Quantcast
Channel: Debian User Forums
Viewing all articles
Browse latest Browse all 2681

Testing And Unstable • [Solved] Re: [Testing - Trixie] LiveDebian USB flash for GRUB rescue

$
0
0
Lucky enough to post resume from restored system.
And it confirms the statement that accurate question contains half an answer!
To restore GRUB with LiveDebian it is required to perform (and not sure if 'resolv.conf' part is required at all but still):

Code:

user@debian:~$ sudo suroot@debian:/home/user# mount /dev/sda7 /mnt          (Mounted the rootfs)root@debian:/home/user# mount /dev/sda1 /mnt/boot/efi/          (Mounted the EFI boot partition)root@debian:/home/user# for i in /dev /dev/pts /proc /sys /sys/firmware/efi/efivars /run; do sudo mount -B $i /mnt$i; done            (to bind mounts of /dev (device nodes), /proc (process information pseudo-file system), and /sys (kernel objects file system) as well as rest of it)root@debian:/home/user# mount --bind /etc/resolv.conf /mnt/etc/resolv.conf           (For getting your network work inside chroot environment, just mount /etc/resolve.conf)root@debian:/home/user# chroot /mnt/ /bin/bash            (To access/operate your locally installed system from LiveDebian USB and make changes to it)    root@debian:/home/user# nano /etc/default/grub  (GRUB_DISABLE_OS_PROBER=false     (To edit etc/default/grub (as root) after installation so this line reads 'false' which was already uncommented) root@debian:/home/user# apt install network-manager-gnome      (To upgrade the grub and regenerate initramfs if necessary (most probably you don't have to))root@debian:/# grub-install /dev/sda --boot-directory=/bootInstalling for x86_64-efi platform.Installation finished. No error reported.root@debian:/# update-initramfs -uvAvailable versions: 6.12.11-amd646.12.10-amd64Keeping /boot/initrd.img-6.12.11-amd64.dpkg-bakupdate-initramfs: Generating /boot/initrd.img-6.12.11-amd64Copying module directory kernel/drivers/usb/host(excluding hwa-hc.ko sl811_cs.ko sl811-hcd.ko u132-hcd.ko whci-hcd.ko)Copying module directory kernel/drivers/hid(excluding hid-*ff.ko hid-a4tech.ko hid-cypress.ko hid-dr.ko hid-elecom.ko hid-gyration.ko hid-icade.ko hid-kensington.ko hid-kye.ko hid-lcpower.ko hid-magicmouse.ko hid-ntrig.ko hid-petalynx.ko hid-picolcd.ko hid-pl.ko hid-ps3remote.ko hid-quanta.ko hid-roccat-ko*.ko hid-roccat-pyra.ko hid-saitek.ko hid-sensor-hub.ko hid-sony.ko hid-speedlink.ko hid-tivo.ko hid-twinhan.ko hid-uclogic.ko hid-wacom.ko hid-waltop.ko hid-wiimote.ko hid-zydacron.ko)Copying module directory kernel/drivers/net(excluding appletalk arcnet bonding can cdc-phonet.ko cdc_mbim.ko cdc_subset.ko cx82310_eth.ko dummy.ko gl620a.ko hamradio hippi hso.ko huawei_cdc_ncm.ko ifb.ko ipheth.ko irda kalmia.ko lg-vl600.ko macvlan.ko macvtap.ko net1080.ko pcmcia plusb.ko qmi_wwan.ko sb1000.ko sierra_net.ko team tokenring tun.ko veth.ko wan wimax wireless xen-netback.ko zaurus.ko)Adding config /etc/initramfs-tools/conf.d/calamares-safe-initramfs.conf..........................(a lot of installation gibberish from 'dracut-install follows)...dracut-install: cp '/lib/modules/6.12.11-amd64/kernel/drivers/infiniband/hw/mlx4/mlx4_ib.ko.xz' '/var/tmp/mkinitramfs_cB49Ya/lib/modules/6.12.11-amd64/kernel/drivers/infiniband/hw/mlx4/mlx4_ib.ko.xz'Building cpio /boot/initrd.img-6.12.11-amd64.new initramfsroot@debian:/# update-grubGenerating grub configuration file ...Found background image: /usr/share/images/desktop-base/desktop-grub.pngFound linux image: /boot/vmlinuz-6.12.11-amd64Found initrd image: /boot/initrd.img-6.12.11-amd64Found linux image: /boot/vmlinuz-6.12.10-amd64Found initrd image: /boot/initrd.img-6.12.10-amd64Warning: os-prober will be executed to detect other bootable partitions.Its output will be used to detect bootable binaries on them and create new boot entries.grub-probe: error: cannot find a GRUB drive for /dev/sdc1.  Check your device.map.Adding boot menu entry for UEFI Firmware Settings ...done# exit# umount -R /mnt# exit
Reboot with precaution as to choose Boot Priority manually. In my case it comes with frantic pressing [F12] key while boot up lights the display in the very beginning. Then check that all necessary EFI boot options are present and choose the Debian GRUB out of alternatives!
My compliment goes to @pbear without his help nothing would rotate in a right direction ;)

Statistics: Posted by nikobit — 2025-02-05 19:56



Viewing all articles
Browse latest Browse all 2681

Trending Articles