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

Re: kernel recompile

On Wed, 2003-01-01 at 02:05, Shawn Lamson wrote:
> On Wed, 1 Jan 2003 11:38:34 +0800
> Robert Storey <dial911@venus.seed.net.tw> wrote:
> > I've just recompiled my kernel and it failed at the very last
> > step (installing the kernel). My procedure:
> > 
> > 1) Use "make xconfig" to choose my settings
> > 2) make dep clean bzImage modules
> > 3) make install modules_install
> > 
> > I received no error messages until the very end when make install
> > tried to write to LILO and couldn't find it (because I don't use
> > LILO, I use GRUB). It offered to make a bootable floppy, and I
> > chose "yes". The floppy was made, but Debian crashes immediately
> > when I boot off that floppy.
> > 
> > I tried copying the file "vmlinuz" on the floppy and putting it
> > into /boot, but that leads to the same problem - instant crash.
> > 
> > Should I conclude that the new kernel I created, "vmlinuz", is
> > screwed? Or is there something else I need to do to install my
> > new kernel?
> > 
> > By the way, is there some good documentation on this? I'm just
> > using an old Redhat book as my guide, but I'd prefer something
> > Debian specific.
> I don't use kpkg - so my advice will be different;  I also don't use
> modules - so I can't direct you explicitly there - but here is what I
> do;
> make menuconfig
> make dep
> make -j2 bzImage    (uses 2 processes - faster)
> cp arch/i386/boot/bzImage /boot/vmlinuz-new
> cp System.map /boot/System.map-new  (obviously these two are done from
> the top dir of your kernel source)
> Thus - I never do a "make install" - I also use grub... so after you
> copy the kernel to the /boot dir you need to add an entry to
> /boot/grub/menu.lst... safest to copy and edit the one that is already
> there...
make install does make bzImage - it has the nice effect of
double-checking that there weren't any compile or linkage errors, but
otherwise, it actually makes the make bzImage redundant.

> for modules i guess you will have to do a 
> make modules _after_ make bzImage    (at least after "make dep")
> and I would back up the present modules (in /lib/modules/`uname -r`)
> then make modules_install
> This method works for me... again I don't even use modules - too much
> configuration.
> This website helped me
> www.linuxchix.org/content/courses/kernel_hacking/lesson3
> and *no* I am not a chick.
> HTH,
> Shawn
> > 
> > thanks in advance,
> > Robert
> > 
> -- 
> Shawn Lamson
> shawn.lamson@verizon.net
> Debian GNU/Linux 3.0

My process is:

1) Apply patches, such as the Debian Framebuffer Logo
2) make xconfig
3) make clean (if this is not the first compile of this source)
4) make dep
5) make bzImage
6) There is no step 6
7) make modules && make modules_install (I have a handful I use for
things like bttv and stv680)
8) make install
9) make <any additional modules for things like ftpfs and cvsfs or for
devices not yet accepted into the standard kernel source>
10) Muddle around in /boot getting things to look the same and editing
11) Run lilo
12) Someday find it necessary to reboot.

A tangent on this - which kernel tree does Debian's kernel source track
- Alan, Marcelo or Linus' work? I know that those have diverged at
times, and that many of the commercially offered distributions
reportedly use Alan Cox's updates, because new support has tended to get
into that before Linus' tree.
ML Kahnt New Markets Consulting
Tel: (613) 531-8684 / (613) 539-0935
Email: kahnt@hosehead.dyndns.org

Attachment: signature.asc
Description: This is a digitally signed message part

Reply to: