Hello,
I am often in a situation to use grml to correct booting problems
or when the package system has been messed up beyond working.
Some of the commands work simplest when run from within the
target system, i .e. first chroot into it. However typically
there is more to it than just chroot: commands need /proc, /dev is
handled by udev, /var/run now is /run on tmpfs, and while at it
/sys might proove usefull as well.
So I am wondering whether it is possible to include a small
script in grml (e.g. named grml-rescuechroot)
#!/bin/sh
# mount all things a remote root needs and chroot into it
mount $1
cd $1
for i n proc sys dev run; do
mount --rbind /$i $i
done
# Sorry - zsh in not common everywhere
exec chroot . /bin/bash
Bye,
Joerg
|