Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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.
I have a dual boot laptop. My primary OS is Neon. A while ago I decided to add Ubuntu Studio. Originally, in the Bios I could choose which boot partition to use. If I set it to Neon, I'd see the Neon boot menu, if I chose Studio, I'd see it's boot menu, and if Windows then no boot menu at all. Ever since I installed Neon, if I didn't select Neon quickly at the menu, the computer would freeze and I'd have to reboot again. This didn't seem to be the issue with the Studio menu, so I've left it on that even though I haven't actually booted into Studio in a long time. I decided to get rid of Studio and just go with Neon. However, even after changing the Bios to load the Neon boot partition, it goes to the grub rescue screen. I've used Boot Repair many times over the years and never had any issues with it. But today I can't get it to work.
I have a couple live disks (Neon and Studio) that I've tried, each have the same results.
The first issue is that it complains that I have "legacy" Windows and the boot of my PC is in EFI mode and that I should change it to Bios-compatibility/CSM/Legacy mode. First I tried telling it to go on anyway and it gave me the second issue, which I'll explain in a bit. Then I tried going into the Bios and changing it from UEFI to Legacy, rebooted and tried Boot Repair again. It came back with the same error. When I tell Boot Repair to go on anyway, it then comes back with the second error saying 'dpkg-error detected. ..open terminal (run) "sudo chroot "/mnt/boot-sav/sda8" dpkg --configure -a". So I do that and then get this error "dpkg: error: unable to access the dpkg database directory /var/lib/dpkg: No such file or directory". /var/lib/dpkg does exist.
I can't get any further than this. Any ideas would be greatly appreciated. I really don't want to reinstall Neon to get past this.
Give this a try, from one of the live systems open gparted highlight sda1, up at the top click on partition, click on manage flags, put a check mark in the esp box close out and reboot. If you don't get a grub menu, try with legacy enabled and disabled, and from the bios boot menu
I don't know what happened but you have multiple problems. Line 5 of boot repair shows windows code in the MBR which would be used on a Legacy/CSM system. Line 138 shows that sda, the drive on which you have windows and neon, is a GPT disk. You can't boot a windows install on a GPT disk unless it is in UEFI according to microsoft. sda1 looks like it might have been the EFI entry but does not show and directory for Neon or Windows. EFI entries for windows and Neon do show in the BIOS firmware, Lines 119 and 120.
Line 179 shows sda1 as BIOS boot partition with a size of 500MB, a Linux BIOS boot partition is 1-2MB in size while EFI partitions are much larger, sometimes up to 500MB so that may have been the original EFI partition which was changed to BIOS boot deleting all your EFI files.
Scrolled down further in your boot repair output and see on line 222 that blkid output shows sda1 as an EFI partition. Also, on lin 293 it shows /boot/efi was installed on sda1 which confirms you originally had an EFI install of at least windows and Neon.
You could try suggestion mentioned above. Make sure you make note of specifically what you did and the results of the actions. If that doesn't work, post back as you may need to reinstall windows EFI files which will require a windows install or recovery disk. You will also need to reinstall Grub EFI.
Wow. Yancek, you make it sound like it's a complete mess. I've had it for several years and have installed multiple versions of Linux and had to reinstall Windows after moving Windows partitions around.
As I stated in the original post, I had 2 versions of Linux, Neon and Ubuntu Studio. Both had /boot contained within their own root partitions. I deleted Studio's partition so had some free space. I decided to install Neon (again) in this new space but create a separate /boot partition. After install I could then boot to both versions of Neon using this new /boot partition. I then went in and deleted the new Neon partition and went into the old Neon and ran grub-update. It cleaned up the boot menu and now boots directly into the old Neon (oddly Windows is not an option afterwards). I also did as ColorPurple suggested and changed the flags of sda1. While it is working, it's not working optimally. Before this issue, I could reboot my computer in roughly 1 minute, from clicking reboot to logged in. Now the boot sequence is taking a couple minutes but I'm sure I can figure that out.
I'll look into your suggestions on the EFI stuff. Thank you.
Last edited by TechnoJunky; 07-26-2021 at 11:47 AM.
Wow. Yancek, you make it sound like it's a complete mess
I've seen a lot worse. First off, having windows in the MBR of a GPT drive is pointless as it won't do anything. To boot windows on a GPT drive, you need to install it in UEFI mode. This is explained at the Microsoft site at the link below.
sda1 appears to have originally been your EFI partition. That is indicated at several places in the boot repair script output but no EFI files show for any of the operating systems you have/had installed which should have been listed under sda1. Further down in the script, there are several BIOS firmware entries showing that there had been EFI installs of windows and neon. Mixing Legacy and UEFI install of Linux/windows is always going to be problematic.
Quote:
Both had /boot contained within their own root partitions.
I'm not sure what your point is here as that is a standard install but if you have an EFI install, you must have EFI boot files on the EFI partition in addition to the boot/grub files.
Some of these problems might be due to a lack of understanding of UEFI. The link below is to Ubuntu documentation which gives a lot of useful information and most of it should apply to Neon as a derivative of Ubuntu. Good luck with it.
Ran both commands, but still no change. Looked in the grub.cfg file and no mention of Windows in it.
The boot up process seems to be hanging on the startup job of a non-existent drive. I hit ESC during the boot up and see that it's waiting a minute and a half on this startup job.
"A start job is running for /dev/disk/by-uuid/b0ff....5efi (45s / 1min 30s).
When I look in /dev/disk/by-uuid, there is no link to this drive. When I run blkid, there is none listed there either.
You were smack on there ColorPurple. I had moved Swap and didn't update the UUID in fstab, it was still trying to mount the old one. Except for the boot menu not having Windows in it, which isn't a big deal, I rarely go in it and can get to it by hitting F12 during boot, everything seems to be fine now. Thank you everyone.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.