InstallInstructions
From BCCD 3.0
Contents |
Build a live CD
- Subversion trunk
- Check out the SVN repository: svn co http://bccd-ng.cluster.earlham.edu/svn/bccd-ng/trunk
- cd trunk/bin
- perl build_livecd.pl --arch i386 --outiso <outiso> --suite lenny
- Burn that ISO to a CD, or boot it up in a VM.
- Stable image
- See USB instructions or CD instructions
Liberate that live CD
General Process
- First, get the networking correct, however it's configured when you run the liberation is what's written.
- As root, logged-in to the console, run /bin/bccd-reset-network
- Use the on-board NIC for the BCCD network and give it a non-routable IP (e.g. 192.168.10.1)
- Enable PXE booting on the BCCD network
- As root, run perl /root/liberate.pl --libdev /dev/hard-drive-device --- this clears any exists partitions and LVM data on that drive
- Reboot and boot off that drive.
Known bugs
- Occasionally a diskless node will hang right before a login prompt would normally show up. This is a locking interaction between aufs and NFS that we haven't solved yet. Reboot the node and it should come up normally.
- The diskless VIA boards must have their SATA support disabled in the BIOS. The driver does not stop probing properly if there are no devices attached.
Create a bootable USB drive
Required: BCCD ISO image (here), 512+ MB USB drive, Linux system with syslinux, fdisk, mkfs.vfat
Note: Mac OS X is only supported by booting the BCCD ISO image under VirtualBox, Parallels, or similar virtualization technology. Sample Mac VirtualBox setup
- Login as root.
- Identify your USB drive
- run the command
mount.If running under the virtualbox BCCD ISO, then you will see it mounted as something like /mnt/sda1 or /mnt/sda2. This means your usb device is either /dev/sda or /dev/sdb.dmesgcan help identify USB devices too.
- run the command
- Partition your USB drive using fdisk
- fdisk /dev/(usb_device) [example /dev/sdb]
- [press p at the prompt] to see a list of partitions
- delete all partitions
- If only one partition
- [press d at the prompt]
- if more than one partition, then repeat below for each partition number
- [press d at the prompt]
- [press 1 at the prompt]
- If only one partition
- create a new partiton
- [press n at the prompt]
- [press p at the prompt]
- [press 1 at the prompt]
- press two returns to select 1 as default 1st cylinder and the actual last as the last cylinder
- change the type of the partition to W95 FAT32
- [press t at the prompt]
- [press b at the prompt]
- make partition bootable/active
- [press a at the prompt]
- [press 1 at the prompt]
- [press x at the prompt] to enter expert mode to be able to save changes
- [press w at the prompt] to save changes
- Format the USB drive
- unmount partition, if it is mounted (you'll know if next step fails) [example "umount /dev/sdb1"]
- as root type mkfs.vfat /dev/(usb_partition) [example /dev/sdb1]
- Locate the file mbr.bin by running the command "locate mbr.bin"
- If locate does not find mbr.bin try manually looking for it in a directory called "syslinux"
- If you still can't find it, you can have the system brute-force search with "find / -name mbr.bin -print", but this may take a very long time depending on the size of your disk.
- You will find something like "/KNOPPIX/usr/lib/syslinux/mbr.bin"
- Add the contents of that file to the end of /dev/sdb, for instance by typing the equivalent of
- cat /KNOPPIX/usr/lib/syslinux/mbr.bin >> /dev/sdb
- Run syslinux
- "syslinux -s /dev/(usb_partition)" [example syslinux -s /dev/sdb1 ]
- If you try booting from the USB device now
- You should get a prompt from syslinux when booting from the usb device.
- You should see an error message saying there is no boot image, the next step will fix that.
- Mount the ISO and mount USB drive. (Download the ISO from http://cluster.earlham.edu/bccd-ng/)
- Make an ISO directory. Use "mount -o loop (ISO path) (ISO directory)" to mount the ISO [example mkdir bccd-iso; mount -o loop bccd_latest.iso bccd-iso/]
- Make a USB directory. Use "mount /dev/(usb_partition) (USB directory)" to mount the USB [example mkdir bccd-usb; mount /dev/sdb1 bccd-usb/]
- If you running from a virtual machine, the ISO directory may be already mounted. For instance, with VirtualBox it is at /cdrom
- Copy over all contents from the ISO over to the USB drive, this can take several minutes.
- use "rsync -Plarv (mounted ISO directory)/ (Mounted USB directory)/" [example rsync -Plarv bccd-iso/ bccd-usb/]
- Note: Make sure to include the trailing slashes! See the USAGE section in man rsync(1).
- Copy all the files from the /boot/isolinux directory of the ISO to the root of the USB drive. If there is a file name conflict it's ok to replace the existing file with a new one (cdrom.ico and index.html) [example cp bccd-iso/boot/isolinux/* bccd-usb]
- In USB root, rename isolinux.cfg to syslinux.cfg [example mv bccd-usb/isolinux.cfg bccd-usb/syslinux.cfg]
- Unmount the ISO and the USB [example umount bccd-iso/ ; umount bccd-usb/]
- You should now be able to boot from your USB device
Networking Mojo
- When you liberate the BCCD, whatever network configuration you have when the script is run is copied to the disk as part of the liberation. Make sure everything is accurate and complete before liberating.
- To reconfigure the network follow these steps:
-
/bin/bccd-reset-network
