SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1 2012-10-30 03:44:27

fonsopr
New Member
From: Guaynabo, Puerto Rico
Registered: 2012-09-20
Posts: 5

[Solved] How to remove old grub2 entries

Hello,

My machine dual boots Statler and Archlinux. I installed #! first, so it is the distro that controls grub2. Ever since I installed Archlinux, I have duplicates of both of my #! grub2 entries (the regular one, and the recovery one). I've done some research on the matter, but still I have no idea how to solve the problem.

The tutorials I read directed me to /etc/grub.d. The files therein do not correspond to the entries in my grub 2 menu.

alfonso@crunchbang:/etc/grub.d$ ls -al
total 64
drwxr-xr-x   2 root root  4096 Sep 18 19:45 .
drwxr-xr-x 133 root root 12288 Oct 29 23:00 ..
-rwxr-xr-x   1 root root  6433 Nov  4  2011 00_header
-rwxr-xr-x   1 root root  1488 Dec  9  2010 05_debian_theme
-rwxr-xr-x   1 root root  4246 Nov  4  2011 10_linux
-rwxr-xr-x   1 root root  4893 Nov  4  2011 20_linux_xen
-rwxr-xr-x   1 root root  5789 Nov  4  2011 30_os-prober
-rwxr-xr-x   1 root root   214 Nov  4  2011 40_custom
-rwxr-xr-x   1 root root    95 Nov  4  2011 41_custom
-rw-r--r--   1 root root   483 Nov  4  2011 README
alfonso@crunchbang:/etc/grub.d$ 

When I look into the 10_linux entry in grub.cfg file, it makes a little bit more sense, but I don't know how to alter grub.d to achieve the desired results in grub.cfg.

Here is the part of my grub.cfg relating to 10_linux:


### BEGIN /etc/grub.d/10_linux ###
menuentry 'CrunchBang Linux, with Linux 3.2.0-0.bpo.3-amd64' --class debian --class gnu-linux --class gnu --class os {
    insmod part_msdos
    insmod ext2
    set root='(hd0,msdos1)'
    search --no-floppy --fs-uuid --set faa19e1a-a00c-4909-b1b7-a32133afa791
    echo    'Loading Linux 3.2.0-0.bpo.3-amd64 ...'
    linux    /boot/vmlinuz-3.2.0-0.bpo.3-amd64 root=UUID=faa19e1a-a00c-4909-b1b7-a32133afa791 ro  quiet splash
    echo    'Loading initial ramdisk ...'
    initrd    /boot/initrd.img-3.2.0-0.bpo.3-amd64
}
menuentry 'CrunchBang Linux, with Linux 3.2.0-0.bpo.3-amd64 (recovery mode)' --class debian --class gnu-linux --class gnu --class os {
    insmod part_msdos
    insmod ext2
    set root='(hd0,msdos1)'
    search --no-floppy --fs-uuid --set faa19e1a-a00c-4909-b1b7-a32133afa791
    echo    'Loading Linux 3.2.0-0.bpo.3-amd64 ...'
    linux    /boot/vmlinuz-3.2.0-0.bpo.3-amd64 root=UUID=faa19e1a-a00c-4909-b1b7-a32133afa791 ro single 
    echo    'Loading initial ramdisk ...'
    initrd    /boot/initrd.img-3.2.0-0.bpo.3-amd64
}
menuentry 'CrunchBang Linux, with Linux 3.2.0-0.bpo.1-amd64' --class debian --class gnu-linux --class gnu --class os {
    insmod part_msdos
    insmod ext2
    set root='(hd0,msdos1)'
    search --no-floppy --fs-uuid --set faa19e1a-a00c-4909-b1b7-a32133afa791
    echo    'Loading Linux 3.2.0-0.bpo.1-amd64 ...'
    linux    /boot/vmlinuz-3.2.0-0.bpo.1-amd64 root=UUID=faa19e1a-a00c-4909-b1b7-a32133afa791 ro  quiet splash
    echo    'Loading initial ramdisk ...'
    initrd    /boot/initrd.img-3.2.0-0.bpo.1-amd64
}
menuentry 'CrunchBang Linux, with Linux 3.2.0-0.bpo.1-amd64 (recovery mode)' --class debian --class gnu-linux --class gnu --class os {
    insmod part_msdos
    insmod ext2
    set root='(hd0,msdos1)'
    search --no-floppy --fs-uuid --set faa19e1a-a00c-4909-b1b7-a32133afa791
    echo    'Loading Linux 3.2.0-0.bpo.1-amd64 ...'
    linux    /boot/vmlinuz-3.2.0-0.bpo.1-amd64 root=UUID=faa19e1a-a00c-4909-b1b7-a32133afa791 ro single 
    echo    'Loading initial ramdisk ...'
    initrd    /boot/initrd.img-3.2.0-0.bpo.1-amd64
}
### END /etc/grub.d/10_linux ###

Thanks in advance for any help,

Alfonso

PD Appologies if I have bad code posting etiquette, this is one of the first times I post.

Last edited by fonsopr (2012-10-30 05:00:18)


#! (Statler backports) makes my Acer Aspire One a beast.
"¿Qué es la vida? Un frenesí. ¿Qué es la vida? Una ilusión, una sombra, una ficción, y el mayor bien es pequeño: que todo en la vida es sueño, y que los sueños, sueños son" -Pedro Calderón de la Barca

Offline

Be excellent to each other!

#2 2012-10-30 04:45:17

VastOne
#! Ranger
From: #! Fringe Division
Registered: 2011-04-26
Posts: 9,739
Website

Re: [Solved] How to remove old grub2 entries

It looks like you have two kernels from your #! install, probably from a dist-upgrade

vmlinuz-3.2.0-0.bpo.3-amd64

and

vmlinuz-3.2.0-0.bpo.1-amd64

they are not duplicates...

I use kernel-remover from the aptosid repos to remove them all that I am not using. smxi is also a good tool fro removing dead kernels.


VSIDO
If you build it, they will come...
Words That Build Or Destroy

Offline

#3 2012-10-30 04:48:34

fonsopr
New Member
From: Guaynabo, Puerto Rico
Registered: 2012-09-20
Posts: 5

Re: [Solved] How to remove old grub2 entries

Thank you for your quick response VastOne.

Is smxi available in the regular #! or debian repos? Or do I need third party repos for it as well (I'm usually hessitant to use them).

Can't I just remove the old kernel manually through apt-get and then do a grub-update?

Last edited by fonsopr (2012-10-30 04:50:15)


#! (Statler backports) makes my Acer Aspire One a beast.
"¿Qué es la vida? Un frenesí. ¿Qué es la vida? Una ilusión, una sombra, una ficción, y el mayor bien es pequeño: que todo en la vida es sueño, y que los sueños, sueños son" -Pedro Calderón de la Barca

Offline

#4 2012-10-30 04:53:34

VastOne
#! Ranger
From: #! Fringe Division
Registered: 2011-04-26
Posts: 9,739
Website

Re: [Solved] How to remove old grub2 entries

See my sig line for the smxi site, it has very detailed instructions...

It may be easier to just add aptosid repos and get kernel-remover, I like it as a better choice.

All you have to do is add it just for that file and then remove it...

Add this to /etc/apt/sources.list

deb http://oscar.aptosid.com/debian/ sid main fix.main
sudo apt-get update
sudo apt-get install kernel-remover

Then edit /etc/apt/sources.list again and take out that repo

and another

sudo apt-get update

And you are done...


VSIDO
If you build it, they will come...
Words That Build Or Destroy

Offline

#5 2012-10-30 04:54:33

VastOne
#! Ranger
From: #! Fringe Division
Registered: 2011-04-26
Posts: 9,739
Website

Re: [Solved] How to remove old grub2 entries

fonsopr wrote:

Thank you for your quick response VastOne.

Is smxi available in the regular #! or debian repos? Or do I need third party repos for it as well (I'm usually hessitant to use them).

Can't I just remove the old kernel manually through apt-get and then do a grub-update?

Yes, you can do that too!


VSIDO
If you build it, they will come...
Words That Build Or Destroy

Offline

#6 2012-10-30 19:25:22

KrunchTime
#! Die Hard
From: East Coast, USA
Registered: 2012-03-02
Posts: 836

Re: [Solved] How to remove old grub2 entries

Also see VastOne's tip on installing and setting up smxi:  http://crunchbanglinux.org/forums/topic … and-setup/


"The Western system in its present state of spiritual exhaustion does not look attractive...the human soul longs for things higher, warmer, and purer." -- Alexander Solzhenitsyn

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.

Debian Logo