Purchase Linux CDs / DVDs / Flash Drives at OSDisc.com

Welcome to Our Community

While Linux.org has been around for a while, we recently changed management and had to purge most of the content (including users). If you signed up before April 23rd please sign up again. Thanks!

  1. Kennedy Projects is proud to maintain and host Linux.org. Please contact us for any Linux or hosting related services if you find yourself in a jam. - Rob / KennedyProjects.com
    Dismiss Notice

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

Discussion in 'General Linux' started by Hans, Dec 6, 2017 at 7:09 PM.

Tags:
  1. Hans

    Hans New Member

    Joined:
    Nov 6, 2017
    Messages:
    23
    Likes Received:
    4
    Hi everyone,



    I'm new to the Linux world and running the Pearl Mate Artful 6.0 disto. Really liking it, but it has started freezing, so I checked and there were upgrades recommended. I installed them and rebooted - and I am stuck in a "grub" screen that I can't escape from.

    I come from the Mac realm and I know very very little about command line/terminal techniques, and am not yet versed in the the nomenclature of the Linux techniques either (grub?).

    If it would help, might there be a way to roll back the upgrades I just installed this morning?

    Thank you,
    Hans
     
  2. mrcrossroads

    mrcrossroads Silver Member
    Silver Supporter

    Joined:
    Nov 23, 2017
    Messages:
    23
    Likes Received:
    25
    This looks like it's close to your issue: https://ubuntuforums.org/showthread.php?t=1599293

    That's a few years old. Don't know if it still applies. Another resource:

    https://help.ubuntu.com/community/Boot-Repair
     
    #2 mrcrossroads, Dec 6, 2017 at 8:36 PM
    Last edited: Dec 6, 2017 at 8:44 PM
  3. Hans

    Hans New Member

    Joined:
    Nov 6, 2017
    Messages:
    23
    Likes Received:
    4
    Thank you, I'll check those out : )
     
  4. Hans

    Hans New Member

    Joined:
    Nov 6, 2017
    Messages:
    23
    Likes Received:
    4
    Unfortunately, the boot-repair method hasn't worked for this particular problem; when I restart, it just brings me back the grub screen. Going to try the other method now...
     
  5. Hans

    Hans New Member

    Joined:
    Nov 6, 2017
    Messages:
    23
    Likes Received:
    4
    Well; I tried, but I couldn't get through the procedure. Some of the paths look like they may have changed, and I couldn't locate the ISO file. Thanks for the suggestion though :)
     
  6. atanere

    atanere Moderator
    Gold Supporter

    Joined:
    Apr 6, 2017
    Messages:
    550
    Likes Received:
    429
    In another thread (this post) you mentioned that you had created a partition and installed Mac OS on this computer. Is that when the problem began that you are now having with the grub screen? Are you able to boot into the Mac OS?

    When stuck at the grub screen, which do you see?

    grub >
    or
    grub rescue >
     
  7. Hans

    Hans New Member

    Joined:
    Nov 6, 2017
    Messages:
    23
    Likes Received:
    4
    Hi Atanere,

    I see "grub>", not "grub rescue>".

    I am able to boot into the Mac partition when I hold down the alt key during reboot. That gives me access to select which volume to boot (or try) booting into.

    I had added the Mac partition some weeks ago, and it worked fine since installing.

    But, Pearl started freezing (opened apps would dim to gray) and that led me to check and install updates in the hopes they might take care of the freezing problem. After installing them and rebooting, the boot process stopped at a statement (which I don't remember) saying something akin to couldn't load/find/do... I then hard-booted it and that's when I arrived at the grub screen. I had been using reFind and that would show up when I rebooted, but that doesn't appear either...
     
  8. atanere

    atanere Moderator
    Gold Supporter

    Joined:
    Apr 6, 2017
    Messages:
    550
    Likes Received:
    429
    Okay. I've never used a Mac, so many things are unfamiliar to me. If I say something that sounds stupid, it's because I am. :confused::D I understand that the alt key gives you boot options, but I assume that if you don't use the alt key that the computer tries to boot Linux by default (and fails... dumping you to the grub screen). Right?

    I also read your post earlier that you are not well-versed in command line use. Carefully following a series of command line instructions should be able to fix the grub issue and make Linux boot again. But also... you were having issues with the Pearl Linux that you have installed. If you didn't have Pearl Linux for long, maybe it would not be a great loss to overwrite it and re-install Pearl Linux fresh. That process will restore the grub bootloader again too. It may also show your Mac OS as a boot option in grub (like grub does with Windows) but I can't be sure about this since I don't know Mac.

    You've installed Pearl before, so this is a process familiar to you. The main care needed is that you install it to the same partition where it is now and not accidentally overwrite your Mac OS partition. Would you rather do the re-install or would you rather try to follow the command line instructions to restore the existing version of Pearl?

    One of the greatest lessons to learn from all of this is to remember that adding/changing/manipulating operating systems can cause the computer not to boot. There is risk to your Mac OS too, though I'm not sure to what degree. If you have any important files on the Mac partition, it's a good idea to make a backup before beginning.
     
    wizardfromoz likes this.
  9. wizardfromoz

    wizardfromoz Well-Known Member

    Joined:
    Apr 30, 2017
    Messages:
    334
    Likes Received:
    342
    Would have been here sooner, but ... I wasn't :confused:

    Afternoon all.

    Hi Hans, how's your memory?

    Here's my Update Manager from Pearl shot from today (hadn't been in for a couple of weeks)

    [​IMG]

    I am particularly interested in whether you recollect having a few of those Level 4 (orange) ones eg Linux firmware and Kernel.

    Yes, there is, it is called Timeshift, but you do not have it yet. I do, but I won't be using it before I install these updates, because:
    1. I want to see if any of the updates borks my Pearl and
    2. I want to keep Timeshift "clean" while I am taping some videos on how to install and use it, which you and others may find useful.
    I will bring you any news if I find it, but I would be inclined to go with one of @atanere 's options above, depending on how quickly you wish to get back in business, whether there is personal data to be safeguarded, &c.

    Back when I can and good luck.

    Wizard
     
    atanere likes this.
  10. wizardfromoz

    wizardfromoz Well-Known Member

    Joined:
    Apr 30, 2017
    Messages:
    334
    Likes Received:
    342
    BTW - If you have a Live medium (doesn't have to be Pearl, could be a Linux Mint or Ubuntu &c), you can access Pearl on the hard drive and save some logs eg /var/log/apt/history.log and /var/log/dpkg.log to tell us exactly what was downloaded and installed.

    Cheers

    Wiz
     
  11. Hans

    Hans New Member

    Joined:
    Nov 6, 2017
    Messages:
    23
    Likes Received:
    4
     
  12. Hans

    Hans New Member

    Joined:
    Nov 6, 2017
    Messages:
    23
    Likes Received:
    4
    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 ~
     
  13. Hans

    Hans New Member

    Joined:
    Nov 6, 2017
    Messages:
    23
    Likes Received:
    4
     
  14. Hans

    Hans New Member

    Joined:
    Nov 6, 2017
    Messages:
    23
    Likes Received:
    4
    Hi Wizard,
    Yea, this screen-shot looks very familiar - including the level 4 items.
     
  15. Hans

    Hans New Member

    Joined:
    Nov 6, 2017
    Messages:
    23
    Likes Received:
    4
    Not sure what a live medium is though...is it like a bootable version of the OS, like the ISO file?
     
  16. Hans

    Hans New Member

    Joined:
    Nov 6, 2017
    Messages:
    23
    Likes Received:
    4
    Correction
    *Rebooting from Mac OS does take me to the grub screen unless I hold down the alt key*
     
  17. atanere

    atanere Moderator
    Gold Supporter

    Joined:
    Apr 6, 2017
    Messages:
    550
    Likes Received:
    429
    Hi Hans, I'm doing some research first to try to avoid errors with the grub commands, especially in the Mac world. When you said, "/root/swap/home" I began to worry.... that is not a normal Linux partition description, and I have to wonder if it might be because you're on a Mac.

    Actually, in Linux, "/root/swap/home" is just describing a folder named "home" in the filesystem (not a partition)... but this description is not normal even in that situation. Maybe you just gave it as an example of things you've seen so far and not as a true path to a folder? A quick refresher: hard drives are typically designated as /dev/sda for the 1st or only hard drive, and if you have a 2nd hard drive it would be designated as /dev/sdb. Partitions are designated with a number attached to the hard drive, such as /dev/sda1, /dev/sda2, etc. Giving commands at the grub> prompt must correctly identify which drive and which partition, but the instructions that I've found so far should help us to identify that information. You can understand how important it is that we get this right so we don't damage your Mac OS.

    I'll try to get back shortly, but also Wizard is very skilled in restoring from a grub> prompt, so he may jump in quicker with some advice (although a Mac system may be unfamiliar to him as well, I don't know).
     
  18. Hans

    Hans New Member

    Joined:
    Nov 6, 2017
    Messages:
    23
    Likes Received:
    4
    Hi Atanere, the reason I portioned the drive like that for Linux was because several how-to install Linux tutorials I found on Youtube used that method; I don't remember the reasoning they gave, but they recommended around 20GB for a root partition, 8GB for a swap partition, and the the rest for a home partition (my home partition is 160GB). After seeing this recommended more than once I started thinking I should do the same thing, so my designations ended up being:
    /dev/sda4 (root)
    /dev/sda5 (swap), &
    /dev/sda6 (home).

    I'll bet this is why I keep seeing permission problems, then having to open things as Administrator, and change permissions to give me more control. I get that from trying to access stuff from the Mac partition, but didn't think I would see that accessing Linux stuff from inside Linux (but I do).

    Anyway, just wanted to mention why I used the root/swap/home approach.

    Thank you
     
    atanere likes this.
  19. atanere

    atanere Moderator
    Gold Supporter

    Joined:
    Apr 6, 2017
    Messages:
    550
    Likes Received:
    429
    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
     
  20. wizardfromoz

    wizardfromoz Well-Known Member

    Joined:
    Apr 30, 2017
    Messages:
    334
    Likes Received:
    342
    That article by Carla looks fine to me, Stan. I have used it before and it worked and as far as I can see it is still current. Love that Apollo 17 pic.

    @Hans - mate in these cases

    ... we go with the numerals only as fas as the two following the first dash, then "-generic"

    so in my screenshot above, that would be 4.13.0-19-generic in both lines 2 and 3 of Stan's code.

    Yours may be a fraction different (eg 4.13.0-16 or 4.13.0-17), with the updates you performed having a dubious outcome, but the tab complete should reveal.

    I am off to Pearl to run those updates and see if any light is shed.

    Wizard

    Edited - added a little more on 4.13 series of kernel
     
    #20 wizardfromoz, Dec 9, 2017 at 3:15 AM
    Last edited: Dec 9, 2017 at 3:30 AM

Share This Page