[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: problem compiling kernel



Bernard wrote:

> Emanoil Kotsev wrote:
> 
>>Bernard wrote:
>>
>>  
>>
>>
>>Compiling md in the kernel is the right approach to boot from raided root
>>without initrd. You can try this just skipping (deleteing the line in grub
>>temporary)
>>  
>>
> I just tried that. Raid compiled into the kernel instead of modules. No
> initrd. Still crashes at boot.

most probably you are missing other modules (like ide/ata lvm etc)
You said your boot is on md but not on lvm. you can build a working initrd
easily - this is actually all you need.

> 
> Also done another test:
> in the /boot/grub/menu.lst file, replaced root=/dev/mapper/vg00-root by
> /dev/sda2. Still crashed : "cannot open root device 'sda2' or unknown
> block(0,0).

this can not work as your root is on lvm. what did you expect?

try passing the kernel option init=/bin/sh

> 
> There is another test that I would like to run, but I need help for
> this, since I don't know the whole package list:
> 
> apt-get purge kernel-building gcc make kernel-utils etc...
> 
> then edit my /etc/apt/sources.list and comment out lines that refer to
> package directories that are too recent, uncomment old lines referring
> to debian sarge packages only, excluding 'testing' etc..
> 
> then
> 
> apt-get install kernel-building gcc make kernel-utils etc...
> 
> and, from there on, trying to recompile, not newer kernels, but my good
> old running kernel 2.6.20-16-386 into a custom version without any sound
> options in it.
> 
> What I need is the list of all packages that I should purge and
> re-install in their former version.
> 
> regards

You really could use the recent 2.6.30.4. There were different problems with
2.6.20 to 2.6.30. I find 2.6.30.4 the best I've had since 2.6.20.

I was also very sad when I found out I can not compile 2.6.20 anymore. Put
let's believe it's for the sake of the progress.

So, what I would do (if I were you) is that I would download latest
2.6.30.4, and compile all I need to access my boot partition (as you
already did with md in the kernel), then compile and rebuild or build by
hand initramfs.
Build by hand I pretty simple- it's actually hacking the one used. I do
unzip it
        cd /tmp; mkdir test; cd test
        zcat /boot/initrd....gz | cpio -Hnewc -i
 then edit init to match my needs i.e. depmod, modprobe, cryptsetup etc
 and finally put a line to run the real init. I then zip it
        find . ! -name *~ | cpio -H newc --create | gzip -9 > ../test-initrd.gz
 I can install then the new initrd (cp ../test-initrd.gz /boot/initrd....gz)

Once you've done it it's very simple and easy ... before it was a big
trouble for me too.

Just look positive as way to learn something new about your operating
system.

reagrds


Reply to: