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

Re: New Hardware + old disks not recognized



On Tue, Jun 25, 2019 at 12:31 PM Pascal Hambourg <pascal@plouf.fr.eu.org> wrote:
>
> Le 24/06/2019 à 01:40, Ross Boylan a écrit :
> >
> > # update-initramfs -u -k 4.19.0-5-amd64
> > update-initramfs: Generating /boot/initrd.img-4.19.0-5-amd64
> > /usr/share/initramfs-tools/hooks/cryptroot: 64:
> > /usr/share/initramfs-tools/hooks/cryptroot: cannot open /proc/mounts:
> > No such file
> > cryptsetup: WARNING: Couldn't determine root device
> > sed: can't read /proc/cmdline: No such file or directory
> > /usr/share/initramfs-tools/hooks/cryptroot: 64:
> > /usr/share/initramfs-tools/hooks/cryptroot: cannot open /proc/mounts:
> > No such file
> > cryptsetup: WARNING: The initramfs image may not contain cryptsetup binaries
> >      nor crypto modules. If that's on purpose, you may want to uninstall the
> >      'cryptsetup-initramfs' package in order to disable the cryptsetup initramfs
> >      integration and avoid this warning.
> > W: Couldn't identify type of root file system for fsck hook
> >
> > /proc/mounts isn't accessible in the chroot;
>
> You need to mount /proc. In a chroot, it is often desirable to mount at
> least the /dev, /proc and /sys pseudo-filesystems.
I'm aware, and probably should have qualified my statement--proc
wasn't accessible when I ran the command.  I hadn't mounted it partly
out of laziness and mostly out of concern that stuff in the chroot
would leak into the main system, or vice-versa.   In  particular ...
>
> > even if it were, it would
> > not give the mounts appropriate for the system I'm trying to set up.
>
> Why not ? The output of /proc/mounts is not static, it is relative to
> the process reading it.

I thought /proc would give me the root of the parent system, but I
just tried it and see that's not so.  Thank you for pointing that out.
Has it always worked that way?

So do you think the chroot generated initrd would have been OK  if I'd
mounted proc?

Ross


Reply to: