0

I'm trying to recover my Grub with Live USB, I tried these commands to recover but get error in the last command.

ubuntu@ubuntu:~$ sudo mount /dev/sda3 /mnt
ubuntu@ubuntu:~$ sudo mount --bind /dev /mnt/dev
ubuntu@ubuntu:~$ sudo mount --bind /proc /mnt/proc
ubuntu@ubuntu:~$ sudo mount --bind /sys /mnt/sys
ubuntu@ubuntu:~$ sudo chroot /mnt
root@ubuntu:/# grub-install /dev/sda
Fatal Python error: Py_Initialize: Unable to get the locale encoding
LookupError: no codec search functions registered: can't find encoding

Current thread 0x00007f209f0d4740 (most recent call first):
Aborted (core dumped)

Current thread 0x00007f209f0d4740 (most recent call first): Aborted (core dumped)

My fdisk -l

Device         Start       End   Sectors   Size Type
/dev/sda1       2048    487423    485376   237M EFI System
/dev/sda2     487424  33314815  32827392  15.7G Linux swap
/dev/sda3   33314816 130971647  97656832  46.6G Linux filesystem
/dev/sda4  130971648 468860927 337889280 161.1G Linux filesystem

My Linux is installed in sda3.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.