Το plirophoria.blogspot, έχει ως σκοπό να δώσει αυτό που λέει, πληροφορίες που θα μπορούσαν να βοηθήσουν. Μια πληροφορία μπορεί να αλλάξει την ζωή και τον τρόπο αντίληψής μας.

Παρασκευή 29 Μαρτίου 2024

Tutorial - How to Fix Grub EFI from live USB at Debian based OS

Open your terminal.

If for any reason something went wrong, run (exit) command to execute again the procedure.

exit

1. Run the command:

sudo su

2. Then the follow  command, to see which partition has your OS:

lsblk -f

3. After run the command and replace your OS partition where sdaX is. Now You will mount, bind and chroot mnt, with the follow command or each command separately after the symbol (;).

mount /dev/sdaX /mnt ; mount --bind /dev /mnt/dev ; mount --bind  /dev/pts /mnt/dev/pts ; mount --bind /sys /mnt/sys ; mount --bind /proc /mnt/proc ; chroot /mnt

4. Verify your mounded system partitiion sdaX with the symbol (/) by running:

lsblk -f

Now you are at your OS to do whatever it needs in that case to fix grub.

If you don't have internet, fix internet by running as root the command:

tee /etc/resolv.conf <<!

nameserver 1.1.1.1

nameserver 1.0.0.1

nameserver 8.8.8.8

nameserver 8.8.4.4

!

If the grub needs to be installed, check if sda is the correct drive, then run the command or each command separately after the symbol (;):

5. From lsblk -f command, find the /boot/efi partition and replace it at the command to fix the Grub:

mount /dev/sdaX  /boot/efi  ; grub-install  /dev/sda ; update-grub 

If it needs to be reinstalled Grub then:

mount /dev/sdaX  /boot/efi  apt install --reinstall grub-efi-amd64 ; grub-install  /dev/sda ; update-grub 

If it needs the kernel to be reinstalled, then:

apt install linux-image-`uname -r` ; update-initramfs -uk all 

And then update Grub again.

If you think everything is ok, reboot and remove the USB.


0 σχόλια:

Δημοσίευση σχολίου

Translate

Εγγραφή για ειδοποιήσεις νέων θεμάτων

Δημοφιλή

Από το Blogger.

Πληροφορίες

Η πληροφορία είναι ενέργεια που μετουσιώνεται σε γνώση, η γνώση έχει την ιδιότητα του φωτός ή μας απελευθερώνει είτε μας τυφλώνει. Επισήμανση, όλα τα θέματα που έχω γράψει μπορείτε να τα δημοσιεύσετε, αναδημοσιεύσετε, αρκεί να μην αλλοιώνεται το περιεχόμενό τους.