PDA

View Full Version : Rebuilding Kernel in 5.1.: Knoppix patch?



Script Cat
11-29-2007, 08:25 PM
I 've managed to build a kernel and put it in a Remastered iso.
But there are errors and it drops to a limited shell.
I think I need more than the Kernel source form Kernel.org and the old config file.

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

Talks about a Knoppix patch but I cannot find this for the 2.6 Kernel.
I think I need this. Is it still required?
Does anyone know what needs to be included to get this to work?

I tried it again more carfully. Same problem. :cry:
This is the Boot messages:


intel_rng: FWH not detected

Welcome to the KNOPPIX live GNU/Linux on CD!


Running Linux Kernel 2.6.19.
Total Memory available: 1026940kB, Memory free: 990732kB
Allowing slow USB-devices some more time to register...OK.
Enabling DMA acceleration for: hda [Maxtor 6E040L0]
Enabling DMA acceleration for: hdc [CDU5211]
Enabling DMA acceleration for: hdd [IOMEGA ZIP 250 ATAPI]
Can't find KNOPPIX filesystem, sorry.
Dropping you to a (very limited) shell.
Press reset button to quit.
Additional builtin commands available:
cat mount umount
insmod rmmod lsmod

knoppix# _



That WIKI Page also needs updating for Knoppix 5.1. Should I do this as I go along? I don't want to trash the page for people still using the older versions of knoppix.

Thanks,
SC

hal8000
12-03-2007, 06:01 PM
According to the boot messages, your remaster is still using 2.6.19

When you were working in the chroot environment did you recreate a symlink to vmlinuz?
E.g. ln -s vmlinuz-2.6.23 vmlinuz (or whatever you called your kernel) and a symlink
to the initial ramdisk.

Regarding the remastering wiki, I've just spent 2 days remastering a knoppix 5.11 disk.
I have also found some errors which I will be emailing to the page maintainer.

The most noticeable error for me was when testing the kde environment as user 'knoppix'
the X window system would not start.
In the chroot env I had to run
chmod 1777 /tmp/.X11-unix
to give write permission.

The other most dominating error is that mkisofs is now a symlink to genisofs. The man page
for genisosys claims that it accepts options "1" for full 31 character iso9660 filenames.

However on running the final command I got unrecognised option "1", also tried with "I" and
got the same message.
Dont know if this is a typo by me, a problem with genisofs in knoppix 5.11 or a package bug,
however omitting 1 completely worked for me.

What Id suggest is remaster a knoppix 5.11 cd without modifying the kernel (apologies if you
have already done this) then add your updated kernel.
HTH

Script Cat
12-03-2007, 10:06 PM
Thanks for helping hal8000, I'm in a pretty bad hole here.

Where does the Symlink to the initial ram disk go?

I have managed to remaster before. It works as long as I don't try a custom kernel.

What I did was download the code for the kernel 2.6.19 since its the same as the knoppix 5.1 cd.
Then I used the config file from /boot but modified to recognize more serial ports.
I didn't apply any patches at all. Just the oldconfig. I compiled the kernel and modules. I placed the new kernel in source/KNOPPIX/boot and in master/boot/isolinux/ except renamed "linux". in minirt.gz I replaced all the modules with the freshly compiled ones.

I get the feeling that I'm just poking at random here. Do you know any good books or other references on doing this?

hal8000
12-12-2007, 10:03 AM
OK, I too have included an updated 2.6.22 kernel to my remastered ISO and..... it doesn't work (still loads but uses kernel 2.6.19).
I've dug a little more deeply and believe I have the answer.

I'm remastering using the wiki process, so boot from a live cd, expand the contents of the cd to a free partition create source and master, work on the cloop, make changes, create a cloop again and then an iso.

The contents of the /cdrom/boot/isolinux are the answer.

These are isolinux and boot directories are copied in the master location, it is the file isolinux.cfg that controls the boot process.
AFAICT this file contains links to the booting process (default) boots the standard kernel expert includes alternate options.

To use your new kernel back up the file called linux in the /boot/isolinux folder and place your kernel here.
The initial ramdisk, there is a file called minirt.gz when I expanded this it looks as though it might be an initrd, but then reading through the knoppix
wiki this is a compressed ext2 filesystem.

I have not yet tried this myself, but one way around this is to compile a kernel with support for your root filesystem and any other devices that need
starting at boot time e.g. scsi drivers.
Its not an acceptable solution if you want to try out different hardware but may work. I will post back in a few days if I get this to work myself.

Books, I've searched on Amazon and found knoppix hacks (I've ordered it for myself) and the reviews look pretty good.