You are not logged in.

#1 2009-03-08 10:34:22

Convergence
Member
Registered: 2005-07-02
Posts: 377

clarification on kernel compilation wiki[resolved]

I'm having a little trouble following the wiki. Everything is pretty clear until I get to the point where it says "(you can also copy the config file and the System.map to /boot, but this is in general no longer required.)"  Why is this no longer required?  Does it have something to do with initramfs?

Then it says "(Optional) Build a ramdisk if necessary (most users probably want this) " 

I don't think that it is necessary for my system; no raid, no encrypted partions, and long ago, on this same computer, I ran gentoo w/o the need for initramfs.     When mkinitcpio started giving me "file not found errors, I decided to leave the ramdisk out of the boot process for my custom kernel. So do I need different info in my menu.lst?   

When I try to boot my new custom kernel, I get "error 15 file not found"  What file?  init?  I notice that in the wiki, it doesn't say that you need a "init=" argument.  Is that because of the assumption that I'll use an initramfs? 

By the way, yes, I built support for all existing file systems directly into the kernel. 

Here is what is in my /boot dir:

ll /boot
total 17M
drwxr-xr-x  4 root root 1.0K 2009-03-08 03:19 .
drwxr-xr-x 20 root root 4.0K 2009-02-08 13:31 ..
-rw-r--r--  1 root root 1.4M 2009-03-08 03:19 System.map
-rw-r--r--  1 root root 789K 2009-02-22 03:06 System.map26
drwxr-xr-x  2 root root 1.0K 2009-02-25 17:14 grub
-rw-r--r--  1 root root 5.0M 2009-02-25 11:16 kernel26-fallback.img
-rw-r--r--  1 root root 295K 2009-03-06 04:16 kernel26-revision1.img
-rw-r--r--  1 root root 295K 2009-03-06 04:20 kernel26.28.7
-rw-r--r--  1 root root 927K 2009-02-25 11:16 kernel26.img
drwx------  2 root root  12K 2009-02-09 00:27 lost+found
-rw-r--r--  1 root root 3.5M 2009-03-07 15:24 minimal
-rw-r--r--  1 root root 1.7M 2009-03-06 05:10 vmlinuz-mycustom
-rw-r--r--  1 root root 1.7M 2009-02-22 03:06 vmlinuz26
-rw-r--r--  1 root root 926K 2009-03-06 05:02 vmlinuz26.28.7.optimized

and here is my menu.lst:

# boot sections follow
# each is implicitly numbered from 0 in the order of appearance below
#
# TIP: If you want a 1024x768 framebuffer, add "vga=773" to your kernel line.
#
#-*


# (0) Arch Custom
title Optimized
root   (hd0,0)
kernel /boot/minimal root=/dev/sda3 ro

# (1) Arch Linux
title  Arch Linux Fallback
root   (hd0,0)
kernel /vmlinuz26 root=/dev/disk/by-uuid/38a1ea10-3bf5-438b-bd4a-e2e633b51432 ro
initrd /kernel26-fallback.img


# (2) Arch Linux
title  Arch Linux  [/boot/vmlinuz26]
root   (hd0,0)
kernel /vmlinuz26 root=/dev/disk/by-uuid/38a1ea10-3bf5-438b-bd4a-e2e633b51432 ro $
initrd /kernel26.img

Last edited by Convergence (2009-03-10 07:08:49)


It's a very deadly weapon to know what you're doing
---  William Murderface

Offline

#2 2009-03-08 13:20:48

somedrew
Member
From: Canada
Registered: 2007-05-14
Posts: 140

Re: clarification on kernel compilation wiki[resolved]

Convergence wrote:

"(you can also copy the config file and the System.map to /boot, but this is in general no longer required.)"  Why is this no longer required?  Does it have something to do with initramfs?

There's no need to copy the config file to /boot. If you'd like to have a copy of your kernel config you can either enable support (CONFIG_IKCONFIG) to save a copy of the file in the kernel itself (/proc/config) or keep the .config around.
System.map is a symbol table that can come in handy when debugging kernel crashes. A symbol table in /proc/kallsyms can be created setting CONFIG_KALLSYMS.

Convergence wrote:

When I try to boot my new custom kernel, I get "error 15 file not found"  What file?  init?

Looks like an issue with the path to the kernel image and with the root device. This should work:

# (0) Arch Custom
title Optimized
root   (hd0,0)
kernel /boot/minimal root=/dev/disk/by-uuid/38a1ea10-3bf5-438b-bd4a-e2e633b51432 ro
Convergence wrote:

I notice that in the wiki, it doesn't say that you need a "init=" argument.  Is that because of the assumption that I'll use an initramfs?

The initrd line in menu.lst is for the initramfs, and should be omitted if you forgo using one. The init kernel parameter is used to run the specified binary instead of /sbin/init

Convergence wrote:

By the way, yes, I built support for all existing file systems directly into the kernel.

Disk controller drivers also need to be built-in when not using an initramfs but based on your grub error they probably are in your case.

cheers,

Last edited by somedrew (2009-03-08 13:31:57)

Offline

#3 2009-03-08 13:45:57

u_no_hu
Member
Registered: 2008-06-15
Posts: 453

Re: clarification on kernel compilation wiki[resolved]

if your boot is on a separate partition, then you dont need that /boot/minimal.... just minimal will do...assuming boot is (hd0,0)


Don't be a HELP VAMPIRE. Please search before you ask.

Subscribe to The Arch Daily News.

Offline

#4 2009-03-08 14:01:14

Convergence
Member
Registered: 2005-07-02
Posts: 377

Re: clarification on kernel compilation wiki[resolved]

somedrew wrote:
Convergence wrote:

"(you can also copy the config file and the System.map to /boot, but this is in general no longer required.)"  Why is this no longer required?  Does it have something to do with initramfs?

There's no need to copy the config file to /boot. If you'd like to have a copy of your kernel config you can either enable support (CONFIG_IKCONFIG) to save a copy of the file in the kernel itself (/proc/config) or keep the .config around.
System.map is a symbol table that can come in handy when debugging kernel crashes. A symbol table in /proc/kallsyms can be created setting CONFIG_KALLSYMS.

Convergence wrote:

When I try to boot my new custom kernel, I get "error 15 file not found"  What file?  init?

Looks like an issue with the path to the kernel image and with the root device. This should work:

# (0) Arch Custom
title Optimized
root   (hd0,0)
kernel /boot/minimal root=/dev/disk/by-uuid/38a1ea10-3bf5-438b-bd4a-e2e633b51432 ro
Convergence wrote:

I notice that in the wiki, it doesn't say that you need a "init=" argument.  Is that because of the assumption that I'll use an initramfs?

The initrd line in menu.lst is for the initramfs, and should be omitted if you forgo using one. The init kernel parameter is used to run the specified binary instead of /sbin/init

Convergence wrote:

By the way, yes, I built support for all existing file systems directly into the kernel.

Disk controller drivers also need to be built-in when not using an initramfs but based on your grub error they probably are in your case.

cheers,

You may have found the problem for me. The disk that hosts /boot is IDE, and I did not build IDE support in to the kernel (It's been a while since I've rolled my own)

So I am now recompiling with <*> ATA/ATAPI/MFM/RLL support  --->

and
<*>   Generic PCI IDE Chipset Support  #How can I go wrong with generic support?  LOL
<*>   AMD and nVidia IDE support        # It is an nforce 2 motherboard, so it might work

Hopefully this is the right stuff.  Thanks, I'll report back either way.


By the way, I also used your recommendation to use the UUID in grub.   I still get the same errors, so I checked my kernel config, and I realized that I didn't have support built in for my old ide hd.

Last edited by Convergence (2009-03-08 14:03:36)


It's a very deadly weapon to know what you're doing
---  William Murderface

Offline

#5 2009-03-08 14:39:09

Convergence
Member
Registered: 2005-07-02
Posts: 377

Re: clarification on kernel compilation wiki[resolved]

somedrew:  Hmm.  Didn't work. Maybe I still have to compile something else in.  I'll take another crack at it tomorrow or tuesday.  right now, I've had enough.  LOL


u_no_hu wrote:

if your boot is on a separate partition, then you dont need that /boot/minimal.... just minimal will do...assuming boot is (hd0,0)

I love this kind of tip.  I genuinely understand grub.conf a little better because of it, and it helps me to simplify my config.  (I even understand why it is unnecessary) Will try tuesday if not before.  Thanks

Last edited by Convergence (2009-03-08 14:40:14)


It's a very deadly weapon to know what you're doing
---  William Murderface

Offline

#6 2009-03-09 13:14:05

Convergence
Member
Registered: 2005-07-02
Posts: 377

Re: clarification on kernel compilation wiki[resolved]

OK, I've made some progress.  I used your suggestions, and it seems to have taken me further along this process.  My kernel seems to be loading!  However I still get a kernel panic when / fails to load.  roll

When kernel first loaded for the first time, it told me that it /dev/sda3 didn't exist, and that the only option that I had were hda1-4. I knew that I had done something wrong because first of all, I haven't seen and hd* device around in a long time, secondly, I have two hd's one of them is ide, the other is sata, and the sata wasn't being recognized at all.

anyway, I disabled < > ATA/ATAPI/MFM/RLL support  altogether, and enabled

<*> Serial ATA (prod) and Parallel ATA (experimental) drivers  ---
...<*>    NVIDIA SATA support
...<*>    AMD/NVidia PATA support

Now my kernel recognizes both drives but, it has reversed the order.  the ide drive used to be sda and the sata used to be sdb.  This is  undesirable because when I switch kernels, it will cause problems.

So, the way that I see it, I can solve this problem in two different ways:

1.  figure out how to re-reverse the naming of those drives
2.  Use UUIDs

OK, just figured out why I couldn't use UUIDs in my new kernel:  mkinitcpio is a requirement to using persistent naming schemes in the bootloader! 

So, I'd much rather just forgo fix 2, and use fix number one to re-reverse the naming scheme.  Anyone know how to do this?


It's a very deadly weapon to know what you're doing
---  William Murderface

Offline

#7 2009-03-09 16:39:01

broch
Banned
From: L.A. California
Registered: 2006-11-13
Posts: 975

Re: clarification on kernel compilation wiki[resolved]

1) I don't use intrd
my menu.lst excerpt:
# (1) Arch Linux
title  Arch Linux 2.6.29-rc6-zen2 RIGAUDON
root   (hd0,0)
kernel /vmlinuz-2.6.29-rc6-zen2-RIGAUDON root=/dev/sda2 nomoduleupdate quiet vga=792 ro
2) I don't use UUIDs. I don't see any advantage
3) I have separate /boot partition
/dev/sda1 /boot ext2 acl,noatime,noexec,noauto,user_xattr 0 1

As you see /boot is not even mounted. No need to have /boot mounted

I would suggest to run lspci, lsmod, lsusb. Then you should not have problems with selecting stuff that is required to boot your system. Better than guessing I think wink

Offline

#8 2009-03-10 07:08:21

Convergence
Member
Registered: 2005-07-02
Posts: 377

Re: clarification on kernel compilation wiki[resolved]

Well, I gave up and use an initrd.  Everything is fine now, but for some reason, I can't get agpgart NOT to load!  I've asked in a different thread how to solve this problem however.  don't want to cross post. Thanks everyone.  Changing the title to show that it is solved.


It's a very deadly weapon to know what you're doing
---  William Murderface

Offline

Board footer

Powered by FluxBB