LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
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 06-24-2008, 07:26 AM   #1
abdulinuxuser
LQ Newbie
 
Registered: Jun 2008
Posts: 4

Rep: Reputation: 0
kernel panic boot problem when re-installing grub


Hello, i am new to this site, and i have a problem..

here is the boring story.

I used to have a windows laptop, and i installed fedora core (old version 2 or 3) in an extended partition.

once upon time a have a problem with windows and i reinstalled it, and
guess what (as experienced ones know), i am not able to boot my linux again.

I used RescueCD (fedora-7 i386) to install GRUB into MBR, i succeeded but when i think everything is ok i got the following error when booting my linux..

uncompressing Linux... OK, booting the kernel.
audit(1214236537.654:0): initialized
ide2: I/O resource 0x3EE-0x3EE not free
ide2: ports already in use skipping probe
Red Hat nash version 4.1.18 starting
mount: error 22 mounting ext2
mount: error 2 mounting none
switchroot : mount failed : 22
umount /initrf/dev failed : 2
kernel panic - not syncing : Attempted to kill init!


what is this horrible message means???

here is my steps:
(a) my grub.conf:
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You do not have a /boot partition. This means that
# all kernel and initrd paths are relative to /, eg.
# root (hd0,5)
# kernel /boot/vmlinuz-version ro root=/dev/hda6
# initrd /boot/initrd-version.img
# boot=/dev/hda
default=1
timeout=5
splashimage=(hd0,5)/boot/grub/splash.xpm.gz
hiddenmenu
title Fedora
root (hd0,5)
kernel /boot/vmlinuz-2.6.9-1.667 ro root=LABEL=/ rhgb quiet
initrd /boot/initrd-2.6.9-1.667.img
title Windows XP Professional
rootnoverify (hd0,0)
chainloader +1

(b) partitions:
#sudo fdisk -lu
disk /dev/sda
/dev/sda1 NTFS
/dev/sda2 NTFS
/dev/sda3 EXT
/dev/sda5 swap
/dev/sda6 linux

(strange thing is the name of partitions sda and not hda, but when i used kubuntu live cd the above command returns /dev/hda ??? really strange!!)

(c) grub-install /dev/hda
(i got error not a device block...
sda also gives error, but i don't remember)
(d) grub
grub> find /boot/grub/stage1
(hd0,5)
grub> root (hd0,5)
grub> setup (hd0)


as i said before, i succeeded to install grub, but i can't boot linux
(as i did nothing! )

any help?? is this problem relative to my grub installation, why is it
sda sometimes and hda other, why my kernel panic????
 
Old 06-24-2008, 12:14 PM   #2
mostlyharmless
Senior Member
 
Registered: Jan 2008
Distribution: Slackware -current (multilib) with kernel 3.16.2
Posts: 1,571
Blog Entries: 13

Rep: Reputation: 182Reputation: 182
I think the problem with sda vs. hda is related to libata and the change in convention between /dev/hdX to /dev/sdX that occurred between your old version of fedora and the new distros you're using.

The other thing that comes to mind is that it appears that the security settings you're using are blocking access to the the disk hardware. That's how I would read the

audit(1214236537.654:0): initialized
ide2: I/O resource 0x3EE-0x3EE not free

messages. But I'm not sure about that, I don't use PAM or SELinux. I found this with google:

http://osdir.com/ml/file-systems.ext.../msg00027.html

where fixing fstab seemed to solve a similar problem.

If that doesn't work you could mount the partition using Knoppix or another live CD, backup your information you want to save, and reinstall a more up to date distro.

Hope that helps.
 
Old 06-25-2008, 02:48 AM   #3
abdulinuxuser
LQ Newbie
 
Registered: Jun 2008
Posts: 4

Original Poster
Rep: Reputation: 0
thanks for reply...

Quote:
Originally Posted by mostlyharmless View Post
I think the problem with sda vs. hda is related to libata and the change in convention between /dev/hdX to /dev/sdX that occurred between your old version of fedora and the new distros you're using.
I guess also it is from my old version. but what is libata??...

Quote:
security settings you're using are blocking access to the the disk hardware. That's how I would read the
audit(1214236537.654:0): initialized
ide2: I/O resource 0x3EE-0x3EE not free
How can i be sure about that and how to unblock access??

Quote:
I found this with google:
http://osdir.com/ml/file-systems.ext.../msg00027.html
where fixing fstab seemed to solve a similar problem.
I saw the site, does it say i have to change the label in my fstab file.. by the way i have only one linux partition (/) and no boot partition...
I remembered another thing.. when i reinstalled windows, i added a second partition.. does this affect my linux...

Quote:
If that doesn't work you could mount the partition using Knoppix or another live CD, backup your information you want to save, and reinstall a more up to date distro.
Hope that helps.
Yes thanks.. i really did that with fedora live cd.. but i need to know whats going on also...

any explanations... thanks
 
Old 06-26-2008, 01:29 PM   #4
mostlyharmless
Senior Member
 
Registered: Jan 2008
Distribution: Slackware -current (multilib) with kernel 3.16.2
Posts: 1,571
Blog Entries: 13

Rep: Reputation: 182Reputation: 182
Libata:
Read about it here:
http://lwn.net/Articles/198344/

PAM and security:
http://linux.about.com/library/cmd/blcmdl8_pam.htm

But it may have nothing to do with the ide2 subsystem problem you have. I don't use PAM so I can't answer your question about that. You could try kernel boot options like noacpi to see if that makes a difference. It also could be that the IDE subsystem is already claimed by the libata drive so that the ide driver is being blocked.

Certainly adding a new partition would affect your linux boot, as it would change the partition numbers. But it looks like you already accounted for that. Still, looking at your menu.lst, did you try changing /dev/hda6 to /dev/sda6 and explicitly try to mount using root=/dev/sda6 instead of using the root=LABEL?

You reinstalled a new distro? Is it working now and you're just trying to figure out the old problem?
 
Old 07-03-2008, 03:27 AM   #5
abdulinuxuser
LQ Newbie
 
Registered: Jun 2008
Posts: 4

Original Poster
Rep: Reputation: 0
Sorry if i am late.. Thanks for help mostlyharmless

Quote:
You reinstalled a new distro? Is it working now and you're just trying to figure out the old problem?
No i didn't reinstall new distro.. i used fedora7-rescuecd... I was fighting to repair my Fedora even if it is old.. just to learn..

Now i am able to boot my old Fedora Core 3 again.. and the kernel didn't panic..
I just did as u said..
- change my /etc/fstab:
LABEL=/ TO /dev/hda6
- change /boot/grub/menu.lst
root=LABEL=/ TO root=/dev/hda6

Yes it is /dev/hda not /dev/sda , I guess my OLD fedora recognize it like that.. i don't care..

I'd like to thank u..

but now i want to get rid of my linux... Uninstall Fedora 3 ... i'd like to run New CentOS Linux from VMware..
I want to know if there is a way to restore windows bootloader into MBR, using my old linux, before shooting it.?
I guess i can do that from Windows XP CD also.?
can anyone explain steps???

I know i am juggling alot but u can't learn Otherwise.

thanks...
 
Old 07-03-2008, 03:37 AM   #6
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,628

Rep: Reputation: Disabled
You can format the linux partitions using windows or live cds.
And then use xp cd to boot from into rescue mode.
When you get the shell ( command prompt for windows ) just give the command:

fixmbr

This will fix your broken mbr ( according to windows ) and give you a boot loader that windows uses.
 
Old 07-04-2008, 10:56 AM   #7
mostlyharmless
Senior Member
 
Registered: Jan 2008
Distribution: Slackware -current (multilib) with kernel 3.16.2
Posts: 1,571
Blog Entries: 13

Rep: Reputation: 182Reputation: 182
I agree with the above: It's probably easiest to use the Windows CD and 'fixmbr'. You certainly can do it with Linux as well, assuming you saved a copy of the MBR before you installed grub, which I'm guessing you didn't...
 
Old 07-05-2008, 11:37 AM   #8
abdulinuxuser
LQ Newbie
 
Registered: Jun 2008
Posts: 4

Original Poster
Rep: Reputation: 0
yes thanks, certainlly i will try doing it using the windows CD,

but before that i want to ask how can i do that in linux..

Yes i didn't save copy of my MBR before.. mostharmless

but i wonder if i can mount my NTFS windows partition and look for boot
files, and restore them into MBR..

Is this possible..

thanks
 
Old 07-06-2008, 12:30 PM   #9
mostlyharmless
Senior Member
 
Registered: Jan 2008
Distribution: Slackware -current (multilib) with kernel 3.16.2
Posts: 1,571
Blog Entries: 13

Rep: Reputation: 182Reputation: 182
Quote:
Originally Posted by abdulinuxuser View Post
but i wonder if i can mount my NTFS windows partition and look for boot
files, and restore them into MBR..

Is this possible..
I don't know if that's possible with Windows. Everyone in the Windows world usually recommends using a rescue CD. I don't think Windows saves an extra copy of NTLDR or whatever they're calling it these days... Sorry

If you had used LILO in the past, prior to GRUB, it automatically saves the MBR as well.

Last edited by mostlyharmless; 07-06-2008 at 12:31 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
Changing Grub config at boot to prevent Kernel panic neelay1 Linux - General 2 04-13-2006 04:13 PM
Changing Grub config at boot to prevent Kernel panic neelay1 Linux - Newbie 3 04-12-2006 04:50 PM
Changing Grub config at boot to prevent Kernel panic neelay1 Linux - Software 2 04-12-2006 04:00 PM


All times are GMT -5. The time now is 12:31 AM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration