Add Zero-OS customization before CPIO creation
- Add initramfs_finalize_customization() function - Remove root password for passwordless login (sed -i 's/^root:[^:]*:/root::/' /etc/passwd) - Update /etc/motd and /etc/issue to Zero-OS branding instead of Alpine - Called automatically before CPIO creation - Fixes init script duplication issue (/init vs /sbin/init) - Correct boot flow: /init → switch_root → /sbin/zinit init (no /sbin/init needed)
This commit is contained in:
@@ -12,11 +12,10 @@ target="/mnt/root"
|
||||
mkdir -p $target
|
||||
mount -t proc proc /proc
|
||||
mount -t sysfs sysfs /sys
|
||||
mount -t tmpfs tmpfs /mnt/root -o size=1536M
|
||||
mount -t tmpfs tmpfs /mnt/root -o size=1024M
|
||||
mount -t devtmpfs devtmpfs /dev
|
||||
|
||||
echo "[+] building ram filesystem"
|
||||
target="/mnt/root"
|
||||
|
||||
# Copy Alpine filesystem to tmpfs (same as original)
|
||||
echo " copying /bin..."
|
||||
@@ -102,6 +101,6 @@ fi
|
||||
|
||||
echo "[+] switching root"
|
||||
echo " exec switch_root /mnt/root /sbin/zinit init"
|
||||
exec switch_root /mnt/root /sbin/zinit init
|
||||
exec switch_root /mnt/root /sbin/zinit -d init
|
||||
|
||||
##
|
||||
Reference in New Issue
Block a user