diff options
author | Andrew Jeffery <andrew@aj.id.au> | 2023-04-26 05:12:02 +0300 |
---|---|---|
committer | Andrew Jeffery <andrew@aj.id.au> | 2023-04-26 05:29:14 +0300 |
commit | 2ea84ebfbe65e2d66db22b459e92c9574a31a096 (patch) | |
tree | e7c7dfdbcd20bf4fd1fed65c528abcc7d91ad58f /meta-phosphor/recipes-phosphor | |
parent | bb3935f2b00a7a71ddd9932368aaeb38caf5647d (diff) | |
download | openbmc-2ea84ebfbe65e2d66db22b459e92c9574a31a096.tar.xz |
meta-phosphor: mmc-init: Fix creation of critical directories
`mkdir $fslist` is responsible for creating all the critical mount-point
directories for a functioning Linux userspace, such as `/dev`, `/proc`
and `/sys`. 2345ace954c2 ("meta-phosphor: phosphor-mmc-init: fix
shellcheck") prevented their existence by instead creating a single
directory named "proc sys dev run":
```
~ # ls -1
bin
dev
etc
init
lib
mnt
proc sys dev run
root
run
sbin
usr
var
```
The lack of directories lead to the inability to mount the required
filesystems, with the boot process stalling at an initrd shell prompt:
```
[ 1.224302] Freeing initrd memory: 3272K
[ 1.265274] Freeing unused kernel image (initmem) memory: 1024K
[ 1.291134] Checked W+X mappings: passed, no W+X pages found
[ 1.291492] Run /init as init process
mount: mounting sys on sys failed: No such file or directory
mount: mounting proc on proc failed: No such file or directory
[ 2.600405] mmcblk0: p1 p2 p3 p4 p5 p6 p7
The operation has completed successfully.
Failed to parse kernel command line, ignoring: No such file or directory
Starting systemd-udevd version 253.1^
Running in chroot, ignoring request.
Running in chroot, ignoring request.
cat: can't open '/proc/cmdline': No such file or directory
[ 2.706024] /dev/disk/by-partlabel/: Can't open blockdev
mount: mounting /dev/disk/by-partlabel/ on /mnt/rofs failed: No such file or directory
/bin/sh: can't access tty; job control turned off
~ #
```
Change-Id: Ie0821508ed7e141c89d7620a6ed0adc069f5c267
Fixes: 2345ace954c2 ("meta-phosphor: phosphor-mmc-init: fix shellcheck")
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Diffstat (limited to 'meta-phosphor/recipes-phosphor')
-rw-r--r-- | meta-phosphor/recipes-phosphor/initrdscripts/phosphor-mmc-init/mmc-init.sh | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/meta-phosphor/recipes-phosphor/initrdscripts/phosphor-mmc-init/mmc-init.sh b/meta-phosphor/recipes-phosphor/initrdscripts/phosphor-mmc-init/mmc-init.sh index 12cf53a228..c55977f2fa 100644 --- a/meta-phosphor/recipes-phosphor/initrdscripts/phosphor-mmc-init/mmc-init.sh +++ b/meta-phosphor/recipes-phosphor/initrdscripts/phosphor-mmc-init/mmc-init.sh @@ -23,7 +23,13 @@ mmcdev="/dev/mmcblk0" rwfsdev="/dev/disk/by-partlabel/rwfs" cd / -mkdir -p "$fslist" + +# We want to make all the directories in $fslist, not one directory named by +# concatonating the names with spaces +# +# shellcheck disable=SC2086 +mkdir -p $fslist + mount dev dev -tdevtmpfs mount sys sys -tsysfs mount proc proc -tproc |