Compare commits

...
Author SHA1 Message Date
Luca Weiss 464244460d main/postmarketos-initramfs: switch_root with /dev (MR 3230)
Mount /dev (and /run) in initramfs so util-linux switch_root can move
the mounts over to the new sysroot before changing root.
BusyBox switch_root doesn't even attempt to move anything so use
util-linux's switch_root for this.

Explicitly disable tests too...
2023-07-23 20:00:58 +01:00
5 changed files with 11 additions and 12 deletions

No files matched your search

@@ -4,6 +4,7 @@
/etc
/lib
/proc
/run
/sbin
/sys
/sysroot
@@ -2,6 +2,7 @@
/sbin/btrfs
/sbin/dmsetup
/sbin/e2fsck
/sbin/switch_root
/usr/sbin/parted
/usr/sbin/resize2fs
/usr/sbin/resize.f2fs
+7 -5
View File
@@ -1,10 +1,11 @@
# Maintainer: Oliver Smith <ollieparanoid@postmarketos.org>
# Co-Maintainer: Clayton Craft <clayton@craftyguy.net>
pkgname=postmarketos-initramfs
pkgver=1.2.0
pkgver=1.3.0
pkgrel=0
pkgdesc="Base files for the postmarketOS initramfs / initramfs-extra"
url="https://postmarketos.org"
options="!check" # no tests
depends="
btrfs-progs
busybox-extras
@@ -21,6 +22,7 @@ depends="
postmarketos-fde-unlocker
postmarketos-mkinitfs
unudhcpd
util-linux-misc
xz
"
source="
@@ -65,9 +67,9 @@ package() {
sha512sums="
bed319179bcd0b894d6267c7e73f2890db07bc07df71542936947dfb3bdb17fade8a7b4e7b577f278af4472464427bba07f75aff0a1e454a4167052c088f3b6a 00-default.modules
399da6e61993f48c8a62c956bb15d294cac10bf003d84257efdf4a213ebc87bb51cdcd75c4675f51c3be832146b8f21a7c769bf3e94f574a5067f001662632a1 00-initramfs-base.dirs
5b364300f31c91fd0591eb0715f67cbf5383f45246a5fb9f34b79f7cb2e3b15768b2130e5f32f816cc169950f988c1beabc879ba31645c58ce131a288dbc071d 00-initramfs-base.dirs
3bc73f3a0d1de210444d9c45fab51fd4520e38b43ffbb76368f8ff854b990aa2f21c6356840c5a48eb9808e834eb885a6d581639a60707c26abf66fc20b70db9 00-initramfs-base.files
e984cd3033ce8752ebc71127828b964b46259a5263c2ebfab32c1394b674bcff464862ff00b8e920d3d31386c54ca0b94f84bc77580d275ecfeea33e76c07ef4 00-initramfs-extra-base.files
5a6252a02f46a4649a5aa7731a3f1bffd6eeca26b36bfd7ba1920dd6c72cceecfe0101da20d2f53850f1394a23f2dc1a61bfcfcf9c99ecdd26aec26df9a72d4e init.sh
a6358ca43f36d84d64da063db456fa7520eeb7bbdb457082e6959995166156245b08d9e7c1098b6f2f52974e7cbcc0b7719e4a0d3400a1d989c9e7b831303bb4 init_functions.sh
8a4adad3785af474b36a09a05f6a3b2c4b4f43aac331a53b903abfa51ea12be1e3d1d807b7a6e66a1346815f3b0044daf8cd62e21e2dc75d2db13ee265a72985 00-initramfs-extra-base.files
911f1b9becbcd25a0f96a7c0b96c1add920d7e50a041719f2947c13729c543fa87e4332ae329ad8f74a7dabd53e5ed56a6f3bba89f2275587bf9f970fd652989 init.sh
71442e33dbb81f4aa8220838a52af6033b453e9010f40109f91775f1b0d19a5738fff1329397eaa05ab42edcc80fe9d335700cfeab0366901f6560e5963d4ea7 init_functions.sh
"
-4
View File
@@ -52,10 +52,6 @@ setup_bootchart2
# Switch root
killall telnetd mdev udevd msm-fb-refresher 2>/dev/null
umount /proc
umount /sys
umount /dev/pts
umount /dev
# shellcheck disable=SC2093
exec switch_root /sysroot "$init"
@@ -26,6 +26,8 @@ mount_proc_sys_dev() {
# mdev
mount -t proc -o nodev,noexec,nosuid proc /proc || echo "Couldn't mount /proc"
mount -t sysfs -o nodev,noexec,nosuid sysfs /sys || echo "Couldn't mount /sys"
mount -t devtmpfs -o mode=0755,nosuid dev /dev || echo "Couldn't mount /dev"
mount -t tmpfs -o nosuid,nodev,mode=0755 run /run || echo "Couldn't mount /run"
mkdir /config
mount -t configfs -o nodev,noexec,nosuid configfs /config
@@ -33,9 +35,6 @@ mount_proc_sys_dev() {
# /dev/pts (needed for telnet)
mkdir -p /dev/pts
mount -t devpts devpts /dev/pts
# /run (needed for cryptsetup)
mkdir /run
}
create_device_nodes() {