Dimitar Zhekov <jimmy@is-vn.bg>:
Looking at lsof(1) output, it seems that unmounting of
/old_root/dev fails because of the kernel daemons keeping
/dev/console open, which doesn't seem very proper to me.
No matter, the right way to move a filesystem IMO is with
mount --move, not by umounting-then-mounting it. The only
drawback is that MS_MOVE has to be #defined [to 8192].
Mounting initrd's /bin as /usr/local/bin was quite dumb
of me I must admit. It's much easier, if needed, to leave
/old_root and put /old_root/bin in $PATH. That's not FHS
compliant, so s/old_root/local/g * if you wish.
2nd_stage_small.tar.gz is created with tar | gzip -9
because it's size is very near the limit (that is, with
mine linked as shared, which currently gives a sig11).
Using .bz2 will be better, if approved by Rene/Clifford.
2nd_stage_small (re)boots/shutdowns with no errors, mount
lists the filesystems mounted properly and /old_root can
be unmounted, so 2nd_stage full should not display errors
as well. Now if there was anybody willing to fix mine...
git-svn-id: http://www.rocklinux.org/svn/rock-linux/trunk@1599 c5f82cb5-29bc-0310-9cd0-bff59a50e3bc
21 years ago Dimitar Zhekov <jimmy@is-vn.bg>:
Looking at lsof(1) output, it seems that unmounting of
/old_root/dev fails because of the kernel daemons keeping
/dev/console open, which doesn't seem very proper to me.
No matter, the right way to move a filesystem IMO is with
mount --move, not by umounting-then-mounting it. The only
drawback is that MS_MOVE has to be #defined [to 8192].
Mounting initrd's /bin as /usr/local/bin was quite dumb
of me I must admit. It's much easier, if needed, to leave
/old_root and put /old_root/bin in $PATH. That's not FHS
compliant, so s/old_root/local/g * if you wish.
2nd_stage_small.tar.gz is created with tar | gzip -9
because it's size is very near the limit (that is, with
mine linked as shared, which currently gives a sig11).
Using .bz2 will be better, if approved by Rene/Clifford.
2nd_stage_small (re)boots/shutdowns with no errors, mount
lists the filesystems mounted properly and /old_root can
be unmounted, so 2nd_stage full should not display errors
as well. Now if there was anybody willing to fix mine...
git-svn-id: http://www.rocklinux.org/svn/rock-linux/trunk@1599 c5f82cb5-29bc-0310-9cd0-bff59a50e3bc
21 years ago Dimitar Zhekov <jimmy@is-vn.bg>:
Looking at lsof(1) output, it seems that unmounting of
/old_root/dev fails because of the kernel daemons keeping
/dev/console open, which doesn't seem very proper to me.
No matter, the right way to move a filesystem IMO is with
mount --move, not by umounting-then-mounting it. The only
drawback is that MS_MOVE has to be #defined [to 8192].
Mounting initrd's /bin as /usr/local/bin was quite dumb
of me I must admit. It's much easier, if needed, to leave
/old_root and put /old_root/bin in $PATH. That's not FHS
compliant, so s/old_root/local/g * if you wish.
2nd_stage_small.tar.gz is created with tar | gzip -9
because it's size is very near the limit (that is, with
mine linked as shared, which currently gives a sig11).
Using .bz2 will be better, if approved by Rene/Clifford.
2nd_stage_small (re)boots/shutdowns with no errors, mount
lists the filesystems mounted properly and /old_root can
be unmounted, so 2nd_stage full should not display errors
as well. Now if there was anybody willing to fix mine...
git-svn-id: http://www.rocklinux.org/svn/rock-linux/trunk@1599 c5f82cb5-29bc-0310-9cd0-bff59a50e3bc
21 years ago |
|
#!/bin/sh
export PATH="/sbin:/bin:/usr/sbin:/usr/bin"
if [ -d /old_root ] && umount /old_root ; then rmdir /old_root else echo "Can't umount /old_root" fi
mkdir -p /lib/modules/$( uname -r ) echo -n >> /lib/modules/$( uname -r )/modules.dep
if [[ "$( < /proc/version)" == "Linux version 2.6."* ]] \
&& type -p udevd > /dev/null ; then /sbin/udevd --daemon udevtrigger udevsettle fi setterm -blank 0 -powersave off -powerdown 0
echo echo ' ******************************************************************' echo ' * Welcome to the ROCK Linux 2nd stage boot disk. *' echo ' ******************************************************************' echo echo "This is a small linux distribution, loaded into your computer's memory." echo "It has everything needed to install ROCK Linux, restore an old installation" echo "or perform some administrative tasks."
for x in /etc/setup-*.sh /setup/setup.sh ; do if [ -f "$x" ] ; then echo ; echo "Running $x ..." ; sh $x echo "Setup script $x finished." fi done
echo ttydevs=""
if [ -z "$autoboot" ]; then echo "Enter the names of all terminal devices (e.g. 'vc/1' or 'tts/0')." echo -n "An empty text stands for vc/1 - vc/6: "; read ttydevs fi
if [ -z "$ttydevs" ]; then ttydevs="vc/1 vc/2 vc/3 vc/4 vc/5 vc/6" fi
if [[ "$ttydevs" = *tts/* ]] ; then echo -n "Connection speed in Baud (default: 9600): " ; read baud [ -z "$baud" ] && baud=9600 else baud=38400 fi
echo echo 'Just type "stone" now if you want to make a normal installation of a ROCK' echo -n 'Linux build ' if type -p dialog > /dev/null ; then echo '(or type "stone -text" if you prefer non-dialog based menus).' else echo '(only the text interface is available).' fi
if [ -z "$autoboot" ]; then echo -e '#!/bin/sh\ncd ; exec /bin/sh --login' > /sbin/login-shell else cat <<- EOT > /sbin/login-shell #!/bin/bash cd case "\$( tty )" in /dev/vc/1) echo "Running 'stone' now.." /bin/sh --login -c "stone" echo -e '#!/bin/sh\\ncd ; exec /bin/sh --login' > /sbin/login-shell exit 0 ;; *) exec /bin/sh --login esac EOT fi chmod +x /sbin/login-shell
for x in $ttydevs ; do ( ( while : ; do agetty -i $baud $x -n -l /sbin/login-shell ; done ) & ) done
exec < /dev/null > /dev/null 2>&1 while : ; do sleep 1 ; done
|