From 0bb0ff98fcc8e654cde02133c5e34ffd25cee725 Mon Sep 17 00:00:00 2001 From: Ivan Davidov Date: Sat, 9 Apr 2016 19:32:13 +0300 Subject: [PATCH] Improved comments. --- src/08_generate_rootfs.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/08_generate_rootfs.sh b/src/08_generate_rootfs.sh index 4cafd95bd..1446f6bdc 100755 --- a/src/08_generate_rootfs.sh +++ b/src/08_generate_rootfs.sh @@ -69,19 +69,26 @@ mkdir /mnt/proc mkdir /mnt/tmp # Move all crytical file systems in the new mountpoint. +echo "Remounting /dev, /sys, /tmp and /proc in /mnt..." mount --move /dev /mnt/dev mount --move /sys /mnt/sys mount --move /tmp /mnt/tmp mount --move /proc /mnt/proc +echo "...done." # Copy all root folders in the new mountpoint. +echo "Moving the rest of the root file system to /mnt..." cp -a bin etc lib lib64 root sbin src usr /mnt +echo "...done." # The new mountpoint becomes file system root. All original root folders are # deleted automatically as part of the command execution. The '/sbin/init' # process is invoked and it becomes the new PID 1 parent process. exec switch_root /mnt/ /sbin/init +echo "You can never see this... unless there is a serious bug..." +sleep 99999 + EOF chmod +x switch.sh @@ -93,7 +100,7 @@ chmod +x switch.sh cat > bootscript.sh << EOF #!/bin/sh -echo "Welcome to \"Minimal Linbux Live\" (/sbin/init)" +echo "Welcome to \"Minimal Linux Live\" (/sbin/init)" for DEVICE in /sys/class/net/* ; do echo "Found network device \${DEVICE##*/}" @@ -173,7 +180,7 @@ cd .. cat > init << EOF #!/bin/sh -echo "Welcome to \"Minimal Linbux Live\" (/init)" +echo "Welcome to \"Minimal Linux Live\" (/init)" # Let's mount all core file systems. /etc/prepare.sh