From bd2f2e1ea079d1721d8fcf684c966d556b763d3e Mon Sep 17 00:00:00 2001 From: Ben Kohler Date: Fri, 16 Feb 2024 13:38:28 -0600 Subject: initrd.scripts: create dir layout for overlayfs as well These dirs like /mnt/gentoo are normally created during boot but overlayfs usage bypasses that. Let's create them for overlayfs users as well. Signed-off-by: Ben Kohler --- defaults/initrd.scripts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/defaults/initrd.scripts b/defaults/initrd.scripts index 01bfe07f..506f8c6c 100644 --- a/defaults/initrd.scripts +++ b/defaults/initrd.scripts @@ -855,6 +855,13 @@ setup_overlayfs() { run mount --bind "${i}" "${NEW_ROOT}${i}" done + # Setup the filesystem nodes and directories + # Copied from non-overlayfs logic earlier in this script + for i in ${CDROOT_PATH} /mnt/header /mnt/livecd /mnt/key /mnt/gentoo /tmp /tmp/.initrd /dev /proc /run /sys; do + run mkdir -p "${NEW_ROOT}${i}" + run chmod 755 "${NEW_ROOT}${i}" + done + # Did we populate the overlayfs modules path locations variable? if [ -n "${mods}" ] then -- cgit v1.2.3-65-gdbad