mirror of
https://git.launchpad.net/livecd-rootfs
synced 2025-05-29 19:51:29 +00:00
do the mounting in an initrd script rather than systemd units
This commit is contained in:
parent
5fda0bb2aa
commit
b341c81ff3
@ -18,6 +18,14 @@ case $PASS in
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
# Add a script to record which kernel meta-package to use and to set
|
||||||
|
# up the /media/filesystem mount that subiquity currently depends
|
||||||
|
# on. It would be cleaner to do this mount in a systemd mount unit but
|
||||||
|
# that doesn't work because we mask the cdrom mount to avoid strange
|
||||||
|
# issues with the handover from the initrd to systemd in the live
|
||||||
|
# session. In any case, subiquity will sooner or later not require
|
||||||
|
# this mount to be here at all and then we can delete these mount commands.
|
||||||
|
|
||||||
cat <<EOF > /etc/initramfs-tools/scripts/init-bottom/live-server
|
cat <<EOF > /etc/initramfs-tools/scripts/init-bottom/live-server
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
case \$1 in
|
case \$1 in
|
||||||
@ -25,6 +33,11 @@ prereqs) exit 0;;
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
echo ${kernel_metapkg} > /run/kernel-meta-package
|
echo ${kernel_metapkg} > /run/kernel-meta-package
|
||||||
|
|
||||||
|
mkdir -p \${rootmnt}/media/filesystem \${rootmnt}/media/full \${rootmnt}/media/minimal
|
||||||
|
mount -o ro -t squashfs \${rootmnt}/cdrom/casper/ubuntu-server-minimal.squashfs \${rootmnt}/media/minimal
|
||||||
|
mount -o ro -t squashfs \${rootmnt}/cdrom/casper/ubuntu-server-minimal.ubuntu-server.squashfs \${rootmnt}/media/full
|
||||||
|
mount -o ro,lowerdir=\${rootmnt}/media/full:\${rootmnt}/media/minimal -t overlay overlay \${rootmnt}/media/filesystem
|
||||||
EOF
|
EOF
|
||||||
chmod +x /etc/initramfs-tools/scripts/init-bottom/live-server
|
chmod +x /etc/initramfs-tools/scripts/init-bottom/live-server
|
||||||
|
|
||||||
|
@ -1,9 +0,0 @@
|
|||||||
[Unit]
|
|
||||||
Requires=media-full.mount media-minimal.mount
|
|
||||||
After=media-full.mount media-minimal.mount
|
|
||||||
|
|
||||||
[Mount]
|
|
||||||
What=/cdrom/casper/ubuntu-server-minimal.ubuntu-server.squashfs
|
|
||||||
Where=/media/filesystem
|
|
||||||
Type=overlay
|
|
||||||
Options=ro,lowerdir=/media/full:/media/minimal
|
|
@ -1,5 +0,0 @@
|
|||||||
[Mount]
|
|
||||||
What=/cdrom/casper/ubuntu-server-minimal.ubuntu-server.squashfs
|
|
||||||
Where=/media/full
|
|
||||||
Type=squashfs
|
|
||||||
Options=ro
|
|
@ -1,5 +0,0 @@
|
|||||||
[Mount]
|
|
||||||
What=/cdrom/casper/ubuntu-server-minimal.squashfs
|
|
||||||
Where=/media/minimal
|
|
||||||
Type=squashfs
|
|
||||||
Options=ro
|
|
Loading…
x
Reference in New Issue
Block a user