Ubuntu Installation :: Removing Kernel From Grub2?
Apr 28, 2011
How do you go about removing old kernel from other distros from the grub menu. For example I have lucid and ubuntu studio installed. Lucid controls the grub2. So how would I remove the old kernel out of the ubuntu studio?
View 9 Replies
ADVERTISEMENT
Apr 14, 2010
Here's how to always have only the latest kernel version in your grub:
Code:
sudo gedit /etc/grub.d/10_linux
Find these lines:
Code:
list=`for i in /boot/vmlinu[xz]-* /vmlinu[xz]-* ; do
if grub_file_is_not_garbage "$i" ; then echo -n "$i " ; fi
done`
And change it with this:
Code:
for ver in /boot/vmlinu[xz]-* ; do
list="$ver"
done
Notice two differences.
1. There's no ` before "for" and after "done" keywords.
2. There's no list= before "for"
If you want to change the name of entry, scroll down to the end of the file and find last two occurrences of:
Code:
linux_entry
${OS} stands for Ubuntu and ${version} stands for your kernel version. I changed this into:
Code:
linux_entry "${OS} 9.10 Karmic Koala"
You can use your own imagination. If you want to have specific name for your Windows entry, in /boot/grub/grub.cfg copy everything between:
Code:
### BEGIN /etc/grub.d/30_os-prober ###
and
Code:
### END /etc/grub.d/30_os-prober ###
paste it in
/etc/grub.d/40_custom
Change the text between double quotes right after menu entry. (For example, my 40_custom looks like this now:
Code:
#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries. Simply type the menu entries you want to add after this comment. Be careful not to change the 'exec tail' line above.
menuentry "Windows 7" {
insmod ntfs
set root=(hd0,1)
search --no-floppy --fs-uuid --set bcdc24dddc249424
chainloader +1
}
)
and make 30_os-prober not executable:
Code:
sudo chmod -x 30_os-prober
If you want to remove recovery mode entry, just uncomment this line in /etc/default/grub:
Code:
#GRUB_DISABLE_LINUX_RECOVERY="true"
PS Don't forget to run
Code:
sudo update-grub
After you finish editing everything! And check in /boot/grub/grub.cfg if everything is ok!
View 9 Replies
View Related
Jun 17, 2010
I have winxp and ubuntu 10.04 dualboot. They were working ok. Today I removed old *21 kernel image and headers so grub updated the confs. That's all I did that could cause the win no longer boot. It starts booting, the screen goes black and the PC reboots. I tried safe mode, it started to load some dlls as it usually shows in safe mode but then still reboot.
Code:
$ sudo fdisk -l
Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
[Code]....
View 3 Replies
View Related
Sep 12, 2010
I have looked for existing threads on this issue, but found no matches, so I am starting a new one.I first installed Ubuntu 9.04 on my laptop from a bought CD last year. When I later installed the kernel updtates with the Update Manager, I noticed the the list of versions growing when I booted up. Then something horrible happened. After installing maybe the third or fourth kernel update, I couldn't boot into Ubuntu, it failed every time. After that I left Ubuntu broken on my laptop for a while.I have now reinstalled from the CD again However, I am now very wary when it comes to installing even the important security updates, never mind the recommended ones! I prefer to keep it simple, because I don't want to do any more reinstalls for a while. So far I have just one kernel headers update on the boot list, and I am trying to figure out how to remove the previous one. I do not see the point in having a growing list of them again.
View 9 Replies
View Related
Apr 19, 2011
I have Ubuntu 10.10 installed on my laptop.Its a dual boot with XP, have been using ubuntu/xp for a while now..Till now i always used to remove older kernel images after ubuntu update, then update grub and do "sudo apt-get autoclean" never had any problem at all.i skipped the second step, i removed the old kernel image and did "Autoclean" on apt-get but forgot to update grub.
Now after i have reboot, when grub loads i can see only 2 "Memtest" lines in grub list and 1 "windows xp" line.the "Linux kernel generic" line is missing. I can boot in xp (have done just that to post this) but since there is no line in grub list to boot into Ubuntu, cant boot in Ubuntu.Is there any option, something i can do at "Grub" to boot into Ubuntu?
View 4 Replies
View Related
Apr 16, 2010
I have not dug into Ubuntu for almost a year now (Since Jaunty, really). I am trying to come to grips with Grub2, but have just now encountered it in Lucid. I am having a terrible time with the graphics chipset, and it may well be that Ubuntu cannot be used on this computer (an older laptop with the dreaded Intel 82845G graphics chip). There are a number of older bug reports that it is unsupported, but some success in more recent versions.
Anyway, one suggestion has been to add i915.nomodset=1 to the kernel boot line. Now, this was a cinch in Legacy Grub, but I have been reading Grub2 wikis and tutorials for two days now, and I know about the config files, but I cannot find anything which tells me specifically how to add a parameter to the kernel boot line.
View 2 Replies
View Related
Jun 19, 2009
I had the 180.xxx nvidia drivers on my FC10 setup.I installed the 185.xxx and am running into issues. It gives me the fatal server error: no screens found message. Before that it says that the nvidia kernel module is 180.xxx and the driver component has 185.xxx. I can't seem to figure out how to uninstall the previous module to make this work. I removed the yum kmod nvidia. I'm running this using sh nvidia.185xxx.xxxx.run . The weird thing is that it sometimes would work but then I would restart and it would break again.
Thanks in advance,
View 9 Replies
View Related
Mar 31, 2010
I just did an upgrade and it included the kernel. As time goes by, I will be stuck with a lot of kernels to choose from, and lower disk space. How do I remove an older kernel and everything it's related to it without breaking stuff?
View 8 Replies
View Related
Mar 7, 2010
I've been using Ubuntu since 7.10 Gutsy Gibbon. I only recently fully switched to Linux OS's, and Ubuntu is now my primary. I currently have 9.10 installed. CURRENTLY I also have Backtrack 4, and Fedora 12 (Ugh!).Previously, I thought something was wrong with my my filesystem in Ubuntu 9.10, and after an upgrade of the linux kernel, I started to get Error: You need to load the Kernel First. That's where my problems started. I had upgraded to 9.10 from 9.04 and I still had Grub Legacy, so I went through hoops to try and get it to work, but eventually everything just kind of broke, and I completely wiped off my partitions on it and started fresh installs of all 3.
And now that the new linux kernel is released, 2.6.31-20 generic (I think... That's what the highest number on a file I can find in /boot is)I went through a few more hoops and ladders and tried to get it to work, but to no avail. I've looked the internet for a solution to this and tried just about everything but there is no unified answer, and I've seen on Launchpad there are alot of bugs that are classified as 'Fixed', but the problem still remains.I took out the 'quiet splash' part in the GRUB2 line for the newest kernel and it didn't do anything. It only changed it to "Error: Couldn't find file".This is the top two kernels (Main and Recovery for the new, and Main and Recovery for the previous working one)
Quote:
### BEGIN /etc/grub.d/10_linux ###
menuentry "Ubuntu, Linux 2.6.31-20-generic" {
recordfail=1
[code].....
View 9 Replies
View Related
Sep 8, 2010
I have installed grub2 on a flash drive to boot some os's that I want to carry around. But in grub.cfg when i put this:
Code: menuentry "BackTrack Persistent" {
set gfxpayload=1024x768
linux/backtrack/boot/vmlinuz BOOT=casper boot=casper persistent rw quiet
initrd/backtrack/boot/initrd.gz
} it does exactaly the same thing as this
[Code]....
I'm thinking of filing a bug report but I want to make sure i'm not doing something wrong first.
View 4 Replies
View Related
Jun 9, 2011
I have recently installed the Maverick backport kernel (2.6.35 - from the lucid-updates/main repo) and while I was at it I also manually (through synaptic) got rid of some old kernels. I made sure that I kept the current Lucid kernel though (that was working fine). All seemed well (although I didn't actually check - just no errors) so I rebooted.On reboot I have lost all my Ubuntu kernel options!
I rebooted with a live cd, mounted, etc and ran
Code:
sudo update-grub
but it doesn't seem to find any kernels!
Code:
grub-install --recheck --root-directory=/media/mnt /dev/sda
Checked /boot to see if the kernels are there:
Code:
jed@lightning:/boot$ ls
abi-2.6.32-31-generic memtest86+.bin
abi-2.6.32-32-generic System.map-2.6.32-31-generic
[code]....
Even reinstalled burg (used to use it but it got broken by a kernel update long ago and never bothered to fix it as I only use Linux these days anyway)Funny thing is that BURG finds the kernels and reports no problem, but then drops to the grub-error prompt on boot.
View 9 Replies
View Related
Mar 6, 2010
I have made a custom grub2 menu however, both the default and the custom show together. So my grub looks like the list below, the bolded entries are my custom ones. How do I get rid of the duplicates? I have tried apt-get remove and deleting old kernels.
ubuntu,linux ...
ubuntu,linux recovery
memtest
memtest
windows7
windows7
ubuntu linux
ubuntu linux recover
View 7 Replies
View Related
May 21, 2010
I'm simply trying to remove old kernels and second rename things that are on the list. It used to take me 10 seconds with grub1, but having some difficultly with grub2. So far I went into /boot/ and removed the old kernels and then did a sudo update-grub2 and it seemed to remove all the old kernels from the list. Is this the best way or doing it or any issues on doing it this way? Second I just want to rename what boots up like Ubuntu 2.6.32-22-generic to something else. I keep read not to modify the grub.cfg, but not sure what to do? I poked around the files in /etc/grub.d/, but not sure what to do?
View 2 Replies
View Related
Jan 9, 2011
Have recently installed 10.10 and have several other OS' installed, as well as other NTFS (non-OS) partitions. After a couple of updates, my boot menu shows about 8 entries, whereas I should only have about 4... How is this fixed in Grub2?
Have installed Startup Manager, and there seems to be no option here...
View 3 Replies
View Related
Feb 27, 2011
what i did was, remove evolution mail from synaptic, what i wanted to do was just remove the indicator applet from the task bar. i read a bunch of bad stuff about removing evolution from synaptic vs just removing the applet.
im worried. did i break anything or put my security at risk. after, i used a command (older) (sudo apt-get install ubuntu-desktop)to install ubuntu desktop. because i thought that it would fix evolution. then i went to synaptic and installed a package called evolution. i rechecked evolution in applications menu. however, i notice that i have both a checkable evolution and two evolution icons. nothing 'seems' broken. im not sure if it ever was. and evolution calender pops up as normal, as does the the installed plain evolution. they both seems to be an exact copy of the other.
all i really wanted to do was remove the indicator applet. did i make a serious mistake. since ive had ubuntu, ive reformatted a lot because i was worried i made a mistake of some kind. however now im into the more "make a mistake and fix it stage' as im pretty happy with my current desktop and have worked hard to customize it. the command, sudo apt-get remove indicator-messages removed the mail icon. i still am worried that i broke something, or put my security at risk. also, now i have two mail icons. evolution mail and calendar, and another just called evolution.
View 1 Replies
View Related
Mar 7, 2010
i initilally installed ubuntu 9.10 then installed windows 7 ,then i recovered grub2 using livecd as told in the post [URL] i did "sudo update-grub" and got windows 7 menu entry but when i select that entry windows 7 does not load but the grub2 is reloaded again.
i cant boot to windows 7.
Windows 7 have 100 mb partition "System Reserved" the grub2 points to that partition but still windows 7 not loaded.
sudo fdisk -l
Disk /dev/sda: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x3c3a81f5
[Code]....
View 3 Replies
View Related
May 17, 2010
I went through so many post but I haven't found the proper answer yet hope you have an Idea1. Grub2 saves only Linux OS as last selected no Windows OS2.It is possible to boot into a cdrom (drive)?
View 2 Replies
View Related
Aug 9, 2010
I am trying to update ALSA drivers which are built-in in the kernel.
I downloaded the latest ALSA drivers 1.0.23 and tried to compile but came with this error (that is the last part of it)
Code:
*** NO PREDEFINED KERNEL COMPILER IS DETECTED
*** Assuming the same compiler is used with the current system compiler.
[Code]....
Is there a way to remove the ALSA driver from the kernel so I can configure and compile the new ALSA driver ?
View 1 Replies
View Related
Apr 24, 2011
Other than the linux kernel image I am using is it ok to remove the others I have and thus gain more disk space ? I only have a small asus 900 netbook.
View 4 Replies
View Related
Jan 10, 2010
I have been reading for hours and just do not get how to do this simple task. I need to add a couple of kernel options to the 3rd menu item that shows in my grub.cfg list. I understand which files to edit (not grub.cfg) and run the updater.
If I look in /etc/default/grub I cannot figure out how to add a kernal parameter unless it is the default.
So basically I want to change the equivilent of this line below:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
But for a kernel menu item that is not the default.
View 4 Replies
View Related
Nov 28, 2010
i have just finish compiling a new kernel from source and would like to know how to load it in to grub2 i know grub the older version was easy to setup with the new kernels but i am not really in to grub2 to know how to load a new kernel to it.
View 1 Replies
View Related
Apr 13, 2011
I've had a fairly trouble free dual boot system for about 7 months now, windows vista / ubuntu 10.04 on separate drives. Got a little lazy and had quite a backlog of updates to do in ubuntu so I started up the update manager and let it do it's thing overnight. When I checked in it was waiting for a reboot to finish installing, which I did. When grub came up every selection returned the same error: file not found and must load kernel first, press any key to continue which leads back to the selection menu. Windows still works fine, and with a live cd I can see the the normal file system stuff is still there: filesystem, intrid.img , intridimg.old , vmlinuz , vmlinuz.old... etc.
Tried the live cd terminal to install grub.. grub-setup, grub-install, grub-probe all return the "/usr/sbin/grub-probe: error: cannot find a device for /boot/grub (is /dev mounted?)." line.
Anyway here is the boot info script results.
Quote:
View 1 Replies
View Related
Sep 25, 2010
I installed the kernel source RPM to add a patch to a driver kernel module that didn't support my NIC. Now that the patch is part of the official source tree I no longer need the kernel source and I want to delete it. Can I just do rm -rf rpmbuild or do I need to run the reverse of the rpm commands described in Section 1 of [URL].
View 2 Replies
View Related
Jun 10, 2011
How do I remove old kernels from the Fedora grub menu? I have three currently and I want to keep only one old version to fall back if I have any problems with the current one. When I was using Ubuntu, I had Ubuntu Tweak which had an option to clean up old kernels from the grub menu .. is there something similar for Fedora?
I'm using Fedora 15 32-bit with Gnome 3.
View 6 Replies
View Related
Sep 19, 2010
In trying to get something else working, I installed a newer version of the kernel from backports (I'm on 2.6.26 lenny and the backport kernel is 2.6.32). That failed, so I want to remove the backport kernel completely.
I tried:
Code:
and got:
Code:
Accept this solution? [Y/n/q/?]
I don't really understand how these metapackages work and I don't want to accidentally remove my currently-working kernel.
What's the correct way to remove all packages related to the backports kernel and leave the existing lenny ones alone?
View 4 Replies
View Related
Jan 7, 2010
So I know I should have known better then to turn my updates back on after the 15 and 16 kernel updates crashed ubuntu and grub but I did anyway and once again after a new kernel gets installed I'm stuck at the grub sh prompt.
Been down the road before... tried using
linux /boot/vml....... root=/dev/sda1 loop=/ubuntu/disks/root.disk ro
When I use the 16 or 17 kernel I get an error stating "invalid imaginary number"...
So I use the 14 kernal and enter
initrd /boot/initrd.....
boot
And it boots like it did the last time this crashed. I went to the terminal and entered
sudo apt-get install grub 2
sudo update-grub2
And then rebooted like I did last time expecting the problem to be fixed and at least be able to boot up the 14-generic. It didn't fixed this time. So now what do I do to fix grub and what do I do about having 2 unbootable kernals??
View 2 Replies
View Related
Mar 25, 2010
On Grub legacy i used a menu entry to boot from a DVD since the bios on my pc doesn't recognize my DVD burner.... So before on the old grub i can just added this menu entry and it all worked...title DVDroot(hd0,0)kernel /boot/grub/memdisk.bininitrdboot/grub/sbootmgr.dskthen grub 2 came along and that all changed..on the 40_custom file i added this
menuentry "Boot DVD Drive" {
set root=(hd0,0)
linux /boot/grub/memdisk.bin
[code]....
View 4 Replies
View Related
Jun 7, 2010
I have been running Ubuntu 10.04 for a while now without any issues. I have also been dual booting with grub2 for a while now, only issues being crappy customization. But anyways I had my grub2 splash all set up the way i liked, with a nice background and everything. I run every update Ubuntu wants and have never had an issue until recently.
On June 3rd I ran an update that Ubuntu requested, it installed a new kernel (-2.6.32-22) and requested a restart, as usual. after restarting, my grub splash is gone. I thought no biggie ill just run `update-grub` as i have before and it will fix everything...nope
I get the error message `head: cannot open `/boot/grub/video.lst' for reading: No such file or directory` right where the "image found" message is supposed to be.
View 3 Replies
View Related
Aug 19, 2010
I have a problem with my touchpad, sometime it doesn't work at start-up and this happens randomly.
I have looked around and maybe I could solve this with the procedure described in [url]
I'd like to add the equivalent of to kopt in the old grub.
I looked into the grub2 documentation, [url]
I am not even sure if I have to modify /etc/grub.d/40_custom or 10_linux.
View 4 Replies
View Related
Nov 8, 2010
How can we add a kernel to grub2? i knew the stuff we could do with the former versions, but it seems to have changed. What files should we edit?
View 5 Replies
View Related