LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-07-2017, 01:28 AM   #1
Orthoducks
LQ Newbie
 
Registered: Mar 2017
Posts: 10

Rep: Reputation: Disabled
Problems installing GRUB 2


I'm trying to repair an Ubuntu 16.04 system whose graphics driver has been corrupted. The instructions I'm following do not work, and I need to figure out why.

I'm supposed to run boot-repair from the distribution DVD to install GRUB 2, then use GRUB 2 to reset the generic display driver. GRUB 2 appears to get installed but won't run.

Following the instructions at https://www.howtogeek.com/114884/how...ntu-wont-boot/, I entered these commands:

Code:
sudo apt-add-repository ppa:yannubuntu/boot-repair
This command appeared to run normally.

Code:
sudo apt-get update
This one gave me the following messages at the end of its output:

Code:
** (appstgreamcli:7166): CRITICAL **: Error while moving old database out of the way.
AppStream cache update failed.
Reading package lists... done.
As I understand this, the boot-repair install was successful but the update was not. I want to understand why and correct it, but I didn't think this should necessarily prevent me from using the program, so I continued.

Code:
sudo apt-get install -y boot-repair
This appeared to run normally.

Code:
boot-repair
boot-repair scanned the "systems" (there's one hard disk with nothing but Ubuntu on it), and asked me if there is RAID on the computer. (There isn't.) It then displayed a dialog with the message, "/boot detected. Please check the options." I don't know what it wants me to check; I just clicked OK. Then I got a dialog which offered me buttons for "Recommended repair," "Create a Bootinfo summary," and "Advanced options."

I clicked "Recommended options." boot-repair said "Applying changes...". After it finished I quit it, then removed the distribution disk and restarted the system, holding down the Shift key as I did so. This was supposed to take me to the GRUB menu, but it didn't. Ubuntu tried to start normally and failed, just as if I weren't holding down Shift, or as if GRUB were not there.

I tried a second time, and when I came to the boot-repair menu I selected "Bootinfo summary." boot-repair generated a report and uploaded it to http://paste2.org/AJ6PMKZ1. After uploading the report, boot-repair sat silently. I don't know what it was doing (if anything), but when I pressed Enter it returned to the command prompt.

I ran boot-repair again and selected "Recommended repair." Again, boot-repair said "Applying changes..." Then it displayed a list of commands which it instructed me to paste into a terminal window. I did so. The commands appeared to execute normally.

I returned to the boot-repair window and clicked Forward. I got a dialog which said, "GRUB is still present. Try again." (So, it appears that GRUB was installed the first time I tried, but wouldn't start for some reason.)

Returning to the second terminal window, I noticed several warnings that "--force-yes is deprecated, use one of the options starting with --allow instead." I gather that some of the commands I entered failed because the deprecated option was used. ("Deprecated" doesn't mean "unsupported" in my dictionary, but something failed.)

So, (a) what could have gone wrong, and (b) what should I do next?

I looked up --force-yes and --allow, and I understand why --force-yes is dangerous, but I don't know which of the --allow options to substitute because I don't know what the commands are doing.

I'm not going to try to type all of the commands I copied/pasted, but here is the first one that uses --force-yes:

Code:
sudo chroot "/mnt/boot-sav/mapper/ubuntu-vg-root" apt-get install -y --force-yes dmraid
 
Old 03-07-2017, 06:22 PM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 18,484

Rep: Reputation: 3097Reputation: 3097Reputation: 3097Reputation: 3097Reputation: 3097Reputation: 3097Reputation: 3097Reputation: 3097Reputation: 3097Reputation: 3097Reputation: 3097
grub is there and is running. Else you wouldn't get to that failed Ubuntu re-start. Try using <Esc> rather than <Shift>.

As you are using LVM for everything other than /boot, you'll have to be a bit careful following instructions you might find to fix things manually. Updates to the grub stanza should be ok though.
As for the AppStream message, plenty of hits from your favourite search engine for fixes.
 
Old 03-07-2017, 08:58 PM   #3
Orthoducks
LQ Newbie
 
Registered: Mar 2017
Posts: 10

Original Poster
Rep: Reputation: Disabled
syg00, thank you for helping me with this. I'm not home safe yet, so I hope you'll stick with me.

First, you said, "Try using <Esc> rather than <Shift>." That worked, but it's a key that one presses rather than a key one holds down, which raises the question: when to press it? I pressed it every second or so starting when the motherboard's splash screen disappeared, but I'd like to know when it actually matters.

After I selected failsafeX, Ubuntu displayed a few pages of text, then settled into a black screen -- the same as when I tried to boot it directly. So the promised fix for my problem did not deliver. I'm open to other suggestions.

As an Ubuntu newbie, I'm unfamiliar with a lot of the terms you used: LVM, stanza, AppStream. I hope you can provide more specific directions, or a pointer to a tutorial, to help me move forward.

As for a backup... no, I don't have one. I feel a little embarrassed about that, but not very, because the work I'm doing with Ubuntu does not involve storing data. There's nothing on the system but Ubuntu itself, some packages I installed, and a handful of scripts that I assume I can copy off by booting from the DVD. (And if I can't, I can rewrite them in less than an hour.)

So the decision not to make a backup was based on the fact that in this case it really wasn't that important. There's no question that if I'd blown away the installation and started over the moment this problem appeared, I'd have been up and running long ago, without losing anything at all.

That said, I would like to start making backups so that I can save data on the machine, should I hanker to, without risk of losing it. I haven't done so yet because I've had trouble finding a backup program I like, and since it is a "nice to have" feature rather than a "got to have" at this point, I put it off rather than settle for something I'd really detest.

I won't complicate things now by listing my criteria for a good backup program, but I may return to that if you're still willing to talk to me when my display problem is solved. :-)

Last edited by Orthoducks; 03-07-2017 at 09:02 PM.
 
Old 03-08-2017, 12:37 AM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 18,484

Rep: Reputation: 3097Reputation: 3097Reputation: 3097Reputation: 3097Reputation: 3097Reputation: 3097Reputation: 3097Reputation: 3097Reputation: 3097Reputation: 3097Reputation: 3097
That backup comment is my sigline - generic, not specifically aimed at you.
As for hitting the <Esc> key, hitting it a couple of times does no harm - I always do. Looks like you have 10 seconds, so wait a couple of seconds after the screen goes blank after the splash screen, then try it.

Quote:
Originally Posted by Orthoducks View Post
I'm supposed to run boot-repair from the distribution DVD to install GRUB 2, then use GRUB 2 to reset the generic display driver.
Show us a link to the source of this contention.
I haven't used Ubuntu in years, so I'm hazy as to what is being referenced.
 
Old 03-08-2017, 03:08 PM   #5
Rickkkk
Senior Member
 
Registered: Dec 2014
Location: Montreal, Quebec, CANADA
Distribution: Arch
Posts: 1,234

Rep: Reputation: 451Reputation: 451Reputation: 451Reputation: 451Reputation: 451
Quote:
Originally Posted by syg00 View Post
That backup comment is my sigline - generic, not specifically aimed at you.
As for hitting the <Esc> key, hitting it a couple of times does no harm - I always do. Looks like you have 10 seconds, so wait a couple of seconds after the screen goes blank after the splash screen, then try it.

Show us a link to the source of this contention.
I haven't used Ubuntu in years, so I'm hazy as to what is being referenced.
Hi guys - I've used Boot-Repair quite extensively - really good tool. Maybe I can add my 2 cents and be of help.

1) My understanding is that you're being told to run Boot-Repair from an Ubuntu installation DVD. This is fine, I suppose, but for convenience sake be aware that Boot-Repair is available as a live ISO itself. I always have it ready on a USB key to troubleshoot boot issues. This would be much faster and simpler than booting the Ubuntu DVD, installing Boot-Repair and running it from there ... Let me know if you don't understand what I mean here.

2) In my experience with Boot-Repair, although this may seem counter-intuitive, I never use the "Recommended Repair" option. I always use the Advanced option. This allows you to specify exactly WHAT Boot-Repair will do and HOW. For example, the answer to most of my boot problems has been to use the "Restore MBR" option, which you can't do unless in Advanced mode. It is often not even necessary to reinstall GRUB. However, when restoring the MBR, it is important to go to the MBR options tab and specify the partition / OS for which you are trying to restore boot functionality. Again, let me know if this requires more explanation.

3) LVM is "logical volume management". This is linux's answer to creating one logical partition out of more than one physical partition. For example, if you have more than one physical disk in the computer, you can configure lvm to mount it as one partition. Your system seems to be configured this way. syg00's comment is just to be mindful when operating on partitions that this is how your system is configured. Same comment re: more explanations ....
 
Old 03-08-2017, 09:41 PM   #6
Orthoducks
LQ Newbie
 
Registered: Mar 2017
Posts: 10

Original Poster
Rep: Reputation: Disabled
syg00 wrote:
Quote:
Show us a link to the source of this contention.
The link to the reference I'm using was in my first post. Search for "Following the instructions".

Rickkk: The separate boot-repair disk sounds like a good thing to have, but right now I just want to get up and running again. Unless I need to boot many more times, I think I'll come out ahead if I defer making preparations for the next disaster until I've recovered from this one. (There's also the bootstrapping question: it is practical or even possible to make a boot-repair disk without having a running system to make it on? I suspect that if I try to mount the distro and a blank disk in my DVD drive at the same time, it will not work well.

Quote:
use the Advanced option. This allows you to specify exactly WHAT Boot-Repair will do and HOW.
OK... but that leaves the question of what I should tell it to do (and how). That's what I was asking in my previous post.

syg00 brought up LVM. I appreciate knowing what it is, but I really don't know if I'm using it or not. I allocated space on the disk with gparted, which suggests that I'm not, but I know almost nothing about this -- just what you told me plus what I learned from the Ubuntu Wiki in about 30 seconds. I think I'd better ignore LVM unless you or Ubuntu tell me I have to deal with it.

Again, I don't know how to go about repairing this problem, and I'd welcome some guidance. The failsafeX option didn't help, and I don't see anything else on the boot-repair menu that looks likely to correct a problem of this nature.
 
Old 03-08-2017, 10:42 PM   #7
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 18,484

Rep: Reputation: 3097Reputation: 3097Reputation: 3097Reputation: 3097Reputation: 3097Reputation: 3097Reputation: 3097Reputation: 3097Reputation: 3097Reputation: 3097Reputation: 3097
That's for boot-repair. I want to know what this is all about - what makes you think the video is corrupt, and where are the instructions that tell you (how) to reset it.
Quote:
Originally Posted by Orthoducks View Post
I'm trying to repair an Ubuntu 16.04 system whose graphics driver has been corrupted. The instructions I'm following do not work, and I need to figure out why.

I'm supposed to run boot-repair from the distribution DVD to install GRUB 2, then use GRUB 2 to reset the generic display driver.
 
Old 03-09-2017, 07:32 AM   #8
Orthoducks
LQ Newbie
 
Registered: Mar 2017
Posts: 10

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by syg00 View Post
That's for boot-repair. I want to know what this is all about - what makes you think the video is corrupt, and where are the instructions that tell you (how) to reset it.
The description of what is happening is in my second post:
Quote:
After I selected failsafeX, Ubuntu displayed a few pages of text, then settled into a black screen -- the same as when I tried to boot it directly.
As for the instructions that tell me how to reset it... I don't understand the question. The instructions are in the boot-repair menu. I appear to have a display driver problem; failsafeX "boots the computer in a failsafe graphic mode" which presumably would let me re-install the proper driver. Nothing could be simpler -- if it actually fixed the problem. Since it didn't fix the problem, and none of the other boot-repair options appear to be relevant, I need advice.
 
Old 03-09-2017, 07:57 AM   #9
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 8,900

Rep: Reputation: 1859Reputation: 1859Reputation: 1859Reputation: 1859Reputation: 1859Reputation: 1859Reputation: 1859Reputation: 1859Reputation: 1859Reputation: 1859Reputation: 1859
I'm not sure why you think Grub is going to solve your graphics driver problem. Maybe posting some info on that problem as suggested would help. There are parameters you can insert on booting Grub which may allow a one time boot but there is no permanent fix.

Your boot repair shows that your installation is using LVM. It has it's advantages but most general computer users don't use it and if you don't know what it is, probably better to not use it. It is also not the default install method so you or whoever installed Ubuntu had to have specifically selected that option.

The boot repair link you posted is from your selecting "Create BootInfo Summary" which will not do anything, not try any repairs as stated at the bottom of the output. If you select another option, it should at least try some repair.

You do have Grub2 installed to the Master Boot Record pointing to the core.img file which is found and you have the Grub files needed including the grub.cfg menu file and nothing stands out there but never having used LVM myself, I'm not sure the menuentries are correct.

Some info on your original graphics problem might help.
 
Old 03-09-2017, 06:38 PM   #10
Orthoducks
LQ Newbie
 
Registered: Mar 2017
Posts: 10

Original Poster
Rep: Reputation: Disabled
Yancek, I can't help feeling that we're going in circles. You asked me for "some info on your original graphics problem." That was in my second post. I quoted it when syg00 asked me the same thing two posts back, so it's in the message you replied to.

Perhaps you need something more, but I have nothing more. Ubuntu displays several screens' worth of text messages before it goes dark, but they go by too quickly to read, and then they disappear. Is there a way I can capture them for you? Or does Ubuntu create a log file that would help? If so, I need to know how to get it, or where to learn.

I'm baffled by your first sentence: "I'm not sure why you think Grub is going to solve your graphics driver problem." One might as well ask why I think Ubuntu is going to solve it. I came here believing I could best repair my installation from the inside, and so far no one has suggested a clear alternative. To repair it from the inside I must boot it, and to boot it without crashing I need Grub.

I'm also baffled by your statement that Create BootInfo Summary won't repair anything. Why did you believe I thought it would? I created the summary to help the community figure out what broke. That seems too obvious to need saying.

Misunderstandings of this sort make me suspect that everyone else has made some fundamental assumption that I don't share. If that is happening, can you help me figure out what it is?

I still want to repair this installation, but I need a working Ubuntu system, and I'm starting to feel that rebuilding it from scratch would be faster and easier than repairing it. If I can't get this discussion back on track I'll have to give up on learning from whatever went wrong and just move on.
 
Old 03-09-2017, 07:51 PM   #11
Rickkkk
Senior Member
 
Registered: Dec 2014
Location: Montreal, Quebec, CANADA
Distribution: Arch
Posts: 1,234

Rep: Reputation: 451Reputation: 451Reputation: 451Reputation: 451Reputation: 451
Orthoducks:

... tough problem, to be sure. Don't get discouraged, people here are trying to help, it's sometimes not easy to know where to start and some of our questions may seem less than helpful to you, but remember that we're not sitting in front of the system, so we're troubleshooting this with you from a distance and at a bit of a disadvantage.

That said, I took another look at your bootinfo posting from Boot-Repair and have the following observations and questions:

- The main grub boot stanza seems to be looking for the kernel on the right partition, the /dev/mapper/ubuntu-vg-root lvm, but 2 questions:

1) I'm wondering if (somehow) a misspelling ended up in the grub.cfg file, because I am reading 2 dashes between "ubuntu" and "vg" instead of one (i.e. /dev/mapper/ubuntu--vg-root instead of /dev/mapper/ubuntu-vg-root, which seems to be the correct name from the info provided at the beginning of the bootinfo file. If this is indeed a mistake, editing the grub stanza to remove one of the dashes would be an interesting step to attempt.

2) Aren't the kernel files under the /boot subdirectory in Ubuntu ? Grub seems to be expecting vmlinuz to be found in / of /dev/mapper/ubuntu-vg-root ... same comment concerning possible correction to attempt if /boot is indeed where the kernel is normally found.

... Anybody else here feel these suggestions might be useful ?

Finally, Orthoducks, I'm also not convinced you actually have some kind of graphics problem. This looks more to me like a boot issue. Unless you have some error message that you either haven't mentioned or that I've missed somewhere in the posts so far.

Keep us informed as to progress (or lack thereof ...) ... ;-)
 
1 members found this post helpful.
Old 03-10-2017, 08:23 AM   #12
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 8,900

Rep: Reputation: 1859Reputation: 1859Reputation: 1859Reputation: 1859Reputation: 1859Reputation: 1859Reputation: 1859Reputation: 1859Reputation: 1859Reputation: 1859Reputation: 1859
Quote:
You asked me for "some info on your original graphics problem." That was in my second post. I quoted it when syg00 asked me the same thing two posts back, so it's in the message you replied to
Your second post simply describes your inability to boot from Grub and the failed attempts. The question is, what was the original problem which led to your belief that you had a graphics driver problem. Apparently, the system did boot at some time and something went wrong so what happened? Was your Ubuntu actually usable at some point? Did you make any changes? Had you installed or tried to install a proprietary graphics driver resulting in this problem?

Grub isn't going to 'repair' your graphics problem. There are parameters you can insert in the Grub menu on boot which might allow you to boot to your Desktop but that is a one time thing. If you can do this, you can then install a new driver or perform whatever needs to be done.

Quote:
I'm also baffled by your statement that Create BootInfo Summary won't repair anything. Why did you believe I thought it would?
Because of your statement below in the original post. The "boot-repair sat silently" part. I see you later tried different options. The Create BootInfo Summary is always the best first option because you can provide info to get helpful suggestions but as you found, it doesn't do anything to try to repair.

Quote:
I tried a second time, and when I came to the boot-repair menu I selected "Bootinfo summary." boot-repair generated a report and uploaded it to http://paste2.org/AJ6PMKZ1. After uploading the report, boot-repair sat silently.
If you had been successfully booting to Ubuntu and using it and suddenly your graphics failed without any changes being made, I would suspect a hardware failure but we don't know what happened. Your problem is not installing Grub because Grub is installed with all the files needed. Since I haven't used LVM, I don't know if your grub.cfg entries are correct.
If you haven't made a lot of changes to the Ubuntu such as installing software and saving data, re-installing would certainly be simpler. A standard new install should not take much more than 30 minutes. If you decide to use LVM again, it would probably be a good idea to read up on its's benefits and disadvantages. Good luck.

Last edited by yancek; 03-10-2017 at 08:30 AM.
 
2 members found this post helpful.
Old 03-10-2017, 12:00 PM   #13
Orthoducks
LQ Newbie
 
Registered: Mar 2017
Posts: 10

Original Poster
Rep: Reputation: Disabled
First: I have access to the system in question only from Sunday night through Thursday night, so anything I need to try will have to wait until next week. Right now I'm working from memory.

Second: Last night I hit the "got to have it now" point... somewhat sooner than I anticipated... and I installed a new Linux system (thereby establishing that this was not a hardware failure, although it could conceivably have been triggered by one). I preserved the original hard disk so I can still work on this problem, but now it's only a matter of learning how to solve a Linux problem, rather than getting my system back, so it's going to have lower priority for me. I want to continue working on it, but don't be surprised if there are much longer delays between my responses.

There are some shell scripts on the original disk that I'd like to retrieve, but that's a distinct problem and I'll address it in another topic if I can't figure it out.

I'm going to give a more detailed explanation of what went wrong. I considered these facts either irrelevant or implicit in my original post, but I've had several questions about them.

My primary working system is Windows 7. I installed Ubuntu on a separate computer a few weeks ago, partly as a learning project and partly as a platform for testing hardware (mainly graphics adapters and hard disks) whose condition is unknown. It worked fine until a couple of weeks ago. It was running an NVIDIA graphics driver (the more recent of two that Additional Drivers offered me), because most of the graphics adapters I'm testing are from NVIDIA.

On the day the problem arose I put a graphics adapter in the system (it was an NVIDIA adapter, and by that I mean an NVIDIA adapter, not some other brand with NVIDIA chips) and I booted it so I could run my usual tests. Some weird stuff happened... I didn't know I was going to have a problem so I wasn't paying attention... and my system ended up in a state where I could run Ubuntu up to the point where it accepted my log-in. Then it displayed several screens full of error messages, which scrolled by too fast to read; then the screen went dark. This was totally reproducible. I don't know whether Linux crashed completely or only the display system failed.

I tried two or three known-good graphics adapters and got the same results, giving me my first indication that it wasn't hardware.

My assumption that it was a graphics driver problem is based on the facts that (1) I was messing with a graphics adapter when it happened, and (2) the symptoms affect the display. I could be wrong about that. It could be anything, and you guys are better qualified to make other guesses than I am.

That said, I'm willing to look at things like double hyphens that should be single, but that sort of failure just doesn't seem likely; how would installing a new graphics card make it happen to a previously functioning system? A .cfg file that's completely corrupted, or a file that's perfectly valid but incompatible with my system, seems more likely.

Last edited by Orthoducks; 03-10-2017 at 01:57 PM.
 
Old 03-10-2017, 01:03 PM   #14
Rickkkk
Senior Member
 
Registered: Dec 2014
Location: Montreal, Quebec, CANADA
Distribution: Arch
Posts: 1,234

Rep: Reputation: 451Reputation: 451Reputation: 451Reputation: 451Reputation: 451
Happy to hear you got your system up and running again. Let us know if ever you feel the need for further assistance.

Cheers :-)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
GRUB missing + problems installing it again gekko Linux - Software 1 01-18-2010 11:00 AM
GRUB Problems On Installing Windows After Ubuntu!!! crash_override_me Ubuntu 10 06-21-2006 04:53 AM
problems installing grub on sata disk atharh Linux - Hardware 3 09-19-2004 08:22 AM
Problems installing Gentoo / grub not loading wiredj Linux - Newbie 7 04-11-2004 06:17 PM
Problems installing Mandrake 10 with GRUB TheDewAddict Linux - Newbie 2 04-08-2004 09:40 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:28 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration