My grub boot partition belongs to another Linux install and I want to get it back.
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
It appears you have done a re-install. You now have two efi partitions, only need /dev/nvme0n1p1.
During the re-install is there a reason you kept the /dev/nvme0n1p3 partition?
Hi,
I have done a few reinstalls of the second Mint copy, which is now on p3, as it detects the original (main) version of Mint and adds it to grub. This is the only way I have been able to create a boot partition that allows me to choose to boot into my main install.
I've edit the theme cfg file as suggested in that post. And when I run
Code:
sudo dpkg --configure -a
, I get no message, just a new prompt.
When I run
Code:
sudo grub-install
I get :
Code:
Installing for x86_64-efi platform.
grub-install: error: cannot find EFI directory.
And when I run
Code:
sudo update-grub
I get:
Code:
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/50_linuxmint.cfg'
Sourcing file `/etc/default/grub.d/63_mint-theme-2k.cfg'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-6.5.0-26-generic
Found initrd image: /boot/initrd.img-6.5.0-26-generic
Found linux image: /boot/vmlinuz-6.5.0-25-generic
Found initrd image: /boot/initrd.img-6.5.0-25-generic
Warning: 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.
Found Linux Mint 21.3 Virginia (21.3) on /dev/nvme0n1p3
Adding boot menu entry for UEFI Firmware Settings ...
done
sudo mount /dev/nvme0n1p1 /boot/efi
sudo grub-install
Not necessary, but will prevent failure if there is grub package upgrade, create a mount point for the efi partition in /etc/fstab similar to the previous fstab.
Last edited by colorpurple21859; 04-07-2024 at 11:48 AM.
I'm not sure what you are doing but originally, you indicated your 'new' install of Mint was on partition three and your 'old' install was on partition 5. Your most recent boot repair doesn't even show a partition 5. What happened there? You show a Linux partition on partition 2 now?
The UUID for partition 2, according to boot repair, is 0ca5353e-55f2-4bde-85a3-4183a5361c2d which is what partition 5 originally showed so if that is the partition you want booting, you need to go into the grub.cfg file on the EFI partition and change your UUID there to the one for partition 2. Do as root, save and reboot. The current UUID in that file is 'b5b94bdb-d97d-48d0-8f30-bcedf470b919' which is partition 3 that you indicate is the new install. Have you already made this change? Did you run the update-grub command from partition 2, the original install?
Might this have something to do with LVM? Did you do both installs LVM? I don't use it but many others here so.
sudo mount /dev/nvme0n1p1 /boot/efi
sudo grub-install
Not necessary, but will prevent failure if there is grub package upgrade, create a mount point for the efi partition in /etc/fstab similar to the previous fstab.
Many thanks colorpurple21859!! That seems to have done the trick!
I'm not sure what you are doing but originally, you indicated your 'new' install of Mint was on partition three and your 'old' install was on partition 5. Your most recent boot repair doesn't even show a partition 5. What happened there? You show a Linux partition on partition 2 now?
The UUID for partition 2, according to boot repair, is 0ca5353e-55f2-4bde-85a3-4183a5361c2d which is what partition 5 originally showed so if that is the partition you want booting, you need to go into the grub.cfg file on the EFI partition and change your UUID there to the one for partition 2. Do as root, save and reboot. The current UUID in that file is 'b5b94bdb-d97d-48d0-8f30-bcedf470b919' which is partition 3 that you indicate is the new install. Have you already made this change? Did you run the update-grub command from partition 2, the original install?
Might this have something to do with LVM? Did you do both installs LVM? I don't use it but many others here so.
Hi Yacek,
Yeah, 0ca5353e-55f2-4bde-85a3-4183a5361c2d is the main Linux install and it now has control of grub. I don't think this was an LVM issue, I think it was connected to removing fonts or something like that.
Anyway, seems to be ok now. Thanks very much for your help and advice!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.