Commit Graph

4 Commits (743c38d878b37d0305f6cad79bc0d3ee07da1fbd)

Author SHA1 Message Date
Harald Hoyer 2394813bf3 mount move instead of umount and fix the search for fallback inits
chdir to newroot, then mount move instead of umount /dev, /sys, etc.
search for fallback init bins in current dirs
2009-03-06 11:53:49 +01:00
Harald Hoyer 63efe29bb3 use switch_root code from http://pjones.fedorapeople.org/mkstart/usr/lib/mkstart/switchroot.c 2009-03-06 10:57:12 +01:00
Harald Hoyer aedead8068 add \n to switch_root 2009-03-04 17:49:19 +01:00
Harald Hoyer c4da240717 replace switch_root shell script with binary
The switch_root shell script did not work with bash-4.0-2, because
"exec" gets the real path of the executable which is then
"/sysroot/lib/ld-linux.so.2" instread of "./lib/ld-linux.so.2".

Also the required chroot binary might live in /usr/bin, which can
be mounted later.

Here is the switch_root code from nash, which can be stripped down
further, but which works.

>From f1b1e4f8694104f007e4483c36b0bf40a5760167 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Date: Wed, 4 Mar 2009 13:41:07 +0100
Subject: [PATCH] replace switch_root shell script with binary

The switch_root shell script did not work with bash-4.0-2, because
"exec" gets the real path of the executable which is then
"/sysroot/lib/ld-linux.so.2" instead of "./lib/ld-linux.so.2".
Also the required chroot binary might live in /usr/bin, which can
be mounted later.

Here is the switch_root code from nash, which can be stripped down
further, but which works.
2009-03-04 17:23:03 +01:00