0

My ubuntu is booting to the Grub command line.

I have Ubuntu 16.04 installed on my workstation. I haven't used it for the past ~2 weeks. I think 2 weeks ago I updated the software from the Ubuntu software popup thing, so that could be causing my present issue.

I've research into this problem but can't seem to find a solution to my specific problem. Specifically I looked at After update in Ubuntu 16.04 I ended up in GNU GRUB and appear to be stuck there And several others.

As you can see from the linked image, the only existing filesystem is on (hd0,2), but this is showing as a fat system which is not compatible with Ubuntu. Could my Ubuntu have been wiped somehow? Any advice on how to proceed?

Referenced Image

This is an image of the screen that I see prior to the screen turning black when I boot to my bootable Ubuntu CD and then selecting the option "Try Ubuntu Without Installing"

GParted Screenshot of SDA

GParted Screenshot of SDB

  • Use a liveusb to run lsblk -f to see the filesystem and if ok run fsck – George Udosen Feb 18 '19 at 19:40
  • Thanks, but could you go into more details on how this works? I've never done this before and I'm somewhat new to Ubuntu. – anonuser01 Feb 18 '19 at 19:41
  • I plugged in my bootable ubuntu usb drive. Then I selected the option to "try Ubuntu without installing." Then it brought me to a black screen where it says (initramfs) Unable to find a medium containing a live file system – anonuser01 Feb 18 '19 at 20:23
  • Did you see the GRUB menu when everything was working normally? From the GRUB menu, can you boot into Recovery Mode? Do you know how to fsck your Ubuntu partition? Do you dual-boot with Windows? If so, what version? Do you have a CD disc in the CD drive? Report back to @heynnema – heynnema Feb 18 '19 at 22:10
  • @heynnema I honestly don't recall ever seeing the GRUB menu before. But I hardly ever shut down my workstation. When I shut it down, and have to turn it back on, I usually do other stuff while I'm waiting for it to get to the log on screen. So perhaps the GRUB menu appeared and then disappeared and I didn't notice. I will check if I can boot into recovery mood. I don't actually know how to do that on GRUB. No I don't know how to fsck my Ubuntu partition. – anonuser01 Feb 19 '19 at 00:14
  • I recall installing Windows 7 many years ago on the same machine, but I haven't logged on it since 2016. I don't recall ever wiping my hard drive entirely since I installed it so it should still be installed. I tried using my bootable USB ubuntu drive earlier. I tried both the "try Ubuntu without installing" and "Install Ubuntu" options, and both seems to get stuck on a black screen. I also made a bootable Ubuntu disc that I am going to try tomorrow. – anonuser01 Feb 19 '19 at 00:18
  • I've put together a brief answer to instruct you how to fsck your filesystem. Lets start there. Report back to @heynnema – heynnema Feb 19 '19 at 00:26
  • Edit your question with the output of grep -i grub_ /etc/default/grub. There's a space after grub_. Report back to @heynnema – heynnema Feb 19 '19 at 00:31
  • Edit your question with a screenshot of gparted. If you're not allow to insert images yet, due to your rep, use imgur.com, and then just give me the link, so I can see it. Report back to @heynnema – heynnema Feb 19 '19 at 00:34
  • @heynnema I tried booting from a bootable Ubuntu CD. When I choose the option "Install Ubuntu," I am able to proceed through the steps. However, when I choose the option "Try Ubuntu WIthout Installing," the screen goes black and gets stuck there. Prior to turning black and getting stuck, I get the following errors: tpm tpm0: A TPM error (7) occured attemping to read a pcr value nouveau 0000:04:00.0 bus: MMIOread of 00000000 FAULT at 3e6684 nouveau 0000:04:00.0 bus: MMIOread of 00000000 FAULT at 10ac08 – anonuser01 Feb 19 '19 at 13:40
  • Turn off Secure Boot in your BIOS, and see if you can get to "Try Ubuntu". Or, from memory... when you boot up the Ubuntu Live DVD/USB, watch for the little icon at the middle-bottom of your screen that looks like a little man next to a keyboard, hit the space bar, go to the F6 submenu, select nomodeset, and continue booting, and see if that gets you to "Try Ubuntu". – heynnema Feb 19 '19 at 13:56
  • @heynnema Thanks, will try turning off Secure Boot first. Right now I have it on Disable Legacy Support and Enable Secure Boot." I just switched it toDisable Legacy Support and Disable Secure Boot`. – anonuser01 Feb 19 '19 at 13:59
  • @heynnema This time it brought me to another black screen that says Ubuntu 16.04.5 LTS ubuntu tty1 ubuntu login: So it appears to be prompting for me to log in and I typed my username and password but it said it was incorrect. Shortly after, it gets stuck on the break screen again. – anonuser01 Feb 19 '19 at 14:08
  • If memory serves me, the username=root or admin, and the password is nothing, so just hit the return key. If that gets you in, type startx and see what happens. If that works, get the gparted screenshot. If none of that works, go back into the BIOS and enable legacy support. – heynnema Feb 19 '19 at 14:15
  • @heynnema Also, I just noticed that after I disable secure boot in BIOS setup, and click "apply and save changes," the computer reboots, and then I go in and double check the BIOS setup and Secure Boot is enabled again. – anonuser01 Feb 19 '19 at 14:16
  • @heynnema Please disregard last comment. I just realized that when I click save changes, it asked me to turn in a 4 digit code, which I "typed" but I realized my num lock wasn't turned on when I typed it. – anonuser01 Feb 19 '19 at 14:20
  • @heynnema Tried to boot with secure boot disabled and legacy boot disabled. It did not bring me to a screen that prompted for login info this time. It got stuck on the black screen again. Now I enabled legacy while keeping secure boot disabled and tried to boot again to the Ubuntu CD. It brought me to a screen with the little man next to the keyboard. I tried pressing the space bar. Not sure if it did anything but eventually the screen disappeared and resulted in the TPM error screen again. – anonuser01 Feb 19 '19 at 14:34
  • @heynnema Now I'm at the Ubuntu loading screen again (The one with the ubuntu logo and 5 dots indicating). So it appears to be loading. It did this earlier too. I'll see what it ends up doing this time. – anonuser01 Feb 19 '19 at 14:35
  • @heynnema looks like I got to the Desktop screen after a couple of error screens. Let me see if I can figure out the gparted thing now – anonuser01 Feb 19 '19 at 14:41
  • @heynnema Okay, I just edited the GParted screenshot into the OP. So it actually does appear I have Windows installed still? It also only appears to be showing 1 of my hard drives. I have another 2 TB harddrive on this computer but I don't see it in this screenshot. Nevertheless, I'm pretty sure I partitioned the ~260GB drive to allocate space for both a Windows and Ubuntu installation, so Ubuntu should be on that drive. – anonuser01 Feb 19 '19 at 14:46
  • In gparted, if you click on /dev/sda, you can change it to /dev/sdb. Cause Ubuntu isn't on sda, so lets look at sdb. Do you have Windows 10? – heynnema Feb 19 '19 at 14:50
  • @heynnema I just uploaded the sdb screenshot. That drive is unused. :(, I guess this means my Ubuntu installation got wiped, somehow? UGH. I'm pretty sure I installed Windows 7 in early 2016 or late 2015. I have not booted to the Windows installation since 2016. – anonuser01 Feb 19 '19 at 14:55
  • Yup. Your Ubuntu is gone, and /dev/sdb is totally empty. Reinstall Ubuntu to /dev/sdb if you wish. Please see Update #2 in my answer, and please remember to accept it if all of this was helpful. Thanks! – heynnema Feb 19 '19 at 15:08
  • @heynnema Ughhh. How could it have gotten wiped? I don't think I did anything to wipe it other than click on the "Update" button when I was asked if I wanted to download and update Ubuntu software. This was about 10 days ago. Also I had installed my Ubuntu installation on sda (I'm pretty certain) and not sdb. I partitioned the sda drive into 2. 1 for Windows and 1 for Ubuntu. – anonuser01 Feb 19 '19 at 15:10
  • Can't say. But it doesn't look like Ubuntu was ever on /dev/sda, as I see only Windows there. Sorry. – heynnema Feb 19 '19 at 15:17
  • Thanks for all the help. If Ubuntu was on sda before and it got wiped, would there be any indication that it was installed there previously? – anonuser01 Feb 19 '19 at 15:18

1 Answers1

0

To check the file system on your Ubuntu partition...

  • boot to the GRUB menu
  • choose Advanced Options
  • choose Recovery mode
  • choose Root access
  • at the # prompt, type sudo fsck -f /
  • repeat the fsck command if there were errors
  • type reboot

If for some reason you can't do the above...

  • boot to a Ubuntu Live DVD/USB
  • open a terminal window
  • type sudo fdisk -l
  • identify the /dev/XXXX device name for your "Linux Filesystem"
  • type sudo fsck -f /dev/XXXX # replacing XXXX with the number you found earlier
  • repeat the fsck command if there were errors
  • type reboot

Update #1:

The user's computer is booting up to a grub> command prompt, not a GRUB menu.

Update #2:

Ubuntu is not installed on /dev/sda, and /dev/sdb is totally empty. Somehow /dev/sdb got wiped.

heynnema
  • 70,711
  • Thanks heynnema. I will report back to you tomorrow morning when I get back to my office. Also I misunderstood you earlier when you mentioned "GRUB menu." I DID see the GRUB menu in the past when I boot up. I don't see the GRUB menu now. I just get brought to the GRUB command line screen that I showed in the image in the OP. – anonuser01 Feb 19 '19 at 00:33
  • @Iamanon ah! Now I understand. See my comment above about a gparted screenshot. Remember to start comments to me with @heynnema, or I may miss them. – heynnema Feb 19 '19 at 00:36
  • Ohh okay, I didn't know the @username actually sent out notifications. Okay I will try gparted. Forgive my ignorance, but do I type that on the grub command line that I get brought to (see image in original post) when I turn on my workstation? I don't think I can actually pull up a terminal since I am currently unable to boot. – anonuser01 Feb 19 '19 at 00:38
  • @Iamanon Don't worry about anything else except the gparted screenshot of /dev/sda (if that's your boot drive). You'll have to boot to a Ubuntu Live DVD/USB in "Try Ubuntu" mode. Thanks! – heynnema Feb 19 '19 at 00:40
  • Thanks, I will try that tomorrow. I could not even boot from my bootable flash drive earlier. It could be that my flash drive became corrupted. I will try the bootable disc I made tomorrow and see if that works. @heynnema – anonuser01 Feb 19 '19 at 01:07
  • (I tried to include this in the above comment, but it's not allowing me to). It just deleted it again. I am trying to @user_name you but it keeps disappearing. – anonuser01 Feb 19 '19 at 01:10
  • Ah. No need to enter @heynnema here, as any comment is a direct reply to an answer that I authored. However, if you send me a comment, above, from your question, you'll be able to use that :-) – heynnema Feb 19 '19 at 13:47
  • Ah okay. I am trying to boot to the Ubuntu CD using the option "Try Ubuntu Without Installing." I just updated the the original post with an image of the error screen that I am seeing prior to the screen getting stuck on a black screen. Also, I think I had reformatted my drive when I reinstalled Ubuntu last year, so I think my Windows installation was wiped. – anonuser01 Feb 19 '19 at 13:52