Kaydet (Commit) 6ad6a1a9 authored tarafından Your Name's avatar Your Name

init fix

üst b7d143ad
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
common_boot(){ common_boot(){
debug "Moving mountpoints" debug "Moving mountpoints"
mount --move /sys /rootfs/kernel/sys mount --move /sys /rootfs/sys
mount --move /proc /rootfs/kernel/proc mount --move /proc /rootfs/proc
mount --move /dev /rootfs/kernel/dev mount --move /dev /rootfs/dev
mount --move /tmp /rootfs/tmp mount --move /tmp /rootfs/tmp
mount --move /run /rootfs/run mount --move /run /rootfs/run
} }
...@@ -44,10 +44,10 @@ normal_boot(){ ...@@ -44,10 +44,10 @@ normal_boot(){
mount -t tmpfs tmpfs /rootfs mount -t tmpfs tmpfs /rootfs
mkdir -p /rootfs/tmp mkdir -p /rootfs/tmp
mkdir -p /rootfs/run mkdir -p /rootfs/run
debug "Creating symlinks" mkdir -p /rootfs/dev
ln -s kernel/dev /rootfs/dev mkdir -p /rootfs/sys
ln -s kernel/sys /rootfs/sys mkdir -p /rootfs/proc
ln -s kernel/proc /rootfs/proc debug "Creating binds"
for i in boot bin lib32 etc kernel lib64 sbin usr data lib root var for i in boot bin lib32 etc kernel lib64 sbin usr data lib root var
do do
debug "Binding /$i" debug "Binding /$i"
...@@ -57,10 +57,10 @@ normal_boot(){ ...@@ -57,10 +57,10 @@ normal_boot(){
common_boot common_boot
} }
clasic_boot(){ classic_boot(){
debug "Mounting rootfs" debug "Mounting rootfs"
mkdir -p /rootfs mkdir -p /rootfs
mount -t auto $root /newroot mount -t auto $root /rootfs
common_boot common_boot
} }
...@@ -68,10 +68,10 @@ if [ "$boot" == "live" ]; then ...@@ -68,10 +68,10 @@ if [ "$boot" == "live" ]; then
msg "Booting from live-media" msg "Booting from live-media"
live_boot live_boot
fi fi
if [ "$boot" == "classic" ]; then if [ "$boot" == "normal" ]; then
msg "Booting from $root (classic)"
clasic_boot
else
msg "Booting from $root" msg "Booting from $root"
normal_boot normal_boot
else
msg "Booting from $root (classic)"
classic_boot
fi fi
...@@ -7,7 +7,7 @@ fi ...@@ -7,7 +7,7 @@ fi
[ -d "/new_root/$subdir" ] || subdir="/" [ -d "/new_root/$subdir" ] || subdir="/"
debug "Subdir=$subdir" debug "Subdir=$subdir"
[ ! -n $init ] || init=/sbin/init [ "$init" != "" ] || init=/sbin/init
debug "init=$init" debug "init=$init"
if [ -f /new_root/$subdir/etc/initrd.local ]; then if [ -f /new_root/$subdir/etc/initrd.local ]; then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment