Posted: . At: 10:00 PM. This was 6 years ago. Post ID: 2003
Page permalink. WordPress uses cookies, or tiny pieces of information stored on your computer, to verify who you are. There are cookies for logged in users and for commenters.
These cookies expire two weeks after they are set.


Re-install the GRUB 2 bootloader in Debian easily.


To re-install the grub2 bootloader in Debian 6.0 , you need to be chrooted into the filesystem, this can be done from the installation DVD or an Ubuntu Live CD. Once you are sitting at a root prompt on the Debian system, you need to type:

debian ~ # grub-install /dev/sda

This will re-install the GRUB bootloader in the Master Boot Record of the hard drive.

Then if you have installed a new kernel from source or changed the configuration of the system bootloader in any other way, you can update the grub.cfg by typing this command:

debian ~ # grub-mkconfig > /boot/grub/grub.cfg

This performs the same operations as running update-grub on Ubuntu. Then you can use ^D to exit the chroot and then type sudo init 6 to re-boot the machine and access your Debian installation! This is a very fast and easy way to fix your Debian system if the bootloader is overwritten and the Linux user needs access back to their Linux installation after a Windows installation has taken over a machine. Apparently Windows 10 can do this all the time. But it is not a very good OS if it does that. But that is progress. Updates installing while you are working, and then your system rebooting in the middle of whatever you were doing. That should not be acceptable behavior from any operating system. Why put up with this? Have we started to go backwards after the release of the Xerox Star computer system in 1982?


Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.