Skip to content

Instantly share code, notes, and snippets.

@derhuerst
Created March 5, 2016 01:23
Show Gist options
  • Save derhuerst/a29598b56703594d0599 to your computer and use it in GitHub Desktop.
Save derhuerst/a29598b56703594d0599 to your computer and use it in GitHub Desktop.
grub 2 with chroot from live stick
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