Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- user@debian:~$ sudo modprobe efivarfs
- user@debian:~$ sudo mount /dev/sda3 /mnt
- user@debian:~$ sudo mount /dev/sda1 /mnt/boot/efi
- user@debian:~$ for i in /dev /dev/pts /proc /sys /sys/firmware/efi/efivars /run; do sudo mount -B $i /mnt$i; done
- user@debian:~$ sudo cp /etc/resolv.conf /mnt/etc/resolv.conf
- user@debian:~$ sudo chroot /mnt
- root@debian:/# apt update
- Hit:1 http://deb.debian.org/debian bullseye InRelease
- Get:2 http://security.debian.org/debian-security bullseye-security InRelease [44.1 kB]
- Get:3 http://deb.debian.org/debian bullseye-updates InRelease [39.4 kB]
- Fetched 83.5 kB in 1s (86.3 kB/s)
- Reading package lists... Done
- Building dependency tree... Done
- Reading state information... Done
- 74 packages can be upgraded. Run 'apt list --upgradable' to see them.
- root@debian:/# mount -t efivarfs efivarfs /sys/firmware/efi/efivars
- mount: /sys/firmware/efi/efivars: efivarfs already mounted on /sys/firmware/efi/efivars.
- root@debian:/# apt install --reinstall grub-efi
- Reading package lists... Done
- Building dependency tree... Done
- Reading state information... Done
- The following package was automatically installed and is no longer required:
- sbsigntool
- Use 'sudo apt autoremove' to remove it.
- 0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 74 not upgraded.
- Need to get 2,536 B of archives.
- After this operation, 0 B of additional disk space will be used.
- Get:1 http://deb.debian.org/debian bullseye/main amd64 grub-efi amd64 2.04-20 [2,536 B]
- Fetched 2,536 B in 0s (24.9 kB/s)
- (Reading database ... 227056 files and directories currently installed.)
- Preparing to unpack .../grub-efi_2.04-20_amd64.deb ...
- Unpacking grub-efi (2.04-20) over (2.04-20) ...
- Setting up grub-efi (2.04-20) ...
- root@debian:/# grub-install /dev/sda
- Installing for x86_64-efi platform.
- Installation finished. No error reported.
- root@debian:/# update-grub
- Generating grub configuration file ...
- Found background image: /usr/share/images/desktop-base/desktop-grub.png
- Found linux image: /boot/vmlinuz-5.10.0-10-amd64
- Found initrd image: /boot/initrd.img-5.10.0-10-amd64
- Found linux image: /boot/vmlinuz-5.10.0-9-amd64
- Found initrd image: /boot/initrd.img-5.10.0-9-amd64
- grub-probe: error: cannot find a GRUB drive for /dev/sdb1. Check your device.map.
- Adding boot menu entry for EFI firmware configuration
- done
- root@debian:/# file /boot/efi/EFI/debian/grubx64.efi
- /boot/efi/EFI/debian/grubx64.efi: PE32+ executable (EFI application) x86-64 (stripped to external PDB), for MS Windows
- root@debian:/# efibootmgr -v | grep debian
- Boot0000* debian HD(1,GPT,c906677e-c2c2-42b5-b818-f0b19c046e95,0x800,0xfa000)/File(\EFI\debian\shimx64.efi)
- root@debian:/# exit
- exit
- user@debian:~$ sudo chroot /mnt
- root@debian:/# efibootmgr
- BootCurrent: 000A
- Timeout: 1 seconds
- BootOrder: 0000,0003,0004,0008,0009,000A
- Boot0000* debian
- Boot0003* UEFI OS
- Boot0004* UEFI OS
- Boot0008* Onboard NIC(IPV4)
- Boot0009* Onboard NIC(IPV6)
- Boot000A* UEFI: USB DISK 2.0 PMAP
- root@debian:/# exit
- exit
- user@debian:~$ sudo umount /mnt/dev
- umount: /mnt/dev: target is busy.
- user@debian:~$ sudo umount /mnt/sys
- umount: /mnt/sys: target is busy.
- user@debian:~$ sudo umount /mnt/proc
- user@debian:~$ sudo umount /mnt
- umount: /mnt: target is busy.
- user@debian:~$ sudo umount /mnt/boot/efi
- user@debian:~$ sudo umount /mnt
- umount: /mnt: target is busy.
- user@debian:~$ sudo umount /mnt/dev/pts
- user@debian:~$ sudo umount /mnt/sys/firmware/efi/efivars
- user@debian:~$ sudo umount /mnt/run
- user@debian:~$ sudo umount /mnt/dev
- user@debian:~$ sudo umount /mnt/sys
- user@debian:~$ sudo umount /mnt
- user@debian:~$
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement