Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 02-13-2006, 04:55 PM   #1
Registered: Nov 2002
Location: /au/qld/bne/4157
Distribution: Gentoo mactel-linux
Posts: 238

Rep: Reputation: 30
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?

Old 02-13-2006, 05:14 PM   #2
Registered: Nov 2002
Location: /au/qld/bne/4157
Distribution: Gentoo mactel-linux
Posts: 238

Original Poster
Rep: Reputation: 30
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/

Old 02-13-2006, 06:00 PM   #3
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 15,811

Rep: Reputation: 2168Reputation: 2168Reputation: 2168Reputation: 2168Reputation: 2168Reputation: 2168Reputation: 2168Reputation: 2168Reputation: 2168Reputation: 2168Reputation: 2168
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.
Old 02-13-2006, 09:55 PM   #4
Registered: Oct 2005
Location: Burley, WA
Distribution: Sabayon, Debian
Posts: 278

Rep: Reputation: Disabled
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.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
USB drive... /dev/sda1 doesn't show unless I try mounting /dev/sda as vfat finite Linux - Hardware 8 03-10-2009 12:52 AM
What is /dev/sda1? BajaNick Linux - General 6 03-16-2005 01:17 AM
Grub Dual Boot /dev/sda1 /dev/hda1 jono268 Debian 4 01-14-2005 04:54 AM
/dev/sda and /dev/sda1 disappeared using sii3112A striderstrahan Linux - Software 0 09-16-2004 05:00 AM
USB Compact flash card reader hotplug creates /dev/sda but no /dev/sda1 -Mandrake 9.1 bibinono Linux - Hardware 2 08-11-2003 09:37 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:55 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration