MAKING A BOOT CD for Bering (Alternate Method). (formating probably messed as text).
I used this to get an older box that would not boot a CD ROM to boot from a combination CD and floppy. I used the uClibc Bering 1.1 iso image.
1. Download the iso and burn the CD for uClibc Bering.
1.1 Use Winimage to make a bootable diskette from the file bootdisk.ima that is on the CD.
2. Mark this diskette “Bering Setup”
2.1 boot this diskette with the uClibc CD in the drive.
2.2 login as root. q to quit the menu
2.3 mount -t msdos /dev/fd0 /mnt
cd /mnt
2.4 ae syslinux.cfg and delete everything starting with LRP= to the end of the line. Make sure there is only one carriage return at the end of the line.
Your syslinux.cfg file should now look like this:
display syslinux.dpy
timeout 0
default linux initrd=initrd.lrp init=linuxrc rw root=/dev/rom0 boot=dev/fd0:msdos PKGPATH=/dev/cdrom:iso9660,/dev/fd0:msdos
PS There is a message from Charles who built the parent to Bering that the boot= has to do with where the files are backed up to - not where they boot from. I leave the boot=/dev/fd0:msdos.
2.5 ae lrpkg.cfg
make a single line with all the packages you want separated by commas with a single carriage return at the end of the line. For example:
etc,local,modules,iptables,shorwall,dhcpd,dnscache,tinydns,libz,weblet,sshd,ulogd
2.6 Boot this diskette. The LRPs in lrpkg.cfg will load from the CD. If everything loads correctly, then make a copy of this diskette and mark it “Boot Loader”. You can make a copy using diskcopy on a Windows machine. Set this diskette aside for making your bootable CD later.
3. Configure the router / firewall
3.1 Boot the floppy / CD combo using the “Bering Setup” diskette. The packages listed in lrpkg.cfg should all load from the CD.
3.2 Configure the router using the instructions from the Bering and Shorewall sites.
To find the modules for your network cards
cd /cdmnt/lib/modules/2.4.20/kernel/drivers/net
If you need the tulip driver it is in a subdirectory
cd tulip
cp tulip.o /lib/modules/tulip.o
cd /lib/modules and delete unused modules to save space on the floppy.
rm ne.o
rm 8390.o
etc etc ...
(The original Dachstein loaded the modules right off the CD - don't know why Bering doesn't)
3.3 To make the ssh encryption keys
passwd and give root a secure password with letters and numerals. Don’t forget it. You may have to replace the etc.lrp if you forget the password.
cd /cdmnt
lrpkg -i sshkey
makekey
3.4 Change the backup destination for the packages that you modified to full fd0. For example: from the backup menu: d 3 and select 1 for fd0 full backup. Do not backup any programs that you have not modified - or you will run out of room on the 1.44 boot diskette. LRPs that you DO NOT need to backup are: root, weblet, libz, ulogd, local, dnscache, iptables. Packages that you will need to backup are etc, modules, shorwall, sshd
NOTE: YOU CAN’T BACKUP to a mounted fd0. umount /mnt before backing up.
3.5 mount -t msdos /dev/fd0 /mnt
ae lrpkg.cfg
add a :R to the programs that you have full backups on the floppy.
etc:R,local,modules:R,iptables,shorwall:R,dhcpd:R,dnscache,tinydns:R,ulogd,libz,weblet,sshd:R,ulogd
3.6 use df to check how much space you have left on your boot floppy.
3.7 type reboot
3.8 The system should boot by loading unmodified LRPs from the CD and modified ones from the floppy.
3.9 Continue to make adjustments to your scripts until everything works. Backup the changed LRPs to the “Bering Setup” floppy. At this stage you have a functional router / firewall that boots from a floppy and loads programs from the CD and from the floppy.
4 I added this to the end of the system wide profile - 2 - 5 from the beginning of the lrcfg menu
umount /cdmnt
backup etc to save
I don’t like the idea of running the Bering box with the CD mounted. I know it is Read Only - but there are utilities on the CD . . .
4.1 If you change the name of your firewall you must change it in two places.
/etc/hosts does not have a carriage return at the end of the file
hostname has a single carriage return.
be careful about adding an extra carriage return in either of these locations. If you do - the boot will hang for 2 minutes at klogd.
AN ALTERNATE METHOD FOR BUILDING A BOOTABLE CD
1. If you have made any changes to your lrpkg.cfg then using the “Bering Setup” diskette
Mount -t msdos /dev/fd0 /mnt
cp /mnt/lrpkg.cfg /tmp/lrpkg.cfg
unount /mnt
ae /tmp/lrpkg.cfg
remove all the :Rs. Make sure there is only a single carriage return at the end of the line.
Put in the floppy marked “Boot Loader”
mount -t msdos /dev/fd0 /mnt
cp /tmp/lrpkg.cfg /mnt/lrpkg,cfg
2. Make a directory uClibc on the machine you will use to burn the cd.
Copy all the LRPs from the original uClibc CD to this directory. Don’t copy stuff that could be a security risk - such as telnetd.lrp. Copy the “lib” folder with all its subfolders.
Copy the LRPs that you backed up to the “Bering Setup” diskette (overwrite the unmodified LRPs). Overwrite [etc.lrp, shorwall.lrp, sshd.lrp, tinydns.lrp, and dhcpd.lrp (if you configured it to assign static IPs to your hosts)].
3. I burned the CD with Nero in Windows.
Exit the wizard when Nero starts.
From the File menu - click New Compilation
Select from the list on the Left - “CD-ROM (Boot)”
Put the “Boot Loader” floppy in the a: drive of the machine used to make the CD. Click the BOOT tab and select source of boot image as a:\
Copy and paste all the files in your uClibc directory onto into the CD configuration.
Copy and paste the “lib” folder with all its subfolders.
Burn the new CD
4. You should now have a tested bootable Bering uClibc CD.
If your machine will not boot from the CD - use the “Boot Loader” floppy to boot the Bering LEAF box and the packages will load already configured from the CD.
It has been reported that some older BIOSs will boot a CD with this method but not with the method in the Bering manual. I cannot attest to this.
-- Victor McAllister
-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger for complex code. Debugging C/C++ programs can leave you feeling lost and disoriented. TotalView can help you find your way. Available on major UNIX and Linux platforms. Try it free. www.etnus.com
------------------------------------------------------------------------
leaf-user mailing list: [EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/leaf-user
SR FAQ: http://leaf-project.org/pub/doc/docmanager/docid_1891.html