LinuxQuestions.org
Review your favorite Linux distribution.
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 03-13-2006, 05:43 PM   #1
BobNutfield
Senior Member
 
Registered: Dec 2005
Location: United Kingdom
Distribution: Fedora , Ubuntu, Slackware-Current
Posts: 1,477

Rep: Reputation: 51
Unable to boot any kernel after compile


Hi Everyone,

Well, I guess all the studying I did prior to trying to compile and configure a new 2.5.15 kernel was not enough. Not sure what I have done, but I cannot boot even into the original kernel. I have somehow changed the system map and boot information for everything and it will not boot. I can still boot with the floppy, so my question is: is there any way I can restore the original boot files (to the 2.4.31 kernel) or am I looking at a complete reinstall?

Any help greatly appreciated.

Bob
 
Old 03-13-2006, 05:45 PM   #2
BobNutfield
Senior Member
 
Registered: Dec 2005
Location: United Kingdom
Distribution: Fedora , Ubuntu, Slackware-Current
Posts: 1,477

Original Poster
Rep: Reputation: 51
One additional note, I am using grub on the MBR of the disk, and it was not affected. Don't know if that matters.

Bob
 
Old 03-13-2006, 06:27 PM   #3
willysr
Senior Member
 
Registered: Jul 2004
Location: Jogja, Indonesia
Distribution: Slackware-Current
Posts: 2,553

Rep: Reputation: 424Reputation: 424Reputation: 424Reputation: 424Reputation: 424
what steps have you took before you rebooted your system?
what are the error messages when it boot?
 
Old 03-13-2006, 06:29 PM   #4
odevans
Member
 
Registered: Nov 2005
Location: Columbus, OH, USA
Distribution: Slackware
Posts: 246

Rep: Reputation: 30
Fear not! Boot from the install CD (#1). When you get the "Welcome to slackware...." welcome screen with the "boot:" prompt, enter:

Code:
boot:  bare.i root=/dev/hda1 noinitrd ro
Substitute whatever kernel you used during the origial install (IIRC you have SATA disks, so you'll probably want the sata.i kernel) and the correct root= option and hit enter. (These instructions are on the screen, but it may time out before you get it all)
 
Old 03-14-2006, 01:21 AM   #5
BobNutfield
Senior Member
 
Registered: Dec 2005
Location: United Kingdom
Distribution: Fedora , Ubuntu, Slackware-Current
Posts: 1,477

Original Poster
Rep: Reputation: 51
Once again, thank you for your reply. You are right, this instruction does boot me back into Slackware, but it does it primarily the same way the floppy does. I guess I not thoroughly understand the instructions you were referreing to (I didn't actually see any instructions). Once passed the original screen, it booted into the OS to a normal prompt. Nothing really changed. On reboot, it does the same thing, goes to a blank screen. The boot file shows
vmlinuz as it did before, but also shows vmlinuz.old and systemmap.old. I guess this is where I have screwed it up. It is these boot files that seem to be corrupted.

Is it possible to restore this to the original condition so that it will boot from grub as it did originally?

As always, thank you for your help.

Bob
 
Old 03-14-2006, 01:26 AM   #6
Alien_Hominid
Senior Member
 
Registered: Oct 2005
Location: Lithuania
Distribution: Hybrid
Posts: 2,247

Rep: Reputation: 53
I think you have messed your grub configuration. Don't know very much about grub (using lilo) but could you post its configuration.
 
Old 03-14-2006, 01:30 AM   #7
BobNutfield
Senior Member
 
Registered: Dec 2005
Location: United Kingdom
Distribution: Fedora , Ubuntu, Slackware-Current
Posts: 1,477

Original Poster
Rep: Reputation: 51
Thank you Alien Homind, but I have considered that already and examinied it. The line that boots to Slackware is

kernel /boot/vmlinuz root=/dev/sda2 ro vga=788

Boot just fine from that before, and it is still intact. I removed any

reference to the newer kernel.

Thanks,

Bob
 
Old 03-14-2006, 01:49 AM   #8
BobNutfield
Senior Member
 
Registered: Dec 2005
Location: United Kingdom
Distribution: Fedora , Ubuntu, Slackware-Current
Posts: 1,477

Original Poster
Rep: Reputation: 51
I am going to try to rename the vmlinuz.old to vmlinuz and remove the current vmlinuz and do the same for System.map old to see if that restores it. If it doesn't, looks like a complete reinstall. Disappointing, because it took quite a while to get verying configured (hardware) the way I needed. But, I guess that's the way it goes sometimes when you are learning.

I will try this tonight. Off to work..

Thanks for your help.

Bob
 
Old 03-14-2006, 02:02 AM   #9
Alien_Hominid
Senior Member
 
Registered: Oct 2005
Location: Lithuania
Distribution: Hybrid
Posts: 2,247

Rep: Reputation: 53
Don't remove current vmlinuz. Just move it to another directory. When you manage to boot properly again, you could check why it (current vmlinuz) was not booting correctly.
 
Old 03-14-2006, 02:26 AM   #10
odevans
Member
 
Registered: Nov 2005
Location: Columbus, OH, USA
Distribution: Slackware
Posts: 246

Rep: Reputation: 30
What you can do, once you've booted from the CD (as I showed above), remove the kernel packages so:

Code:
root@box~#  cd /var/log/packages
root@box#   ls -l | grep -i kernel

-rw-r--r--  1 root root  25797 2006-02-09 11:33 kernel-headers-2.4.31-i386-1
-rw-r--r--  1 root root    882 2006-02-09 11:30 kernel-sata-2.4.31-i486-1
-rw-r--r--  1 root root  60118 2006-02-09 11:30 kernel-modules-2.4.31-i486-1

root@box#   removepkg kernel-sata-2.4.31-i486-1
(not entirely sure what the SATA kernel package is called as I have no SATA stuff, I guessed based on the name of the ide one, substitute as appropriate)

Then you can run pkgtool and use the "Setup Choose Slackware installation scripts to run again" option, and then re-run the kernel installation script to re-install your 'default' kernel (if you booted from the CD, it should already be mounted, if not you'll have to cancel and mount it).

Hopefully that'll get you back to square one, as it were.
 
Old 03-14-2006, 08:02 AM   #11
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 11,203
Blog Entries: 3

Rep: Reputation: 1431Reputation: 1431Reputation: 1431Reputation: 1431Reputation: 1431Reputation: 1431Reputation: 1431Reputation: 1431Reputation: 1431Reputation: 1431
Quote:
Originally Posted by BobNutfield
I am going to try to rename the vmlinuz.old to vmlinuz and remove the current vmlinuz and do the same for System.map old to see if that restores it. If it doesn't, looks like a complete reinstall. Disappointing, because it took quite a while to get verying configured (hardware) the way I needed. But, I guess that's the way it goes sometimes when you are learning.

I will try this tonight. Off to work..

Thanks for your help.

Bob
Hi,

Bob, use the cd1 to boot then;

#mkdir /bob
#mount /dev/sda1 /bob #use you device
#chroot /bob

Now edit your lilo or grub to point to your original configuration. In the future you should leave the working stanza in the configuration. When you did a make install the script changed your configuration to point to the new image configuration after copying files.

I like to manually install my new image then edit the lilo.conf to reflect the change therefore keeping a known working configuration that I can get back into if a problem exists with the new image.

You could look at Shilo's web site, reference #11 in my sig. He has some good pointers/procedures that will help you.

HTH!
 
Old 03-14-2006, 08:50 AM   #12
piete
Member
 
Registered: Apr 2005
Location: Havant, Hampshire, UK
Distribution: Slamd64, Slackware, PS2Linux
Posts: 465

Rep: Reputation: 44
"Does not boot" and "all I see is a blank screen"are two different errors.

Having a quick skim around for information on Grub (like most Slackers, I use lilo), I've pulled up this site (http://wiki.antlinux.com/pmwiki.php?n=HowTos.VgaModes). You should check to make sure that you are passing vga=normal to grub otherwise you're probably trying to use a VESA framebuffer. Have a look around for "blank screen boot" problems and you'll see that actually your kernel is fine, you've just messed up the framebuffer options in the kernel.

Try waiting for it to boot then logging in blindly and typing `startx` - if you have a working xorg.conf file then you should get your window manager up, where you can recompile your kernel and try and fix the framebuffer problems.

Can I ask why you are using the 2.5 kernel series, and not 2.6?

A few last words:
1. Check Shilo's guide out for kernel recompiles - it is awesome.
2. Backing up vmlinuz and System.map and restoring the .old versions should work just fine. Under lilo you have to rerun `lilo`, but i understand grub doesn't need to do that.
3. You can save your kernel configuration from place to place - it's just a text file and is located, typically, in /usr/src/linux/.config

Finally the big one:
There is (almost) nothing in Linux that cannot be fixed. Reinstalls are so rarely required, the primary reasons for a reinstall being a) it's faster to reinstall than to fix and b) your security has been compromised and you don't know what you can trust.

Having a broken kernel is not the end of the world, and by using the "bare.i root=/dev/hda1" boot lines from a disk, you are effectively booting your system with a different kernel. If you can do that, then you can repair the "damage" done by your installed kernel not booting.

Let us know how you do and if you need more info =)
- Piete.
 
Old 03-14-2006, 12:55 PM   #13
BobNutfield
Senior Member
 
Registered: Dec 2005
Location: United Kingdom
Distribution: Fedora , Ubuntu, Slackware-Current
Posts: 1,477

Original Poster
Rep: Reputation: 51
From pdevans post: re-install the kernel...

How do I go about reinstalling the kernel 2.4.31. I followed your instructions, removed the packages, re-ran the setup scripts from pkgtool,,,same result, will not boot.

Any ideas? Thanks alot,

Bob
 
Old 03-14-2006, 01:08 PM   #14
BobNutfield
Senior Member
 
Registered: Dec 2005
Location: United Kingdom
Distribution: Fedora , Ubuntu, Slackware-Current
Posts: 1,477

Original Poster
Rep: Reputation: 51
UPDATE: I fixed the boot problem by renaming the vmlinuz.old file in boot to vmlinuz and just overwrote it. System booted to the original kernel after doing that. This restored the original vmlinux file that grub looked for to boot. I am sure this was not the desired way to repair this problem, but it worked.

I am going to do a lot more research before I attempt to install an updated kernel again. Also, when I do attempt it again, I want to find a way to be able to boot the different kernels (old and new) so that I can avoid these problems in the future.

As always, thanks to everyone who came to my aid. I must say, the help I have received in this forum is superb. I look forward to the time I can serve others as well.

Bob
 
  


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
Unable to compile ndiswrapper with 2.6.13 kernel SlackwareInAZ Linux - Wireless Networking 5 09-18-2005 05:01 PM
Unable to compile kernel-2.6.x on Slackware 10.1 Basel Slackware 21 09-01-2005 11:02 AM
Unable to compile Reiser4 Support into 2.6.12 kernel SlackwareInAZ Slackware 11 07-19-2005 01:12 PM
unable to compile new modules in the kernel Menestrel Slackware 1 01-09-2005 05:41 AM
kernel compile ----unable to open console masand Linux - General 3 04-17-2004 10:20 AM


All times are GMT -5. The time now is 01:44 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