Use cases - Ubuntu 8.10 on USB device
- System: x86, PC-BIOS
- Description: In this use case Ubuntu 8.10 is booted from USB device. PC-BIOS supports booting from used USB device.
Disk configuration
USB Device
- MBR, PC partition table
- Partition table:
- (hd0,2) - ext2, mount point: / (during boot)
BIOS configuration
- USB Device is set as first boot device.
GRUB installation
- /boot/grub folder is: (hd0,2)/boot/grub
- Core image can be either embedded after MBR or loaded from partition.
- Installed from booted system. No special chroot active.
Additional notes
None.
Usage instructions
One can use grub2 to boot ubuntu with an usbdrive instead of burning a cd.
- download an iso, ie 8.10
- prepare ext2 partition on usbdrive
:# fdisk /dev/sdb
- mount ext2 partition on usbdrive
:# mount /dev/sdb2 ~/usbdrive
- create grub directory on usbdrive
:# mkdir -p ~/usbdrive/boot/grub
- create device.map in grub directory
:# echo (hd0) /dev/sdb>~/usbdrive/boot/grub/device.map
- create grub.cfg in grub directory
:# vim ~/usbdrive/boot/grub/grub.cfg set default=0 set timeout=5 set root=(hd0,2) linux /casper/vmlinuz file=/cdrom/preseed/ubuntu.seed boot=casper initrd=/casper/initrd-gu.gz quiet splash -- initrd /casper/initrd-gu.gz
- install grub on usbdrive
:# grub-install --root-directory=~/usbdrive/ /dev/sdb
- mount the iso image
:# mount -o loop ~/downloads/u8.10.iso ~/isoimage
- copy files to usb drive
:# cp -rfv ~/isoimage/* ~/usbdrive
Thats it!