View previous topic :: View next topic |
Author |
Message |
Lox n00b
Joined: 12 May 2002 Posts: 4
|
Posted: Sun May 12, 2002 1:13 pm Post subject: Broken Kernel or Recompile |
|
|
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?
Sorry for the long post[/quote] |
|
Back to top |
|
|
AutoBot l33t
Joined: 22 Apr 2002 Posts: 968 Location: Usually Out
|
Posted: Sun May 12, 2002 4:01 pm Post subject: |
|
|
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 |
|
|
rommel Veteran
Joined: 19 Apr 2002 Posts: 1145 Location: Williamsburg Virginia
|
Posted: Mon May 13, 2002 3:32 am Post subject: |
|
|
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 |
|
|
AnimalMachine Tux's lil' helper
Joined: 27 Apr 2002 Posts: 106 Location: Milwaukee, WI USA
|
Posted: Mon May 13, 2002 3:23 pm Post subject: |
|
|
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 ). 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 |
|
|
|