27.04.2024, 23:06 UhrDeutsch | English
Hallo Gast [ Registrierung | Anmelden ]

Grub2 recovery with chroot



It may happen that grub breaks during an update and the system can not start anymore.
Here you can start the Kanotix-live-cd and repair grub with the Acritox-Installer.
But there is another alternative. You may try to repair grub with a chroot.

#### IMPORTANT! ####

The architecture of the live-CD has to be the same as the architecture of your system! 32-bit system requires a 32-bit live-CD, same for a 64-bit-system, here you need a 64-bit live-CD.
--> All commands are executed as root

sudo -i


* Boot with the Kanotix Live-CD.
* Open a terminal and execute the following commands. By typing

fdisk -l

you will find out on which partition the system is installed and where grub needs repair.


From now on i will write /dev/sdX? , you have to replace sdX? with the right term of your partition.

* The filesystem will be mounted on /mnt

mount /dev/sdXY /mnt


* Now the important devices of the filesystem /dev /proc /sys have to be mounted.

for x in proc sys dev; do mount --bind /$x /mnt/$x; done


* Changing into the installes system now:

chroot /mnt 


*If needed, edit the /etc/default/grub files to fit your system again. After that run

update-grub



* Now grub can be written in the MBR using this command

grub-install /dev/sda


* When errors appear, then try to run

grub-install --recheck /dev/sda


* The chroot is left by the command

exit

and /dev and the root filesystem will be unmounted by executing the following command

for x in proc sys dev; do umount /mnt/$x; done
umount /mnt


* Reboot and your system should start again.
XML Revisions of $tag
Seiten-History :: Letzter Editor : caillean :: Eigentümer : caillean ::
Powered by pnWikka 1.0
 
 
Deutsch | English
Logos and trademarks are the property of their respective owners, comments are property of their posters, the rest is © 2004 - 2006 by Jörg Schirottke (Kano).
Consult Impressum and Legal Terms for details. Kanotix is Free Software released under the GNU/GPL license.
This CMS is powered by PostNuke, all themes used at this site are released under the GNU/GPL license. designed and hosted by w3you. Our web server is running on Kanotix64-2006.