Tuesday, July 27, 2010

Using the Live CD from a USB Floppy Drive Installing a Ubuntu Full File System

Converting the Live CD to a bootable USB floppy drive requires at least a 1-GB thumb drive.

1. Start a shellwith root privileges. This is done for convenience since nearly every command must be done as root.

sudo bash


2. Unmount and blank the thumb drive.


3. Format the disk as one big FAT16 drive. The -I parameter to mkdosfs says to format the entire device. In this example, the USB drive is /dev/sdc.

mkdosfs -I -F 16 /dev/sdc
sync


4. Mount the Live CD and the USB drive:

mkdir /mnt/usb
mkdir /mnt/iso
mount -o loop ubuntu-8.04.3-desktop-i386.iso /mnt/iso/
mount /dev/sdc /mnt/usb


5. Copy over the files. This can take 20 minutes or longer. Go watch TV or have lunch. Also, ignore the errors about symbolic links, since FAT16 does not support them.

cp -rpx /mnt/iso/* /mnt/usb/
sync


6. Set up the files for a bootable disk. Since SYSLINUX does not support subdirectories for kernel files, you need to move these to the top directory on the USB drive.

# move the kernel files and memory tester
mv /mnt/usb/casper/vmlinuz /mnt/usb/vmlinuz
mv /mnt/usb/casper/initrd.gz /mnt/usb/initrd.gz
mv /mnt/usb/install/mt86plus /mnt/usb/mt86plus
# move boot files to top of the drive
mv /mnt/usb/isolinux/* /mnt/usb/
mv /mnt/usb/isolinux.cfg /mnt/usb/syslinux.cfg
rm /mnt/usb/isolinux.bin
# Optional: Delete Windows tools and ISO files to free space
rm -rf /mnt/usb/start.* /mnt/usb/autorun.inf
rm /mnt/usb/bin /mnt/usb/programs
rm -rf /mnt/usb/isolinux
# All done
sync


7. Edit the /mnt/usb/syslinux.cfgfile and correct the kernel paths.Remove the paths /casper/ and /install/wherever you see them. This is because Step 6 moved the files to the root of the USB drive. There should be eight occurrences of /casper/ and one of /install/. After you write your changes, run sync.


8. Unmount the drive and make it bootable:

umount /mnt/usb
syslinux /dev/sdc
sync
eject /dev/sdc
exit # leave the root shell

The USB thumb drive should now be bootable! You can run the Ubuntu Live operating system or install the operating system from this USB thumb drive. For customization, you can change the boot menu by editing the /mnt/usb/syslinux.cfg file and modifying the kernels.

Source of Information : Wiley Ubuntu Powerful Hacks And Customizations

No comments: