LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 08-22-2008, 11:17 AM   #1
rixtr66
Member
 
Registered: Aug 2008
Location: Portland,ME.
Distribution: Slackware
Posts: 102

Rep: Reputation: 15
Unhappy trying to make kernel,/sbin/lilo.error


after compiling a kernel,i got this message from /sbin/lilo;

root@slack1:/usr/src/linux# /sbin/lilo
Warning: LBA32 addressing assumed
Warning: Partition 3 on /dev/sda is not marked Active.
Fatal: open /boot/vmlinuz: No such file or directory
what did i do wrong?is this fixable?
Rick
 
Old 08-22-2008, 11:25 AM   #2
TomaCzar
Member
 
Registered: Dec 2003
Location: Roc City (Rochester-NY)
Distribution: Slacker 4 Life
Posts: 125

Rep: Reputation: 15
What steps did you use to compile? The program lilo can't find the kernel (vmlinuz) in its default directory (/boot). If you used the correct steps to compile, and compilation completed without error, it should be there.

-TomaCzar
 
Old 08-22-2008, 03:56 PM   #3
rixtr66
Member
 
Registered: Aug 2008
Location: Portland,ME.
Distribution: Slackware
Posts: 102

Original Poster
Rep: Reputation: 15
Unhappy

here is whati went by(i used the slackbook)
cd /usr/src/linux
make mrproper
make menuconfig
make bzImage
make modules
mv /boot/vmlinuz /boot/vmlinuz.old
cat arch/x86/boot/bzImage . /vmlinuz
mv /boot/system.map /boot/system.map.old
here's where the system told me the file could not be found(above)
cp system.map /boot/system.map
again file not found(above)
make modules_install
/sbin/lilo
thats what i used,i dont know why i got file not found?
could someone explain please?
Rick
 
Old 08-22-2008, 04:18 PM   #4
GazL
Senior Member
 
Registered: May 2008
Posts: 3,392

Rep: Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917
Quote:
Originally Posted by rixtr66 View Post
here is whati went by(i used the slackbook)
cd /usr/src/linux
make mrproper
make menuconfig
make bzImage
make modules
mv /boot/vmlinuz /boot/vmlinuz.old
cat arch/x86/boot/bzImage . /vmlinuz
mv /boot/system.map /boot/system.map.old
here's where the system told me the file could not be found(above)
cp system.map /boot/system.map
again file not found(above)
make modules_install
/sbin/lilo
thats what i used,i dont know why i got file not found?
could someone explain please?
Rick
There's your problem Rick (the line in red). You need to copy the bzImage file to /boot/vmlinuz instead, which is where lilo will look for it.

In a standard slackware install /boot uses symbolic links to point to vmlinuz. On my system I've left /boot/vmlinuz as a symlink pointing to the default and changed /etc/lilo.conf to point directly to a new file as follows:

Code:
# Linux bootable partition config begins
image = /boot/vmlinuz-generic-smp-2.6.24.5-smp
  initrd = /boot/initrd.gz
  root = /dev/sysvg/lvroot
  label = Linux
  read-only  # Partitions should be mounted read-only for checking
# Linux bootable partition config ends
Doing this means you can leave the original kernel as shipped in case you have an accident.


Hope this helps.




P.S. Eric has a very good page on his wiki all about working with custom kernels. it's well worth a look.

http://alien.slackbook.org/dokuwiki/...kernelbuilding

Last edited by GazL; 06-12-2011 at 04:57 AM.
 
Old 08-22-2008, 04:46 PM   #5
TomaCzar
Member
 
Registered: Dec 2003
Location: Roc City (Rochester-NY)
Distribution: Slacker 4 Life
Posts: 125

Rep: Reputation: 15
Everything GazL wrote is absolutely correct. I merely offer the following as an alternative.

The following works as well:
Code:
cd /usr/src/linux
make mrproper
make menuconfig
make bzImage install modules modules_install
Notice this removes the need to do all the mv-ing around and the possibility of a fat finger mistake.

One last thing I would add to what GazL recommended, if you decide to edit the /etc/lilo.conf file, make sure each partition definition has a unique "label=" definition or lilo will complain. What I usually have in my lilo.conf while kernel compiling is:
Code:
image = /boot/vmlinuz
  initrd = /boot/initrd.gz
  root = /dev/sysvg/lvroot
  label = Linux
  read-only  # Partitions should be mounted read-only for checking
image = /boot/vmlinuz.old
  initrd = /boot/initrd.gz
  root = /dev/sysvg/lvroot
  label = Linux.old
  read-only  # Partitions should be mounted read-only for checking
image = /boot/vmlinuz-generic-smp-2.6.24.5-smp
  initrd = /boot/initrd.gz
  root = /dev/sysvg/lvroot
  label = Linux.orig
  read-only  # Partitions should be mounted read-only for checking
This way I can easily get back to the stock install kernel (Linux.orig), my last working kernel (Linux.old), and my current "test" kernel (Linux). Good luck

-TomaCzar
 
Old 08-22-2008, 04:52 PM   #6
rixtr66
Member
 
Registered: Aug 2008
Location: Portland,ME.
Distribution: Slackware
Posts: 102

Original Poster
Rep: Reputation: 15
GazL;im not sure i follow you,do you mean change it to something like this:
cat arch/x86/boot/bzImage /boot/vmlinuz?
im alittle skatchy when it comes to this.
Rick
 
Old 08-22-2008, 04:59 PM   #7
GazL
Senior Member
 
Registered: May 2008
Posts: 3,392

Rep: Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917
Quote:
Originally Posted by rixtr66 View Post
GazL;im not sure i follow you,do you mean change it to something like this:
cat arch/x86/boot/bzImage /boot/vmlinuz?
im alittle skatchy when it comes to this.
Rick
That's ok Rick, Its a little involved when you first do it, but it'll become very easy once you've done it once or twice.

Here's an exert from Eric's page that shows the bit you're having trouble with.

Code:
make bzImage modules            # compile the kernel and the modules
make modules_install            # installs the modules to /lib/modules/<kernelversion>
cp arch/i386/boot/bzImage /boot/vmlinuz-custom-2.6.24.5  # copy the new kernel file
cp System.map /boot/System.map-custom-2.6.24.5           # copy the System.map (optional)
cp .config /boot/config-custom-2.6.24.5                  # backup copy of your kernel config
cd /boot
rm System.map                                            # delete the old link
ln -s System.map-custom-2.6.24.5 System.map              # create a new link
I've highligted the line in red that does the copy. Eric has used a sligntly different name /boot/vmlinuz-custom-2.6.24.5, instead of just /boot/vmlinuz, but the principles the same.

Have a good read of that page that I linked at the bottom of my last message and it should all become clearer. If you're still having trouble after that drop another note in here and I'm sure we can talk you through it.

edit: just wanted to add for clarity arch/i386 is for all the intel chips. arch/x86 I'm not sure about. Is it amd?

Last edited by GazL; 06-12-2011 at 04:57 AM.
 
Old 08-22-2008, 05:55 PM   #8
rixtr66
Member
 
Registered: Aug 2008
Location: Portland,ME.
Distribution: Slackware
Posts: 102

Original Poster
Rep: Reputation: 15
well that was a catostrophic failure!i didnt notice your ? onthe bottom about x86,i386,my kernel compile should have been i386,not x86,i thought i chose intel options,but it came back x86?i specifically chose a celeron processor.im running an acer aspire w/2gb celeronw/1024L2 cache..anyway back to the drawing board.your help has been greatly appreciated!!even though i used the wrong architecture,i still managed to compile a kernel.that link,and your input helped alot.im not giving up though,ill give it another shot.it ended up having a kernel panic?
and i had to boot from a usb stick to get back.what could i have done to make it come out x86?
rick
 
Old 08-22-2008, 06:10 PM   #9
keefaz
Senior Member
 
Registered: Mar 2004
Distribution: Slackware
Posts: 4,563

Rep: Reputation: 124Reputation: 124
That's funny, I never noticed the x86 directory in the kernel source dir
Now that I look at it, I also have a bzImage in arch/x86/boot/
when I diff i386/boot/bzImage x86/boot/bzImage, I get no output, meaning those files are the same file...
linux kernel 2.6.26.3
processor XP 2500+ AuthenticAMD

Last edited by keefaz; 08-22-2008 at 06:17 PM. Reason: added kernel version number and processor info
 
Old 08-22-2008, 06:19 PM   #10
rixtr66
Member
 
Registered: Aug 2008
Location: Portland,ME.
Distribution: Slackware
Posts: 102

Original Poster
Rep: Reputation: 15
Unhappy

boy did i screw up!!apparently my backup failed i now have to boot from a usb stick!im not sure how to fix lilo this is what is there;

image=/boot/vmlinuz-generic-smp-2.6.24.5-smp
root=/dev/sda3
label="slackware"
read-only # Partitions should be mounted read-only for checking
# Linux bootable partition config ends

whats missing?cause its not booting.
Rick
 
Old 08-22-2008, 06:23 PM   #11
GazL
Senior Member
 
Registered: May 2008
Posts: 3,392

Rep: Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917
If you used the arch/x86/boot/bzImage instead of the i386 one then I guess that is where your kernel panic came from. At least you now know how to boot from a usb stick.
That x86 v i386 arch thing is a bit misleading. Basically the intel chips from 386 and up are all the i386 arch. For a celeron you definately want to copy the arch/i386/bzImage to /boot/vmlinuz
Just copy that one to /boot/vmlinuz instead of the x86 one and you should be fine (unless you've turned something off in the kernel config that you shouldn't have).
Don't forget to re-run /sbin/lilo whenever you change it.

Stick with it mate you'll get there.

My main system died a while ago so I'm running on an old P3-800 at present while I sort out a new system. As a kernel compile will take forever on this old box, I've not got one to hand so its hard for me to go digging into the config files from here.

Best of luck.
 
Old 08-22-2008, 06:24 PM   #12
keefaz
Senior Member
 
Registered: Mar 2004
Distribution: Slackware
Posts: 4,563

Rep: Reputation: 124Reputation: 124
Hey if it is your first kernel compilation, it is pefectly normal to have kernel panic
In my opinion of course You learn by mistake

But imho that error does not come from the wrong kernel dir (arch/x86/boot/bzImage vs arch/i386/boot/bzImage) as those files are the same file in my kernel source tree

Did you run /sbin/lilo again to take the configuration change in account ?

Also, you didn't configure the kernel from scratch, did you ?

Last edited by keefaz; 08-22-2008 at 06:28 PM.
 
Old 08-22-2008, 06:25 PM   #13
TomaCzar
Member
 
Registered: Dec 2003
Location: Roc City (Rochester-NY)
Distribution: Slacker 4 Life
Posts: 125

Rep: Reputation: 15
Hey, is there something intrinsically wrong with "make install"? I don't want to be the only guy out there doing things the dumb way if there is.

-TomaCzar
 
Old 08-22-2008, 06:37 PM   #14
keefaz
Senior Member
 
Registered: Mar 2004
Distribution: Slackware
Posts: 4,563

Rep: Reputation: 124Reputation: 124
For my part I do:
make
make modules_install
then I copy the bzImage and System.map by hand in /boot

I know from 'make help', that you can make a script named /sbin/installkernel
and it will be executed with 'make install'
 
Old 08-22-2008, 06:48 PM   #15
GazL
Senior Member
 
Registered: May 2008
Posts: 3,392

Rep: Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917
Quote:
Originally Posted by rixtr66 View Post
boy did i screw up!!apparently my backup failed i now have to boot from a usb stick!im not sure how to fix lilo this is what is there;

image=/boot/vmlinuz-generic-smp-2.6.24.5-smp
root=/dev/sda3
label="slackware"
read-only # Partitions should be mounted read-only for checking
# Linux bootable partition config ends

whats missing?cause its not booting.
Rick
Ah, ok.

if you're using the generic/modular kernel now then you'll probably need to build a initrd. There's a file in /boot called README.initrd that explains how.

I'm not familiar with booting from a usb stick. I normally just boot from the install cd when I screw up my installs and fix it from there.

If you just have the 1 partition on sda3 you can fix it with the following

boot from the install cd/dvd. (this may also be the same with the usb stick but i've never booted from one so I can't say)

login as root, but do not run setup.
run the following commands:

mount -o rw /dev/sda3 /mnt
mount -o bind /proc /mnt/proc
mount -o bind /sys /mnt/sys
chroot /mnt

That should get you into your system. From here you can then fix your system.

What I'd suggest is that you edit lilo.conf again and change it back to use the image=vmlinuz-huge-smp-2.6.24.5-smp
then run /sbin/lilo

You should now be back to square one and a reboot should bring you back to running off of the default kernel. Then you can have a look around, do a bit of reading and try and figure out what you did wrong the first time.

* I'm off to bed now so I'll leave you in the capable hands of the others here *

Last edited by GazL; 08-22-2008 at 06:53 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
can't compile kernel 2.6.23.8 ERROR: no /sbin/init found on rootdev tommcd Slackware 18 11-24-2007 09:32 PM
# /sbin/lilo returns incorrect error message Bruce Hill Slackware 5 11-24-2004 02:29 PM
Upgraded kernel, lilo.conf, didn't run /sbin/lilo dtashima Linux - Newbie 4 10-18-2004 11:21 AM
SuSE kernel update /sbin/lilo hindenbergbaby Linux - Newbie 3 12-05-2003 12:11 PM
new kernel causes lilo crash; /sbin/lilo = Warning: device 0x0305 exceeds 1024 cylind dandysf Linux - Software 0 08-26-2003 04:50 PM


All times are GMT -5. The time now is 11:46 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration