• Welcome to Peterborough Linux User Group (Canada) Forum.
 

Grub menu gone!

Started by fox, August 27, 2020, 07:09:31 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

fox

As if I haven't had enough aggravation on my 5k iMac with the newer Linux kernels, something I did today managed to screw up most of what I carefully cultivated on this computer. It happened with a software update on MacOS Catalina, which was located on my external drive. That drive was shared with Mint, which now appears to be blown away. But worse, I can't bring up a grub menu anymore. I was using Refind, a menu that shows with icons all the bootable partitions, Mac and Linux. Now it doesn't work and removing it, and reinstalling grub on a Ubuntu partition, doesn't bring up the grub menu. I tried several other things - removing Refind, editing the grub config file, using Grub Customizer, and even installing Ubuntu 18.04 in a new partition. I can now boot up MacOS or the default grub file, but that's it. I can manipulate the default grub file by moving the preferred boot partition to the top with Grub Customizer. That's it. Furthermore, Ubuntu can no longer see the external disk connected by Thunderbolt; even gparted doesn't see it. And Ubuntu, which used to boot in 25 seconds, now takes about double. I've been trying to solve this since early afternoon but haven't yet.
Ubuntu 24.10 on 2019 5k iMac
Ubuntu 24.04 on Dell XPS 13

ssfc72

Maybe we can have a PLUG Mug for this coming Monday evening and you can hopefully update us on your recovery progress?
Mint 20.3 on a Dell 14" Inspiron notebook, HP Pavilion X360, 11" k120ca notebook (Linux Lubuntu), Dell 13" XPS notebook computer (MXLinux)
Cellphone Samsung A50, Koodo pre paid service

fox

I can update a bit. The Mint partition on my Thunderbolt external drive wasn't blown away, but I can no longer access a Thunderbolt drive from the Linux side of this computer. I went onto Settings>Privacy>Thunderbolt. The drive shows there and I can set it to direct mount, but neither the File Manager (Nautilus) nor gparted see this drive. However, my 2011 iMac, running Ubuntu 20.04, does see it and it sees the Mint partition, although trying to boot from it hangs. However, I can access that partition and see/copy files that are on it.

With or without that drive, the 5k iMac doesn't see a grub menu, and Refind, which used it allow it to boot from any of the mounted Linux or Mac partitions, no longer works. I can still get Ubuntu to boot and manipulate which kernel it boots, but to do that, I have to use Grub Customizer to set the default partition and kernel I want booted. I can also boot a live USB, but even then, I get no grub menu. I have researched this problem and tried the various proposed solutions (changing grub config, booting holding the shift or esc key); none of this works.
Ubuntu 24.10 on 2019 5k iMac
Ubuntu 24.04 on Dell XPS 13

ssfc72

I wonder if the hard drive that has the Grub, has developed some damaged sectors, from old age?  Maybe you will need to replace a hard drive?
Mint 20.3 on a Dell 14" Inspiron notebook, HP Pavilion X360, 11" k120ca notebook (Linux Lubuntu), Dell 13" XPS notebook computer (MXLinux)
Cellphone Samsung A50, Koodo pre paid service

fox

Plausible, but I tried reinstalling grub on two different drives, to no avail.
Ubuntu 24.10 on 2019 5k iMac
Ubuntu 24.04 on Dell XPS 13

Jason

I'm guessing since you are trying to do all these things that you don't have the Ubuntu partition backed up somewhere? Or was it on the external drive that it won't recognize? Although it sounds like you're saying it's just the MBR at issue here.

Where was Grub located? Was it on the MBR, or another drive? Or was it chainloading, from grub on the mbr to another grub on a drive partition? You could try putting grub on the drive that Ubuntu is on and then change it to be the initial drive on bootup if you think it might have grub on it.

Bill, did you mean an in-person or online meeting? I can't do Monday nights for either. I'm usually at my brother's place then. He has a disability to so I run errands for him including taking out his garbage which has to happen in the evening.
* Zorin OS 17.1 Core and Windows 11 Pro on a Dell Precision 3630 Tower with an
i5-8600 3.1 GHz 6-core processor, dual 22" displays, 16 GB of RAM, 512 GB Nvme and a Geforce 1060 6 GB card
* Motorola Edge (2022) phone with Android 13

fox

Not sure whether grub was just on the MBR or whether it was chain loading too. How do you find out? This problem of grub menu not appearing seems independent of any disk. I say this because I tried two different live USBs (Ubuntu and Knoppix). Both should start up with grub menus, but neither do.

This is yet another mystery to add to the series of mysteries I've had with this particular iMac. I have made up my mind to either use it only as our household computer (MacOSX) or trade it in. But not quite yet. I'm busy with work stuff, and both the Ubuntu and the Mac partitions are OK, even if I have lost the ability to boot up other partitions without a lot of gymnastics. All of this is quite a contrast to my experience with the older, non-5k 2011 iMac, which had been rock-solid as a Linux computer except for the ability to adjust the brightness on the fly.

Incidentally, I do have backups of the Ubuntu and Mint partitions, though they may not be current. The Mint one should be, as it was backed up automatically with TimeShift.
Ubuntu 24.10 on 2019 5k iMac
Ubuntu 24.04 on Dell XPS 13

Jason

Quote from: fox on August 28, 2020, 01:15:55 PM
This problem of grub menu not appearing seems independent of any disk. I say this because I tried two different live USBs (Ubuntu and Knoppix). Both should start up with grub menus, but neither do.

This might be a clue. If even USB sticks are not booting it suggests that maybe the boot order isn't correct? Or perhaps something in the new version of the MacOS doesn't allow you to boot from USB or even other OSes unless something is turned on. Can you check in your BIOS or whatever it's called on a Mac and nose around to see if it's set to EFI or set to not allow alternative other OSes to boot?
* Zorin OS 17.1 Core and Windows 11 Pro on a Dell Precision 3630 Tower with an
i5-8600 3.1 GHz 6-core processor, dual 22" displays, 16 GB of RAM, 512 GB Nvme and a Geforce 1060 6 GB card
* Motorola Edge (2022) phone with Android 13

buster

I used two hds on a computer fairly recently, installed independently. Then I used keystrokes at the beginning of the boot to find boot-able drives the way you find and boot usb sticks, or at least I did. I'm guessing the keystrokes would give you a list and a chance to get into into some of the systems and poke about. Not sure but worth a try if you can find out the keyboard keys.

What would happen if you used a live Ubuntu to look at the partitions? And if it finds them all, install Grub on the mbr from the live edition, which may require using commands and all that old stuff? If the live Ubuntu can be booted of course.

Growing up from childhood and becoming an adult is highly overrated.

fox

Quote from: Jason Wallwork on August 28, 2020, 01:26:01 PM
This might be a clue. If even USB sticks are not booting it suggests that maybe the boot order isn't correct? Or perhaps something in the new version of the MacOS doesn't allow you to boot from USB or even other OSes unless something is turned on. Can you check in your BIOS or whatever it's called on a Mac and nose around to see if it's set to EFI or set to not allow alternative other OSes to boot?

Perhaps I wasn't clear, but both distros on the USB sticks booted successfully. However, normally, at the beginning of the boot sequence you get a menu with choices, and I didn't get this with either.
Ubuntu 24.10 on 2019 5k iMac
Ubuntu 24.04 on Dell XPS 13

fox

Quote from: buster on August 28, 2020, 01:35:17 PM
I used two hds on a computer fairly recently, installed independently. Then I used keystrokes at the beginning of the boot to find boot-able drives the way you find and boot usb sticks, or at least I did. I'm guessing the keystrokes would give you a list and a chance to get into into some of the systems and poke about. Not sure but worth a try if you can find out the keyboard keys.

I did so a search for keystrokes that would make the "invisible" grub menu visible. There were suggestions for the esc and the shift keys. I tried both and in each case they just froze the boot sequence.

Quote from: buster on August 28, 2020, 01:35:17 PM
What would happen if you used a live Ubuntu to look at the partitions? And if it finds them all, install Grub on the mbr from the live edition, which may require using commands and all that old stuff? If the live Ubuntu can be booted of course.

The live Ubuntu can be booted and it shows the internal partitions, but even when the Thunderbolt drive was attached, it did not show. I should have been able to get it to show using the Thunderbolt settings, but it didn't work. Neither did the mount command in a terminal.
Ubuntu 24.10 on 2019 5k iMac
Ubuntu 24.04 on Dell XPS 13

buster

" keystrokes that would make the "invisible" grub menu visible."

What I did had nothing to do with grub or I suspect the mbr . It was I believe at a lower level than grub. Probably used something like f12 or f2, and sometimes just Esc. Soon as I pressed the boot button, pretty well as quickly as possibly, I started tapping one of the keys. and kept tapping until a list showed up. If no,t start over and try another key.

This can be used on a Microsoft or Linux system. Probably not connected to the mbr either. The list wold show me hard drives that could be booted as well as usbs.
Growing up from childhood and becoming an adult is highly overrated.

ssfc72

Monday evening, Aug 31,  would be a get together in the parking lot of the Monaghan rd., outside of the PetSmart store (the strip mall that Tim Hortons is located, at).


Quote from: Jason Wallwork on August 28, 2020, 12:37:19 PM
I'm guessing since you are trying to do all these things that you don't have the Ubuntu partition backed up somewhere? Or was it on the external drive that it won't recognize? Although it sounds like you're saying it's just the MBR at issue here.

Where was Grub located? Was it on the MBR, or another drive? Or was it chainloading, from grub on the mbr to another grub on a drive partition? You could try putting grub on the drive that Ubuntu is on and then change it to be the initial drive on bootup if you think it might have grub on it.

Bill, did you mean an in-person or online meeting? I can't do Monday nights for either. I'm usually at my brother's place then. He has a disability to so I run errands for him including taking out his garbage which has to happen in the evening.
Mint 20.3 on a Dell 14" Inspiron notebook, HP Pavilion X360, 11" k120ca notebook (Linux Lubuntu), Dell 13" XPS notebook computer (MXLinux)
Cellphone Samsung A50, Koodo pre paid service

ssfc72

I wonder if booting up a Live MXLinux Distro, would see the Thunderbolt drive.

Quote from: fox on August 28, 2020, 05:40:26 PM
I did so a search for keystrokes that would make the "invisible" grub menu visible. There were suggestions for the esc and the shift keys. I tried both and in each case they just froze the boot sequence.

The live Ubuntu can be booted and it shows the internal partitions, but even when the Thunderbolt drive was attached, it did not show. I should have been able to get it to show using the Thunderbolt settings, but it didn't work. Neither did the mount command in a terminal.
Mint 20.3 on a Dell 14" Inspiron notebook, HP Pavilion X360, 11" k120ca notebook (Linux Lubuntu), Dell 13" XPS notebook computer (MXLinux)
Cellphone Samsung A50, Koodo pre paid service

fox

#14
Quote from: ssfc72 on August 28, 2020, 10:09:11 PM
I wonder if booting up a Live MXLinux Distro, would see the Thunderbolt drive.

Based on Debian, I don't see why it would be any different than the Ubuntu 20.04 live usb. However, I had the KDE version already downloaded, so I tried it. It wouldn't boot at all on this iMac. I also tried the latest Manjaro live usb because it isn't Debian-based. It booted, and actually runs well, even in live mode. (I'm posting in this now.) But there was no grub menu again. (Maybe it doesn't use one?) In live mode, both the file manager and gparted see the internal partitions of the iMac. Plugging in the Thunderbolt drive, it still doesn't see it. Trying to mount that drive through a Terminal command doesn't do it either. When I plugged in a usb 3 external drive, it was seen and read by both the file manager and gparted.

What happens in all cases is that after booting, I get a dark screen and eventually the live distro boots and I see text going across the screen and eventually the desktop. If booting an installed distro, whatever is the default at the top of the invisible grub menu boots after a dark screen. If it's Ubuntu 20.04 with the 4.15 kernel, the dark screen is brief (10-15 sec) and then you get the "Ubuntu graphic" (Ubuntu written at bottom with a rotating wheel above it, followed by the login screen and quickly, a working desktop. If it's Ubuntu with the 5.4 kernel, the screen stays dark much longer and you get text and a long wait until the boot screen followed by another long wait for the working desktop. All of that is the same as it was before except for the dark screen being longer and the grub menu never showing.

Bottom line. I am still able to run Ubuntu or Mint on this iMac as easily as before, but I have lost the ability to switch the distro via the grub menu. I can choose the distro at the top of the grub list (in this case, Ubuntu 20.04) just by booting the iMac, and it comes up as quickly, or almost as quickly, as it did before. If I want to boot into the MacOS, I just hold the option key at bootup and choose it from the options that show. But I have lost flexibility in two ways: (1) I can't access an external Thunderbolt drive on the Linux side (still can on the Mac side); and (2) if I want to boot a different distro on the drive, I have to boot the default distro first and edit the grub menu through Grub Customizer to change the default distro (or kernel within a distro). This vs. the situation before, where I would just choose what I want to boot through the grub menu.

Because these changes occur even when booting from a live usb, I don't think that the issue is a corrupted disk or partition. I think that somehow, a system update I did on the MacOS introduced some changes at a deeper level concerning how the machine behaves when booting a "foreign" OS. I could be wrong; a number of people have reported grub menu disappearance in Ubuntu or Mint on other computers (Mac and PC). But none of the suggested fixes work on mine, and I don't see how this would affect a grub menu from a non-Ubuntu live distro.
Ubuntu 24.10 on 2019 5k iMac
Ubuntu 24.04 on Dell XPS 13