Chroot: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
* Boot from an external CD or USB disk, e.g., Slackware Setup disk | * Boot from an external CD or USB disk, e.g., Slackware Setup disk | ||
* <code># mkdir /dir</code> | * <code># mkdir /dir</code> | ||
* <code># mount /dev/ | * <code># mount /dev/sdaX /dir</code> (substitute /dev/sdaX with your root device name) | ||
* <code># mount --bind /dev /dir/dev</code> | * <code># mount --bind /dev /dir/dev</code> | ||
* <code># mount --bind /dev/pts /dir/dev/pts</code> | * <code># mount --bind /dev/pts /dir/dev/pts</code> | ||
Revision as of 17:48, 7 December 2014
- Boot from an external CD or USB disk, e.g., Slackware Setup disk
# mkdir /dir# mount /dev/sdaX /dir(substitute /dev/sdaX with your root device name)# mount --bind /dev /dir/dev# mount --bind /dev/pts /dir/dev/pts# mount --bind /proc /dir/proc# mount --bind /sys /dir/sys# chroot /dir- Repair the boot loader, for example, for LiLO:
# vi /etc/lilo.conf(if needed)# lilo -v
# exit# umount /dir/sys# umount /dir/proc# umount /dir/dev/pts# umount /dir/dev# umount /dir# reboot