After grub menu cleanup cannot reboot to anything but command line

Asked by crew99advisor@hotmail.com

OS: Ubuntu 10.04LST Lucid Lynx (64-bit)

Problem - after a number of updates my grub menu was getting crowded. I have dual boot partitions, and the extra OS options were getting in the way.

I used "sudo apt-get remove linux-image-2.6.23-##-generic" to remove all but the kernel 2.6.32-36-generic. When I went to reboot I had several problems getting a good reboot - having to go through the recover boot and fix a lot of the issues it was having.

Evidently apt-get remove didn't do things as cleanly as I had hoped. I need to recover/refresh 10.04LST to keep from loosing the data several of my users have in their accounts (not to mention my own). Any hints on how to do that?

(The *wise* thing to have done was to make a recovery CD. I was not wise).

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu grub2 Edit question
Assignee:
No assignee Edit question
Solved by:
crew99advisor@hotmail.com
Solved:
Last query:
Last reply:
Revision history for this message
marcus aurelius (adbiz) said :
#1

i'm guessing that your grub.cfg file wasn't changed.
you'll need to edit the grub.cfg file. delete the entries for the kernels that you don't have anymore. that is, keep the entry for the latest kernel and delete the rest. you'll want to keep the recovery thing and whatever other systems (e.g. windoze) you have.
be careful what you delete and that you delete the entire segment for the kernels.

you can also try to reinstall grub.

Revision history for this message
Chris (fabricator4) said :
#2

It's a good idea to not delete the last used previous version of the kernel so that you've got it as a backup - in this case 2.6.32-35. I suggest you reinstall this older kernel version and see if it will boot into X. "sudo apt-get install" the following kernel components.

linux-headers-2.6.32-35
linux-headers-2.6.32-35-generic
linux-image-2.6.32-35-generic

Accept any dependencies it offers, especially anything to do with X or the DE. If the older kernel does not appear in the grub list after this, then you might need to run update-grub, but I think it should do that all by itself.

I suspect that the desktop environment has been taken out as a "dependency" while you were removing the kernels. You do have to be a little bit careful when removing things like this. I prefer to use the synaptic package manager to remove older kenels and doing general cleanup, and if it reports X or DE type components as also being marked for removal I do not proceed.

If the above works do the same for the 2.6.32-36 kernel, selecting re-install for all components. You could also remove the -36 components and let -35 upgrade itself again.

If you still have no X, type "startx" and see if it starts (or if you get some error messages which might give a clue).

You could also try installing gnome-shell and repeating this (startx) process.

Chris

Revision history for this message
crew99advisor@hotmail.com (crew99advisor) said :
#3

Well, I've not (yet) located the grub.cfg file - it's not in /boot/grub at least. I may grep for it in a bit.

I did the "sudo apt-get install" on 2.6.32-35 (both linux-headers-... were still there it said, and it loaded the linux-image...). Rebooted - no joy. Repeated for 2.6.32-36 - it said it was up to date.

I tried to do the "startx" - it said it was running - but suggested if it wasn't really running to remove /tmp/.X0-lock - which I did & tried again. I got these messages:

xauth: /var/run/gdm/auth-for-(userid)-LG1UIw/database not writeable, changes will be ignored

xauth: error in locking authority file /var/run/gdm/auth-for-(userid)-LG1UIw/database (repeated several times)

I checked on permissions/owner/group for gdm and auth-for-(userid)-LG1UIw

gdm is: 711 root gdm,

auth-for-(userid)-LG1UIw is: 711 userid userid

I am thinking the userid has been dropped from the gdm group. Does anyone agree? If that's part of my problem, I need to figure out how to redo that.

Revision history for this message
crew99advisor@hotmail.com (crew99advisor) said :
#4

Still trying to figure this out.

I've "sudo apt-get install --reinstall linux-{header/image}-2.6.32-36{-generic}", reloaded grub, & run boot-repair.

I'm beginning to think my KDE may be garbaged somehow.

Anyone have any ideas?

Revision history for this message
crew99advisor@hotmail.com (crew99advisor) said :
#5

To be clearer - on boot/reboot I get the grub menu with all of my available kernels, including Windows (which still works so I've not garbaged that) but when I boot any of the Ubuntu kernels, I get the standard Ubuntu load screen, but when the log-in screen pops up it is not the standard screen. It has all my users listed, but some generic avatar image of a person to the left. Logging in as any user takes one to a 1/4-sized terminal screen & command-line prompt.

I know my users' directories & log-ins are still there, but we cannot get the GUI interface up. Fixing grub did not fix that.

I have no clue how removing old versions of the kernel destroyed the GUI. Suggestions welcome.

In the interim I'm trying to see what I can find in the community documentation. But I'd really appreciate any thoughts or ideas.

Revision history for this message
crew99advisor@hotmail.com (crew99advisor) said :
#6

I found the solution:

my Gnome had been garbaged. I ran

"sudo apt-get install --reinstall gnome-desktop-environment" and everything is back.

Thanks to all who tried to help me.