How do you make a usb drive bootable?
I have an 80gb usb drive with 1.8gb swap on partition 2 and the rest is ext3 on partition 1.
I just copied an existing and working Linux filesystem over to this partition and used gparted to mark partition 1 as a boot partition. Is there something I need to do with grub? I've read the readmes and manuals, but I'm hopelessly lost trying to interpret this as far as making a usb drive boot right to the linux kernel within (and I don't want to mess with the host computer's boot sector). Any advice? Thanks! |
change your BIOS to boot off of it
|
Quote:
But how do I use grub to make it actually boot into Linux? Do I need to do something with the menu.lst file? |
It depends on several things.
When You say copy, how did You copy? dd, rsync, cp? It isn't too much messing with boot system on the original. An easy way would be to just add an entry to the end of Your existing boot loaders /boot/grub/menu.lst file, You can try something like this: Code:
title My Old Linux |
You must do the following to boot a distro, originally installed in another disk, in the 1st partition of an external hard disk
(1) Edit menu.lst so that (a) the partition and disk numbers correspond to the USB disk position and this should be (hd0,0) and (b) amend the "kernel" statement with the parameter "root=" corresponding to the new partition reference. For example the 1st partition of a bootable USB disk would be sda1 but your Linux may be installed in device hda3. The change should therefore from root=/dev/hda3 to root=/dev/sda1. (2) Do the same as Item 1b for /etc/fstab (3) Edit /boot/grub/device.map to reflect the (hd0) is now sda (4) Restore the boot loader. Say boot up by a Live CD and activate a Grub shell in root console the command would be Code:
grub |
All times are GMT -5. The time now is 06:46 PM. |