Created
March 5, 2016 01:23
-
-
Save derhuerst/a29598b56703594d0599 to your computer and use it in GitHub Desktop.
grub 2 with chroot from live stick
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo mkdir /foo | |
sudo mount /dev/sda1 /foo # system partition | |
sudo mount /dev/sda2 /foo/boot/efi # EFI System Partition | |
sudo mount -o bind /dev /foo/dev | |
sudo mount -o bind /sys /foo/sys | |
sudo mount -t proc /proc /foo/proc | |
sudo cp /proc/mounts /foo/etc/mtab | |
sudo chroot /foo /bin/bash | |
# in root shell: | |
grub-install /dev/sda | |
update-grub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment