LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] System boots with disks in random order...

[ILUG] System boots with disks in random order...

Michael Watterson watty at eircom.net
Mon Dec 24 12:23:58 GMT 2007


Rory Byrne wrote:
> On Mon, Dec 24, 2007 at 11:49:53AM +0100, Rory Byrne wrote:
>   
>> On Sun, Dec 23, 2007 at 09:09:35PM +0000, Kevin Lyda wrote:
>>     
>>> I have a linutop box that works very well - until I plug in a second
>>> disk. Then it doesn't tend to boot because the disks come up in a
>>> different order.
>>>
>>>       
>> Hi Kevin,
>>
>> how about adding a fallback entry, so if it fails to boot from 
>> (hd0) it just tries (hd1). 
>>
>>     default 0
>>     fallback 1
>>     
>>     title       Debian GNU/Linux, kernel 2.6.18-3-amd64
>>     root        (hd0,1)
>>     kernel      /boot/vmlinuz-2.6.18-3-amd64 root=/dev/sda2 ro
>>     initrd      /boot/initrd.img-2.6.18-3-amd64
>>     
>>     title       Debian GNU/Linux, kernel 2.6.18-3-amd64
>>     root        (hd1,1)
>>     kernel      /boot/vmlinuz-2.6.18-3-amd64 root=/dev/sda2 ro
>>     initrd      /boot/initrd.img-2.6.18-3-amd64
>>
>>     
>
> Actually, that should have read:
>
>     default saved
>     fallback 1
>
>     title         Debian GNU/Linux, kernel 2.6.18-3-amd64
>     root          (hd0,1)
>     kernel        /boot/vmlinuz-2.6.18-3-amd64 root=/dev/sda2 ro
>     initrd        /boot/initrd.img-2.6.18-3-amd64
>     savedefault   fallback
>
>     title         Debian GNU/Linux, kernel 2.6.18-3-amd64
>     root          (hd1,1)
>     kernel        /boot/vmlinuz-2.6.18-3-amd64 root=/dev/sda2 ro
>     initrd        /boot/initrd.img-2.6.18-3-amd64
>     savedefault
>
> You'd also want to do the following once to make sure the default is 
> set up correctly:
>
>     grub-set-default 0
>
> And you'd need to put an entry in your rc.local file (eg /etc/rc.local) 
> that resets the default back to 0 on a successful boot:
>
>    # /etc/rc.local
>    /usr/sbin/grub-set-default 0
>
> However, I just bothered to read Michael Watterson's post, and it 
> eclipses this one. If you're not already seeing a grub menu when you 
> boot, or being dropped to a grub shell, then nothing I've mentioned here 
> will work. 
>
> Cheers,
>
> Rory
>   
Since both devices are USB, then  both need to be bootable, and the 
different scripts on each mount everything the same way, no matter which 
device was booted from.
Since the kernel does not need to be on the bootable partition, AFAIK  
you  only  need  the Kernel on  one  disk as  long  as  both  disks are 
visible to grub on either disk.

-- 
Mike




More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell