From 5298ca668034a801cef8ec12f8ded9e867668ec6 Mon Sep 17 00:00:00 2001 From: Nasir Hossain Date: Sat, 17 Feb 2024 01:01:57 +0600 Subject: [PATCH 1/2] fix: start cttyhack sh on initrd init --- scripts/init.sh | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/scripts/init.sh b/scripts/init.sh index 6fbe832..ac188ad 100644 --- a/scripts/init.sh +++ b/scripts/init.sh @@ -8,8 +8,5 @@ mount -t devtmpfs none /dev mount -t proc none /dev mount -t sysfs none /sys -# Start shell -/bin/sh - -# Shutdown the machine when shell is exited -poweroff -f \ No newline at end of file +# Start shell with proper tty and power off support +exec cttyhack sh \ No newline at end of file From f4f18d3016c97706e149a15c634479df32da536d Mon Sep 17 00:00:00 2001 From: Nasir Hossain Date: Sat, 17 Feb 2024 01:02:19 +0600 Subject: [PATCH 2/2] feat: add a welcome message --- scripts/init.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/scripts/init.sh b/scripts/init.sh index ac188ad..027de93 100644 --- a/scripts/init.sh +++ b/scripts/init.sh @@ -8,5 +8,26 @@ mount -t devtmpfs none /dev mount -t proc none /dev mount -t sysfs none /sys +clear + +# Print the welcome message +echo "Welcome to the Linux Kernel" +echo "" +echo "" +echo " ___ ___ ___ "; +echo " | __|__ _ / _ \/ __|"; +echo " | _|/ _\` | (_) \__ \\"; +echo " |___\__, |\___/|___/"; +echo " |___/ "; +echo "Is Built Successfully!"; +echo "" +echo "" +echo "Kernel Version: $(uname -r)" +echo "Kernel Build Date: $(uname -v)" +echo "Kernel Architecture: $(uname -m)" +echo "Kernel Compiler: $(uname -o)" +echo "Kernel Hostname: $(uname -n)" + + # Start shell with proper tty and power off support exec cttyhack sh \ No newline at end of file