[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#588675: Beginings of Heading Towards a Root Cause of #588675



For some time I'd been trying to search for a cause of #588675.  Looks
like I finally searched for the right string (problem is "root" occurs in
many places inside the Linux kernel source).

Looks like the key file is linux/init/do_mounts.c:

Appears the line:
		ROOT_DEV = name_to_dev_t(root_device_name);
inside prepare_namespace() resolves any specified root device into
major/minor.  Later at the end of mount_root(), /dev/root is created with
the appropriate major/minor, but mount_root() never tries to resolve the
major/minor back into a proper device name.

The two spots that I've gotten hints of potentially being able to get
back the proper device name are: Inside do_mount_root(), s->s_id is
"sda1", but I'm a bit worried that may not work in cases with LVM where
the proper result could have been "scsi0/target0/<long string of dirs>".
The other is potentially doing bdevname(bdget(ROOT_DEV), char_buffer)
may give something approximating a proper name.

>From looking at the current code, I suspect while this behavior may have
first appeared with SCSI devices, it may well have spread to all block
devices other than MTD and UBI (commonly being embedded devices with
memory completely inadequate to hold an initial ramdisk, users of MTD
device roots would have screamed too loudly to ignore).  So I got that
wrong.

If things go well, I may have a patch soon (alas, I'm also having to
fight other issues as well, so that could take a while).


-- 
(\___(\___(\______          --=> 8-) EHM <=--          ______/)___/)___/)
 \BS (    |         EHeM+sigmsg@m5p.com  PGP 87145445         |    )   /
  \_CS\   |  _____  -O #include <stddisclaimer.h> O-   _____  |   /  _/
8A19\___\_|_/58D2 7E3D DDF4 7BA6 <-PGP-> 41D1 B375 37D0 8714\_|_/___/5445


Reply to: