Arch-Like - nietypowy blog, nietypowe forum.

Poradniki => Software => Wątek zaczęty przez: sir_lucjan w Październik 27, 2014, 20:48:00

Tytuł: [How To]Usuwamy kernel dystrybucyjny w Manjaro Linux
Wiadomość wysłana przez: sir_lucjan w Październik 27, 2014, 20:48:00
Jeśli skompilowaliśmy kernel w Manjaro Linux, być może będziemy chcieli całkowicie zrezygnować z kernela dystrybucyjnego. Niestety, zależności (pakiet manjaro-system) nie będą zezwalały na odinstalowanie kernela:

linux>=3.4
Aby temu zaradzić możemy wybrać następujące rozwjązania:

1. Metoda łatwa

Kompilujemy kernel linux-bridge-pl przygotowany przez polską społeczność Bridge Linux - niewielkie modyfikacje zawarte w tym kernelu umożliwiają swobodne odinstalowanie kernela dystrybucyjnego

2. Metoda trudniejsza


Jeśli chcemy skompilować inny kernel, przykładowo kernel linux-ck, musimy wprowadzić drobną modyfikację w pliku PKGBUILD. Pobieramy zatem tarball i szukamy następującej pozycji:

Cytuj
package_linux-ck() {
   _Kpkgdesc='Linux Kernel and modules with the ck1 patchset featuring the Brain Fuck Scheduler v0.441.'
   pkgdesc="${_Kpkgdesc}"
   depends=('coreutils' 'linux-firmware' 'mkinitcpio>=0.7')
   optdepends=('crda: to set the correct wireless channels of your country' 'lirc-ck: Linux Infrared Remote Control kernel modules for linux-ck' 'nvidia-ck: nVidia drivers for linux-ck' 'nvidia-beta-ck: nVidia beta drivers for linux-ck' 'modprobed_db: Keeps track of EVERY kernel module that has ever been probed - useful for those of us who make localmodconfig')
   provides=("linux-ck=${pkgver}")
   conflicts=('kernel26-ck' 'linux-ck-corex' 'linux-ck-p4' 'linux-ck-pentm' 'linux-ck-atom' 'linux-ck-core2' 'linux-ck-nehalem' 'linux-ck-sandybridge' 'linux-ck-ivybridge' 'linux-ck-haswell' 'linux-ck-kx' 'linux-ck-k10' 'linux-ck-barcelona' 'linux-ck-bulldozer' 'linux-ck-piledriver')
   replaces=('kernel26-ck')
   backup=("etc/mkinitcpio.d/linux-ck.preset")
   install=linux-ck.install
   #groups=('ck-generic')

Musimy wpisać odpowiedni zapis do składni - po naszej modyfikacji dany fragment musi wyglądać następująco:

Cytuj
package_linux-ck() {
   _Kpkgdesc='Linux Kernel and modules with the ck1 patchset featuring the Brain Fuck Scheduler v0.441.'
   pkgdesc="${_Kpkgdesc}"
   depends=('coreutils' 'linux-firmware' 'mkinitcpio>=0.7')
   optdepends=('crda: to set the correct wireless channels of your country' 'lirc-ck: Linux Infrared Remote Control kernel modules for linux-ck' 'nvidia-ck: nVidia drivers for linux-ck' 'nvidia-beta-ck: nVidia beta drivers for linux-ck' 'modprobed_db: Keeps track of EVERY kernel module that has ever been probed - useful for those of us who make localmodconfig')
   provides=("linux-ck=${pkgver}" "linux=${pkgver}" )
   conflicts=('kernel26-ck' 'linux-ck-corex' 'linux-ck-p4' 'linux-ck-pentm' 'linux-ck-atom' 'linux-ck-core2' 'linux-ck-nehalem' 'linux-ck-sandybridge' 'linux-ck-ivybridge' 'linux-ck-haswell' 'linux-ck-kx' 'linux-ck-k10' 'linux-ck-barcelona' 'linux-ck-bulldozer' 'linux-ck-piledriver')
   replaces=('kernel26-ck')
   backup=("etc/mkinitcpio.d/linux-ck.preset")
   install=linux-ck.install
   #groups=('ck-generic')

Po takim zabiegu odinstalowanie kernela dystrybucyjnego nie będzie stanowiło problemu:

[lucjan@openlinux ~]$ pacman -Qsq linux
alsa-lib
alsa-utils
alsi
archlinux-keyring
cpupower
deadbeef
downgrader
efilinux-efi
hdparm
iptables
keyboardctl
keyutils
kmod
ladspa
libiec61883
libimobiledevice
libraw1394
libva
linux-api-headers
linux-firmware
linux-manjaro-pl
linux-manjaro-pl-headers
man-pages
manjaro-firmware
manjaro-hotfixes
manjaro-system
mdadm
mdm
mhwd
mhwd-db
net-tools
netkit-bsd-finger
pacman-mirrorlist
squashfs-tools
syslinux
sysvinit-tools
usb_modeswitch
util-linux
v4l-utils
lucjan@openlinux ~]$ mhwd-kernel -li
Currently running: 3.11.7-13-manjaro-pl (linux311)
The following kernels are installed in your system:
[lucjan@openlinux ~]$