[gentoo-user] Re: Can't find init due to inconsistent drive order

2013-07-02 Thread Grant Edwards
On 2013-07-01, Grant Edwards grant.b.edwa...@gmail.com wrote:

 I've just recently run into a problem where sometimes when a machine
 boots, the kernel can't find init.  This appears to be because my grub
 configuration line says root=/dev/sda5 and _sometimes_ the drive
 that contains my root partition is sdb instead of sda. AFAICT, for the
 past 30 years the linux kernel was 100% consistent in the order that
 hard drives were labelled -- but recently that has seems to have
 changed.

I still haven't figured out why my drives suddenly started getting
discovered in varying orders.  I think that the SATA drives are always
in the same order with respect to each other, but sometimes the
external firewire drive gets discovered before the SATA drives and
sometimes after the SATA drives.

It looks like my options are:

 1) Keep hitting the reset button until it works.

 2) Unplug or power down the firewire drive when booting. 

 3) Set up an initrd for the sole purpose of finding the actual root
parition via filesystem label.  [I find this idea rather offensive.]

 4) Build the firewire drive as a module instead of building it into
the kernel.  That would delay the discovery of the firewire drive
until after root has been mounted.

 5) For the drive with the root parition on it switch from a DOS
parition table to a GPT partition table and use the
root=PARTUUID=whatever kernel option.

 6) Fix the kernel so it can find root by looking at filesystem
labels.

Number 6 (fixing the kernel) is The Right Thing To Do(tm), but it's a
bit out of scope for the momement.  The early code in the kernel
obviously knows how to read partition tables and also knows about the
relevent file system, so I'm a bit baffled why it can't look at the
file system label.

Changing the firewire driver to be a module is probably the simplest
solution, but it's a kludgy work-around for what is, in my opinion, a
kernel bug: if you are going to require people to specify an absolute
disk drive index for the root partition, then you'd better index
drives in a consistent order from one boot to the next.

Switching to a GPT partition table sounds like the cleanest solution,
but I need to figure out if the grub (legacy) ebuild includes GPT
support or not.  I know it's supported by grub2, but I don't really
feel like switching to grub2 ATM.

-- 
Grant Edwards   grant.b.edwardsYow! But was he mature
  at   enough last night at the
  gmail.comlesbian masquerade?




Re: [gentoo-user] Re: Can't find init due to inconsistent drive order

2013-07-02 Thread Randolph Maaßen
2013/7/2 Grant Edwards grant.b.edwa...@gmail.com

 On 2013-07-01, Grant Edwards grant.b.edwa...@gmail.com wrote:

  I've just recently run into a problem where sometimes when a machine
  boots, the kernel can't find init.  This appears to be because my grub
  configuration line says root=/dev/sda5 and _sometimes_ the drive
  that contains my root partition is sdb instead of sda. AFAICT, for the
  past 30 years the linux kernel was 100% consistent in the order that
  hard drives were labelled -- but recently that has seems to have
  changed.

 I still haven't figured out why my drives suddenly started getting
 discovered in varying orders.  I think that the SATA drives are always
 in the same order with respect to each other, but sometimes the
 external firewire drive gets discovered before the SATA drives and
 sometimes after the SATA drives.

 It looks like my options are:

  1) Keep hitting the reset button until it works.

  2) Unplug or power down the firewire drive when booting.

  3) Set up an initrd for the sole purpose of finding the actual root
 parition via filesystem label.  [I find this idea rather offensive.]

  4) Build the firewire drive as a module instead of building it into
 the kernel.  That would delay the discovery of the firewire drive
 until after root has been mounted.

  5) For the drive with the root parition on it switch from a DOS
 parition table to a GPT partition table and use the
 root=PARTUUID=whatever kernel option.


You don't need to switch to GPT for that. I have a DOS partitioned disk and
blkid prints the LABEL and UUID for each partition.


  6) Fix the kernel so it can find root by looking at filesystem
 labels.

 Number 6 (fixing the kernel) is The Right Thing To Do(tm), but it's a
 bit out of scope for the momement.  The early code in the kernel
 obviously knows how to read partition tables and also knows about the
 relevent file system, so I'm a bit baffled why it can't look at the
 file system label.

 Changing the firewire driver to be a module is probably the simplest
 solution, but it's a kludgy work-around for what is, in my opinion, a
 kernel bug: if you are going to require people to specify an absolute
 disk drive index for the root partition, then you'd better index
 drives in a consistent order from one boot to the next.

 Switching to a GPT partition table sounds like the cleanest solution,
 but I need to figure out if the grub (legacy) ebuild includes GPT
 support or not.  I know it's supported by grub2, but I don't really
 feel like switching to grub2 ATM.

 --
 Grant Edwards   grant.b.edwardsYow! But was he mature
   at   enough last night at the
   gmail.comlesbian masquerade?





-- 
Mit freundlichen Grüßen / Best regards

Randolph Maaßen


Re: [gentoo-user] Re: Can't find init due to inconsistent drive order

2013-07-02 Thread Wang Xuerui
2013/7/2 Grant Edwards grant.b.edwa...@gmail.com:
 It looks like my options are:

 snip

  5) For the drive with the root parition on it switch from a DOS
 parition table to a GPT partition table and use the
 root=PARTUUID=whatever kernel option.

 Switching to a GPT partition table sounds like the cleanest solution,
 but I need to figure out if the grub (legacy) ebuild includes GPT
 support or not.  I know it's supported by grub2, but I don't really
 feel like switching to grub2 ATM.

I'm not exactly sure about your system's setup, but msdos partition
tables can also hold partition UUIDs, which can be seen by running
blkid. So, such a solution does not necessarily imply a GPT-based
setup... you can experiment with it a bit, having fun tweaking kernel
parameters :)



Re: [gentoo-user] Re: Can't find init due to inconsistent drive order

2013-07-02 Thread Daniel Frey
On 07/02/2013 07:23 AM, Grant Edwards wrote:
 On 2013-07-01, Grant Edwards grant.b.edwa...@gmail.com wrote:
 
 
  2) Unplug or power down the firewire drive when booting. 
 

I had this problem on my Intel motherboard, and found out you can
disable booting from external drives. Boot to removable devices or
similar in the BIOS. Failing that, changing the boot order so that the
firewire/USB device is at the very end of the boot list may help your
situation.

 
 Number 6 (fixing the kernel) is The Right Thing To Do(tm), but it's a
 bit out of scope for the momement.  The early code in the kernel
 obviously knows how to read partition tables and also knows about the
 relevent file system, so I'm a bit baffled why it can't look at the
 file system label.
 

Is CONFIG_EDD set?

CONFIG_EDD:


  Say Y or M here if you
want to enable BIOS Enhanced Disk Drive Services real mode BIOS calls to
determine which disk
BIOS tries boot from.  This information is then exported via sysfs.


Dan



[gentoo-user] Re: Can't find init due to inconsistent drive order

2013-07-02 Thread Grant Edwards
On 2013-07-02, Randolph Maa?en r.maasse...@gmail.com wrote:
 2013/7/2 Grant Edwards grant.b.edwa...@gmail.com

 It looks like my options are:

[...]

  5) For the drive with the root parition on it switch from a DOS
 parition table to a GPT partition table and use the
 root=PARTUUID=whatever kernel option.

 You don't need to switch to GPT for that. I have a DOS partitioned disk and
 blkid prints the LABEL and UUID for each partition.

And you can pass those values to the kernel via  the root= parameter?

-- 
Grant Edwards   grant.b.edwardsYow! NEWARK has been
  at   REZONED!!  DES MOINES has
  gmail.combeen REZONED!!




Re: [gentoo-user] Re: Can't find init due to inconsistent drive order

2013-07-02 Thread Randolph Maaßen
2013/7/2 Grant Edwards grant.b.edwa...@gmail.com

 On 2013-07-02, Randolph Maa?en r.maasse...@gmail.com wrote:
  2013/7/2 Grant Edwards grant.b.edwa...@gmail.com

  It looks like my options are:
 
 [...]
 
   5) For the drive with the root parition on it switch from a DOS
  parition table to a GPT partition table and use the
  root=PARTUUID=whatever kernel option.
 
  You don't need to switch to GPT for that. I have a DOS partitioned disk
 and
  blkid prints the LABEL and UUID for each partition.

 And you can pass those values to the kernel via  the root= parameter?


Yep.
The G in GPT just means that the type of the partition is stored as
GUID/UUID. The partition ID is a separate value.


 --
 Grant Edwards   grant.b.edwardsYow! NEWARK has been
   at   REZONED!!  DES MOINES
 has
   gmail.combeen REZONED!!





-- 
Mit freundlichen Grüßen / Best regards

Randolph Maaßen


Re: [gentoo-user] Re: Can't find init due to inconsistent drive order

2013-07-02 Thread Bruce Hill
On Tue, Jul 02, 2013 at 02:42:15PM +, Grant Edwards wrote:
 
  You don't need to switch to GPT for that. I have a DOS partitioned disk and
  blkid prints the LABEL and UUID for each partition.
 
 And you can pass those values to the kernel via  the root= parameter?

That still requires an initrd/initramfs, iirc.
-- 
Happy Penguin Computers   ')
126 Fenco Drive   ( \
Tupelo, MS 38801   ^^
supp...@happypenguincomputers.com
662-269-2706 662-205-6424
http://happypenguincomputers.com/

A: Because it messes up the order in which people normally read text.   

   
Q: Why is top-posting such a bad thing? 

   
A: Top-posting. 

   
Q: What is the most annoying thing in e-mail?

Don't top-post: http://en.wikipedia.org/wiki/Top_post#Top-posting



[gentoo-user] Re: Can't find init due to inconsistent drive order

2013-07-02 Thread Grant Edwards
On 2013-07-02, Daniel Frey djqf...@gmail.com wrote:
 On 07/02/2013 07:23 AM, Grant Edwards wrote:
 On 2013-07-01, Grant Edwards grant.b.edwa...@gmail.com wrote:
 
 
  2) Unplug or power down the firewire drive when booting. 
 

 I had this problem on my Intel motherboard, and found out you can
 disable booting from external drives. Boot to removable devices or
 similar in the BIOS. Failing that, changing the boot order so that the
 firewire/USB device is at the very end of the boot list may help your
 situation.

The problem isn't that the BIOS is booting the wrong drive.  The BIOS
is booting the correct drive, grub is starting, grub is loading the
correct kernel.  When the _kernel_ runs it (sometimes) identifies disk
drives in the wrong order and tries to mount the root directory from
the wrong drive.

 Number 6 (fixing the kernel) is The Right Thing To Do(tm), but it's a
 bit out of scope for the momement.  The early code in the kernel
 obviously knows how to read partition tables and also knows about the
 relevent file system, so I'm a bit baffled why it can't look at the
 file system label.
 

 Is CONFIG_EDD set?

 CONFIG_EDD:

 Say Y or M here if you want to enable BIOS Enhanced Disk Drive
 Services real mode BIOS calls to determine which disk BIOS tries boot
 from.  This information is then exported via sysfs.

This has nothing to do with what disk drive the BIOS tries to boot
from (there's no problem with that).

-- 
Grant Edwards   grant.b.edwardsYow! I'm wearing PAMPERS!!
  at   
  gmail.com




[gentoo-user] Re: Can't find init due to inconsistent drive order

2013-07-02 Thread Grant Edwards
On 2013-07-02, Bruce Hill da...@happypenguincomputers.com wrote:
 On Tue, Jul 02, 2013 at 02:42:15PM +, Grant Edwards wrote:

 You don't need to switch to GPT for that. I have a DOS partitioned disk and
 blkid prints the LABEL and UUID for each partition.
 
 And you can pass those values to the kernel via  the root= parameter?

 That still requires an initrd/initramfs, iirc.

The PARTUUID= parition specifier format is handled directly by kernel
code, so I don't see why it should require an initrd (unless the UUID
values for MBR partitions aren't actually something the kernel knows
about and are something made up from whole cloth by the blkid program)

-- 
Grant Edwards   grant.b.edwardsYow! ... I have read the
  at   INSTRUCTIONS ...
  gmail.com




Re: [gentoo-user] Re: Can't find init due to inconsistent drive order

2013-07-02 Thread Neil Bothwick
On Tue, 2 Jul 2013 15:16:15 + (UTC), Grant Edwards wrote:

 The PARTUUID= parition specifier format is handled directly by kernel
 code, so I don't see why it should require an initrd (unless the UUID
 values for MBR partitions aren't actually something the kernel knows
 about and are something made up from whole cloth by the blkid program)

MBRs don't have PARTUUIDs do they? Don't confuse them with filesystem
UUIDs as used in fstab.


-- 
Neil Bothwick

Oops. My brain just hit a bad sector.


signature.asc
Description: PGP signature


Re: [gentoo-user] Re: Can't find init due to inconsistent drive order

2013-07-02 Thread Neil Bothwick
On Tue, 2 Jul 2013 15:09:28 + (UTC), Grant Edwards wrote:

  I had this problem on my Intel motherboard, and found out you can
  disable booting from external drives. Boot to removable devices or
  similar in the BIOS. Failing that, changing the boot order so that the
  firewire/USB device is at the very end of the boot list may help your
  situation.  
 
 The problem isn't that the BIOS is booting the wrong drive.  The BIOS
 is booting the correct drive, grub is starting, grub is loading the
 correct kernel.  When the _kernel_ runs it (sometimes) identifies disk
 drives in the wrong order and tries to mount the root directory from
 the wrong drive.

And the BIOS order can affect the order in which the kernel sees the
drives, so it is worth trying.

I'd go for the firewire-as-a-module approach and add the module
to /etc/conf.d/modules to make sure it is loaded ASAP. Yes, it is a
kludge, but it is the simplest solution from a practical POV.


-- 
Neil Bothwick

Processor: (n.) a device for converting sense to nonsense at the speed
   of electricity, or (rarely) the reverse.


signature.asc
Description: PGP signature


[gentoo-user] Re: Can't find init due to inconsistent drive order

2013-07-02 Thread Grant Edwards
On 2013-07-02, Randolph Maa?en r.maasse...@gmail.com wrote:
 2013/7/2 Grant Edwards grant.b.edwa...@gmail.com

 I still haven't figured out why my drives suddenly started getting
 discovered in varying orders. [...]

 It looks like my options are:

[...]

  5) For the drive with the root parition on it switch from a DOS
 parition table to a GPT partition table and use the
 root=PARTUUID=whatever kernel option.

 You don't need to switch to GPT for that.


All the references Google can find for me say that you have to use a
GPT partition table if you want to specify a boot partition using
root=PARTUUID=partition-uuid.

Does the root=PARTUUID option work for you?

Can you point to some documentation on how you can use
root=PARTUID=partition-uuid with an DOS/MBR partition table?

 I have a DOS partitioned disk and blkid prints the LABEL and UUID
 for each partition.

Anybody can write a program to gnerate and print a UUID for a
partition.  What matters is what the _kernel_ thinks the partition
UUID is.

I added some printk() calls to the kernel mount code to print out the
parition UUIDs.  They don't match the UUIDs printed by blkid:

  kernel   blkid
   sector  UUID UUID

sda1  64  0004c99d-0166E1C3CF7C012A2E
sda2   209715264  0004c99d-02e9a3eb9e-10d0-4075-aacf-018219cf77a3
sda3   211812416  null n/a
sda4   n/a  n/a  n/a
sda5   211812480  0004c99d-05ab4724ab-9030-4217-8582-00f0abe1a48e
sda6   421527744  0004c99d-06n/a
sda7   429916416  0004c99d-0713c0fbde-db8a-4784-861a-b3f4e4cdd8f5
sda8   639631680  0004c99d-08d0f87d87-002c-4d12-b5f3-193d9b0bebee
sda9   849346944  0004c99d-0903c479f0-ecf8-4060-885b-b350368deee8
sda10 1059062208  0004c99d-0a60acb3d3-ce8e-48ce-b197-858bc51a74ea
sda11 1268777472  0004c99d-0bn/a
sda12 1478492736  0004c99d-0cn/a
sda13 1688208000  0004c99d-0dn/a
sda14 1897923264  0004c99d-0en/a

IOW, it appears that the blkid program is either just making stuff
up or its the filesystem UUID rather than the partition UUID. I
suspect the latter, since I notice that blkid doesn't print a UUID for
paritions that don't have filesystems.

One might think that one could use root=PARTUUID=0004c99d-06 instead
of root=/dev/sda5, but the kernel will reject any partition UUID
strings shorter than 36 characters.

-- 
Grant Edwards   grant.b.edwardsYow! ... I see TOILET
  at   SEATS ...
  gmail.com




Re: [gentoo-user] Re: Can't find init due to inconsistent drive order

2013-07-02 Thread Neil Bothwick
On Tue, 2 Jul 2013 16:57:26 + (UTC), Grant Edwards wrote:

 IOW, it appears that the blkid program is either just making stuff
 up or its the filesystem UUID rather than the partition UUID. I
 suspect the latter, since I notice that blkid doesn't print a UUID for
 paritions that don't have filesystems.

UUIDs are for filesystems, PARTUUIDs ae for partitions - blkid prints
both, but only if both are present, which requires a GPT partition table.


-- 
Neil Bothwick

A man needs a mistress - just to break the monogamy


signature.asc
Description: PGP signature


[gentoo-user] Re: Can't find init due to inconsistent drive order

2013-07-02 Thread Grant Edwards
On 2013-07-02, Neil Bothwick n...@digimed.co.uk wrote:
 On Tue, 2 Jul 2013 16:57:26 + (UTC), Grant Edwards wrote:

 IOW, it appears that the blkid program is either just making stuff
 up or its the filesystem UUID rather than the partition UUID. I
 suspect the latter, since I notice that blkid doesn't print a UUID for
 paritions that don't have filesystems.

 UUIDs are for filesystems, PARTUUIDs ae for partitions - blkid prints
 both, but only if both are present, which requires a GPT partition table.

I found some references to blkid at one time generating PARTUUID
values for MBR partitions, but that feature got removed.

-- 
Grant Edwards   grant.b.edwardsYow! How's the wife?
  at   Is she at home enjoying
  gmail.comcapitalism?




Re: [gentoo-user] Re: Can't find init due to inconsistent drive order

2013-07-02 Thread Paul Hartman
On Tue, Jul 2, 2013 at 11:57 AM, Grant Edwards
grant.b.edwa...@gmail.com wrote:


 All the references Google can find for me say that you have to use a
 GPT partition table if you want to specify a boot partition using
 root=PARTUUID=partition-uuid.

 Does the root=PARTUUID option work for you?

 Can you point to some documentation on how you can use
 root=PARTUID=partition-uuid with an DOS/MBR partition table?

As Neil alluded to, you can use UUID with MBR (instead of PARTUUID and
GPT). I have DOS/MBR partition table and my kernel commandline looks
like:

root=UUID=1d21fa55-0fa9-4d43-8d41-8b4193900efa ro log_buf_len=1M quiet
rootfstype=ext4 raid=noautodetect

(along with an initramfs)



[gentoo-user] Re: Can't find init due to inconsistent drive order

2013-07-02 Thread Grant Edwards
On 2013-07-02, Paul Hartman paul.hartman+gen...@gmail.com wrote:
 On Tue, Jul 2, 2013 at 11:57 AM, Grant Edwards
grant.b.edwa...@gmail.com wrote:

  5) For the drive with the root parition on it switch from a DOS
 parition table to a GPT partition table and use the
 root=PARTUUID=whatever kernel option.

 You don't need to switch to GPT for that.

 All the references Google can find for me say that you have to use a
 GPT partition table if you want to specify a boot partition using
 root=PARTUUID=partition-uuid.

 Does the root=PARTUUID option work for you?

 Can you point to some documentation on how you can use
 root=PARTUID=partition-uuid with an DOS/MBR partition table?

 As Neil alluded to, you can use UUID with MBR (instead of PARTUUID and
 GPT). I have DOS/MBR partition table and my kernel commandline looks
 like:

 root=UUID=1d21fa55-0fa9-4d43-8d41-8b4193900efa ro log_buf_len=1M quiet
 rootfstype=ext4 raid=noautodetect

 (along with an initramfs)

Yes, we've already discussed that if you have an initrd (or
initramfs), and an 'init' program that handles it, you can use
filesystem labels and filesystem uuids.

The option we were discussing in the posting to which you replied is
that of using the root=PARTUUID method which is handled directly by
the kernel.  I said that requires switching from MBR to GPT, and was
told You don't need to switch to GPT for that. The evidence for that
last statement seemed to be the fact the 'blkid' command prints out
filesystem UUIDs.

I tried using root=PARTUUID= with an MBR and the UUID values printed
by 'blkid': it didn't work.  I even modified the kernel to show the
kernel's partition UUIDs that were being compared against.

I still maintain that you _do_ need to switch to GPT to use
root=PARTUUID but would welcome any evidence or documentation that
indicates otherwise.

-- 
Grant Edwards   grant.b.edwardsYow! The Korean War must
  at   have been fun.
  gmail.com




[gentoo-user] Re: Can't find init due to inconsistent drive order

2013-07-02 Thread Grant Edwards
On 2013-07-02, Randolph Maa?en r.maasse...@gmail.com wrote:
 2013/7/2 Grant Edwards grant.b.edwa...@gmail.com

 On 2013-07-02, Randolph Maa?en r.maasse...@gmail.com wrote:
 2013/7/2 Grant Edwards grant.b.edwa...@gmail.com

 It looks like my options are:

 [...]

  5) For the drive with the root parition on it switch from a DOS
 parition table to a GPT partition table and use the
 root=PARTUUID=whatever kernel option.

 You don't need to switch to GPT for that. I have a DOS partitioned
 disk and blkid prints the LABEL and UUID for each partition.

 And you can pass those values to the kernel via  the root= parameter?

 Yep. The G in GPT just means that the type of the partition is stored
 as GUID/UUID. The partition ID is a separate value.

I think you're confusing the partition UUID and the filesystem UUID
(which I believe is what's printed by blkid).

GPT provides a partition UUID you can use to tell the kernel where
root is.  DOS/MBR does not.

-- 
Grant Edwards   grant.b.edwardsYow! I just had my entire
  at   INTESTINAL TRACT coated
  gmail.comwith TEFLON!




[gentoo-user] Re: Can't find init due to inconsistent drive order

2013-07-02 Thread Grant Edwards
On 2013-07-02, Neil Bothwick n...@digimed.co.uk wrote:
 On Tue, 2 Jul 2013 15:16:15 + (UTC), Grant Edwards wrote:

 The PARTUUID= parition specifier format is handled directly by kernel
 code, so I don't see why it should require an initrd (unless the UUID
 values for MBR partitions aren't actually something the kernel knows
 about and are something made up from whole cloth by the blkid program)

 MBRs don't have PARTUUIDs do they? Don't confuse them with filesystem
 UUIDs as used in fstab.

No, blkid does not print a PARTUUID value with an MBR. In only prints
UUID values, which as you noted, are _filesystem_ UUIDs.  If you
want to use a filesystem UUID to locate the root partition, you need
an initramfs/initrd which contains an 'init' program that finds the
filesystem with the specified UUID, mounts that filesystem, and then
does a root_pivot.

-- 
Grant Edwards   grant.b.edwardsYow! Hello.  Just walk
  at   along and try NOT to think
  gmail.comabout your INTESTINES being
   almost FORTY YARDS LONG!!




Re: [gentoo-user] Re: Can't find init due to inconsistent drive order

2013-07-02 Thread Randolph Maaßen
2013/7/2 Grant Edwards grant.b.edwa...@gmail.com

 On 2013-07-02, Neil Bothwick n...@digimed.co.uk wrote:
  On Tue, 2 Jul 2013 15:16:15 + (UTC), Grant Edwards wrote:
 
  The PARTUUID= parition specifier format is handled directly by kernel
  code, so I don't see why it should require an initrd (unless the UUID
  values for MBR partitions aren't actually something the kernel knows
  about and are something made up from whole cloth by the blkid program)
 
  MBRs don't have PARTUUIDs do they? Don't confuse them with filesystem
  UUIDs as used in fstab.

 No, blkid does not print a PARTUUID value with an MBR. In only prints
 UUID values, which as you noted, are _filesystem_ UUIDs.  If you
 want to use a filesystem UUID to locate the root partition, you need
 an initramfs/initrd which contains an 'init' program that finds the
 filesystem with the specified UUID, mounts that filesystem, and then
 does a root_pivot.

 --
 Grant Edwards   grant.b.edwardsYow! Hello.  Just walk
   at   along and try NOT to
 think
   gmail.comabout your INTESTINES
 being
almost FORTY YARDS
 LONG!!



SCREW ME! Still messing around with these IDs.

Sorry for disturbance.

-- 
Mit freundlichen Grüßen / Best regards

Randolph Maaßen


[gentoo-user] Re: Can't find init due to inconsistent drive order

2013-07-02 Thread Grant Edwards
On 2013-07-02, Neil Bothwick n...@digimed.co.uk wrote:
 On Tue, 2 Jul 2013 15:09:28 + (UTC), Grant Edwards wrote:

  I had this problem on my Intel motherboard, and found out you can
  disable booting from external drives. Boot to removable devices or
  similar in the BIOS. Failing that, changing the boot order so that the
  firewire/USB device is at the very end of the boot list may help your
  situation.  

[...]

 I'd go for the firewire-as-a-module approach and add the module to
 /etc/conf.d/modules to make sure it is loaded ASAP. Yes, it is a
 kludge, but it is the simplest solution from a practical POV.

I changed the firewire storage driver from in-kernel to module, and
that looks like it solves the problem.  It appears to get
demand-loaded immediately after root is mounted.

Next time I do an install, I think I'll try GPT...

-- 
Grant Edwards   grant.b.edwardsYow! Now, let's SEND OUT
  at   for QUICHE!!
  gmail.com




Re: [gentoo-user] Re: Can't find init due to inconsistent drive order

2013-07-02 Thread Paul Hartman
On Tue, Jul 2, 2013 at 3:27 PM, Grant Edwards grant.b.edwa...@gmail.com wrote:
 Can you point to some documentation on how you can use
 root=PARTUID=partition-uuid with an DOS/MBR partition table?

 As Neil alluded to, you can use UUID with MBR (instead of PARTUUID and
 GPT). I have DOS/MBR partition table and my kernel commandline looks
 like:

 root=UUID=1d21fa55-0fa9-4d43-8d41-8b4193900efa ro log_buf_len=1M quiet
 rootfstype=ext4 raid=noautodetect

 (along with an initramfs)

 Yes, we've already discussed that if you have an initrd (or
 initramfs), and an 'init' program that handles it, you can use
 filesystem labels and filesystem uuids.

 The option we were discussing in the posting to which you replied is
 that of using the root=PARTUUID method which is handled directly by
 the kernel.

Ah, sorry, I missed that detail. I thought I was helping to clear up
confusion, when in fact I was the confused one! :)



Re: [gentoo-user] Re: Can't find init due to inconsistent drive order

2013-07-02 Thread Neil Bothwick
On Tue, 2 Jul 2013 20:40:20 + (UTC), Grant Edwards wrote:

 Next time I do an install, I think I'll try GPT...

I can't think why any sane person would do otherwise. Who in their right
mind would want to use a 30+year old format where any more than four
partitions is a fragile kludge? :-O


-- 
Neil Bothwick

Eat shit - 50 million flies can't be wrong
Use Microsoft . . . . .


signature.asc
Description: PGP signature


[gentoo-user] Re: Can't find init due to inconsistent drive order

2013-07-01 Thread Grant Edwards
On 2013-07-01, Alan McKinnon alan.mckin...@gmail.com wrote:
 On 01/07/2013 23:52, Grant Edwards wrote:
 I've just recently run into a problem where sometimes when a machine
 boots, the kernel can't find init.  This appears to be because my grub
 configuration line says root=/dev/sda5 and _sometimes_ the drive
 that contains my root partition is sdb instead of sda. AFAICT, for the
 past 30 years the linux kernel was 100% consistent in the order that
 hard drives were labelled -- but recently that has seems to have
 changed.
 
 I use partition labels in my fstab, so that's not a problem, but after
 all these years, the kernel still doesn't know how to grok parition
 labels.
 
 Are we really expected now to set up an initrd just so that the kernel
 can find the root partition??

 Where have you been for the past 6 months?

 Did you miss the entire clusterfuck debate about latest udev tricks?

No.

 Those names depend only on the order in which devices are discovered,
 and that process has always been indeterminate.

Really?  I've been running Linux on a lot of machines for 30 years --
often on machines with a half-dozen hard drives -- and I never saw
drive order change from one reboot to the next until today.  That's
quite a lucky streak.

 udev used to get in the middle and rename things in an arbitrary but
 defined order, it no longer does this.

How did udev get in the middle?  It somehow ran before the kernel
mounted root and started 'init'?

 We discussed this whole subject *to death* over the last many months

I remember that discussion, but I don't see how it's relelvent to
events that occur before init starts.

-- 
Grant





[gentoo-user] Re: Can't find init due to inconsistent drive order

2013-07-01 Thread Grant Edwards
On 2013-07-01, Paul Hartman paul.hartman+gen...@gmail.com wrote:
 On Mon, Jul 1, 2013 at 4:52 PM, Grant Edwards grant.b.edwa...@gmail.com 
 wrote:
 I've just recently run into a problem where sometimes when a machine
 boots, the kernel can't find init.  This appears to be because my grub
 configuration line says root=/dev/sda5 and _sometimes_ the drive
 that contains my root partition is sdb instead of sda. AFAICT, for the
 past 30 years the linux kernel was 100% consistent in the order that
 hard drives were labelled -- but recently that has seems to have
 changed.

 I wonder if it could be related to parallel initialization of disks.

Apparently so.

 I think there's a kernel toggle for that.

I'll look into it.

 Are we really expected now to set up an initrd just so that the
 kernel can find the root partition??

 As far as I know, the answer is yes.

 FWIW, I always resisted making an initrd until very recently, but
 wanted to use UUID in my bootup on my new system. I used this command
 (which I re-run whenever I deploy a new kernel):

 dracut -H -o i18n -o resume -o usrmount --force /boot/initramfs.img

 And then added one line to my grub2 config:

 initrd  /initramfs.img

 and it just simply works... though it's still a bit of black magic to
 me,

It's not really that complex.  There are two ways to get the kernel to
use an initial ram fs as root: the bootloader loads the initial ram
image into ram or it gets linked into the kernel when the kernel is
built.

 and every time I reboot I feel a bit of nervousness when I see
 Loading initial ramdisk... and don't breathe until it succeeds. :)

I've got nothing against initramfs -- on my embedded systems root
starts out as an initramfs and stays that way.  I just don't see why I
should be forced to have one.

-- 
Grant





Re: [gentoo-user] Re: Can't find init due to inconsistent drive order

2013-07-01 Thread Canek Peláez Valdés
On Jul 1, 2013 9:45 PM, Grant Edwards grant.b.edwa...@gmail.com wrote:

 On 2013-07-01, Alan McKinnon alan.mckin...@gmail.com wrote:
  On 01/07/2013 23:52, Grant Edwards wrote:
  I've just recently run into a problem where sometimes when a machine
  boots, the kernel can't find init.  This appears to be because my grub
  configuration line says root=/dev/sda5 and _sometimes_ the drive
  that contains my root partition is sdb instead of sda. AFAICT, for the
  past 30 years the linux kernel was 100% consistent in the order that
  hard drives were labelled -- but recently that has seems to have
  changed.
 
  I use partition labels in my fstab, so that's not a problem, but after
  all these years, the kernel still doesn't know how to grok parition
  labels.
 
  Are we really expected now to set up an initrd just so that the kernel
  can find the root partition??
 
  Where have you been for the past 6 months?
 
  Did you miss the entire clusterfuck debate about latest udev tricks?

 No.

  Those names depend only on the order in which devices are discovered,
  and that process has always been indeterminate.

 Really?  I've been running Linux on a lot of machines for 30 years --
 often on machines with a half-dozen hard drives -- and I never saw
 drive order change from one reboot to the next until today.  That's
 quite a lucky streak.

Since Linus started writing Linux in 1991 (22 years ago), I want to know
which time machine did you use.

Regards.
--
Canek Peláez Valdés


[gentoo-user] Re: Can't find init due to inconsistent drive order

2013-07-01 Thread Grant Edwards
On 2013-07-02, Canek Pel??ez Vald??s can...@gmail.com wrote:
 On Jul 1, 2013 9:45 PM, Grant Edwards grant.b.edwa...@gmail.com wrote:

 Those names depend only on the order in which devices are discovered,
 and that process has always been indeterminate.

 Really?  I've been running Linux on a lot of machines for 30 years --
 often on machines with a half-dozen hard drives -- and I never saw
 drive order change from one reboot to the next until today.  That's
 quite a lucky streak.

 Since Linus started writing Linux in 1991 (22 years ago), I want to know
 which time machine did you use.

Doh! I meant 20 years.  The first time was just a typo, and then
somehow after reading my original post I did it again.

I started running Linux in 93 with a friend's Yggdrasil CD and a Sun
CD drive I borrowed from work.  I think that was on a 25MHz 486 with
4MB of RAM and two 30MB hard drives.

-- 
Grant