How can I install Grub to /dev/sda1
I have formatted a 3.5" 20GB ide hard disk mounted in a USB caddy with seven partitions:
sda1: boot 32M sda2: swap 512M sda3: 2G sda4 ext - sda5 1G; sda6 1G; sda7 12.5G All save swap have been formatted ext2 and I want to try and make my thinkpad and dell be able to boot off this disk. I tried to install grub to this device but it will not recognise the drive number I tried things like root (hd0,0) install (sd0) no go root (hd1,0) install (hd1) no go ... I wonder if this can actually be done this way - I have been reading a bit on how to make a USB boot disk and things still don't quite add up. First step I would like is just to have grub command line so I can use this disk as a rescue and recovery disk - eventually with its own mini kernel and some tools etc... Any tips? Will |
I have rebooted to sus out the BIOS options more fully and find that if I select the USB HDD option at boot I get a grub command line!
I will try too boot to my existing HDD partitions/root from that just to confirm that what I am trying to do is possible. I got errors about drive number when I tried to install grub though - so I am confused - this drive was just formatted so there is no grub on it (surely it is not hung over from a previous partitioning and multiboot exercise - could the mbr still have that original grub installed on it?) Because when the last install was on this drive it had been in a laptop. It would seem that the ThinkPad has no trouble allowing booting from USB drives but will a kernel panic when it tries to load its own USB drivers (/??) much more reading I am guessing - anyone know a tried and trusted way to do this/ ? Will |
Grub supports tab completition, so just type "root (" then <tab> - it'll tell you what it can see. Same applies to "setup", which I think you should be using instead of "install".
Quote from the grub manual re "install"; "This command is fairly complex, and you should not use this command unless you are familiar with GRUB. Use setup (see setup) instead." As for booting a kernel off it, I'd guess you'd need an initrd/initram. Haven't done it, so hopeffully someone else can tell you for sure. |
First you have to tell grub which device you want to work with::
grub> device (hd0) /dev/sda1 Then you can do root (.... And yes, syg00 is correct, use setup, not install. |
All times are GMT -5. The time now is 02:56 PM. |