[distri] Re: Log into demi image

  • From: Michael Stapelberg <michael+distri@xxxxxxxxxxxxx>
  • To: distri@xxxxxxxxxxxxx
  • Date: Fri, 28 Feb 2020 08:44:39 +0100

On Thu, Feb 27, 2020 at 8:06 PM Phillip Susi <phill@xxxxxxxxxxxx> wrote:



Michael Stapelberg writes:

It seems to work fine in qemu-kvm: I downloaded distri-qemu-serial.img
and started it using

I just downloaded distri-disk.img.zst and booted it.  Not sure what your
makefile is doing there.

https://github.com/distr1/distri/blob/70032ef46a79f45319583ae4b6cb36cf2b5bb37f/Makefile#L22

% make -n qemu-serial DISKIMG=/tmp/distri-qemu-serial.img
qemu-system-x86_64 -device e1000,netdev=net0 -netdev
user,id=net0,hostfwd=tcp::5555-:22 -device virtio-rng-pci -smp 8
-machine accel=kvm -m 4096 -drive
if=none,id=hd,file=/tmp/distri-qemu-serial.img,format=raw -device
virtio-scsi-pci,id=scsi -device scsi-hd,drive=hd -nographic


  % make qemu-serial DISKIMG=distri-qemu-serial.img

The initrd contains copies of the required files, so no squashfs
images are involved yet.

Of course, but when handing off to the real root, how do you do that
when you have to have a FUSE daemon running to provie the systemd
binary?  I guess that's why systemd is in the root and it must start the
fuse mount and keep it running as it serializes its state and execs the
systemd copy in the root fs?  So I guess the actual fuse daemon remains
running from the initramfs even after switch-to-root?

No, it’s another systemd process that runs from the root file system.
In minitrd, there’s no systemd in the initrd.

I’m not entirely sure why you think this wouldn’t work :)


See also 
https://michael.stapelberg.ch/posts/2020-01-21-initramfs-from-scratch-golang/

Ahh, interesting... reading now.

I don’t know. I googled for a little bit, but couldn’t immediately
find such an option.

I'm thinking it probably invovles messing with the dependencies of the
mount unit so that systemd doesn't think it must be deactivated before 
shutdown.target.

Other related posts: