[distri] Re: Log into demi image
- From: Michael Stapelberg <michael+distri@xxxxxxxxxxxxx>
- To: distri@xxxxxxxxxxxxx
- Date: Thu, 27 Feb 2020 08:49:44 +0100
On Tue, Feb 25, 2020 at 6:04 PM Phillip Susi <phill@xxxxxxxxxxxx> wrote:
Michael Stapelberg writes:
Can you file an issue for rescue mode being broken please? Please
include which virtual machine program you use. I can take a look.
OK.
I'm using a Xen virtual machine to run distri. Is this not an issue in
say, qemu-kvm?
It seems to work fine in qemu-kvm: I downloaded distri-qemu-serial.img
and started it using
% make qemu-serial DISKIMG=distri-qemu-serial.img
In the GRUB menu, I selected Advanced Options → Rescue Mode. In the
booted system, I get asked:
You are in rescue mode. After logging in, type "journalctl -xb" to view
system logs, "systemctl reboot" to reboot, "systemctl default" or "exit"
to boot into default mode.
Give root password for maintenance
(or press Control-D to continue):
After entering “peace” as the root password, I get a shell prompt.
My guess regarding init=/bin/bash is that you end up in the initrd,
not in the actual system?
It looked like the initrd includes systemd and it tried to chain exec
the systemd in the root fs, but honored the init= argument and ran bash
instead. It looks like some daemon is backing the fuse fs and auto
mounts the squashfs images on demand normally. I'm guessing that
whatever that is wasn't running since systemd didn't start it. Then
again, what gets the systemd or bash squashfs mounted?
The initrd contains copies of the required files, so no squashfs
images are involved yet.
See also
https://michael.stapelberg.ch/posts/2020-01-21-initramfs-from-scratch-golang/
Is this purely a cosmetic issue or does it prolong shutdown?
It's cosmetic.
Unmounting /ro is tricky as there will always be running processes
keeping files open.
Right, so isn't there a way to tell systemd that it shouldn't bother
I don’t know. I googled for a little bit, but couldn’t immediately
find such an option.
trying? I mean, it's read-only already, and normally the root fs can
only be remounted ro before shutdown.
Note that it is logically read-only, but not actually mounted as
read-only. The contents of exchange directories (such as /ro/bin)
change when new packages are added to the underlying store, and there
is a control socket file (not 100% sure if that would work on a
read-only mount).
Other related posts: