diff options
author | Ben Kohler <bkohler@gentoo.org> | 2024-02-16 13:38:28 -0600 |
---|---|---|
committer | Ben Kohler <bkohler@gentoo.org> | 2024-02-16 13:38:28 -0600 |
commit | bd2f2e1ea079d1721d8fcf684c966d556b763d3e (patch) | |
tree | 33e7319974531c114f933220176f38758f89d95e | |
parent | doc: add new cmdline options to man page (diff) | |
download | genkernel-bd2f2e1ea079d1721d8fcf684c966d556b763d3e.tar.gz genkernel-bd2f2e1ea079d1721d8fcf684c966d556b763d3e.tar.bz2 genkernel-bd2f2e1ea079d1721d8fcf684c966d556b763d3e.zip |
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 <bkohler@gentoo.org>
-rw-r--r-- | defaults/initrd.scripts | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/defaults/initrd.scripts b/defaults/initrd.scripts index 01bfe07..506f8c6 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 |