LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-04-2011, 04:59 AM   #1
Timothy.u
Member
 
Registered: Aug 2011
Location: Lithuania
Distribution: Slackware, Debian, Archlinux
Posts: 44

Rep: Reputation: Disabled
Kernel panic


Hello guys, as I'm still green in linux same as in this forum, I read posts from here pretty often, so I decided finally to join and try to get some help with my problems, so here it comes.

I was using Slackware 13 with personally compilid kernel(it was my first and last time compiling kernel till now, I was trying to learn some basics). So i was playing with machine, installing, compiling others packages and so on, everything was ok till I hit slacpkg upgrade-all.

After that my shell started to act rly weird, it didn't react on commands or reacted and answered with bunch of errors, so i just hit reboot, and hello kernel panic :/

I am able to access my old file system through live cd, but the thing is, I don't wan't to reinstall OS, I want to bring it back and learn from it. So I'll try to give information I've collected so far, and methods I tried, also, tell me what else info i can bring to u, thank u.

Here is an image of problem.

If I understand correctly, the problem is, that I upgraded my kernel without realising it, and as it was compilid by my needs, it had problems with upgraded version.

What i was trying to do:
1) I accessed my old file system, and found there, that next to my compiled kernel image "vmlinuz-2.6.32.28_ovz" was lying "vmlinuz-huge-2.3.35.11", deciding by numbers, i think it's that new kernel, maybe I'm wrong? i really don;t know, someone tell me please what is that.
2) Than I went and tried modify /etc/lilo.conf file, where i tried to point to load that "huge" thing, but as long as I'm on live cd, i can't iniciate /sbin/lilo for old config.

So now i wander, if i somehow update my boot menu, would that help? Cause it's gonna take some time for me, so better to know it ahead, and how else can i get new kernel?...

Thank U everyone
 
Old 08-04-2011, 05:41 AM   #2
baxzius
Member
 
Registered: Jan 2010
Location: India
Distribution: ubuntu
Posts: 134
Blog Entries: 1

Rep: Reputation: 21
Quote:
Originally Posted by Timothy.u View Post
Hello guys, as I'm still green in linux same as in this forum, I read posts from here pretty often, so I decided finally to join and try to get some help with my problems, so here it comes.

I was using Slackware 13 with personally compilid kernel(it was my first and last time compiling kernel till now, I was trying to learn some basics). So i was playing with machine, installing, compiling others packages and so on, everything was ok till I hit slacpkg upgrade-all.

After that my shell started to act rly weird, it didn't react on commands or reacted and answered with bunch of errors, so i just hit reboot, and hello kernel panic :/

I am able to access my old file system through live cd, but the thing is, I don't wan't to reinstall OS, I want to bring it back and learn from it. So I'll try to give information I've collected so far, and methods I tried, also, tell me what else info i can bring to u, thank u.

Here is an image of problem.

If I understand correctly, the problem is, that I upgraded my kernel without realising it, and as it was compilid by my needs, it had problems with upgraded version.

What i was trying to do:
1) I accessed my old file system, and found there, that next to my compiled kernel image "vmlinuz-2.6.32.28_ovz" was lying "vmlinuz-huge-2.3.35.11", deciding by numbers, i think it's that new kernel, maybe I'm wrong? i really don;t know, someone tell me please what is that.
2) Than I went and tried modify /etc/lilo.conf file, where i tried to point to load that "huge" thing, but as long as I'm on live cd, i can't iniciate /sbin/lilo for old config.

So now i wander, if i somehow update my boot menu, would that help? Cause it's gonna take some time for me, so better to know it ahead, and how else can i get new kernel?...

Thank U everyone
after compilation of the kernel. you forgot to update the initramfs.
sudo update-initramfs -c -k (version-number)
 
0 members found this post helpful.
Old 08-04-2011, 06:01 AM   #3
Timothy.u
Member
 
Registered: Aug 2011
Location: Lithuania
Distribution: Slackware, Debian, Archlinux
Posts: 44

Original Poster
Rep: Reputation: Disabled
Unhappy

How do I execute command without working system? Obviously if i run it in live cd, it won't help.
 
Old 08-04-2011, 08:42 AM   #4
gary185
Member
 
Registered: Jul 2011
Posts: 113

Rep: Reputation: Disabled
Hi, the way you run lilo on the new config from the live cd to get back booting your old kernel
or make the new initramfs or however you want to aproach it is called chroot
(change root)
here is a good page about it
http://en.gentoo-wiki.com/wiki/Chroot_from_a_livecd
it basically uses the kernel from the live cd and transfers its functionality to your hard drive setup and gets you a bash shell on the hard drives system.
mount your swap with swapon
mount boot and root and whatever partitions you need to use like normal
i guess you need to make some mountpoints on the live cd system with something like
mkdir -v /mnt/rescue
mkdir -v /mnt/rescue/{boot,root,dev,proc,sys}
make some device nodes on your mounted system too i think since the kernel and udev and all that is not running
mknod -m 600 /mnt/rescue/dev/console c 5 1
mknod -m 666 /mnt/rescue/dev/null c 1 3
mount -v --bind /dev /mnt/rescue/dev
then mount the kernel virtual file systems
mount -vt devpts devpts /mnt/rescue/dev/pts
mount -vt tmpfs shm /mnt/rescue/dev/shm
mount -vt proc proc /mnt/rescue/proc
mount -vt sysfs sysfs /mnt/rescue/sys

then something like
chroot /mnt/rescue/ env -i HOME=/root TERM="$TERM" PS1='\u:\w\$ ' PATH=/bin:/usr/bin:/sbin:/usr/sbin bash --login +h

i think that will work
it should give you a clean shell that things it's the hardrive system
you might have to play with it a bit

umount everything when you are done
 
Old 08-05-2011, 01:05 AM   #5
Timothy.u
Member
 
Registered: Aug 2011
Location: Lithuania
Distribution: Slackware, Debian, Archlinux
Posts: 44

Original Poster
Rep: Reputation: Disabled
Smile

Quote:
Originally Posted by gary185 View Post

i think that will work
it should give you a clean shell that things it's the hardrive system
you might have to play with it a bit

umount everything when you are done
Thank U a lot, I'll try it and post results later.
 
Old 08-05-2011, 04:24 AM   #6
NM04
Member
 
Registered: Jan 2011
Distribution: Back Track,Fedora,centos
Posts: 239

Rep: Reputation: 14
hello timothy,
welcome to the LQ. can you boot to grub menu ? Also check this link, it might help.
 
Old 08-05-2011, 04:36 AM   #7
Timothy.u
Member
 
Registered: Aug 2011
Location: Lithuania
Distribution: Slackware, Debian, Archlinux
Posts: 44

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by NM04 View Post
hello timothy,
welcome to the LQ. can you boot to grub menu ? Also check this link, it might help.
Hey,

Sorry, right now i don't have time to try that solutions, but i will, later on today or next weak. The thing is, I use lilo for crased server, on my laptop I've got grub, and I know it's much easier to work with it, I just change some strings, and I can try to boot anything, that's why lilo is problem here -.- As I mentioned before I'm trying to find solution, with present state, without changing packages or whole OS, just to learn the way of linux
 
Old 08-05-2011, 06:59 AM   #8
gary185
Member
 
Registered: Jul 2011
Posts: 113

Rep: Reputation: Disabled
yea i think there might be some reason slackware uses lilo instead of grub.

just a hint
slackware is perfect for using as a developement environment because the packages are whole and not split into binary and "dev" like other distributions. This makes it basically the only distribution that makes a functioal developement platform
BUT the traditional way of looking at slackware is that's it's not really "updatable" the way say debian is.
Sure there has been an attempt to make a debian like front end for the package manager but most slackware users i bet know not to do updates like you would on a debian system. That's not to say you can't get away with it every now and them but it's going to eventually break stuff.
I almost look at slackware the same as i do for a "Linux from scratch" system.
It's rock solid and fast as lightning but will simply get old after while and then will get replaced with a whole new build.

If you need to updade certain things for functionality you can do it by hand.
Linux developers will generally put newer packages than their system is currently using in /usr/local/
rather than /usr. This is why the default ./configure command without arguments goes to /usr/local.
you over time will learn what things can coexist and how to manipulate the environment so you know which API you are compiling against.
There are some particularly tricky things like multiple glibs and things like that but you learn how to do it.
When in doubt ask the developers how they set up their developement environment and keep it seperate from their system.
I think you made a great choice with slack. it's simple, you can understand it and it's very elegantly put together.
welcome aboard! and happy coding.
 
Old 08-11-2011, 06:43 AM   #9
Timothy.u
Member
 
Registered: Aug 2011
Location: Lithuania
Distribution: Slackware, Debian, Archlinux
Posts: 44

Original Poster
Rep: Reputation: Disabled
Hello again, so I've "chrooted" after a while, and guess where it throw me? Exactly to the same point before crash. When I did "upgrade-all" command line started to behave weird like, to any command responding: "No such file or directory". So, after that I restarted my machine and got kernel panic, now when I "chroot", I get the same, so i was thinking, might be PATH problem, but no, for some reason "echo PATH" works and it shows all ok. Another thing is, I am absolutely sure all commands I'm trying to execute are present, I can see them using "cd" command and pressing tab(once i try initiate "cd" i also get same error).
So at this point I have access to all my files and my old system, yes, and I have some weird problem, that even with "chroot" behaves the same before crash. Any ideas? :/

P.S.
If i try to chroot this way: env -i HOME=/root TERM=$TERM SHELL=/bin/bash PS1='\u:\w\$ ' PATH=/bin:/usr/bin:/sbin:/usr/sbin $(type -p chroot) /mnt/rescue/ /bin/bash
"cd" command works, but no other... here is a screen of that...

Last edited by Timothy.u; 08-11-2011 at 09:22 AM.
 
Old 08-11-2011, 07:50 PM   #10
gary185
Member
 
Registered: Jul 2011
Posts: 113

Rep: Reputation: Disabled
that's pretty darn confusing
have you tried to adjust lilo to boot your old kernel you made ?
actually you are saying you still can't run the lilo command aren't you?
i'll try to think about this and get back to you tonight.
although i'm not so sure we can fix if you tool chain is so broken like it seems.
let's see is the olny command you did to upgrade slacpkg upgrade-all ?
slackware has implemented some rather large changes mostly related to x.
 
Old 08-12-2011, 01:11 AM   #11
Timothy.u
Member
 
Registered: Aug 2011
Location: Lithuania
Distribution: Slackware, Debian, Archlinux
Posts: 44

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by gary185 View Post
that's pretty darn confusing
have you tried to adjust lilo to boot your old kernel you made ?
actually you are saying you still can't run the lilo command aren't you?
i'll try to think about this and get back to you tonight.
although i'm not so sure we can fix if you tool chain is so broken like it seems.
let's see is the olny command you did to upgrade slacpkg upgrade-all ?
slackware has implemented some rather large changes mostly related to x.

Hey, yes, everything's right, I'd love to change lilo to boot my specified kernel but as u got it on the way, I can't run lilo itself after file configuration. Yes I'm totally sure it happened after upgrade all, and if u mean x something related to the gui, I can assure u, I wasn't using it on that machine at all. I was wandering, there should be a possibility to change system boot to GRUB, if so, might that do the trick?

P.S. I just remembered, I had a fallback, but it was crashing too, but only now I realized, it looks like this:
This is my compiled kernel:
image = /boot/vmlinuz-2.6.32.28-ovz-1
root = /dev/sda2
label = Linux_ovz
read-only

And this is fallback:
image = /boot/vmlinuz
root = /dev/sda2
label = Linux
read-only

And what's even more interesting, this is a content of my boot section:
drwxr-xr-x 2 root root 4096 Aug 11 13:47 .
drwxr-xr-x 26 root root 4096 Jun 22 03:16 ..
-rw-r--r-- 1 root root 512 Feb 24 07:03 boot.0800
-rw-r--r-- 1 root root 168 Feb 24 07:03 boot_message.txt
lrwxrwxrwx 1 root root 21 Feb 25 09:26 config -> config-huge-2.6.35.11
-rw-r--r-- 1 root root 98025 Feb 28 10:07 config-2.6.32.28-ovz-1
-rw-r--r-- 1 root root 108620 Feb 8 2011 config-huge-2.6.35.11
-rw-r--r-- 1 root root 5040 Mar 27 06:53 diag1.img
-rw-r--r-- 1 root root 17932 Mar 27 06:53 diag2.img
-rw------- 1 root root 144896 Mar 4 04:26 map
lrwxrwxrwx 1 root root 37 Jun 21 10:31 README.initrd -> /usr/doc/mkinitrd-1.4.6/README.initrd
-rw-r--r-- 1 root root 15634 Mar 27 05:32 slack.bmp
lrwxrwxrwx 1 root root 25 Feb 25 09:26 System.map -> System.map-huge-2.6.35.11
-rw-r--r-- 1 root root 2463107 Feb 28 10:07 System.map-2.6.32.28-ovz-1
-rw-r--r-- 1 root root 2602935 Feb 8 2011 System.map-huge-2.6.35.11
lrwxrwxrwx 1 root root 22 Feb 25 09:26 vmlinuz -> vmlinuz-huge-2.6.35.11
-rw-r--r-- 1 root root 5445472 Feb 28 10:06 vmlinuz-2.6.32.28-ovz-1
-rw-r--r-- 1 root root 5445472 Aug 3 14:07 vmlinuz-2.6.32.28-ovz-2


So the fallback is linked to the newer kernel if understand right ( vmlinuz -> vmlinuz-huge-2.6.35.11 ), so is there possibility that if I change link to older kernel it also might do the trick? And i wander, where can i find older or newer kernel image, cause actually til now I was doing all with manuals, so I'd appreciate some info on that too, thank U.

Last edited by Timothy.u; 08-12-2011 at 01:27 AM.
 
Old 08-12-2011, 03:25 AM   #12
gary185
Member
 
Registered: Jul 2011
Posts: 113

Rep: Reputation: Disabled
a good source for slackware info is slackwiki.
i'm kinof new to slackware so i don't know all the ins and outs
I know the latest slack build was a pretty large departure from the way previous things were put together.
I don't think your problem is actually the kernel.
I think you missed a crucial upgrade command
you just upgraded existing packages (i think), not exactly sure what the commands do.
see if the structure of the way things function change alot then some crucial packages might need to be added and some old packages might need to be removed.
i think the most likely cause for your troubles is util-linux-ng got changed to util-linux.
this document might help
http://slackware.osuosl.org/slackware-13.37/UPGRADE.TXT
if you want to try in the future to upgrade slack like its debian or something do it like this
slackpkg update
slackpkg install-new
slackpkg upgrade-all

i think the install-new command would have gotten you the new util-linux
about the kernel packages
right now slackware seem to be in such a major upgrade mode that the package browser is offline and getting an upgrade.
this is a useful site
http://slackfind.net/en/
here is a mirror
http://ftp.lip6.fr/pub/linux/distrib...ting/packages/
sometimes it helps to just burn a new cd like suggested in the upgrade how to.
 
Old 08-12-2011, 03:38 AM   #13
Timothy.u
Member
 
Registered: Aug 2011
Location: Lithuania
Distribution: Slackware, Debian, Archlinux
Posts: 44

Original Poster
Rep: Reputation: Disabled
Thank U, I saw that manual before, but thought it's too late to do something with that after crash, but now I'll read it fully and see if something pops up tht might be useful. I'll post results later.
 
Old 08-13-2011, 04:00 AM   #14
fotoguy
Senior Member
 
Registered: Mar 2003
Location: Brisbane Queensland Australia
Distribution: KirraMail Live Email Server
Posts: 1,285

Rep: Reputation: 61
Your new kernel should be in the kernel source sub-directory from where you built it, go to the root of the kernel source directory, if you copied it to /usr/src then and look for /usr/src/linux-your-kerenl-version/arch/x86_64/boot/bzImage
 
Old 08-18-2011, 04:11 AM   #15
Timothy.u
Member
 
Registered: Aug 2011
Location: Lithuania
Distribution: Slackware, Debian, Archlinux
Posts: 44

Original Poster
Rep: Reputation: Disabled
Okay, so few weaks of digging, and still no results, sorry... So anyone else has any ideas? I can always provide some info from my crashed system if u need it...
 
  


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
Kernel 2.4 in Zipslack (Waring: unable to open an initial console | Kernel Panic...) kurtamos Linux - General 2 05-10-2006 01:58 PM
kernel panic: try passing init= option to kernel...installation with Red Hat 9 kergen Linux - Hardware 1 09-30-2004 04:28 AM
Kernel panic puts me in a panic theeeg Linux - Software 2 07-31-2004 05:46 PM
kernel panic (narius panic) narius Linux - Newbie 3 06-20-2002 04:56 PM
Kernel panic making me panic! Linux_N0oby Linux - Software 19 05-29-2002 01:31 AM


All times are GMT -5. The time now is 02:15 PM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration