Chroot

From Notes to self
Revision as of 17:45, 7 December 2014 by Verbovet (talk | contribs)
Jump to navigation Jump to search
  • Boot from an external CD or USB disk, e.g., Slackware Setup disk
  • # mkdir /dir
  • # mount /dev/sda1 /dir
  • # 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