feat: introduce init script for initramfs

This commit is contained in:
Nasir Hossain Nishad 2024-02-16 17:18:15 +06:00
parent 4e9cc08e39
commit 9fdf6d6a1f
2 changed files with 12 additions and 4 deletions

View File

@ -50,12 +50,11 @@ cd busybox-${BUSYBOX_VERSION}
cd ..
# Create the initramfs
sudo mount -t proc /proc initramfs/proc
sudo mount -t sysfs /sys initramfs/sys
sudo mount -o bind /dev initramfs/dev
sudo mount -o bind /dev/pts initramfs/dev/pts
cd initramfs
rm linuxrc # We'll be using a init sciprt instead
cp config/initramfs.sh init
find . | cpio -H newc -o > ../iso/boot/initramfs.cpio
cd ..
# Install GRUB
cp config/grub.cfg iso/boot/grub/grub.cfg

9
scripts/init.sh Normal file
View File

@ -0,0 +1,9 @@
#!/bin/sh
# Disable Kernel Messages
dmesg -n 1
# Mount the file system
mount -t devtmpfs none /dev
mount -t proc none /dev
mount -t sysfs none /sys