PDA

View Full Version : Custom Kernel - boot locked up



keeger
01-25-2008, 05:49 PM
Hello, I've been working on a customized Knoppix cd for a few days now, using many of the tips here. I need to update the kernel to include support for some newer hardware, and it's breaking.

What I did:

Started with Knoppix 5.1.1, followed wiki for unpacking to hard drive and chrooting in to it.
while chrooted, did the following:

obtained 2.6.23.14 (latest stable) sources from kernel.org
loaded up the config file on 5.1.1 cd, added what I needed, built kernel, installed, did make modules, modules-install.
updated the symlinks in /boot/vmlinuz to reference new kernel and system.map
copied kernel to /mnt/sda1/knx/master/boot/isolinux/linux
made the iso, tried it, and received a fatal error about cloop.ko

rebuilt cloop.ko from sources, installed, copied to /mnt/sda1/knx/master/KNOPPIX/modules
tried again, machine locks up when booting.
Updated the aufs.ko as well, tried again, locks up in same spot. (used sources)


Any help would be greatly appreciated! Here is the screen when I boot:




Running Linux Kernel 2.6.23.14
Total Memory available: 254628kB, Memory free: 247344kB.
Enabling DMA acceleration for: hda [VMWare Virtual IDE Hard Drive]
Enabling DMA acceleration for: hdc [VMWare Virtual IDE CDROM Drive]
Accessing KNOPPIX CD at /dev/hdc..._


Now, I say it's locked, as in, hanging, but my keyboard is flashing lights, my caps lock and scroll lock lights.

keeger
01-26-2008, 04:32 PM
I've been working on this and I think it's due to the cloop.ko.

Anyone know where I can find some good info on how to put the cloop.ko into the cd properly? I can't seem to find many details on this...

kaspare
02-01-2008, 04:16 PM
I've been working on this and I think it's due to the cloop.ko.

Anyone know where I can find some good info on how to put the cloop.ko into the cd properly? I can't seem to find many details on this...

You right the problem is cloop!

try to download the new cloop source here:

http://debian-knoppix.alioth.debian.org/sources/cloop_2.624-1.tar.gz

I remastered my miniknoppix with kernel 2.6.24 without problem.

I had the same problem and had a answer from Klaus:

Something with namespaces? I think I found the bug: This occurs when you
modprobe cloop; rmmod cloop; modprobe cloop again. It's fixed in
cloop-2.623. There was one forgotten disk allocation on rmmod, which
caused the module to unload cleanly, but on second modprobe, the same
disk was allocated twice, causing a kernel oops.

Enjoy you knoppix ;-)

Ciao
Max

hal8000
02-05-2008, 10:39 PM
In compiling your new kernel, did you build it as a monolithic kernel (all support and driver files compiled into kernel) or
did you include some as modules?

Also did you need to make an initaial ramdisk?
If yes where did you place the initrd?
To boot the kernel your new kernel must have support compiled into the kernel for cloop fs or the cloop fs an an initrd.
One final question, where is the config on the 5.1.1 kernel stored?
Thanks in advance.

keeger
02-06-2008, 05:33 PM
Yeah, I figured out the Cloop issue with the latest source. It was interesting. I had 2.6.24.14 kernel code, and the cloop-2623 code, and it wouldn't make cleanly or work. then on Saturday, I checked the download site for cloop, and there was cloop-2624! hehe.

So yea, getting that working fixed my problem. After that, I ran into an issue with the AUFS module. It was necessary to patch the kernel with 3 patches and rebuild the AUFS module against it afterwards.

I made a doc on the exact steps I did, was thinking of posting it somewhere, but it's very dependent on my VMware setup. I did a Hard drive install, made 2 separate partitions, etc.

=======

Hal: the config for 5.1.1 is on the cd, but I forget where exactly. It's covered in the Wiki on HDD Remastering and kernel compilation.

I copied that to my /usr/src/linux folder (as .config) and started from it. No, I didn't make a monolithic kernel, I did a mostly modularized one. As for the ramdisk, you don't need to worry about that for the custom cd. although you do need to update the minrt.gz file, which is analogous to a initrd.

kaspare
02-07-2008, 09:51 AM
In compiling your new kernel, did you build it as a monolithic kernel (all support and driver files compiled into kernel) or
did you include some as modules?

Also did you need to make an initaial ramdisk?
If yes where did you place the initrd?
To boot the kernel your new kernel must have support compiled into the kernel for cloop fs or the cloop fs an an initrd.
One final question, where is the config on the 5.1.1 kernel stored?
Thanks in advance.

I follow the knoppix way:

aufs & cloop as a module placed in KNOPPIX/modules/
the initrt is minirt.gz, you have to gunzip it, mount and change the modules with the new ones.

I cand send you my new .config.

For aufs I had to patch the kernel with sec_perm-2.6.24.patch (I did only this pacth).

Aufs is version 20071217

Ciao

Max

hal8000
02-07-2008, 11:04 AM
Thanks for the info guys.

I have remastered 5.11 several times, but with the 2.6.19 stock kernel.
There are scripts to help in remastering knoppix, not used these, always followed the wiki procedure.
I will have a go at installing a new kernel following your tips, it maybe an idea to create yourself a
knoppix wiki account and modify the wiki with steps on howto remaster creating a new kernel

http://www.knoppix.net/wiki/Knoppix_Remastering_Howto

keeger
02-07-2008, 04:08 PM
I tried that document in the beginning, and I had difficulty working in the chroot environment. I followed this document pretty closely and so didn't see a need to change it.

http://www.knoppix.net/wiki/Remaster_From_Hd_Install_HowTo