You are not logged in.

#1 2009-02-24 02:48:16

sheng
Member
Registered: 2009-02-19
Posts: 28

How to edit GRUB for boot new compile kernel?

I compile the newest Linux kernel.
I read Archlinux wiki about how to edit GRUB for boot new compile kernel,
but Archlinux wiki do not reference to it.
Who can help me, baby?

Offline

#2 2009-02-24 02:59:00

ataraxia
Member
From: Pittsburgh
Registered: 2007-05-06
Posts: 1,553

Re: How to edit GRUB for boot new compile kernel?

The file is /boot/grub/menu.lst . Change the file names inside this file to use your new kernel and initrd that you just built. You don't have to do anything else after you finish this file.

Offline

#3 2009-02-24 04:08:16

sheng
Member
Registered: 2009-02-19
Posts: 28

Re: How to edit GRUB for boot new compile kernel?

ataraxia wrote:

The file is /boot/grub/menu.lst . Change the file names inside this file to use your new kernel and initrd that you just built. You don't have to do anything else after you finish this file.

If my built kernel's name is "newkernel",
and the "menu.lst" like this:

#(0) Arch Linux
title  Arch Linux  [/boot/vmlinuz]
root   (hd0,0)
kernel /vmlinuz26 root=/dev/hda1 ro vga=792
initrd /initrd26.img (use this if you use mkinitrd)
initrd /kernel26.img (use this if you use mkinitcpio, or if you have an updated kernel)

Where should modify?
Please say it clearer.

Offline

#4 2009-02-24 04:22:05

bangkok_manouel
Member
From: indicates a starting point
Registered: 2005-02-07
Posts: 1,556

Re: How to edit GRUB for boot new compile kernel?

how did you build your kernel? traditional way or arch way?
if it's the arch way (TM), here's an example of a custom kernel with -mm patch.
what I have in /boot:

-rw-r--r-- 1 root root 4.3M 2008-12-23 09:52 kernel26mm-fallback.img
-rw-r--r-- 1 root root 668K 2008-12-23 09:52 kernel26mm.img
-rw-r--r-- 1 root root 764K 2008-12-22 18:44 System.map26mm
-rw-r--r-- 1 root root 1.7M 2008-12-22 18:44 vmlinuz26mm

now here's the /boot/grub/menu.lst related entry (you may add the fallback one):

# (2) Arch Linux
title  kernel26mm
root   (hd0,0)
kernel /vmlinuz26mm root=/dev/sda5 ro vga=773
initrd /kernel26mm.img

Offline

#5 2009-02-24 04:41:50

sheng
Member
Registered: 2009-02-19
Posts: 28

Re: How to edit GRUB for boot new compile kernel?

bangkok_manouel wrote:

how did you build your kernel? traditional way or arch way?
if it's the arch way (TM), here's an example of a custom kernel with -mm patch.
what I have in /boot:

-rw-r--r-- 1 root root 4.3M 2008-12-23 09:52 kernel26mm-fallback.img
-rw-r--r-- 1 root root 668K 2008-12-23 09:52 kernel26mm.img
-rw-r--r-- 1 root root 764K 2008-12-22 18:44 System.map26mm
-rw-r--r-- 1 root root 1.7M 2008-12-22 18:44 vmlinuz26mm

now here's the /boot/grub/menu.lst related entry (you may add the fallback one):

# (2) Arch Linux
title  kernel26mm
root   (hd0,0)
kernel /vmlinuz26mm root=/dev/sda5 ro vga=773
initrd /kernel26mm.img

Should be traditional way.

Offline

#6 2009-02-24 04:55:37

bangkok_manouel
Member
From: indicates a starting point
Registered: 2005-02-07
Posts: 1,556

Re: How to edit GRUB for boot new compile kernel?

Offline

#7 2009-02-24 05:01:05

jacko
Member
Registered: 2007-11-23
Posts: 840

Re: How to edit GRUB for boot new compile kernel?

it's highly recommended to install packages in arch using makepkg/pacman. Just modify a kernel26 PKGBUILD. I have yet to see one that doesn't allow you to use a custom config. So just rename the PKGBUILD mv your config to the source of the PKGBUILD dir and run makepkg. Then pacman -U and update menu.lst with the new entry (duplicate of the original) using the new name for the custom kernel.

All the info you need is in the wiki, throw this on top of ccache and you can repackage a kernel26 just like arch devs do it in mins when an update comes through upstream.

Offline

Board footer

Powered by FluxBB