You are not logged in.

#1 2008-11-08 10:02:46

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,224
Website

[SOLVED] Compiling Custom Kernel - root device not found

OK, so I'm trying to compile a custom kernel to enable PAE and 64GB so I can (hopefully) see the full 4gb of RAM in my laptop, instead of the 2.97GB it currently sees.

I tried following the wiki here: http://wiki.archlinux.org/index.php/Cus … n_with_ABS

I copied 'config' from /var/abs/core/kernel26/ and these are the setting I changed:

CONFIG_LOCALVERSION="-PAE"
CONFIG_X86_PAE=y
CONFIG_RESOURCES_64BIT=y

I also changed JFS, SMB and CIFS to be included in the kernel instead of being modules.

Everything built OK, and I installed the pkg. I had to 'f'orce it since pacman was complaining about a bunch of /lib/firmware files that existed in the file system.

Added a new entry to grub:

title  Arch Linux (PAE)
root   (hd0,2)
kernel /vmlinuz26274-PAE root=/dev/disk/by-uuid/d36e2370-f812-4f3d-9895-7b0e65e3c3f8 ro vga=792
initrd /kernel26.img

When I reboot and try that Grub entry, it barfs out complaining that it can't find the root device. I copied and pasted from the original Grub file so I know the UUID is correct.

Where did I go wrong? sad

(NB: I've never compiled a kernel myself before, so this is a big step for me! tongue)

Last edited by fukawi2 (2008-11-10 23:40:09)

Offline

#2 2008-11-08 10:44:49

shazeal
Member
From: New Zealand
Registered: 2007-06-05
Posts: 341

Re: [SOLVED] Compiling Custom Kernel - root device not found

Is it grub barfing (ie you can go back to the grub menu) or is the kernel booting then complaining?

As an aside...

initrd /kernel26.img

That doesnt sound right, kernel26.img is the default arch image, if you did it properly you should have a new kernel26pae.img or something.

Just so you know what I mean this is my grub file, vanilla is my custom, the fallback is the default arch kernel.

# (0) Arch Linux
title  Arch Linux
root   (hd0,0)
kernel /vmlinuz26vanilla md=0,/dev/sdb1,/dev/sdc1 md=1,/dev/sdb2,/dev/sdc2 root=/dev/md1 ro 5
initrd /kernel26vanilla.img

# (1) Arch Linux
title  Arch Linux Fallback
root   (hd0,0) 
kernel /vmlinuz26 md=0,/dev/sdb1,/dev/sdc1 md=1,/dev/sdb2,/dev/sdc2 root=/dev/md1 ro
initrd /kernel26.img

Last edited by shazeal (2008-11-08 10:45:36)

Offline

#3 2008-11-09 21:36:31

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,224
Website

Re: [SOLVED] Compiling Custom Kernel - root device not found

shazeal wrote:

Is it grub barfing (ie you can go back to the grub menu) or is the kernel booting then complaining?

Yes, Grub is the one barfing.

shazeal wrote:

initrd /kernel26.img

That doesnt sound right, kernel26.img is the default arch image, if you did it properly you should have a new kernel26pae.img or something.

That's what I thought - but I looked after installing the .pkg and there wasn't a kernel26pae.img file, only these files hmm

root ~ # pacman -Qpl /kernel26-pae/kernel26274-PAE-2.6.27.4-4-i686.pkg.tar.gz | grep /boot/
kernel26274-PAE /boot/
kernel26274-PAE /boot/System.map26274-PAE
kernel26274-PAE /boot/kconfig26274-PAE
kernel26274-PAE /boot/vmlinuz26274-PAE
root ~ #

Offline

#4 2008-11-09 22:10:57

creslin
Member
Registered: 2008-10-04
Posts: 241

Re: [SOLVED] Compiling Custom Kernel - root device not found

What do your install/preset files look like?  Make sure your install script is running `mkinitcpio -p kernel26274-PAE` along with this preset:

# mkinitcpio preset file for kernel26274-PAE

########################################
# DO NOT EDIT THIS LINE:
source /etc/mkinitcpio.d/kernel26274-PAE.kver
########################################
ALL_config="/etc/mkinitcpio.conf"

PRESETS=('default' 'fallback')

default_image="/boot/kernel26274-PAE.img"

fallback_image="/boot/kernel26274-PAE-fallback.img" 
fallback_options="-S autodetect"

Last edited by creslin (2008-11-09 22:22:48)


ARCH|awesome3.0 powered by Pentium M 750 | 512MB DDR2-533 | Radeon X300 M
The journey is the reward.

Offline

#5 2008-11-09 22:44:28

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,224
Website

Re: [SOLVED] Compiling Custom Kernel - root device not found

Now we're on different paths... hmm

My install file doesn't look anything like what you've posted. Here's mine:
http://pastebin.com/m413534ce

Offline

#6 2008-11-09 22:51:34

creslin
Member
Registered: 2008-10-04
Posts: 241

Re: [SOLVED] Compiling Custom Kernel - root device not found

fukawi2 wrote:

Now we're on different paths... hmm

My install file doesn't look anything like what you've posted. Here's mine:
http://pastebin.com/m413534ce

Sorry, I should have been more clear.  You need to adjust both the install file and the preset file.  In your install file, replace:

/sbin/mkinitcpio -p kernel26

with:

/sbin/mkinitcpio -p kernel26274-PAE

Then, you also need to adjust the preset file accordingly.  The preset file was what I posted.

Last edited by creslin (2008-11-09 22:57:26)


ARCH|awesome3.0 powered by Pentium M 750 | 512MB DDR2-533 | Radeon X300 M
The journey is the reward.

Offline

#7 2008-11-09 22:58:48

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,224
Website

Re: [SOLVED] Compiling Custom Kernel - root device not found

Ah ok - I'm with you now smile

So adjust the kernel26.install file from the PKGBUILD directory, and the kernel26.preset file in /etc/mkinitcpio.d/ ?

Offline

#8 2008-11-09 23:06:49

creslin
Member
Registered: 2008-10-04
Posts: 241

Re: [SOLVED] Compiling Custom Kernel - root device not found

fukawi2 wrote:

Ah ok - I'm with you now smile

So adjust the kernel26.install file from the PKGBUILD directory, and the kernel26.preset file in /etc/mkinitcpio.d/ ?

You'll need to rename the preset to kernel26274-PAE.preset in order for `mkinitcpio -p kernel2674-PAE` to use it properly.  Does your PKGBUILD not install a preset file?  It sounds like it doesn't, based on what you've said.  It would be easiest if you used the PKGBUILD to do this instead of manually placing the preset into /etc/mkinitcpio.d beforehand.


ARCH|awesome3.0 powered by Pentium M 750 | 512MB DDR2-533 | Radeon X300 M
The journey is the reward.

Offline

#9 2008-11-09 23:17:10

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,224
Website

Re: [SOLVED] Compiling Custom Kernel - root device not found

It doesn't appear to - I'm using the PKGBUILD from http://wiki.archlinux.org/index.php/Cus … n_with_ABS

Perhaps that page needs to be updated if the PKGBUILD is incorrect. I'm willing to do it myself if I can get my head around this whole process smile

I've copied kernel26.preset to kernel-26274-PAE.preset as well as the kver file, and edited both the .preset and the .install files. I'm running makepkg now so we'll see what happens smile

Offline

#10 2008-11-09 23:32:54

creslin
Member
Registered: 2008-10-04
Posts: 241

Re: [SOLVED] Compiling Custom Kernel - root device not found

Personally I think it you might find it easier to use the kernel26 abs PKGBUILD as your base template and then checking some maintained AUR kernels to see what they do.

Last edited by creslin (2008-11-09 23:41:32)


ARCH|awesome3.0 powered by Pentium M 750 | 512MB DDR2-533 | Radeon X300 M
The journey is the reward.

Offline

#11 2008-11-09 23:51:02

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,224
Website

Re: [SOLVED] Compiling Custom Kernel - root device not found

If this fails, then I'll try using the whole ABS kernel26 package (rather than just the 'config' file!).

There's nothing in AUR for PAE sad

Offline

#12 2008-11-09 23:56:06

creslin
Member
Registered: 2008-10-04
Posts: 241

Re: [SOLVED] Compiling Custom Kernel - root device not found

fukawi2 wrote:

There's nothing in AUR for PAE sad

Oh I know, but I just meant you can see how they handle the version customization in a general sense.  I think you might find it easier to adapt the PKGBUILD to your -PAE needs that way instead.


ARCH|awesome3.0 powered by Pentium M 750 | 512MB DDR2-533 | Radeon X300 M
The journey is the reward.

Offline

#13 2008-11-10 00:07:08

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,224
Website

Re: [SOLVED] Compiling Custom Kernel - root device not found

fukawi2 wrote:
shazeal wrote:

Is it grub barfing (ie you can go back to the grub menu) or is the kernel booting then complaining?

Yes, Grub is the one barfing.

Sorry, I stand corrected. It's the kernel barfing. I get the ramfs$ prompt

This is where I get to:

:: Running hook [encrypt]
:: Running hook [filesystems]
:: Loading root filesystem module...
Attempting to create root device '/dev/disk/by-uuid/d36e2370-f812-4f3d-9895-7b0e65e3c3f8'
ERROR: Failed to parse block device name for '/dev/disk/by-uuid/d36e2370-f812-4f3d-9895-7b0e65e3c3f8'
unkown
ERROR: root fs cannot be detected. Try using the rootfstype= kernel parameter.
Waiting for devices to settle...done.

<more complaints about the root device not being present>
ramfs$

Offline

#14 2008-11-10 00:32:15

creslin
Member
Registered: 2008-10-04
Posts: 241

Re: [SOLVED] Compiling Custom Kernel - root device not found

Maybe it's related to the changes you made to FS modules?


ARCH|awesome3.0 powered by Pentium M 750 | 512MB DDR2-533 | Radeon X300 M
The journey is the reward.

Offline

#15 2008-11-10 10:23:30

shazeal
Member
From: New Zealand
Registered: 2007-06-05
Posts: 341

Re: [SOLVED] Compiling Custom Kernel - root device not found

Nah hes doing a mkinitcpio against the wrong kernel. You need to fix the above problems. The kernel26.preset points to kernel26.kver... fix it wink

Offline

#16 2008-11-10 21:35:39

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,224
Website

Re: [SOLVED] Compiling Custom Kernel - root device not found

What does the .kver file need to have in it? I created a copy of it and updated the .preset file to point to the new one, but I didn't change anything inside it. There's only 2 lines; 1 with the kernel version, and 1 comment telling me not to change it hmm

I take it I just need to make the variable in there to say to "2.6.27-PAE" or to "2.6.27.4-PAE"?

Offline

#17 2008-11-10 22:04:27

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

Re: [SOLVED] Compiling Custom Kernel - root device not found

Why not to use sources?
Reading about all the problems users have with PKBUILD kernel, I think that building directly from the sources is super easy. I never had any problems, never had to look for specific options, nvidia always installed.

I might be wrong, but i think that getting sources from www.kernel.org and compiling custom stuff from there is actually much easier.
You can use Arch default config file and then go from there if you just started to learn about kernel.

Offline

#18 2008-11-10 22:09:48

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,224
Website

Re: [SOLVED] Compiling Custom Kernel - root device not found

How easy / difficult is it to remove the kernel doing it the 'traditional' way? My main attraction to using the PKGBUILD is that I can do pacman -R kernel26274-PAE and I know everything will be cleaned up...

Offline

#19 2008-11-10 22:34:56

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,224
Website

Re: [SOLVED] Compiling Custom Kernel - root device not found

Half-yay. shazeal ftw big_smile

Thanks everyone, it's going now smile

(Apart from I forgot to include the nVidia drivers roll )

Offline

#20 2008-11-10 23:23:23

shazeal
Member
From: New Zealand
Registered: 2007-06-05
Posts: 341

Re: [SOLVED] Compiling Custom Kernel - root device not found

Good to hear. If you can do a proper kernel PKGBUILD you can do any PKGBUILD imho lol

I wouldnt include the NVIDIA drivers inside the kernel package if thats what you mean?

Offline

#21 2008-11-10 23:39:51

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,224
Website

Re: [SOLVED] Compiling Custom Kernel - root device not found

No - rebuilt the nVidia package against the new kernel smile   X is up and running now smile

Before PAE:

            total       used       free     shared    buffers     cached
Mem:          3040       2930        110          0          0       2529
-/+ buffers/cache:        400       2639
Swap:         8189        114       8074

After PAE:

            total       used       free     shared    buffers     cached
Mem:          4048        413       3635          0          1        270
-/+ buffers/cache:        141       3906
Swap:         8189          0       8189

Offline

Board footer

Powered by FluxBB