[issue1287] Wishlist: script to run commands in target system

Markus Rekkenbeil markus at bionix-it.de
Wed Dec 4 11:14:54 CET 2013


Hello,

you can use grml-chroot instead of chroot itself.
It is a wrapper script from us.

http://grml.org/online-docs/grml-chroot.8.html

Regards,

Markus "bionix" R.


On 04/12/13 11:06, Joerg Dorchain wrote:
> 
> New submission from Joerg Dorchain <joerg at dorchain.net>:
> 
> 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
> 
> ----------
> messages: 4691
> nosy: joerg1
> status: unread
> title: Wishlist: script to run commands in target system
> 
> _____________________________________
> GRML issue tracker <bts at bts.grml.org>
> <http://bts.grml.org/grml/issue1287>
> _____________________________________
> _______________________________________________
> Bugs-changes mailing list
> Bugs-changes at ml.grml.org
> http://ml.grml.org/mailman/listinfo/bugs-changes
> 


-- 
MfG,
Markus "bionix" Rekkenbeil


More information about the Bugs-changes mailing list