ubuntu安装pae kernel和删除多余kernel

ubuntu安装pae kernel和删除多余kernel

首先, ubuntu安装pae kernel

arcko@arcko-d525w:~$ sudo apt-get install linux-generic-pae linux-image-generic-pae linux-headers-generic-pae

重启选择进入pae kernel, 删除多余kernel

第一步:查看当前在用的kernel信息:

arcko@arcko-d525w:~$ uname -a
Linux arcko-d525w 3.2.0-67-generic-pae #101-Ubuntu SMP Tue Jul 15 18:04:54 UTC 2014 i686 i686 i386 GNU/Linux

第二步:查看已经安装的Kernel信息:

arcko@arcko-d525w:~$ dpkg –get-selections | grep linux
libselinux1                    install
libselinux1-dev                    install
linux-firmware                    install
linux-generic-lts-trusty            install
linux-generic-pae                install
linux-headers-3.13.0-32                install
linux-headers-3.13.0-32-generic            install
linux-headers-3.13.0-34                install
linux-headers-3.13.0-34-generic            install
linux-headers-3.2.0-65                install
linux-headers-3.2.0-65-generic-pae        install
linux-headers-3.2.0-67                install
linux-headers-3.2.0-67-generic-pae        install
linux-headers-3.8.0-44                install
linux-headers-3.8.0-44-generic            install
linux-headers-generic-lts-raring        install
linux-headers-generic-lts-trusty        install
linux-headers-generic-pae            install
linux-image-3.11.0-15-generic            deinstall
linux-image-3.11.0-23-generic            deinstall
linux-image-3.13.0-32-generic            install
linux-image-3.13.0-34-generic            install
linux-image-3.2.0-64-generic-pae        install
linux-image-3.2.0-65-generic-pae        install
linux-image-3.2.0-67-generic-pae        install
linux-image-3.8.0-44-generic            install
linux-image-generic-lts-raring            install
linux-image-generic-lts-trusty            install
linux-image-generic-pae                install
linux-libc-dev                    install
linux-sound-base                install
linux-source                    install
linux-source-3.2.0                install
pptp-linux                    install
syslinux                    install
syslinux-common                    install
syslinux-legacy                    install
util-linux                    install

第三步:删除不想要的Kernel信息:

arcko@arcko-d525w:~$ sudo apt-get remove linux-generic-lts-trusty
[sudo] password for arcko:
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following packages will be REMOVED:
linux-generic-lts-trusty
0 upgraded, 0 newly installed, 1 to remove and 2 not upgraded.
After this operation, 28.7 kB disk space will be freed.
Do you want to continue [Y/n]?
(Reading database … 429636 files and directories currently installed.)
Removing linux-generic-lts-trusty …
arcko@arcko-d525w:~$ sudo apt-get remove linux-headers-3.13.0-32
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following packages will be REMOVED:
linux-headers-3.13.0-32 linux-headers-3.13.0-32-generic
0 upgraded, 0 newly installed, 2 to remove and 2 not upgraded.
After this operation, 76.3 MB disk space will be freed.
Do you want to continue [Y/n]?
(Reading database … 429633 files and directories currently installed.)
Removing linux-headers-3.13.0-32-generic …
Removing linux-headers-3.13.0-32 …
arcko@arcko-d525w:~$ sudo apt-get remove linux-headers-3.13.0-34
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following packages will be REMOVED:
linux-headers-3.13.0-34 linux-headers-3.13.0-34-generic
linux-headers-generic-lts-trusty
0 upgraded, 0 newly installed, 3 to remove and 2 not upgraded.
After this operation, 76.3 MB disk space will be freed.
Do you want to continue [Y/n]?
(Reading database … 404717 files and directories currently installed.)
Removing linux-headers-generic-lts-trusty …
Removing linux-headers-3.13.0-34-generic …
Removing linux-headers-3.13.0-34 …
arcko@arcko-d525w:~$ sudo apt-get remove linux-headers-3.2.0-65 linux-headers-3.2.0-67 linux-headers-3.8.0-44 linux-headers-generic-lts-raring linux-image-3.11.0-15-generic linux-image-3.11.0-23-generic linux-image-3.13.0-32-generic linux-image-3.13.0-34-generic linux-image-3.2.0-64-generic-pae linux-image-3.2.0-65-generic-pae linux-image-3.8.0-44-generic linux-image-generic-lts-raring linux-image-generic-lts-trusty
Reading package lists… Done
Building dependency tree
Reading state information… Done
Package linux-image-3.11.0-15-generic is not installed, so not removed
Package linux-image-3.11.0-23-generic is not installed, so not removed
The following packages will be REMOVED:
linux-generic-pae linux-headers-3.2.0-65 linux-headers-3.2.0-65-generic-pae
linux-headers-3.2.0-67 linux-headers-3.2.0-67-generic-pae
linux-headers-3.8.0-44 linux-headers-3.8.0-44-generic
linux-headers-generic-lts-raring linux-headers-generic-pae
linux-image-3.13.0-32-generic linux-image-3.13.0-34-generic
linux-image-3.2.0-64-generic-pae linux-image-3.2.0-65-generic-pae
linux-image-3.8.0-44-generic linux-image-generic-lts-raring
linux-image-generic-lts-trusty
0 upgraded, 0 newly installed, 16 to remove and 2 not upgraded.
After this operation, 869 MB disk space will be freed.
Do you want to continue [Y/n]?
(Reading database … 379798 files and directories currently installed.)
Removing linux-generic-pae …
Removing linux-headers-3.2.0-65-generic-pae …
Removing linux-headers-3.2.0-65 …
Removing linux-headers-generic-pae …
Removing linux-headers-3.2.0-67-generic-pae …
Removing linux-headers-3.2.0-67 …
Removing linux-headers-generic-lts-raring …
Removing linux-headers-3.8.0-44-generic …
Removing linux-headers-3.8.0-44 …
Removing linux-image-3.13.0-32-generic …
Examining /etc/kernel/prerm.d.
run-parts: executing /etc/kernel/prerm.d/dkms 3.13.0-32-generic /boot/vmlinuz-3.13.0-32-generic
dkms: removing: nvidia-331-updates 331.38 (3.13.0-32-generic) (i686)

——– Uninstall Beginning ——–
Module:  nvidia-331-updates
Version: 331.38
Kernel:  3.13.0-32-generic (i686)
————————————-

Status: Before uninstall, this module version was ACTIVE on this kernel.

nvidia_331_updates.ko:
– Uninstallation
– Deleting from: /lib/modules/3.13.0-32-generic/updates/dkms/
– Original module
– No original module was found for this module on this kernel.
– Use the dkms install command to reinstall any previous module version.

depmod………..

DKMS: uninstall completed.
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.13.0-32-generic /boot/vmlinuz-3.13.0-32-generic
update-initramfs: Deleting /boot/initrd.img-3.13.0-32-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.13.0-32-generic /boot/vmlinuz-3.13.0-32-generic
Generating grub.cfg …
Found background image: /usr/share/images/desktop-base/desktop-grub.png
Found linux image: /boot/vmlinuz-3.13.0-34-generic
Found initrd image: /boot/initrd.img-3.13.0-34-generic
Found linux image: /boot/vmlinuz-3.8.0-44-generic
Found initrd image: /boot/initrd.img-3.8.0-44-generic
Found linux image: /boot/vmlinuz-3.2.0-67-generic-pae
Found initrd image: /boot/initrd.img-3.2.0-67-generic-pae
Found linux image: /boot/vmlinuz-3.2.0-65-generic-pae
Found initrd image: /boot/initrd.img-3.2.0-65-generic-pae
Found linux image: /boot/vmlinuz-3.2.0-64-generic-pae
Found initrd image: /boot/initrd.img-3.2.0-64-generic-pae
Found memtest86+ image: /boot/memtest86+.bin
Found Windows 7 (loader) on /dev/sda1
done
Removing linux-image-generic-lts-trusty …
Removing linux-image-3.13.0-34-generic …
Examining /etc/kernel/prerm.d.
run-parts: executing /etc/kernel/prerm.d/dkms 3.13.0-34-generic /boot/vmlinuz-3.13.0-34-generic
dkms: removing: nvidia-331-updates 331.38 (3.13.0-34-generic) (i686)

——– Uninstall Beginning ——–
Module:  nvidia-331-updates
Version: 331.38
Kernel:  3.13.0-34-generic (i686)
————————————-

Status: Before uninstall, this module version was ACTIVE on this kernel.

nvidia_331_updates.ko:
– Uninstallation
– Deleting from: /lib/modules/3.13.0-34-generic/updates/dkms/
– Original module
– No original module was found for this module on this kernel.
– Use the dkms install command to reinstall any previous module version.

depmod………..

DKMS: uninstall completed.

——————————
Deleting module version: 331.38
completely from the DKMS tree.
——————————
Done.
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.13.0-34-generic /boot/vmlinuz-3.13.0-34-generic
update-initramfs: Deleting /boot/initrd.img-3.13.0-34-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.13.0-34-generic /boot/vmlinuz-3.13.0-34-generic
Generating grub.cfg …
Found background image: /usr/share/images/desktop-base/desktop-grub.png
Found linux image: /boot/vmlinuz-3.8.0-44-generic
Found initrd image: /boot/initrd.img-3.8.0-44-generic
Found linux image: /boot/vmlinuz-3.2.0-67-generic-pae
Found initrd image: /boot/initrd.img-3.2.0-67-generic-pae
Found linux image: /boot/vmlinuz-3.2.0-65-generic-pae
Found initrd image: /boot/initrd.img-3.2.0-65-generic-pae
Found linux image: /boot/vmlinuz-3.2.0-64-generic-pae
Found initrd image: /boot/initrd.img-3.2.0-64-generic-pae
Found memtest86+ image: /boot/memtest86+.bin
Found Windows 7 (loader) on /dev/sda1
done
The link /vmlinuz is a damaged link
Removing symbolic link vmlinuz
you may need to re-run your boot loader[grub]
The link /initrd.img is a damaged link
Removing symbolic link initrd.img
you may need to re-run your boot loader[grub]
Removing linux-image-3.2.0-64-generic-pae …
Examining /etc/kernel/prerm.d.
run-parts: executing /etc/kernel/prerm.d/dkms 3.2.0-64-generic-pae /boot/vmlinuz-3.2.0-64-generic-pae
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.2.0-64-generic-pae /boot/vmlinuz-3.2.0-64-generic-pae
update-initramfs: Deleting /boot/initrd.img-3.2.0-64-generic-pae
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.2.0-64-generic-pae /boot/vmlinuz-3.2.0-64-generic-pae
Generating grub.cfg …
Found background image: /usr/share/images/desktop-base/desktop-grub.png
Found linux image: /boot/vmlinuz-3.8.0-44-generic
Found initrd image: /boot/initrd.img-3.8.0-44-generic
Found linux image: /boot/vmlinuz-3.2.0-67-generic-pae
Found initrd image: /boot/initrd.img-3.2.0-67-generic-pae
Found linux image: /boot/vmlinuz-3.2.0-65-generic-pae
Found initrd image: /boot/initrd.img-3.2.0-65-generic-pae
Found memtest86+ image: /boot/memtest86+.bin
Found Windows 7 (loader) on /dev/sda1
done
Removing linux-image-3.2.0-65-generic-pae …
Examining /etc/kernel/prerm.d.
run-parts: executing /etc/kernel/prerm.d/dkms 3.2.0-65-generic-pae /boot/vmlinuz-3.2.0-65-generic-pae
dkms: removing: virtualbox 4.1.12 (3.2.0-65-generic-pae) (i686)

——– Uninstall Beginning ——–
Module:  virtualbox
Version: 4.1.12
Kernel:  3.2.0-65-generic-pae (i686)
————————————-

Status: Before uninstall, this module version was ACTIVE on this kernel.

vboxdrv.ko:
– Uninstallation
– Deleting from: /lib/modules/3.2.0-65-generic-pae/updates/dkms/
– Original module
– No original module was found for this module on this kernel.
– Use the dkms install command to reinstall any previous module version.

vboxnetadp.ko:
– Uninstallation
– Deleting from: /lib/modules/3.2.0-65-generic-pae/updates/dkms/
– Original module
– No original module was found for this module on this kernel.
– Use the dkms install command to reinstall any previous module version.

vboxnetflt.ko:
– Uninstallation
– Deleting from: /lib/modules/3.2.0-65-generic-pae/updates/dkms/
– Original module
– No original module was found for this module on this kernel.
– Use the dkms install command to reinstall any previous module version.

vboxpci.ko:
– Uninstallation
– Deleting from: /lib/modules/3.2.0-65-generic-pae/updates/dkms/
– Original module
– No original module was found for this module on this kernel.
– Use the dkms install command to reinstall any previous module version.

depmod………

DKMS: uninstall completed.
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.2.0-65-generic-pae /boot/vmlinuz-3.2.0-65-generic-pae
update-initramfs: Deleting /boot/initrd.img-3.2.0-65-generic-pae
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.2.0-65-generic-pae /boot/vmlinuz-3.2.0-65-generic-pae
Generating grub.cfg …
Found background image: /usr/share/images/desktop-base/desktop-grub.png
Found linux image: /boot/vmlinuz-3.8.0-44-generic
Found initrd image: /boot/initrd.img-3.8.0-44-generic
Found linux image: /boot/vmlinuz-3.2.0-67-generic-pae
Found initrd image: /boot/initrd.img-3.2.0-67-generic-pae
Found memtest86+ image: /boot/memtest86+.bin
Found Windows 7 (loader) on /dev/sda1
done
Removing linux-image-generic-lts-raring …
Removing linux-image-3.8.0-44-generic …
Examining /etc/kernel/prerm.d.
run-parts: executing /etc/kernel/prerm.d/dkms 3.8.0-44-generic /boot/vmlinuz-3.8.0-44-generic
dkms: removing: virtualbox 4.1.12 (3.8.0-44-generic) (i686)

——– Uninstall Beginning ——–
Module:  virtualbox
Version: 4.1.12
Kernel:  3.8.0-44-generic (i686)
————————————-

Status: Before uninstall, this module version was ACTIVE on this kernel.

vboxdrv.ko:
– Uninstallation
– Deleting from: /lib/modules/3.8.0-44-generic/updates/dkms/
– Original module
– No original module was found for this module on this kernel.
– Use the dkms install command to reinstall any previous module version.

vboxnetadp.ko:
– Uninstallation
– Deleting from: /lib/modules/3.8.0-44-generic/updates/dkms/
– Original module
– No original module was found for this module on this kernel.
– Use the dkms install command to reinstall any previous module version.

vboxnetflt.ko:
– Uninstallation
– Deleting from: /lib/modules/3.8.0-44-generic/updates/dkms/
– Original module
– No original module was found for this module on this kernel.
– Use the dkms install command to reinstall any previous module version.

vboxpci.ko:
– Uninstallation
– Deleting from: /lib/modules/3.8.0-44-generic/updates/dkms/
– Original module
– No original module was found for this module on this kernel.
– Use the dkms install command to reinstall any previous module version.

depmod……….

DKMS: uninstall completed.
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.8.0-44-generic /boot/vmlinuz-3.8.0-44-generic
update-initramfs: Deleting /boot/initrd.img-3.8.0-44-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.8.0-44-generic /boot/vmlinuz-3.8.0-44-generic
Generating grub.cfg …
Found background image: /usr/share/images/desktop-base/desktop-grub.png
Found linux image: /boot/vmlinuz-3.2.0-67-generic-pae
Found initrd image: /boot/initrd.img-3.2.0-67-generic-pae
Found memtest86+ image: /boot/memtest86+.bin
Found Windows 7 (loader) on /dev/sda1
done
The link /vmlinuz.old is a damaged link
Removing symbolic link vmlinuz.old
you may need to re-run your boot loader[grub]
The link /initrd.img.old is a damaged link
Removing symbolic link initrd.img.old
you may need to re-run your boot loader[grub]
arcko@arcko-d525w:~$ sudo update-grub
[sudo] password for arcko:
Generating grub.cfg …
Found background image: /usr/share/images/desktop-base/desktop-grub.png
Found linux image: /boot/vmlinuz-3.2.0-67-generic-pae
Found initrd image: /boot/initrd.img-3.2.0-67-generic-pae
Found memtest86+ image: /boot/memtest86+.bin
Found Windows 7 (loader) on /dev/sda1
done
arcko@arcko-d525w:~$

标签