You are not logged in.

#1 2010-11-18 12:56:01

halhen
Member
From: Gothenburg, Sweden
Registered: 2009-04-08
Posts: 56
Website

[Solved] "Unable to determine major/minor..." with homebuilt kernel

My story already has a happy ending, so I write this for future frustrated freshmen of kernel compilation.

This was my first attempt to compile a kernel, and my first venture into the land of pre-init-scripts, so I knew next to nothing about what to expect. Both https://wiki.archlinux.org/index.php/Ke … 26_Package and https://wiki.archlinux.org/index.php/Ke … rom_Source (the PKGBUILD method) with both 2.6.37 and 2.6.34 versions failed in the same way. During boot, I got the message

Unable to determine major/minor number of root device /dev/disk/by-uuid/....

After some booting back and forth between a working setup and my fresh one, I realized that udev didn't find any disks. A bit of google-fu pointed me towards mkinitcpio, and failure to load modules. I checked the contents of kernel26-halhen.img - the version I was building - through

$ zcat /boot/kernel26-halhen.img | cpio -i -v --no-absolute-filenames

and compared the directory structure to kernel26.img, the working -ARCH one installed and maintained through pacman. Sure enough, the /lib/modules directory, and some more module* files was missing in -halhen

Ok, so mkinitcpio had troubles. Some man-searching led me to the -M switch, which makes mkinitcpio tell me what modules it intends to include. Sure enough, I get an error:

$ sudo mkinitcpio -k 2.6.34.7-halhen -g /boot/kernel26-halhen.img -M
Modules autodetected:
FATAL: Could not load /lib/modules/2.6.34.7-halhen/modules.dep: No such file or directory
find: /lib/modules/2.6.34.7-halhen': No such file or directory

Hmm... lets try

$ ls /lib/modules
2.6.34.7-halhen-g3d47e3f-dirty   2.6.35-ARCH

This doesn't look right. Google a bit more, to figure out what the -dirty part means. Turns out that this is the cause.

When one compiles the kernel in a git repo with uncommitted changes, the build scripts appends the last commit SHA1 and "-dirty", to make it clear that the build was made from some limbo state. In my case, I was building from ~/projects/kernelbuild which is not a git repo. I do however lazily keep my dotfiles .gitrepo directly at ~, which had some uncommitted stuff in it, and of which every sub-directory is part of.

So, the solutions in this case are: Compile the kernel outside of git repos, make sure you have no uncommitted changes, or deselect the "Automatically append version information to the version string" under "General setup" in the kernel menuconfig. After this: success and a sigh of relief.

Oh, well. I got to know mkinitcpio along the way.

Last edited by halhen (2010-11-18 13:01:16)


statnot - status text manager and notification-daemon for dwm, wmii and the like
shic - SHellscript Irc Client

Offline

#2 2010-11-18 13:43:27

ChoK
Member
From: France
Registered: 2008-10-01
Posts: 346

Re: [Solved] "Unable to determine major/minor..." with homebuilt kernel

iirc -dirty has something to do with licensing. meaning some of the modules you build are not GPL2. I could be wrong.

edit: nevermind, I mixed that up with another project, can't recall what it is though.

Last edited by ChoK (2010-11-18 13:47:35)


Ah, good taste! What a dreadful thing! Taste is the enemy of creativeness.
Picasso
Perfection is reached, not when there is no longer anything to add, but when there is no longer anything to take away.
Saint Exupéry

Offline

Board footer

Powered by FluxBB