LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Grub, Stage1, and GRUB/BIOS detection of external hard drive (https://www.linuxquestions.org/questions/linux-newbie-8/grub-stage1-and-grub-bios-detection-of-external-hard-drive-710418/)

godfigure 03-10-2009 02:09 AM

Grub, Stage1, and GRUB/BIOS detection of external hard drive
 
Ladies and Gentlemen (no offense meant).

I have run out of ideas, and so has the Net Forums.

Interesting problem: I have a MyBook connected via eSata internal PCI card. When this external drive is powered off, my hdX architecture looks normal (sda,sdb,sdc,sdd, MyBook powered later as 'sde' ) at boot time, when GRUB takes control. XP is on hda0, and /boot/[Ubuntu 8.10] is on hda1.

BUT....When the eSATA is powered at boot time, it precedes my IDE drive (0,0) and the takes the 'sda' position.

This behavior is probably obvious to some to be troublesome, as it displaces my boot partition from GRUB (hda,1) to (hdb,1). Interestingly, XP is unaffected, I suppose the writers of GRUB used wide latitude in giving the opportunity for Windows users to regain their distaste for the OS.

I know ONE solution is to leave the MyBook unpowered and drive home to power it up when I want to access it, but I would prefer to be able to work the solution, and remote reboot without adding commuting to the mix.

An added note:

I have the Menu to set fallbacks in case of failure to try the Ubuntu boot on the (hdb,1) as the first fallback if there is a failure. However, when the failure 'cannot find /boot image' (error 15, if I'm recall) the stage1 doesn't panic?? just drops to the shell..initramd -- Which I can drive home and hit <CTRL+ALT+DELETE> and the fallback takes hold and loads from the correct partition.

Can I change the behavior of the Stage1 portion via some command line 'stunt' of GRUB so it reboots automatically upon general errors, certain errors, or no matter what? Would this require me to get the source to Stage1 and rewrite the code, optimize for space (something I never cared about before --scary)? Or is there something out there already.

Or am I missing a simple solution that doesn't involve manually operation of the machine?

Thanks for any ideas you have -- I hope it is interesting.

G

syg00 03-10-2009 02:51 AM

Nothing (directly) to do with grub - that's a BIOS issue. Grub was generated expecting to be on the "first" hard disk as indicated by the BIOS (it's just a flag setting). If some-one stuffs another disk in there as the first (0x80) disk, grub will happily go looking there for its stage files.
Can you set the (BIOS) boot order to have the external last ? - possibly not if it's not present all the time.
Sorry, can't think of any other obvious solution off the top of my head.


All times are GMT -5. The time now is 06:59 AM.