• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Can someone help me understand this?

Hey Guys,

Recently I update my Ubuntu Kernel from:
2.6.31-02063103 -> 2.6.31-02063104

After this, I had about 7 different Kernels on my system and decided to remove some of them. I did a 'sudo apt-get purge' of:
linux-image 2.6.30-02063003
linux-headers 2.6.30-02063003-generic

As well as another kernel which version escapes me.

Those were the only files I touched.

I left these kernels on the system:
2.6.30-02063005
2.6.30-02063103
(One that was just installed) -> 2.6.31-02063104

The /boot/grub/menu.lst was updated as normal after updating the kernel files.

When I booted up; however, the grub menu did not load as normal. Instead I was greeted with the grub command prompt:

[ Minimal BASH-Like line editing is supported. For the first word, TAB lists possible command completions. Anywhere else TAB lists the possible completions of a device/filename. ]
grub >

I have very little experience in the grub commands but I was able to manage to remember enough to boot into my new kernel. I ran these commands.

grub >root (hd0,0)
grub >kernel /boot/vmlinuz-2.6.31-063104-generic root=UUID=[my uuid] ro quiet splash
grub>initrd /boot/initrd.img-2.6.31-063104
grub > boot

The computer booted. I quickly opened a terminal and ran "update-grub". When I restarted; however, I was greeted with the same grub prompt. I ran everything and booted up again. This time, I did an 'rm -f /boot/grub/menu.lst' and then had the "update-grub' command recreate the file. This time it worked and I am fully operational with all 4 kernel options again.

Can someone attempt to explain to me what happened?

Thanks,
-Kevin
 
My guess is that somehow your original menu.lst got hosed enough so that grub couldn't parse it. At that point, it dropped you into a grub command console, and you were able to force the boot process. Might have been nice to have actually saved off the menu.lst so you could look at it. Maybe it has some control characters, or it's missing some keywords. Something to cause grub to not recognize the old file. But, that's just MHO.
 
Originally posted by: Gamingphreek
Can someone attempt to explain to me what happened?[...]
I gotta run, sooo I don't have time to pour over your post, but...

Maybe you like to cleanup everything from the command line, but there is a wonderful tool out there that takes care of a lot of this drudgery:

http://ubuntu-tweak.com (Ubuntu-Tweak! Home Page)


Here's a screenie for you (Vin's netbook)...

http://vindsl.com/images/Ubuntu-Tweak.png (Ubuntu Tweak! - Linux Mint 7 - 10" Eee PC Netbook)

Gotta run! BBL
 
Originally posted by: mgpaulus
My guess is that somehow your original menu.lst got hosed enough so that grub couldn't parse it. At that point, it dropped you into a grub command console, and you were able to force the boot process. Might have been nice to have actually saved off the menu.lst so you could look at it. Maybe it has some control characters, or it's missing some keywords. Something to cause grub to not recognize the old file. But, that's just MHO.

Well, from what I remember looking at, it was all comments and no actual options regardless of how many times I ran update-grub. This is what prompted me to try and delete it and then recreate it.

If I did an rm -f would there be any way for me to recover the file so I can post it again for ya'll to look over? Or, barring some advanced computer forensics, is it gone forever?

-Kevin
 
Originally posted by: VinDSL
Originally posted by: Gamingphreek
Can someone attempt to explain to me what happened?[...]
I gotta run, sooo I don't have time to pour over your post, but...

Maybe you like to cleanup everything from the command line, but there is a wonderful tool out there that takes care of a lot of this drudgery:

http://ubuntu-tweak.com (Ubuntu-Tweak! Home Page)


Here's a screenie for you (Vin's netbook)...

http://vindsl.com/images/Ubuntu-Tweak.png (Ubuntu Tweak! - Linux Mint 7 - 10" Eee PC Netbook)

Gotta run! BBL

Thats a pretty neat looking tool! Thank you so much! The thing is however, I was I want to master all the stuff before I start taking shortcuts through it all 😉.

-Kevin
 
I managed to find the gedit recycled version of the menu.lst before I deleted it. It is like I remembered, everything is commented, even after I had run 'update-grub'. Here it is:

### BEGIN AUTOMAGIC KERNELS LIST
## lines between the AUTOMAGIC KERNELS LIST markers will be modified
## by the debian update-grub script except for the default options below

## DO NOT UNCOMMENT THEM, Just edit them to your needs

## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specific kernels use kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be omitted.
## e.g. kopt=root=/dev/hda1 ro
## kopt_2_6_8=root=/dev/hdc1 ro
## kopt_2_6_8_2_686=root=/dev/hdc2 ro
# kopt=root=UUID=e99103a1-638f-4d5d-990c-cd169e04bf4e ro

## default grub root device
## e.g. groot=(hd0,0)
# groot=e99103a1-638f-4d5d-990c-cd169e04bf4e

## should update-grub create alternative automagic boot options
## e.g. alternative=true
## alternative=false
# alternative=true

## should update-grub lock alternative automagic boot options
## e.g. lockalternative=true
## lockalternative=false
# lockalternative=false

## additional options to use with the default boot option, but not with the
## alternatives
## e.g. defoptions=vga=791 resume=/dev/hda5
# defoptions=quiet splash

## should update-grub lock old automagic boot options
## e.g. lockold=false
## lockold=true
# lockold=false

## Xen hypervisor options to use with the default Xen boot option
# xenhopt=

## Xen Linux kernel options to use with the default Xen boot option
# xenkopt=console=tty0

## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
## altoptions=(recovery) single
# altoptions=(recovery mode) single

## controls how many kernels should be put into the menu.lst
## only counts the first occurence of a kernel, not the
## alternative kernel options
## e.g. howmany=all
## howmany=7
# howmany=all

## specify if running in Xen domU or have grub detect automatically
## update-grub will ignore non-xen kernels when running in domU and vice versa
## e.g. indomU=detect
## indomU=true
## indomU=false
# indomU=detect

## should update-grub create memtest86 boot option
## e.g. memtest86=true
## memtest86=false
# memtest86=true

## should update-grub adjust the value of the default booted system
## can be true or false
# updatedefaultentry=false

## should update-grub add savedefault to the default options
## can be true or false
# savedefault=false
 
VinDSL, that's a great piece of software. I was able to use it to turn my windows into jello, but I haven't found a way to get rid of old kernels yet. Do you know of a place where it can?
 
Originally posted by: Ken g6
VinDSL, that's a great piece of software. I was able to use it to turn my windows into jello, but I haven't found a way to get rid of old kernels yet. Do you know of a place where it can?

To get rid of old kernels, you need only delete the image and header files. Thus:

sudo apt-get remove linux-image-[image to remove] linux-headers-[headers to remove]

After removing these, they will automatically update your boot loader as well.

-Kevin
 
Originally posted by: Ken g6
VinDSL, that's a great piece of software. I was able to use it to turn my windows into jello, but I haven't found a way to get rid of old kernels yet. Do you know of a place where it can?
With Ubuntu-Tweak, it a simple click-click-click away!

Here's a screenie for you...

http://vindsl.com/images/package_cleaner.png (VinDSL.com | Ubuntu-Tweak Package Cleaner Screenie | my Asus Mint 7 netbook)

As, you can see, you can clean up your packages, clear your cache, clean your config, and get rid of old kernels in a few seconds, without ever shelling to CLI.

Simple pimple! 😀
 
Back
Top