This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
|
linux:grub [2019/12/11 13:00] 95.91.138.179 created |
linux:grub [2019/12/11 13:17] (current) 95.91.138.179 addded efi |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== update grub from live linux ====== | ====== update grub from live linux ====== | ||
| - | mount partition some where. Bind ''dev'', ''sys'' and ''proc''. Then chroot to the partition and run update-grub inside. Maybe mount windows partition inside the chroot env to make grub find the windows | + | mount root partition to ''/mnt''. Bind ''dev'', ''sys'' and ''proc'' into root part. mount efi partition into /boot/efi of root part. chroot to the partition and run update-grub & grub-install inside. |
| <code> | <code> | ||
| sudo mount /dev/sda2 /mnt | sudo mount /dev/sda2 /mnt | ||
| + | sudo mount /dev/sda1 /mnt/boot/efi | ||
| sudo mount --bind /dev /mnt/dev | sudo mount --bind /dev /mnt/dev | ||
| sudo mount --bind /sys /mnt/sys | sudo mount --bind /sys /mnt/sys | ||
| sudo mount --bind /proc /mnt/proc | sudo mount --bind /proc /mnt/proc | ||
| sudo chroot /mnt | sudo chroot /mnt | ||
| - | sudo mount /dev/sda3 /mnt | ||
| sudo update-grub | sudo update-grub | ||
| + | sudo grub-install | ||
| </code> | </code> | ||