feat(image): add overlay to /etc and use busybox getty for login prompt
This commit is contained in:
parent
3374541b3a
commit
0ed83a6d27
2 changed files with 20 additions and 27 deletions
image
|
@ -13,6 +13,7 @@ find rootfs/ -type d -exec chmod 755 {} \;
|
|||
ln -sf multi-user.target rootfs/usr/lib/systemd/system/default.target
|
||||
|
||||
# mount patos state
|
||||
ln -sf ../etc.mount rootfs/usr/lib/systemd/system/local-fs.target.wants/etc.mount
|
||||
ln -sf ../var.mount rootfs/usr/lib/systemd/system/sysinit.target.wants/var.mount
|
||||
|
||||
# enable dbus
|
||||
|
@ -25,32 +26,6 @@ ln -sf ../systemd-networkd.service rootfs/usr/lib/systemd/system/sysinit.target.
|
|||
# generate a temporary machine id
|
||||
$systemd/usr/bin/systemd-machine-id-setup --root=rootfs/
|
||||
|
||||
# FIXME: remove this later (just to get a shell in the initramfs)
|
||||
cat <<EOF > rootfs/usr/lib/systemd/system/demo.service
|
||||
[Unit]
|
||||
Description=Debug Shell (/bin/sulogin)
|
||||
Conflicts=shutdown.target
|
||||
Before=shutdown.target
|
||||
|
||||
[Service]
|
||||
Environment=HOME=/root
|
||||
WorkingDirectory=/root
|
||||
ExecStart=/bin/sulogin
|
||||
Type=idle
|
||||
StandardInput=tty-force
|
||||
StandardOutput=inherit
|
||||
StandardError=inherit
|
||||
KillMode=process
|
||||
IgnoreSIGPIPE=no
|
||||
SendSIGHUP=yes
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
ln -sf ../demo.service rootfs/usr/lib/systemd/system/multi-user.target.wants/demo.service
|
||||
|
||||
|
||||
$systemd/usr/bin/ukify build \
|
||||
--linux $kernel/bzImage \
|
||||
--initrd $initrd/initrd.xz \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue