Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Assume partitions as below
- # EFI partition: /dev/sda6
- # OS partition: /dev/sda5, /dev/sda8, etc.
- # This assume EFI partition is formated as FAT32 with "boot,esp" flags
- # After boot using Live CD,
- # first, then mount to OS partition, say /dev/sda8
- sudo mount /dev/sda8 /mnt
- # Check /etc/fstab to list all fs mapping
- # Need to double check if any partitions are reformated
- cat /mnt/etc/fstab
- # check partition uuid with "blkid" to double confirm uuid mapping is correct
- blkid
- # Next, mount all partitions according to the fstab
- # below is just my example
- sudo mkdir /mnt/boot/efi-partition # to this and grub-install with "--efi-directory" if your EFI partition is corrupted
- sudo mount /dev/sda6 /mnt/boot/efi-partition # or mount to /mnt/boot/efi if EFI partition is not corrupted
- # mount all other required paths
- sudo mount --bind /dev /mnt/dev
- sudo mount --bind /dev/pts /mnt/dev/pts
- sudo mount --bind /sys /mnt/sys
- sudo mount --bind /proc /mnt/proc
- sudo mount --bind /var /mnt/var
- # change root to /mnt or /dev/sda8 (os partition root)
- sudo chroot /mnt
- # grub install
- grub-install --recheck
- # or
- grub-install --recheck --efi-directory=/boot-efi-partition
- # update grub
- update-grub
- # Here, it should work properly!
- # If after this, encounter "grub rescue>" or "Emergency mode",
- # double check all UUID in /etc/fstab again
- # or read the log and find any devices causing timeout
- # DONE!!! Happy hacking!!!
Add Comment
Please, Sign In to add comment