--- Begin Message ---
- To: submit@bugs.debian.org
- Subject: / left as /dev/root with non-initrd kernel
- From: Elliott Mitchell <ehem@m5p.com>
- Date: Sat, 10 Jul 2010 20:12:55 -0700 (PDT)
- Message-id: <201007110312.o6B3Ct2D053680@m5p.com>
Package: initscripts
Version: 2.86.ds1-61
I'm guessing some step is being done by the initial ramdisk scripts,
with Etch that step was also done by the regular init script; whereas
in Lenny it got removed from the initscripts.
$ head -2 /proc/mounts
rootfs / rootfs rw 0 0
/dev/root / ext3 ro,errors=continue,data=journal 0 0
$
This isn't huge, but it does cause some problems with utilities that look
for the currently mounted root filesystem (they can't get the device
name).
--
(\___(\___(\______ --=> 8-) EHM <=-- ______/)___/)___/)
\BS ( | EHeM@gremlin.m5p.com PGP F6B23DE0 | ) /
\_CS\ | _____ -O #include <stddisclaimer.h> O- _____ | / _/
2477\___\_|_/DC21 03A0 5D61 985B <-PGP-> F2BE 6526 ABD2 F6B2\_|_/___/3DE0
--- End Message ---
--- Begin Message ---
- To: Elliott Mitchell <ehem+debian@m5p.com>, 588675-done@bugs.debian.org
- Subject: Re: Bug#588675: Beginings of Heading Towards a Root Cause of #588675
- From: Salvatore Bonaccorso <carnil@debian.org>
- Date: Sat, 8 May 2021 16:32:21 +0200
- Message-id: <YJag9QE5whmEIQmT@eldamar.lan>
- In-reply-to: <20160617015332.GB95740@scollay.m5p.com>
- References: <20160617015332.GB95740@scollay.m5p.com>
Hi,
On Thu, Jun 16, 2016 at 06:53:32PM -0700, Elliott Mitchell wrote:
> 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).
Closing this bugreport as for the above I think was no further
followup. Please reopen if you disagree.
Rgards,
Salvatore
--- End Message ---