Tuesday, April 3, 2018

Install Grub from chroot


Install Grub from chroot



The simple way to install grub/ grub2 from any Linux live-CD or any other bootable medium.


Step 1: boot from Linux live CD/DVD or even USB
Step 2: mount your hdd
Step 3: chroot in the mounted file system
Step 3: install grub
Step 4: reboot

#fdisk -l
#mount /dev/sda1 /mnt/
#mount -t proc none /mnt/proc
#mount -o bind /dev /mnt/dev
#mount -t sysfs sys /mnt/sys
#chroot /mnt/ /bin/bash
#update-grub
#/usr/sbin/grub-install --recheck --no-floppy /dev/sda
#sync & reboot



SUSE Syntax:

#update-grub is Debian and Ubuntu little helper this execute the same as:


#grub2-install --recheck --no-floppy /dev/sda
#grub2-mkconfig -o /boot/grub2/grub.cfg
#mkinitrd


No comments: