Added read-only (overlay) filesystem
This commit is contained in:
parent
052631361a
commit
e315c692d9
12
stage2/07-enable-overlayfs/00-run.sh
Executable file
12
stage2/07-enable-overlayfs/00-run.sh
Executable file
|
@ -0,0 +1,12 @@
|
|||
#!/bin/bash -e
|
||||
|
||||
install -d "${ROOTFS_DIR}/etc/systemd/system/enable-overlayfs.target.wants"
|
||||
install -m 644 files/enable-overlayfs.service "${ROOTFS_DIR}/etc/systemd/system/"
|
||||
install -m 644 files/enable-overlayfs.target "${ROOTFS_DIR}/etc/systemd/system/"
|
||||
install -m 755 files/enable_overlayfs.sh "${ROOTFS_DIR}/usr/bin/"
|
||||
|
||||
on_chroot << EOF
|
||||
ln -s /etc/systemd/system/enable-overlayfs.service /etc/systemd/system/enable-overlayfs.target.wants/enable-overlayfs.service
|
||||
systemctl daemon-reload
|
||||
systemctl set-default enable-overlayfs.target
|
||||
EOF
|
10
stage2/07-enable-overlayfs/files/enable-overlayfs.service
Normal file
10
stage2/07-enable-overlayfs/files/enable-overlayfs.service
Normal file
|
@ -0,0 +1,10 @@
|
|||
[Unit]
|
||||
Description=Enable Overlay Filesystem
|
||||
After=multi-user.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/usr/bin/enable_overlayfs.sh
|
||||
|
||||
[Install]
|
||||
WantedBy=enable-overlayfs.target
|
5
stage2/07-enable-overlayfs/files/enable-overlayfs.target
Normal file
5
stage2/07-enable-overlayfs/files/enable-overlayfs.target
Normal file
|
@ -0,0 +1,5 @@
|
|||
[Unit]
|
||||
Description=Enable Overlay Filesystem Target
|
||||
Requires=multi-user.target
|
||||
After=multi-user.target
|
||||
AllowIsolate=yes
|
5
stage2/07-enable-overlayfs/files/enable_overlayfs.sh
Executable file
5
stage2/07-enable-overlayfs/files/enable_overlayfs.sh
Executable file
|
@ -0,0 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
/usr/bin/raspi-config nonint do_overlayfs 0
|
||||
systemctl set-default multi-user.target
|
||||
reboot
|
Loading…
Reference in New Issue
Block a user