BTS

Message4691

Author joerg1
Recipients bugs, joerg1
Date 2013-12-04.10:06:23
Content
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
History
Date User Action Args
2013-12-04 10:06:23joerg1setrecipients: + joerg1
2013-12-04 10:06:23joerg1linkissue1287 messages
2013-12-04 10:06:23joerg1create