The last error in our case can be ignored as /dev/sdb1 is a partition on a live USB stick.Ĭool Tip: How to mount an LVM Partition in a rescue mode! Read more → Grub-probe: error: cannot find a GRUB drive for /dev/sdb1. Sourcing file `/etc/default/grub.d/init-select.cfg'įound linux image: /boot/vmlinuz-5.4.0-88-genericįound initrd image: /boot/initrd.img-5.4.0-88-genericįound linux image: /boot/vmlinuz-5.4.0-74-genericįound initrd image: /boot/initrd.img-5.4.0-74-generic Sourcing file `/etc/default/grub.d/50_linuxmint.cfg' Generate the main configuration file /boot/grub/grub.cfg: # update-grub
Optionally, you may want to update a GRUB’s configuration (for example, if the system was not booting properly due to some incorrect modifications you made in the /etc/default/grub file earlier – this is a time to fix them): # vi /etc/default/grubĪs an example you can take a GRUB’s default configuration file locate here: # cat /usr/share/grub/default/grub Grub-install: warning: EFI variables are not supported on this system.
Install GRUB on the primary disk drive (in our case it is /dev/sda): # grub-install /dev/sdaįile descriptor 4 (/dev/sda1) leaked on vgs invocation. Mount the UEFI partition: # mount /dev/sda1 /mnt/boot/efiīind the directories required by the grub-install and update-grub commands: # for i in /dev /dev/pts /proc /sys /run do mount -B $i /mnt$i doneĬhroot into a broken system: # chroot /mnt Loop0 7:0 0 679.8M 1 loop /run/archiso/sfs/airootfs
Mount a “ root” LVM partition: # mount /dev/vgubuntu/root /mntįind out a name of the UEFI system partition (the first partition of a primary disk drive, i.e. The folder will be present if your system is using UEFI.īoot from the rescue media (this can be a special SystemRescue USB stick or a simple live USB with Ubuntu or Linux Mint or any other system with a Linux shell prompt).ĪCTIVE '/dev/vgubuntu/root' inheritĪCTIVE '/dev/vgubuntu/swap_1' inherit UEFI or BIOS? The easiest way to find out if the system has booted in UEFI or BIOS mode is to look for a folder /sys/firmware/efi. I have tested this GRUB reinstallation on Ubuntu Linux, though all of the commands below should work for the other Linux systems as well.Ĭool Tip: How to create a Linux rescue USB stick! Read more → Reinstall GRUB from Live USB In this note i am describing a particular case of how to repair GRUB by reinstalling it from a live USB if a broken system is configured to boot in UEFI mode and a system’s disk is partitioned to LVM.
reason why should use labels, because memory stick might /dev/sdb on 1 machine, /dev/sdd on another, insert second usb stick or memory card on 1 computer, have diffrent numberings on same computer.There are many reasons why you may need to reinstall GRUB: corrupted boot partition GRUB got overridden after Windows installation some unsupported Linux kernel parameters have been set in a GRUB configuration file and the system is not booting anymore but this can’t be fixed from a GRUB menu as it is not showing up, etc. Not sure if can specify labels in grub, maybe. Use labels on partitions, specify in fstab files far know, can't chainload syslinux, since belive installs in mbr Syslinux configlines need modified work in grub, might give hint of put in grub, have either install grub on each of partitons, chainload, or configure on grub partiton. Install other operatingsystems manually or unetbootin, concidered customizing thisįirst backup, entire process isn't testedĬustomize /boot/grub/menu.lst on grub partition, might go Use unetbootin install grub on first partition (check "show drives", select first partition on memorystick) Mkfs.ext2 /dev/sdb1 (if first partiton on memstick) Disclaimer: didn't go through entire process, teoretically should work