FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 01-07-2011, 01:01 PM
pk
 
Default Changing boot device with 2.6.36

On 2011-01-07 10:34, J. Roeleveld wrote:
> On Friday 07 January 2011 09:47:28 Jörg Schaible wrote:

> Another option would be to patch the kernel to either support Labels natively
> or to have it include a "scan harddisks in following order:...." option which
> lists which harddisk-drivers (sata/ide/usb) are scanned and in which order.

If I read this correctly[1], then a root file system via partition UUID
will be supported from 2.6.37... Haven't tried it myself yet.

[1]:
http://kernelnewbies.org/LinuxChanges#head-6a19c715952abb48d54c44d3ca5d4c402f500bec
(if the link doesn't work, check *core* changes, first line)

HTH

Best regards

Peter K
 
Old 01-07-2011, 01:23 PM
"J. Roeleveld"
 
Default Changing boot device with 2.6.36

On Friday 07 January 2011 15:01:48 pk wrote:
> On 2011-01-07 10:34, J. Roeleveld wrote:
> > On Friday 07 January 2011 09:47:28 Jörg Schaible wrote:
> >
> > Another option would be to patch the kernel to either support Labels
> > natively or to have it include a "scan harddisks in following
> > order:...." option which lists which harddisk-drivers (sata/ide/usb) are
> > scanned and in which order.
>
> If I read this correctly[1], then a root file system via partition UUID
> will be supported from 2.6.37... Haven't tried it myself yet.
>
> [1]:
> http://kernelnewbies.org/LinuxChanges#head-6a19c715952abb48d54c44d3ca5d4c40
> 2f500bec (if the link doesn't work, check *core* changes, first line)

The way I read it, it looks like UUID can be used as well. Which is a good
step forward.
I'd still prefer LABEL-support though. It's easier to understand for us mere
mortals

--
Joost
 
Old 01-07-2011, 01:53 PM
Andrea Conti
 
Default Changing boot device with 2.6.36

Had to boot this morning 5 times, since the root device switched arbitrarily
between sde3 and sdg3


Try disabling CONFIG_SCSI_SCAN_ASYNC ("Asynchronous SCSI scanning" under
SCSI options). While it is not a solution, this might somewhat reduce
the randomness you are experiencing.


andrea
 
Old 01-07-2011, 04:37 PM
Dale
 
Default Changing boot device with 2.6.36

J. Roeleveld wrote:


Dale, juust out of curiosity here.
Do you have your CD/DVD drive attached using a SATA-cable? Or using an "older"
IDE-cable?

I use AHCI in my BIOS and can boot from CD/DVD. But my DVD-drive is a SATA-
drive.

--
Joost




My DVD drive is connected with a SATA cable. It was sort of odd that it
did that and I plan to check into that more the next time I reboot. I
made the changes so that I could boot from the DVD and when I was done
booting from the DVD, I changed it back including the AHCI part.


Dale

:-) :-)
 
Old 01-08-2011, 12:00 PM
Jörg Schaible
 
Default Changing boot device with 2.6.36

Hi Andrea,

Andrea Conti wrote:

>> Had to boot this morning 5 times, since the root device switched
>> arbitrarily between sde3 and sdg3
>
> Try disabling CONFIG_SCSI_SCAN_ASYNC ("Asynchronous SCSI scanning" under
> SCSI options). While it is not a solution, this might somewhat reduce
> the randomness you are experiencing.

I turned of the flag on the kernel line, but it did not help, root is still
at sde3.

Anyway, thanks for the suggestion,
Jörg
 
Old 01-08-2011, 12:07 PM
Jörg Schaible
 
Default Changing boot device with 2.6.36

Hi Joost,

J. Roeleveld wrote:

> On Friday 07 January 2011 09:47:28 Jörg Schaible wrote:
>> Hi Dale,
>>
>> Dale wrote:
>> > Jörg Schaible wrote:
>> >> that approves my tests ... :-/
>> >>
>> >> Had to boot this morning 5 times, since the root device switched
>> >> arbitrarily between sde3 and sdg3 and I've chosen by bad luck always
>> >> the wrong one. It seems there is also some timing involved regarding
>> >> the initialization of the available devices ... sigh.
>> >>
>> >> - Jörg
>> >
>> > I had to reboot last night and was in my BIOS looking for other things
>> > but did notice this feature. I have a setting in my BIOS that tells it
>> > what drive to look for to boot first. It's above the part where you
>> > tell it to boot CDROM, hard drive, floppy, ZIP and other bootable
>> > things. You may want to check and see if you have the same thing.
>> > Mine
>> > is called "hard disk boot priority". I'm not sure this will help but
>> > it couldn't hurt to check I guess.
>>
>> The first device to try is my HD and as alternative I can only select the
>> CD drive anyway (which is deactivated). At boot time I can still switch
>> into a boot menu of the BIOS to select something else.
>
> This will not affect the order the Linux kernel will identify and label
> the devices.
> It will only affect where the BIOS will look for boot-code.
>
> Simply put, the following happens when a PC boots:
>
> 1) BIOS goes through its self-check
>
> 2) BIOS looks for boot-code on the devices it found in the order
> configured in the BIOS (BIOS -Boot Order)
>
> 3) BIOS runs boot-code
>
> 4) boot-code starts the boot-loader (GRUB)
>
> 5) GRUB loads kernel into memory
>
> 6) starts kernel
>
> 7) kernel detects drives and assigns them names in order of finding them
>
> At this point, it goes wrong as the drivers are not always identified in
> the same order. From what it looks like, on the OPs system, the
> USB-subsystem is scanned before the SATA-controller.
> The easiest solution to this problem would be to ensure that the
> USB-subsystem is not scanned before the boot-device is identified by the
> kernels boot- process.
>
> This can be achieved by configuring the USB-mass-storage support as a
> module.

This is what I did now and it seems the only setup that actually brings back
my root on sda3.

> Another option would be to patch the kernel to either support Labels
> natively or to have it include a "scan harddisks in following order:...."
> option which lists which harddisk-drivers (sata/ide/usb) are scanned and
> in which order.

Yep. Maybe LABELs are supported in future ... it would definitely improve
the situation.

Tanks for your help,
hJörg
 
Old 01-08-2011, 04:11 PM
walt
 
Default Changing boot device with 2.6.36

On 01/08/2011 05:07 AM, Jörg Schaible wrote:

Hi Joost,

J. Roeleveld wrote:


The easiest solution to this problem would be to ensure that the
USB-subsystem is not scanned before the boot-device is identified by the
kernels boot- process.

This can be achieved by configuring the USB-mass-storage support as a
module.


This is what I did now and it seems the only setup that actually brings back
my root on sda3.


Another option would be to patch the kernel to either support Labels
natively or to have it include a "scan harddisks in following order:...."
option which lists which harddisk-drivers (sata/ide/usb) are scanned and
in which order.


Yep. Maybe LABELs are supported in future ... it would definitely improve
the situation.


I'm now using the kernel flag PARTUUID=<uuid number> to boot, and it really
does work. Your kernel will never again try to mount the wrong root disk
(I think this feature was added after 2.6.36. It's very recent.)

The annoying thing is that legacy grub can't do the same, and so it will
try to load the kernel from the wrong disk if the BIOS changes the disk
numbers at boot time.

I've emerged grub-2 to play with but it's quite different from legacy grub
and I don't yet have a good feel for it. If it solves this problem I'll
let you know later.
 
Old 01-08-2011, 08:13 PM
Dale
 
Default Changing boot device with 2.6.36

walt wrote:


I've emerged grub-2 to play with but it's quite different from legacy
grub

and I don't yet have a good feel for it. If it solves this problem I'll
let you know later.





I wouldn't mind a new thread and you posting how it works and all. I
wouldn't mind switching at some point in the near future but would like
someone with hands on experience to describe how the switch went. The
man page and other docs are nice but real live experience is even better.


Dale

:-) :-)
 

Thread Tools




All times are GMT. The time now is 06:40 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org