Merge pull request #390 from Googulator/devtmpfs

Use devtmpfs, and improve finalize_fhs.sh
This commit is contained in:
fosslinux 2024-01-08 10:55:57 +00:00 committed by GitHub
commit 9ec45654cf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 20 additions and 9 deletions

View file

@ -16,7 +16,6 @@ if [ "${KERNEL_BOOTSTRAP}" = True ]; then
find / -xdev -type d -printf "dir %p %m %U %G\n" >> /initramfs.list
find / -xdev -type f -printf "file %p %p %m %U %G\n" >> /initramfs.list
find / -xdev -type l -printf "slink %p %l %m %U %G\n" >> /initramfs.list
find / -xdev -type c -or -type b -not -name "ram*" -printf "nod %p %m %U %G %y " -exec stat -c '%Hr %Lr' {} \; >> /initramfs.list
kexec-linux "/dev/ram1" "/boot/linux-4.9.10" "!$(command -v gen_init_cpio) /initramfs.list"
else
mkdir /etc

View file

@ -4,7 +4,11 @@
#
# SPDX-License-Identifier: GPL-3.0-or-later
set -ex
set -e
# mount might fail if /etc doesn't exist because of fstab and mtab
mkdir -p /dev /etc
mount -t devtmpfs none /dev &> /junk || true # no /dev/null yet
rm /junk &> /dev/null || true
# Create partition if it doesn't exist
if [ $(($(stat -c "%Lr" "/dev/${DISK}") % 8)) -eq 0 ]; then