Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Broken Kernel or Recompile
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Lox
n00b
n00b


Joined: 12 May 2002
Posts: 4

PostPosted: Sun May 12, 2002 1:13 pm    Post subject: Broken Kernel or Recompile Reply with quote

I am moderately new to gentoo, moved here from debian and I must confess I have been using debians make-kpkg tools for kernel rebuilds for far too long and have lost the skills to do it manually..

I happily built my kernel the first time round (for install), however the second time round when I was compiling to add some extra things as modules I decided to compile ext3 (my filesystem) into the kernel rather than as a module (which it was initially).

I did this:

Quote:

make menuconfig
make dep && make clean bzImage modules modules_install


exactly like I did in the install process. When I went to comy my /boot/bzImage to /boot/bzImage.orig I found that I couldn't mount /boot because there was no longer the ext3 module in the system.

I rebooted with the install cd, figuring I would mount /boot and / and do the copy from there... Unfortunately the newly compiled bzImage wasn't there :( At this point I started from scratch...

In future how should I recompile the kernel? Under debian the deb used to ask me to back up the modules so it didn't overwrite them.. Should I clean out /usr/src/linux before every kernel recompile?

:cry: Sorry for the long post[/quote]
Back to top
View user's profile Send private message
AutoBot
l33t
l33t


Joined: 22 Apr 2002
Posts: 968
Location: Usually Out

PostPosted: Sun May 12, 2002 4:01 pm    Post subject: Reply with quote

No you shouldn't have to clean anything, this always works for me:
Code:

su
cd /usr/src/linux
make menuconfig
make && make clean bzImage modules modules_install
mount /boot
mv /boot/bzImage /boot/bzImage.old
cp /usr/src/linux/arch/i386/boot/bzImage /boot
umount /boot
reboot

_________________
This message self destructed a long time ago.
Back to top
View user's profile Send private message
rommel
Veteran
Veteran


Joined: 19 Apr 2002
Posts: 1145
Location: Williamsburg Virginia

PostPosted: Mon May 13, 2002 3:32 am    Post subject: Reply with quote

did you run as root the command to mount the partition that you boot is on....like for me

#mount /dev/hde1
then to see if its mounted you could cd to the /boot dir or just ls /boot and see if you see grub adn bzImage there

it should work but gentoo umounts the boot partition for safty reasons after the system comes up...so it would have to be remounted to cp or mv the bzImage around
Back to top
View user's profile Send private message
AnimalMachine
Tux's lil' helper
Tux's lil' helper


Joined: 27 Apr 2002
Posts: 106
Location: Milwaukee, WI USA

PostPosted: Mon May 13, 2002 3:23 pm    Post subject: Reply with quote

I'm guessing that when you did the "make modules_install" part you ended up wiping out your old directory of modules, no?

See, generally "make modules_install" is safe IFF the version numbers of the kernel changed. When version numbers change, new modules go in a new directory automatically, and old ones stay where they are. If you're compiling just a new patch level of a kernel version, the modules will get installed to the same module directory - but not before the old ones are erased. To be extra safe, you must make a backup copy of "/lib/modules/<version>". I'm not sure how to get a backup bzImage to use something other than the default module directory though ...

For your particular problem, you could try mounting your /boot partition before doing make modules_install ... this way the module is already in memory and locked, so it won't matter if it gets deleted off the fs (unless you've messed up something with the kernel :wink:). But if you've already deleted the ext3 module, just recompile things with ext3 as a module (temporarily), mount /boot, recompile with ext3 built into the kernel, then setup bzImage - grub - modules and reboot.

I use "make dep && make bzImage modules modules_install" for my kernel ... I don't think I ever "make clean" unless I'm trying to save space. This may not be the proper way to do it, but so far it's worked for me.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum