Chroot

From Notes to self
Revision as of 17:49, 7 December 2014 by Verbovet (talk | contribs) (Verbovet moved page Fix boot loader to Fixing boot loader without leaving a redirect)
Jump to navigation Jump to search
  • 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