LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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


Reply
  Search this Thread
Old 07-24-2021, 08:49 AM   #1
TechnoJunky
Member
 
Registered: Aug 2007
Location: Illinois (NW Chicago burbs)
Distribution: Fedora
Posts: 86

Rep: Reputation: 1
Grub and BootRepair Issues


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.
 
Old 07-24-2021, 09:48 AM   #2
verndog
Member
 
Registered: Oct 2007
Posts: 279

Rep: Reputation: 68
Is there a reason why your using Legacy instead of uefi? There's benefits to using efi.
 
Old 07-24-2021, 09:59 AM   #3
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,371

Rep: Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593
Run and post the boot-info from the boot-repair
 
Old 07-24-2021, 10:09 AM   #4
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,371

Rep: Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593
Quote:
Is there a reason why your using Legacy instead of uefi?
when uefi first came out some manufacturers would install windows in legacy mode instead of uefi mode.

Last edited by colorpurple21859; 07-24-2021 at 10:10 AM.
 
Old 07-24-2021, 10:37 AM   #5
TechnoJunky
Member
 
Registered: Aug 2007
Location: Illinois (NW Chicago burbs)
Distribution: Fedora
Posts: 86

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by verndog View Post
Is there a reason why your using Legacy instead of uefi? There's benefits to using efi.
My options are UEFI or Legacy. Just EFI is not an option.
 
Old 07-24-2021, 10:41 AM   #6
TechnoJunky
Member
 
Registered: Aug 2007
Location: Illinois (NW Chicago burbs)
Distribution: Fedora
Posts: 86

Original Poster
Rep: Reputation: 1
Boot-info uploaded to http://paste.ubuntu.com/p/sBGcjQbmTk/
 
Old 07-24-2021, 05:55 PM   #7
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,371

Rep: Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593
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
 
Old 07-25-2021, 08:36 AM   #8
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,548

Rep: Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498
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.
 
Old 07-26-2021, 11:40 AM   #9
TechnoJunky
Member
 
Registered: Aug 2007
Location: Illinois (NW Chicago burbs)
Distribution: Fedora
Posts: 86

Original Poster
Rep: Reputation: 1
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.
 
Old 07-26-2021, 12:11 PM   #10
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,371

Rep: Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593
Now that you can boot neon, run
Code:
sudo grub-install 
sudo update-grub
and see if it will pick up windows and speed up the boot process

Last edited by colorpurple21859; 07-26-2021 at 12:15 PM.
 
Old 07-27-2021, 07:09 AM   #11
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,548

Rep: Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498
Quote:
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.

https://docs.microsoft.com/en-us/win...artition-style

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.

https://help.ubuntu.com/community/UEFI
 
Old 07-27-2021, 08:17 AM   #12
TechnoJunky
Member
 
Registered: Aug 2007
Location: Illinois (NW Chicago burbs)
Distribution: Fedora
Posts: 86

Original Poster
Rep: Reputation: 1
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.
 
Old 07-27-2021, 09:03 AM   #13
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,371

Rep: Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593
check your /etc/fstab uuids compared to actual uuids
 
Old 07-27-2021, 02:07 PM   #14
TechnoJunky
Member
 
Registered: Aug 2007
Location: Illinois (NW Chicago burbs)
Distribution: Fedora
Posts: 86

Original Poster
Rep: Reputation: 1
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.
 
Old 07-27-2021, 03:38 PM   #15
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,371

Rep: Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593
at the grub menu press c for for a grub> prompt, enter the following two lines and see if windows will boot.
Code:
chainloader (hd0,1)\EFI\Microsoft\Boot\bootmgfw.efi
boot
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Infinite Grub Loop: GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB... beeblequix MEPIS 2 11-02-2013 10:56 PM
DNS issues, Downloading issues, Web issues. UbuntuHelp Linux - Networking 1 08-28-2012 07:34 AM
Booting my new ubuntu install = "GRUB GRUB GRUB GRUB GRUB" etc. dissolved soul Ubuntu 2 01-13-2007 12:55 PM
Grub, Grub and Grub ZeroEffect Linux - Newbie 11 10-07-2004 01:33 PM
GRUB GRUB GRUB GRUB "Whats Going on?" Gaweph Linux - Newbie 6 03-26-2004 10:40 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:21 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration