Stuck at "grub" screen after installing recommended upgrades & rebooting.

Yes, her instructions have worked for me before too, but I know I was using MBR. Wizard, what do you think about that final step if @Hans is using GPT (which I expect)?

In post #18 he told us his Linux root partition is /dev/sda4.... but I'm also curious if the grub-install shouldn't rather be directed to the EFI System Partition?

Either way, I worry that /dev/sda is not a good choice for grub-install. :confused:
 


Thank you both - so far, I verified my root file system is on (hd3, gpt4) and using tab completion, I found both a "vmlinuz-4.13.0-17" and a "vmlinuz-4.13.0-16", but only one "initrd" file: the 4.13.0-16.
So I entered:

"grub> set root=(hd3,gpt4)"
"grub> linux /boot/vmlinuz-4.13.0-16-generic root=/dev/sda4".
"grub> initrd /boot/initrd.img-4.13.0-16-generic"
"boot"

It didn't drop me at the grub screen this time, and a lot of text scrolled through the screen but then it just stopped - like it did after my first reboot from installing all those updates.

So, I tried substituting the "vmlinuz-4.13.0-17" for the "vmlinuz-4.13.0-16" I used initially. But, it had a similar result. When I had to hard-boot again, it took me back to grub : (
 
Just a quick reply as I'm not home right now.

Do you have 4 hard drives? Seeing hd3 is not something I expected. But if so, part of the trouble may be that you didn't match up the bold text that I said to pay close attention to, and as Carla described. hd3 is not sda.

Remember this stuff is tricky, and we don't want you to crash your Mac OS. If it is on a separate drive, it will be best protected if you unplug it while doing these commands... but that will also change what hd# you see.

Gotta run. More later.
 
Hi Atanere,

No, just one hard drive. But, I think I see why there was a disparity between the steps I should have taken, and those I actually did; I had two usb thumb drives in my computer while I was doing this. Even though I only use Linux and Mac, this is the readout that an “ls” gives me when those USBs are in:

grub> ls

(hd0) (hd0,gpt2) (hd0,gpt1) (hd1) (hd2) (hd2,apple3) (hd2,apple2) (hd2,apple1) (hd3) (hd3,gpt6) (hd3,gpt5) (hd3,gpt4) (hd3,gpt3) (hd3,gpt2) (hd3,gpt1) (cd0)

Using the ls (hdx,y) searches, it was the (hd3,gpt4) that gave me the root file contents listed to look for. This is why I substituted (hd3,4) for (hd0,1). But, based on the information you gave me, I got to thinking, and removed the USBs. When I booted up after that, the designations changed, making me wonder if the hdx designations are relative instead of absolute(?)

Here is what a list command gave after one USB was removed:
grub> ls
(hd0) (hd1) (hd1,apple3) (hd1,apple2) (hd1,apple1) (hd2) (hd2,gpt6) (hd2,gpt5) (hd2,gpt4) (hd2,gpt3) (hd2,gpt2) (hd2,gpt1) (cd0)

…and after removing the 2nd USB:
grub> ls

(hd0) (hd0,apple3) (hd0,apple2) (hd0,apple1) (hd1) (hd1,gpt6) (hd1,gpt5) (hd1,gpt4) (hd1,gpt3) (hd1,gpt2) (hd1,gpt1) (cd0)

Then I disconnected the backup drive that I always have connected and just forget about.

grub> ls
(hd0) (hd0,gpt6) (hd0,gpt5) (hd0,gpt4) (hd0,gpt3) (hd0,gpt2) (hd0,gpt1) (cd0)

and now the command
grub> ls (hd0,1)/ gives:

._.Trashes efi/ .Trashes/ .Spotlight-V100/ .fseventsd/

whereas
grub> ls (hd0,4)/ gives me those root files mentioned in the article you supplied me with:

My actual ones are:

./ ../ lost+found/ boot/ home/ etc/ media/ var/ bin/ cdrom/ dev/ lib/
lib64/ mnt/ opt/ proc/ root/ run/ sbin/ snap/ srv/ sys/ tmp/ usr/ vmlinuz
initrd.img webmin-setup.out lib32/

I’m thinking I should use (hd0,4) in place of (hd0,1) and root=/dev/sda4 in place of root=/dev/sda1, but I’ll wait to see if that is recommended or if I should use (hd0,1) and root=/dev/sda1.

Thanks so much for your help, and sorry for the long response.

Hans
 
I’m thinking I should use (hd0,4) in place of (hd0,1) and root=/dev/sda4 in place of root=/dev/sda1, but I’ll wait to see if that is recommended

Bingo! You'll be teaching this class soon! :D:D (And we could certainly use some Mac experts!)

Follow it all again and see if it will boot using those parameters. I am hopeful that it will.

Still hold off on the final step for Wizard's review. I do think it is incorrect for your setup (as Carla described it), and we need to choose one of two other options for the install-grub.

Cheers
 
Just a holding Post on a Sunday morning on my 3rd coffee (slept in). Playing catch up now.

Back soon with something relevant (I hope), and good and thoughtful work Hans :D

Wiz
 
Hope the coffee is helping! I'm up all night tonight... not by choice (it's my job).

I'm thinking install-grub to /dev/sda4 (after update-grub).... but @Hans may need the Alt-key boot method for that too.

His output for hd0,1 continues to make me nervous about dealing with a Mac. I've long heard that EFI on a Mac is different from PC's.

Perhaps installing rEFInd again when Pearl is running is an option for better boot management?

Cheers
 
Well 6 hours or more later, I am back. Not sure I am any the wiser, but some of what I have found, and determined, may help?

The "determined", which I am, first:

If there is a What, Who, When, Where, Why & How of problem-solving, then the OP, Hans has given us the How? at #22

Thank you both - so far, I verified my root file system is on (hd3, gpt4) and using tab completion, I found both a "vmlinuz-4.13.0-17" and a "vmlinuz-4.13.0-16", but only one "initrd" file: the 4.13.0-16.

Although only a part of the Linux Kernel upgrade process, the vmlinuz and initrd packages travel in pairs, they go hand-in-hand.

I ran those updates on my Pearl, and following is an excerpt of the output from Grub being reconfigured as a part of the process.

For the benefit of Hans, and any new Linux Users amongst The Viewers, GRUB is the GRand Unified Bootloader. Grub2 commenced with v1.99 & is now just called "Grub", whilst versions prior are now referred to as "Legacy Grub".

Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.13.0-19-generic
Found initrd image: /boot/initrd.img-4.13.0-19-generic

Found linux image: /boot/vmlinuz-4.13.0-17-generic
Found initrd image: /boot/initrd.img-4.13.0-17-generic

Found linux image: /boot/vmlinuz-4.13.0-16-generic
Found initrd image: /boot/initrd.img-4.13.0-16-generic

Found Linux Mint 18.3 Sylvia (18.3) on /dev/sda1
Found Linux Mint 18.2 Sonya (18.2) on /dev/sda10
Found PCLinuxOS on /dev/sda11
Found Ubuntu 16.04.3 LTS (16.04) on /dev/sda12
Found Arch Linux on /dev/sda13
Found Ubuntu 17.10 (17.10) on /dev/sda14
Found MX-16.1 Metamorphosis (16.1) on /dev/sda15
... and so on, through 30+ partitions, lol.

I have highlighted the pairs that relate to the Kernels involved, hope no-one is colour-blind.

For Hans to have only one (1) file "vmlinuz-4.13.0-17" withouts an accompanying initrd means that the update process was borked, for reasons unknown, and that is why he has been returned to a grub prompt instead of booting.

I am also going to show you my Pearl Desktop, and the red-coloured icon in its Dock with the stylized T on it is Timeshift, that I have installed, and in future, it will mean that Hans can restore his Pearl with only a few clicks and keystrokes, in, likely, less than 30 minutes.

VGLjmAn.png




Not sure what a live medium is though...is it like a bootable version of the OS, like the ISO file?


The ABOVE From #15, and I think my #10. It is the bootable stick or DVD you used to install Pearl in the first place, but it can just as easily be one which has been burned with another Distro on it, preferably from the same family, which in this case is Debian-based, and could include Ubuntu or a Linux Mint, &c.

We could use such an instrument to safeguard the data you have created with ... I am going to have to go for a minute, so I'll post this and be back

Wizard
 
We could use such an instrument to safeguard the data you have created with ...

...WINE. Wine is an acronym for "WINE Is Not an Emulator" ... go figure :confused:

Someone whom uses Wine would have to help you there, if we cannot get you back into your Pearl, but here's hoping?

I did think about whether I should try reinstalling Pearl, but I really wanted to avoid that if I could. Some of the things I did while in Pearl took me a lot of time and reading to get through (like running a program via Wine that I used long ago on a Windows PC). I am afraid of losing the work that I had put in, not being adept at recreating those techniques.

Wizard
 
Afternoon all. Subject to the OP's ( @Hans ) response to the above Post, I've been doing a little brainstorming, and would welcome input on the following.

From Hans:

...so far, I verified my root file system is on (hd3, gpt4) and using tab completion, I found both a "vmlinuz-4.13.0-17" and a "vmlinuz-4.13.0-16", but only one "initrd" file: the 4.13.0-16.

From my experience with Pearl:

  1. It installed with kernel 4.13.0-16 being shipped
  2. It is likely that when Hans ran updates, Pearl tried to upgrade to 4.13.0-17, but the process borked, leaving him without an initrd-4.13.0-17, HENCE being sent to grub> on a reboot.
  3. When I ran my updates it upgraded to the latest, 4.13.0-19.

Q. What happens if he reboots, and holds down the Shift key, to see if he gets up a Grub Menu? Will it sidestep the effect of rEFInd?

If so, the Grub menu would likely show the entries of Pearl on top and Mac below it.

In between would be a line resembling “advanced options for Pearl Linux”. Hans could choose that option, and be shown perhaps a few lines including the kernel details that are included in the Distro’s install. If there is one there for “... 4.13.0-16-generic”, he would choose that option and it would boot him into Pearl.

If successful in booting into Pearl, we could then show him how to eliminate all traces of 4.13.0-17.

He could then install Timeshift, and take a snapshot of his Pearl setup, to be stored on a separate partition, or externally, if he has the resources. If stored on a separate partition on his HDD, this can be effected by using GParted to downsize his 160 GB Home to say around 100 GB.

Once he has got the Timeshift snapshot, he can run “sudo update-grub” to reflect the revision of kernels, and then try rebooting.

When next he is notified of updates, Linux will skip the 4.13.0-17 in favour of the newer 4.13.0-19 that I am using.

This may need some tweaking, but I think it may be sound, in principle. What think you?

I'd also like to answer some questions from @atanere whereby I have been remiss whilst I was preoccupied with getting my Timeshift tutorial off the ground.

Stan asked:

...But I would like for you to wait on the final step until Wizard weighs in with the directions I'll give below.

This may revolve around the following, from the OP:

Thanks for your help Wizard. I had tried deleting all of v5.1.3 but it still didn't help; I went ahead and partitioned my drive and installed Mac OS that way, so for now, I think I can let this problem go. Since this morning though, I have bigger problems - I installed all the recommended updates and when I rebooted - I get the "grub" screen. From there I can't get anywhere. I'm really in the dark on this one. Can you recommend anything for when this happens?

If any readers are confused that is from #18 at https://www.linux.org/threads/cannot-uninstall-virtualbox-ext-pack-version-5-1.14707/#post-48599

... which is the OP's original thread when he was having problems of a virtual nature.

So given Hans has his Linux on /dev/sdas 4, 5, and 6. It begs the question what is on 1, 2 and 3? And yes, I know, there is some Macintosh.

For those of The Viewers perhaps just entering this thread, the OP is on UEFI - GPT. The GPT part means he will be on a sequential numbering system, and all partitions are Primary, or treated as same.

If it is a given that Mac takes up one to two of those first 3, it means he has put Macintosh on, and then followed that with Linux. It is what you would do with Windows being the sole OS.

If there is a dedicated ESP (EFI System Partition), it will be FAT32 and likely only 300 MB or less. Linux will have tried to install the Grub bootloader there. A GParted picture will tell. This can be taken from a Live medium being inserted and booted from.

So to answer Stan's question - if there is an ESP, I would choose to

Code:
# grub-install /dev/sda

If there is NOT an ESP, I would err on the safe side and

Code:
# grub-install /dev/sda4

.. where /dev/sda4 is the OP's root partition of 20 GB.

I have some more radical ideas which involve trashing my Pearl by eliminating a part of my Kernel process, to duplicate being returned to a grub> prompt, but I would want to hear from the OP first how he is doing?

I have no problems with doing this, as I have installed Timeshift and taken two snaps of Pearl, so it is easily recreated if I cock up.

Cheers

Wiz
 
Sounds promising, Mate, in your own time, we'll be not far away :)

It's been a week now and that must be frustrating for you, but slow and steady wins the race.

Wiz
 
Boot options

Yes, when restarting, it tends to automatically boot to the OS most recently used unless you use the alt key. If I had been using the Mac OS, rebooting doesn't take me to the grub screen, but back to Mac. But, rebooting from grub (since I can't get into Linux) brings me back to grub.

Clean reinstall or rescue existing

I did think about whether I should try reinstalling Pearl, but I really wanted to avoid that if I could. Some of the things I did while in Pearl took me a lot of time and reading to get through (like running a program via Wine that I used long ago on a Windows PC). I am afraid of losing the work that I had put in, not being adept at recreating those techniques.

Regarding grub, it hasn't yet shown me boot options; just the grub prompt and the mention that I can hit "tab" to autocomplete commands. I try that, but don't know the proper use of those commands.

Reinstalling on the desired partition is something I do now feel comfortable with though; I've used a few different partitioning apps and have come to understand the designation given to the Linux partitions (root/swap/home) vs my Mac partition. But - yea - I thank you for mentioning that, as not using care to target the right partition would cause...what was the name of that song from the 70's - 96 tears? lol But yes, I'd prefer try to restore the existing version of Pearl.

Thanks for your assistance Atanere ~
What only 96?:D:D
 
Ah, that helps... thanks. I thought it might be just a bit of a terminology issue. You never actually access the swap partition directly, but it is available to the system.... so you while you may see a reference to the /root partition and the /home partition, you rarely see a reference to /swap.

Well, I think I can get you started... hopefully enough to boot your Pearl Linux. But I would like for you to wait on the final step until Wizard weighs in with the directions I'll give below. The final step is to actually re-install the grub bootloader, and I am still hesitant about that in your case. I haven't quite found enough solid info while Googling around.

These directions below are taken from an article (here) by a lady named Carla Schroder. You can read her full article (highly recommended) but I have just taken the steps out to try to get you directly to the point where you can boot. Each command will be shown in a "code" box and there will be some comments below each command.

Start at the grub> prompt... carefully type things exactly... watch for spaces or no spaces, etc.

Code:
grub> set pager=1
This isn't a terribly important part, but she recommends it, so go ahead.

Code:
grub> ls
That's lower case LS. I hope you get an output that looks like one of these below (tell us in your reply)
(hd0,msdos1) or (hd0,gpt1)

Code:
grub> ls (hd0,1)/
With luck, you'll see an output similar to this below:
lost+found/ bin/ boot/ cdrom/ dev/ etc/ home/ lib/
lib64/ media/ mnt/ opt/ proc/ root/ run/ sbin/
srv/ sys/ tmp/ usr/ var/ vmlinuz vmlinuz.old
initrd.img initrd.img.old


Code:
grub> cat (hd0,1)/etc/issue
This isn't really needed either, it just identifies your Linux. Your Pearl Linux may still say Ubuntu... similar to this:
Ubuntu 14.04 LTS \n \l

Okay... the code below has 4 things to do, one after another. Be sure (hd0,1) matches what you found above, but if somethings seems wrong here then don't proceed. Don't type all of the 2nd and 3rd lines as you see in the example... follow Carla's instructions listed below the code. This is where you use "tab completion" to enter in your exact vmlinuz and initrd file information. Pay special attention to the part in bold... this will not tab complete and you need to correct info. Here we go....

Code:
grub> set root=(hd0,1)
grub> linux /boot/vmlinuz-3.13.0-29-generic root=/dev/sda1
grub> initrd /boot/initrd.img-3.13.0-29-generic
grub> boot
The first line sets the partition that the root filesystem is on.
The second line tells GRUB the location of the kernel you want to use. Start typing /boot/vmli, and then use tab-completion to fill in the rest. Type root=/dev/sdX to set the location of the root filesystem. Yes, this seems redundant, but if you leave this out you'll get a kernel panic. How do you know the correct partition? hd0,1 = /dev/sda1. hd1,1 = /dev/sdb1. hd3,2 = /dev/sdd2. I think you can extrapolate the rest.
The third line sets the initrd file, which must be the same version number as the kernel.
The fourth line boots your system.

With that, I hope that your Pearl Linux comes alive again. The final steps... those that I'm concerned about... are completed from within Pearl Linux at a regular terminal prompt. Although you may have to go through the above process again, please wait and let's see what Wizard thinks about this part. And also, he may offer a better way that the above anyway. My concern is about installing to /dev/sda because that is usually the Master Boot Record (MBR) on a Legacy type hard drive.... and I think yours is going to be GPT instead of MBR. So, here are the final steps, as Carla describes in her article:

Code:
sudo update-grub
sudo grub-install /dev/sda

(Carla shows " # " instead of sudo.... basically the same thing. You're running these commands as root.)

OK, enough typing from me for awhile! :eek::D (Now to post and review for mistakes.)

Cheers
That is a very informative article, Stan.:cool: Thanks for bringing it to my attention. I wish that I had known about it a couple months ago. I had a drive with mint cinnamon which had that very error.:oops: I just reloaded it, but I would have tried to recover it if I had the proper information. Oh, well, water under the bridge or something like that.

Again, thanks,:)
Paul
 
Tsk, tsk, tsk ;)

... and how many years have you been here? I don't know whether I would go as far as to say that this site is the fountain of all knowledge Linux, but it is certainly a healthy spring, or a well.

Seem to be on a water theme, so I will just trickle off, and you can wait with dripping anticipation for my next booboo.

Cheers

Wiz
 
Sounds promising, Mate, in your own time, we'll be not far away :)

It's been a week now and that must be frustrating for you, but slow and steady wins the race.

Wiz
Hi Wizard,

Using the techniques given to me, I was able to boot back up into Pearl - thank you! That was the biggie for me. Although, I still have the boot and performance problems that led me to the update that has caused the problems. But, more info first:

Here is the file I typed up:
 

Attachments

  • upload_2017-12-15_12-31-44.png
    upload_2017-12-15_12-31-44.png
    1.8 MB · Views: 1,089
  • upload_2017-12-15_12-32-27.png
    upload_2017-12-15_12-32-27.png
    2.5 MB · Views: 927
  • upload_2017-12-15_12-32-45.png
    upload_2017-12-15_12-32-45.png
    3.1 MB · Views: 795
  • upload_2017-12-15_12-32-54.png
    upload_2017-12-15_12-32-54.png
    2.6 MB · Views: 1,085
  • Dec 15 report from Hans pdf.pdf
    1.8 MB · Views: 660
Hi Wizard,

Using the techniques given to me, I was able to boot back up into Pearl - thank you! That was the biggie for me. Although, I still have the boot and performance problems that led me to the update that has caused the problems. But, more info first:

Here is the file I typed up:
Please open the file named "Dec 15 report from Hans" from among those 5 files above - it contains all the text and images. Thank you.
 
Hi Hans, thanks for all the info, that helps clarify the picture.

With the GParted shot, on /dev/sda2 just left of "Apple" is a mustard coloured icon with an exclamation mark on it. Can you right-click on that and tell us what it holds?

I have put in a USB stick I know is buggered, and then gone to GParted and taken a shot, and then a shot of the info provided by right-clicking, and you will see what I mean:

0MRoH6w.png


and then right-clicked


poVSdPg.png


I may be onto something here, given your recent output. You have a "flag" on /dev/sda4, your Root partition, saying "msftdata". That is for "Microsoft Basic Data Partition" ... I do not think it should be there. Another flag we get with MS is "msftres" Microsoft Reserved Partition.

If for example you were to remove the Boot flag from /dev/sda1 your ESP, it would likely change to msftdata, because of the FAT32 connection.

Now I know you do not have Windows on there, but you have MountainLion and

  1. Macintosh uses a slightly "twisted" version of UEFI to MS & Linux, historically, apparently and
  2. Macintosh can do funny things when placed on an Intel-based machine.
Brainstorming might help, particularly with MS and Mac users adding input.

Glad you can get into Pearl, but obviously undesirably cumbersome, we'll get that fixed, if you bear with us.

If you are not shy about telling us what you placed on Pearl using Wine, I have installed Wine and can try a couple of things (I am in Pearl, but you may be asleep).. I'll see if I can find MSPaint or something and put it on. Any suggestions welcome.

You have a separate Home partition, so that is good. It should be safe.

Have you data generated in MountainLion you need to save, if we have to remove it & rEFInd?

Cheers

Wizard

Edited typo
 
Hi Hans, thanks for all the info, that helps clarify the picture.

With the GParted shot, on /dev/sda2 just left of "Apple" is a mustard coloured icon with an exclamation mark on it. Can you right-click on that and tell us what it holds?

I have put in a USB stick I know is buggered, and then gone to GParted and taken a shot, and then a shot of the info provided by right-clicking, and you will see what I mean:

0MRoH6w.png


and then right-clicked


poVSdPg.png


I may be onto something here, given your recent output. You have a "flag" on /dev/sda4, your Root partition, saying "msftdata". That is for "Microsoft Basic Data Partition" ... I do not think it should be there. Another flag we get with MS is "msftres" Microsoft Reserved Partition.

If for example you were to remove the Boot flag from /dev/sda1 your ESP, it would likely change to msftdata, because of the FAT32 connection.

Now I know you do not have Windows on there, but you have MountainLion and

  1. Macintosh uses a slightly "twisted" version of UEFI to MS & Linux, historically, apparently and
  2. Macintosh can do funny things when placed on an Intel-based machine.
Brainstorming might help, particularly with MS and Mac users adding input.

Glad you can get into Pearl, but obviously undesirably cumbersome, we'll get that fixed, if you bear with us.

If you are not shy about telling us what you placed on Pearl using Wine, I have installed Wine and can try a couple of things (I am in Pearl, but you may be asleep).. I'll see if I can find MSPaint or something and put it on. Any suggestions welcome.

You have a separate Home partition, so that is good. It should be safe.

Have you data generated in MountainLion you need to save, if we have to remove it & rEFInd?

Cheers

Wizard

Edited typo
Hey there. Yes, I have Mountain Lion backed up now. Also, the game I use Wine for is "Unreal Tournament (Game of the Year edition [year 2000 or so])". I am not a gamer, but this was some of the most fun I've had on any computer, so I was really thrilled to get it working on Linux with Wine. I wish I could remember how I did it, but I do remember it took me a long time to make it happen.

Some breathing room:

Wizard, you know - I did see what you pictured here - the Warning with the exclamation point in GParted. I had to get more productive than Pearl was allowing me to be though, so I tried installing a distro (on another partition) that I hadn't used until now (Linux Mint). Not only do I really like it, but it fixed the boot problem by giving me a boot up screen with choices. Now when I use GParted, the warning and exclamation point is gone. I think I might be happy staying with Mint, if I need to. So far, it's working well for me...
 

Members online


Top