You are not logged in.

#1 2011-03-23 15:59:44

guidito73
Member
Registered: 2010-07-02
Posts: 43

Stock and custom kernels

Hi, I have a simple question:

If I install a custom kernel (kernel26-one-dev in this case, available in AUR), do I have to uninstall the stock kernel?

Or should I mantain both of them?

Thanks in advance!

Offline

#2 2011-03-23 16:00:37

SanskritFritz
Member
From: Budapest, Hungary
Registered: 2009-01-08
Posts: 1,928
Website

Re: Stock and custom kernels

You dont have to uninstall the stock kernel, but you have to adjust your grub menu.


zʇıɹɟʇıɹʞsuɐs AUR || Cycling in Budapest with a helmet camera || Revised log levels proposal: "FYI" "WTF" and "OMG" (John Barnette)

Offline

#3 2011-03-23 16:00:58

ANOKNUSA
Member
Registered: 2010-10-22
Posts: 2,141

Re: Stock and custom kernels

Custom kernels are always installed alongside the default one, which should be kept as a backup.

Offline

#4 2011-03-23 16:03:59

guidito73
Member
Registered: 2010-07-02
Posts: 43

Re: Stock and custom kernels

SanskritFritz wrote:

You dont have to uninstall the stock kernel, but you have to adjust your grub menu.

Thanks for your quick question!

The Wiki entry for my Acer Aspire One doesn't explain how can I adjust the grub.
If I install the package from AUR with yaourt, could it be done automagically?
Is there any entry I should read to get this done?

Offline

#5 2011-03-23 16:45:54

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Stock and custom kernels

Offline

#6 2011-03-23 16:51:07

guidito73
Member
Registered: 2010-07-02
Posts: 43

Re: Stock and custom kernels

I don't know if I'm a bit stupid today or what, but I can't find a clear way to do what I want to do in that entry :B

So, if anyone could enlight me with some straight answer or entry, I'd appreciate it!

Offline

#7 2011-03-23 17:19:57

stqn
Member
Registered: 2010-03-19
Posts: 1,191
Website

Re: Stock and custom kernels

Copy paste the grub entry for the default Arch kernel and change the vmlinuz and kernel names to the names of the ones from the AUR. "ls /boot" to find out the names.

Offline

#8 2011-03-23 17:22:47

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Stock and custom kernels

Look at your /boot/grub/menu.lst - you should have at least the regular kernel image and the fallback listed there. Now you want to add another image. This is my Arch Linux Fallback entry:

# (1) Arch Linux One 
title  Arch Linux Fallback
root   (hd0,0)
kernel /vmlinuz26 root=/dev/disk/by-uuid/bf1d191b-0f0d-4961-bd67-4d023a2e5873 ro
initrd /kernel26-fallback.img

I copy it and modify e.g. like this

# (2) Arch Linux One
title  Arch Linux One
root   (hd0,0)
kernel /vmlinuz26 root=/dev/disk/by-uuid/bf1d191b-0f0d-4961-bd67-4d023a2e5873 ro
initrd /kernel26-one.img

assuming the file is in /boot and it is named kernel26-one.img. I have a separate partition for /boot.

If you prefer the new kernel to be the default one, change the number on the 'default' line

# general configuration:
timeout   5
default   0

in my example, the kernel26-one.img is number 2:

# (2) Arch Linux One

Offline

#9 2011-03-23 18:11:38

guidito73
Member
Registered: 2010-07-02
Posts: 43

Re: Stock and custom kernels

Thanks Karol, that was sweet!

But I understand that kernel26-one doesn't create a "kernel26-one.img". So, is there any chance that it uses the normal kernel26.img and patches it or something like that?

I'll try to investigate a bit more, but I'm pretty sure that's how it works.

Offline

#10 2011-03-23 18:19:48

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Stock and custom kernels

I have no idea how kernel26-one-dev works and what's the name of the kernel image it creates, you need to check this by yourself http://aur.archlinux.org/packages/kerne … v/PKGBUILD

Offline

#11 2011-03-23 18:29:29

guidito73
Member
Registered: 2010-07-02
Posts: 43

Re: Stock and custom kernels

karol wrote:

I have no idea how kernel26-one-dev works and what's the name of the kernel image it creates, you need to check this by yourself http://aur.archlinux.org/packages/kerne … v/PKGBUILD

Once again, thank you very much Karol.

There's no entry in the PKGBUILD of kernel26-one-dev that says something about an .img file, as there is in some other kernels I found on AUR (http://aur.archlinux.org/packages/kernel26-35-lts-arch/PKGBUILD, as an example).

So, as I said, I think it does not create a new .img file.

Since I know very little about programming and PKGBUILDs, I'm assuming it uses the current kernel26.img or patches it somehow.

Could it be that way?

Offline

#12 2011-03-23 19:34:09

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Stock and custom kernels

By 'kernel image' I mean the kernel.img file, it's not the Linux kernel, it's the initial ramdisk https://wiki.archlinux.org/index.php/Mkinitcpio
The vmlinux thing is the kernel and it gets created

[karol@black kernel26-one-dev]$ grep vmlinuz PKGBUILD
   install -T arch/x86/boot/bzImage ${pkgdir}/boot/vmlinuz${_kernelname}

You are right, this kernel does not create any .img files. The first comment says

Inkaine wrote:

THE PACKAGE IS IN NO WAY MEANT AS A REPLACEMENT FOR kernel26-one. It may be unstable or even completely unbootable. It is supposed to provide a testing field open to everyone who wants to support kernel26-one development.

Therefor it only installs a rudimentary kernel and no source files so it doesn't interfere with a main kernel.

Offline

#13 2011-03-23 19:47:12

guidito73
Member
Registered: 2010-07-02
Posts: 43

Re: Stock and custom kernels

Well, neither does kernel26-one (the not-dev version).

So, my guess is that installing it from the AUR with yaourt does all the magic?

Simple as that?

Offline

Board footer

Powered by FluxBB