LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Recompilation of Slackware kernel that boots from floppy failed - why? (https://www.linuxquestions.org/questions/slackware-14/recompilation-of-slackware-kernel-that-boots-from-floppy-failed-why-133870/)

mjewell 01-11-2004 11:29 PM

Recompilation of Slackware kernel that boots from floppy failed - why?
 
I followed instructions at pp. 57-60 of The Official Guide to Slackware Linux 1st Ed. (Cantrell, Johnson & Lumens) for recompiling my kernel to include a driver that I needed.

Per instructions, I logged in as roor and changed to /usr/src/linux

Then I ran make mrproper and then make menuconfig.

After making selections in menuconfig, I ran make dep and make clean.

Then I ran make zImage (which worked fine) and make modules.

Then THE PROBLEM

I ran mv /vmlinuz /vmlinuz and got an error message like cannot stat (???) vmlinuz

I was stopped there.

Could this problem be a result of booting Slackware 9.1 from a floppy? I installed it to a partition, but I boot from the floppy. WinXP Pro is on the other partition and when I tried to use LILO the outcome was bad and wrong.

I've wondered before whether the commands always need to be executed within the correct directory. Maybe vmlinuz is not where the manual expects it to be since I'm booting from the floppy?

I dunno. Help please.

Berhanie 01-12-2004 02:20 AM

from what I gather, you are trying to perform the first of the following
series of commands (as mentioned in The Book):

# mv /vmlinuz /vmlinuz.old
# cat arch/i386/boot/zImage > /vmlinuz
# mv /boot/System.map /boot/System.map.old
# cp System.map /boot/System.map

Since your old kernel is probably in /boot, the command
you need is
# mv /boot/vmlinuz /boot/vmlinuz.old

Berhanie 01-12-2004 02:32 AM

Sorry. You're booting from a disk. I think you have to do a
# make bzdisk
instead.

But, did you try running liloconfig under the 'expert' option?
In case you haven't done so, please read the
section on Lilo in the installation HowTo:
ftp://ftp.slackware.com/pub/slackware/slackware-9.1/Slackware-HOWTO

thegeekster 01-12-2004 02:50 AM

Re: Recompilation of Slackware kernel that boots from floppy failed - why?
 
Quote:

Originally posted by mjewell
...Then THE PROBLEM

I ran mv /vmlinuz /vmlinuz and got an error message like cannot stat (???) vmlinuz

I was stopped there...

You're trying to remane the file with the same name instead of using a different name :)

mjewell 01-12-2004 07:02 PM

typo
 
To geekster: sorry, I typed it in wrong! D'oh! It was mv /vmlinuz /vmlinuz.old

to Berhanie: I will try reading that document. What am I looking for. I'm okay booting from the disk, I just can't tell if it changes how I'm supposed to execute the commands from the manual.

Berhanie 01-12-2004 10:03 PM

Yes, it changes things somewhat. The main thing is that The Book assumes
you're going to install the kernel onto your / or /boot directory,
which is the reason behind the "cat arch/i386/boot/zImage > /vmlinuz"
command. In your case you should either do a "make bzImage" and then
copy the new kernel image (/arch/i386/boot/bzImage) to a floppy, or,
I believe, just do a "make bzdisk" in lieu of those two commands. This will create your new boot floppy. You should then follow the rest of the steps
in The Book, ignoring anything about lilo.

One thing to keep mind is that you need to do "make modules_install" after doing "make modules". This is necessary in order to move the newly-compiled kernel modules to their proper place.

mjewell 01-13-2004 08:53 PM

Well . . . I think you put me on the right track. I subbed bzdisk for vmlinuz and used the make bzdisk.

When I booted from the disk though I got:

Loading . . .
Uncompressing Linux . . . . .

invalid compressed format (err=2)
--System halted

So . . . I thiink I have to try and reinstall right.

:eek:

Berhanie 01-13-2004 10:30 PM

I'm not an expert, but I'll make one final suggestion:

cd to the kernel source directory and cp the .config file to a safe place:
# cp .config /your/home/directory

then:

# make mrproper

bring back the .config file to the kernel source directory:
# cp /your/home/directory/.config .

Then:

# make mrproper
# make oldconfig
# make dep
# make clean
# make bzImage
# cp arch/i386/boot/bzImage /path/to/floppy

Try out the new boot floppy. If it works, then
we can do:

# make modules
# make modules_install

*edit*:
make sure you do a "make bzImage", not a "make zImage"

mjewell 01-14-2004 10:02 PM

You are helping me tons. I'm going to try this asap, but I can't do it tonight. I'll post as soon as I do and let everyone know what happens.

Thanks!

mjewell 01-15-2004 09:44 PM

Just one more thanks --- it worked!

Berhanie 01-15-2004 10:09 PM

I've been leeching answers off this place for weeks.
Glad to give something back for a change.


All times are GMT -5. The time now is 07:04 PM.