LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices

Reply
 
Search this Thread
Old 02-13-2006, 04:55 PM   #1
stardotstar
Member
 
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?

Will
 
Old 02-13-2006, 05:14 PM   #2
stardotstar
Member
 
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/
?

Will
 
Old 02-13-2006, 06:00 PM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,283

Rep: Reputation: 1028Reputation: 1028Reputation: 1028Reputation: 1028Reputation: 1028Reputation: 1028Reputation: 1028Reputation: 1028
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
leandean
Member
 
Registered: Oct 2005
Location: Burley, WA
Distribution: Sabayon
Posts: 276

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.
 
  


Reply


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


All times are GMT -5. The time now is 09:49 PM.

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