Useful sysrecuecd chroot stuff [WIP]

mkdir /mnt/tmp
mount /dev/vdb /mnt/tmp
mount /dev/vda1 /mnt/tmp/boot
mount -o bind /proc /mnt/tmp/proc
mount -o bind /dev /mnt/tmp/dev
mount -o bind /dev/pts /mnt/tmp/dev/pts
mount -o bind /dev/sys /mnt/tmp/sys/
chroot /mnt/tmp /bin/bash

Refs:
* http://www.sysresccd.org/forums/viewtopic.php?t=1684

On Debian/Ubuntu:

dpkg-divert –local –rename –add /sbin/initctl
ln -s /bin/true /sbin/initctl

Refs
* http://mrzard.posterous.com/failed-to-connect-to-socket-comubuntuupstart

This entry was posted in linux and tagged , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *