grub: breaking the 1gb barrierForum: USB booting Topic: grub: breaking the 1gb barrier started by: ~thc Posted by ~thc on Feb. 21 2007,20:26
use extreme caution: several steps mentioned below could ruin your pendrive and/or your harddiskDO NOT COPY AND PASTE COMMANDS - double check what you are doing! I have tested this with a 2 gb pendrive (fat16) / knoppix 5.1.1 and a 512 mb pendrive (fat32) / dsl 2.1. the filenames, directoriy names and grub settings used below are only examples! what you need - an usb pendrive of any size formatted as a hard disk - the first or only partition of this pendrive formatted with a fat filesystem and enough space left for dsl/knoppix - the contents of a dsl (or other knoppix based) cd - a real or virtual computer running a linux installation with grub and usb pendrive support - a pc bios capable of emulating a hard disk booting mechanism for the usb pendrive step by step 1. copy the following dsl/knoppix files to the usb pendrive (cd)/KNOPPIX/KNOPPIX -> (usb)/KNOPPIX/KNOPPIX (cd)/boot/isolinux/kernel_filename -> (usb)/boot/linux (cd)/boot/isolinux/gzipped_miniroot_filename -> (usb)/boot/minirt.gz [starting with knoppix 5 the cd contains essential kernel modules in /KNOPPIX/modules - you will need this directory and all files in it too.] 2. convert isolinux.cfg from the dsl/knoppix cd create a new text file (dos or un*x) namend menu.lst and add those three lines:
the syntax of the boot entries in (cd)/boot/isolinux/isolinux.cfg and grub's menu.lst differ slightly. for every dsl/knoppix isolinux.cfg boot entry like this example
add the corresponding boot entry to menu.lst like this converted example:
another example: a menu.lst file containing only the default dsl 2.1 entry would look like this:
create a directory (usb)/boot/grub. copy the file menu.lst to (usb)/boot/grub 3. prepare the grub install boot the linux installation and mount your usb pendrive (sda1 and /mnt are only examples!)
copy the grub stage loader files from the linux installation to the stick
mark the usb grub directory by putting a unique file there:
4. install grub start grub from the command line.
from the grub shell enter the following commands (hd1 and the grub output are only examples!):
the file "mark" is no longer needed:
the stick should now boot into grub. goodies - grub's stage 1.5 loader reads file systems, not hard disk sectors - you don't have to worry about the geometry or the size of your pendrive. - grub's setup does not alter neither the boot sector of the first (or only) pendrive partition nor the contents of that partition. [the stage 1.5 loader is written to 15 (normally empty and unused) sectors directly following the mbr/partition table.] - if bartpe is (or will be ;) ) installed on your pendrive, you can tell grub to boot it by adding to menu.lst:
|