Add support for booting from initramfs 55/308555/2
authorSeung-Woo Kim <sw0312.kim@samsung.com>
Wed, 27 Mar 2024 09:55:29 +0000 (18:55 +0900)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Wed, 27 Mar 2024 11:18:27 +0000 (20:18 +0900)
The booting from initramfs requires /init, so it should be
created. Add /init file as symlink to /sbin/init. Also, in
initramfs devtmpfs is not mounted automatically, so, it
should be mounted manually.

Both are fine on case of ext4 initrd image also.

Change-Id: Ic90bb8cc44df331017858903b24eb0a91fe95a53
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
src/initrd-recovery/00-initrd-recovery.list.in
src/initrd-recovery/init

index fd4f1ae820d9b77d188215c380f2b9952510530b..9f17f2d639fcdd64a4127625696dd1824876b99c 100644 (file)
@@ -25,6 +25,7 @@ SYMLINKS="
 /sbin/init:@INITRD_RECOVERY_LIBEXEC_DIR@/init
 /sbin/minireboot:@INITRD_RECOVERY_LIBEXEC_DIR@/minireboot
 /sbin/reboot:@INITRD_RECOVERY_LIBEXEC_DIR@/minireboot
+/init:sbin/init
 "
 
 VERBATIMS="
index 65002f7ebc04f34524362e202ff161861e6da8ca..8a3b9b091f0b4326a61e1c4dd729889096496d07 100755 (executable)
@@ -27,6 +27,7 @@ mount_partitions() {
     "$MOUNT" -t smackfs smackfs /smack
     "$MOUNT" -t tmpfs tmpfs /run -o rw,nosuid,nodev,mode=755
     "$MOUNT" -t tmpfs tmpfs /tmp -o mode=1777,smackfsroot=*
+    "$MOUNT" -t devtmpfs devtmpfs /dev -o nosuid,strictatime,mode=755
 
     "$MKDIR" /dev/pts
     "$MOUNT" -t devpts devpts /dev/pts