Jump to content

Can't boot newly recompiled kernel


Recommended Posts

Hi all

 

I recompiled my kernel with the help of THIS tutorial. I set some features with menuconfig. I have some questions about that:

 

1) It took 1:15 !!! Is it normal? --> Duron 1300 with 512 Meg ram

2) Now I can't boot at all with the new kernel. I select the new kernel on the boot manager menu (I tried with Grub and Lilo) and then the blue and gray screen appears. After like 2-3 seconds, here is what I get:

mount: error 22 mounting reiserfs flags kernel panic: No init found.  Try passing init= option to kernel

 

I searched on google and tried

mkinitrd -f -v --with=reiserfs --with=ext3 /boot/initrd-2.4.19-1custom.img 2.4.19-1custom

 

but got the same results with Grub and Lilo. I'm loss. Anyone know what I should try next?

 

I can still boot the default mandrake kernel no prob.

 

Thanks for reading and suggest something

 

MOtts

Link to comment
Share on other sites

It took 1:15 !!! Is it normal?
Hmm..how much did you take out of the kernel?

Did you make -jx modules, where x is 2,3,4,5 ect, or just make modules?

 

I have a Celeron 600Mhz and 192MB RAM. When I compiled the 2.4.19-16mdk for 9.0 it took me 55 min, taking about 1/3 out of the kernel, and make -5 modules.

 

I also got the same error after my first try :shock: which had never happened b4 :wink:

 

I compared

/usr/src/linux/.config.DEF (my backup of the original .config)

to

/usr/src/linux/arch/i386/defconfig and they weren't anything alike :!: :shock:

 

So I

cp /usr/src/linux/arch/i386/defconfig /usr/src/linux/.config

compiled and it worked :D

 

I didn't use any options on mkinitrd and I use reiserfs. Didn't know there was any :roll: :wink:

 

When I got the error (I use grub) I passed

init=/boot/initrd-2.4.19-16.img

to the kernel (2.4.19-16 being my EXTRAVERSION), and it found it and then locked :?

 

Hope something here helps!

Link to comment
Share on other sites

It took 1:15 !!! Is it normal?
Hmm..how much did you take out of the kernel?

Did you make -jx modules, where x is 2,3,4,5 ect, or just make modules?

 

Well, I took out the pcmcia things out, changed the processor .. and lots of other things like NTFS support and other.. Maybe I removed too much stuff. For the -j option of Make I did exactly like dolson suggest .. like evertything else. I used the -j3 option.

 

Now I'm recompiling it with only one change, the cpu, with no -j option so we'll see about the time and about the stuff removed from the kernel. I'm compiling it with the .config file from the kernel-source RPM. Is it ok or there is differences with the arch/i386/defconfig file?

 

I have a Celeron 600Mhz and 192MB RAM. When I compiled the 2.4.19-16mdk for 9.0 it took me 55 min, taking about 1/3 out of the kernel, and make -5 modules.

That doesn't surprise me at all comming from you man... you get FPS of 800 or 900 with a PCI nVidia card whereas I get 400, 450 at best, with an AGP card ... :lol: :lol:

 

I have another question for you. Where did you find info about what you should leave in and what you should remove from the .config file? Did you remove firewire support and other things that you are sure you'll never need until 9.1 come out? How did you know about all that stuff? .. I mean going through the 'make menuconfig' program is long and painfull .. especially when it take an hour to compile and you are not sure that is going to work .. :roll:

 

Thanks for the response!!

 

MottS

Link to comment
Share on other sites

Is it ok or there is differences with the arch/i386/defconfig file?
In my experience, in the past, they're the same. But this wasn't the case with 9.0's 2.4.19-16mdk. So the defconfig is always the one to use if you want to be sure. You can even use a .config from a diff kernel version, but you have to be familiar enough to know what has changed as to whether or not this is possible. I used the same .config for several versions, but then they changed the layout and added a lot, and I wanted to know what, so I had to start over.

 

 

 

Where did you find info about what you should leave in and what you should remove from the .config file? Did you remove firewire support and other things that you are sure you'll never need until 9.1 come out? How did you know about all that stuff? .. I mean going through the 'make menuconfig' program is long and painfull .. especially when it take an hour to compile and you are not sure that is going to work ..
My head? Seriously though, if I don't have it, the answer is N. There are some things I'm not sure about, but I think most of it's common sense. Maybe it's just me. Yes, firewire, mouse, joysticks, sound mods, pcmcia, isa, anything. I got the 2.4.19 in ML8.1 down to 7 and 800kb. Keep in mind that's also removing firewall support, I think netconfig is what it was called, and ram disk support for mkinitrd hehehe...I didn't have to do that step. Needless to say I run a very basic, and simple setup. I haven't bothered with all this in 9.0, I just did a quicky, and didn't want to use an old .config. Is there a big diff in speed? NO! Even after all I did there wasn't a big diff. You could tell. It just ran smoother and seemed lighter. Even with the vanilla kernel and preempt, or low-latenvy patches, mdk's kernels are so optimized, there's really no diff between a mdk and a vanilla with the patches.

 

Just my opinion though :wink:

Link to comment
Share on other sites

I GOT IT!!!!!!! I'm typing that with a custom kernel .. lol

 

Ok so I compared .config and defconfig and they both have 2045 lines and same size (44k) .. so that was not the problem.

 

Here is the EXACT error when I remove the 'append = quiet' option ..:

...

...

Loading reiserfs module

Mounting /proc filesystem

Creating root device

Mounting root filesystem

Read_super_block: can't find a reiserfs filesystem on (dev 03:01, block 64, size 1024)

Read_super_block: can't find a reiserfs filesystem on (dev 03:01, block 8, size 1024)

mount: error 22 mounting reiserfs flags kernel panic: No init found. Try passing init= option to kernel 

 

So I started to think at Partimage. I recently deleted windows --> I partimaged my Linux partition (hda7 - ext3), refomated my HD in reiserfs and put back my image in hda1. So the problem is that partimage returned the partition to its original FS, ie: EXT3. When I type 'mkinitrd /boot/initrd-2.4.19-1custom 2.4.19-1custom' it makes a part of the boot sequence by reading the /etc/fstab file. Since my fstab mounts reiserfs partitions, the initrd-2.4.19-1custom file wants to mount that too but doesn't find it because Partimage returned the FS to ext3 :-( ... But this is weird because KDiskFree tells me that hda1 is reiserfs. Anyway.. How could I make sure that the FS on hda1 is either reiserfs or ext3? .. I'm kind of lost now.

 

The key thing is that if I write 'reiserfs' in the first line of /etc/fstab and type 'mkinitr ...' It doesn't work and gives the above error. However, If I wrtie 'ext3' in first line of fstab and make 'mkinitr ..' it works like a charm.

 

BTW, can I remove the /usr/src/linux2.4.19-1custom directory since the kernel is compiled now? .. because this is kind of big (262 Megs). Why /usr/src/linux2.4.19-16mdk is 168 Meg big? .. I mean why have they a different size now?

 

Now I can start to throw unnecessary stuff out of the kernel ! .. but that's another post.

 

Thx

 

MottS

Link to comment
Share on other sites

What does diskdrake say hda1 is? Maybe KDiskFree reads fstab.

How could I make sure that the FS on hda1 is either reiserfs or ext3?
I don't have a clue. I have very little experience here. Seems to me that mkinitrd is reading a file somewhere, because it's formated reiser but copied ext3.

 

There's always arusabals tut. Did you format the entire drive? Again, I know nothing about resizing and such with linux partitions. Hope someone has an answer.

 

 

 

 

 

why have they a different size now?
I'd say compiling, building of the kernel, and script building and such cause this. Mines 189MB.

 

BTW, can I remove the /usr/src/linux2.4.19-1custom
If I understand correctly, NO, not if you want to build programs for custom. It's now your kernel source. I could be wrong though. I've never looked into that. This is what I assume, because when you build a program it uses /lib/modules/2.4.19-1custom/build which is a symlink to /usr/src/linux-2.4.19-1custom.
Link to comment
Share on other sites

I have 3 partitions. According to diskdrake and KDiskFree, hda1 is reiserfs. The other one is reiserfs and my swap is .. swap. When I deleted windows I formated the WHOLE drive and put my image in hda1. But my image was made from a ext3 partition so that probably caused the problem. Also, my first line in /etc/fstab is

/dev/hda1 / reiserfs defaults 1 1

Anyway. As I said, the only thing I had to do to be able to boot my new kernel is to modify the above fstab line to

/dev/hda1 / ext3 defaults 1 1

and then run mkinitrd. Then I rewrite reiserfs instead of ext3 and it booted like a charm.

 

btw, by default mkinitrd read /etc/fstab so ..

 

So I'll keep /usr/src/linux-2.4.19-1custom because vmware needs it to build its vmmon module .. haha.

 

Thx

 

MottS

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...