1

On a production server, I just did a dist-upgrade from ubuntu 14.04 to 14.04.01. During the upgrade, I encountered a serious problem with configuring grub. I finally traced back the source of the problem and fixed it.

Now, although apparently everything is properly configured, I am a bit anxious to reboot the server (remotely). Before I do so, I'd like to ensure that the reboot will proceed smoothly. I would like to know what I should check.

Here is a summary of the problem I encountered earlier, and the fix applied.

During the dist-upgrade:

rub-pc
 Error in function: 
A fatal error occurred 
Please report this as a bug and include the files
 /var/log/dist-upgrade/main.log and /var/log/dist-upgrade/apt.log in
 your report. The upgrade has aborted.
 Your original sources.list was saved in
 /etc/apt/sources.list.distUpgrade. 
SystemError: E:Sub-process /usr/bin/dpkg returned an error code (1) 
Could not install the upgrades 
The upgrade has aborted. Your system could be in an unusable state. A
 recovery will run now (dpkg --configure -a). 
Please report this bug in a browser at
 http://bugs.launchpad.net/ubuntu/+source/ubuntu-release-upgrader/+filebu...
 and attach the files in /var/log/dist-upgrade/ to the bug report.
 installArchives() failed 
Setting up grub-pc (2.02~beta2-9ubuntu1) ...
 Replacing config file /etc/default/grub with new version
 Installing for i386-pc platform.
 Installation finished. No error reported.
 Generating grub configuration file ...
 /etc/grub.d/06_OVHkernel: line 6: /usr/lib/grub/update-grub_lib: No such file or directory
 dpkg: error processing package grub-pc (--configure):
 subprocess installed post-installation script returned error exit status 1
 Errors were encountered while processing:
 grub-pc
Upgrade complete 
The upgrade has completed but there were errors during the upgrade
 process. 
To continue please press [ENTER]

I tried configuring manually:

# dpkg --configure -a
 Setting up grub-pc (2.02~beta2-9ubuntu1) ...
 Replacing config file /etc/default/grub with new version
 Installing for i386-pc platform.
 Installation finished. No error reported.
 Generating grub configuration file ...
 /etc/grub.d/06_OVHkernel: line 6: /usr/lib/grub/update-grub_lib: No such file or directory
 dpkg: error processing package grub-pc (--configure):
 subprocess installed post-installation script returned error exit status 1
 Errors were encountered while processing:
 grub-pc

I finally found and posted the solution here:

https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1362723
Edit the file /etc/grub.d/06_OVHkernel
and replace update-grub_lib with grub-mkconfig_lib.

then tried reconfiguring again, this time successfully:

# sudo dpkg --configure -a
 Setting up grub-pc (2.02~beta2-9ubuntu1) ...
 Replacing config file /etc/default/grub with new version
 Installing for i386-pc platform.
 Installation finished. No error reported.
 Generating grub configuration file ...
 Found linux image: /boot/bzImage-2.6.38.2-grsec-xxxx-grs-ipv6-64
 No volume groups found
 done

/etc/default/grub has changed during the upgrade but I dont' know how it affects grub:

-GRUB_CMDLINE_LINUX_DEFAULT="" 
+GRUB_CMDLINE_LINUX_DEFAULT="nomdmonddf nomdmonisw"  
-GRUB_DISABLE_LINUX_UUID=true
+#GRUB_DISABLE_LINUX_UUID=true  

I couldn't find the documention for the values in that file.

So, what should I now check to ensure that the system is ready for a successful reboot?

  • Standard entry is this: GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" But since you seem to have a custom grub with OVH and non-standard or old 2.6 kernels do you have special boot options? – oldfred Sep 16 '14 at 4:23
  • @oldfred I don't know why the kernel appears to be so old. I have not myself configured any specific boot options and I am not aware of any special requirements. So far, I have used all the default values for the bootloader and the kernel. I assume the kernel is automatically updated during a dist-upgrade. – augustin Sep 16 '14 at 5:43
  • Google search on your 2.6.38.2 comes up with OVH, so you have an old kernel with a customized install. Its not standard Ubuntu, so we really cannot help. – oldfred Sep 16 '14 at 15:24
  • @oldfred Thanks but the question is not about the kernel but about grub itself. The kernel works for now, and I'll upgrade it next. The question is what should I look for in grub to make sure it's properly configured for a reboot. – augustin Sep 16 '14 at 15:31
  • OP's own answer is just a link to this question saying it helped them – Zanna Dec 15 '16 at 22:52
0

The following question and answers provide some useful pointers in reply to my own question:

How to properly update Grub in Hosted environment

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.