LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 11-10-2003, 10:11 AM   #1
janjack
LQ Newbie
 
Registered: Nov 2003
Posts: 6

Rep: Reputation: 0
kernel panic:no init found after changing from hda to hdc


Hi guys,

I have installed RedHat Linux 9.0 on my PC and is running fine, but one day, the IDE system crashed. I have no choice but to switch from hda to hdc, as the hda cannot be used. I have changed the lilo.conf in rescue mode to mount and boot from hdc, but I still received the kernel panic message. I also cannot boot from boot-up diskette. What do I have to do? Pls advise.
Thanks in advance.

regards
 
Old 11-10-2003, 12:08 PM   #2
/bin/bash
Senior Member
 
Registered: Jul 2003
Location: Indiana
Distribution: Mandrake Slackware-current QNX4.25
Posts: 1,802

Rep: Reputation: 46
Go back into rescue mode and edit /etc/fstab and change all /dev/hdaX to /dev/hdcX
 
Old 11-10-2003, 07:13 PM   #3
janjack
LQ Newbie
 
Registered: Nov 2003
Posts: 6

Original Poster
Rep: Reputation: 0
I have tried changing the fstab, but the result is still the same. Still kernel panic. Pls help!
 
Old 11-10-2003, 07:20 PM   #4
/bin/bash
Senior Member
 
Registered: Jul 2003
Location: Indiana
Distribution: Mandrake Slackware-current QNX4.25
Posts: 1,802

Rep: Reputation: 46
Could you post your /etc/lilo.conf and /etc/fstab files.
 
Old 11-11-2003, 07:23 AM   #5
janjack
LQ Newbie
 
Registered: Nov 2003
Posts: 6

Original Poster
Rep: Reputation: 0
fstab:

LABEL=/ / ext3 defaults 1 1

LABEL=/boot /boot ext3 defaults 1 2

LABEL=/home /home ext3 defaults 1 2

/dev/fd0 /mnt/floppy auto noauto,owner 0 0
none
/proc proc defaults 0 0
none
/dev/shm tmpfs defaults 0 0
none
/dev/pts devpts gid=5,mode=620 0 0

/dev/hdc9 swap swap defaults 0 0

/dev/cdrom /mnt/cdrom iso9660 noauto,owner,kudzu,ro 0 0



lilo.conf:

boot=/dev/hdc6

map=/boot/map

install=/boot/boot.b

prompt

timeout=50

message=/boot/message

lba32

default=linux


image=/boot/vmlinuz

label=linux

read-only

initrd=/boot/initrd-2.4.20-8.img

root=/dev/hdc7

Any advice?
 
Old 11-11-2003, 09:22 AM   #6
/bin/bash
Senior Member
 
Registered: Jul 2003
Location: Indiana
Distribution: Mandrake Slackware-current QNX4.25
Posts: 1,802

Rep: Reputation: 46
First make sure you don't have those extra lines in /etc/fstab. Each entry in fstab should be on a single line like this:

fstab:

LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
LABEL=/home /home ext3 defaults 1 2
/dev/fd0 /mnt/floppy auto noauto,owner 0 0
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
none /dev/pts devpts gid=5,mode=620 0 0
/dev/hdc9 swap swap defaults 0 0
/dev/cdrom /mnt/cdrom iso9660 noauto,owner,kudzu,ro 0 0



Secondly since you only have one operating system why not put lilo on the MBR of the drive. You are putting it on a logical drive on an extended partition. If fixinf fstab doesn't help try changing lilo.con like this.


lilo.conf:
boot=/dev/hdc
map=/boot/map
install=/boot/boot.b
prompt
timeout=50
message=/boot/message
lba32
default=linux

image=/boot/vmlinuz
label=linux
read-only
initrd=/boot/initrd-2.4.20-8.img
root=/dev/hdc7
 
Old 11-11-2003, 10:53 AM   #7
janjack
LQ Newbie
 
Registered: Nov 2003
Posts: 6

Original Poster
Rep: Reputation: 0
Sorry for wrong layout for fstab, because I used mcopy to copy the files to a diskette and when I open the file again, the lines wrapped around and I cut the lines at the wrong point. The fstab you provided is actually what is found on the /etc. As for lilo.conf, I forgot to mention that I am actually using a multi-boot system, that's why the linux lies in the logical partition of the extended partition. I cannot possibly post this reply if the windows of the primary partition is down. Any suggestions?
 
Old 11-11-2003, 07:20 PM   #8
/bin/bash
Senior Member
 
Registered: Jul 2003
Location: Indiana
Distribution: Mandrake Slackware-current QNX4.25
Posts: 1,802

Rep: Reputation: 46
So then are you using a windows bootloader? If so have you replaced the linux bootsector with a new one since you swapped the drive?
 
Old 11-11-2003, 09:05 PM   #9
janjack
LQ Newbie
 
Registered: Nov 2003
Posts: 6

Original Poster
Rep: Reputation: 0
I can boot to the lilo showing the redhat boot screen, so I do not think it is the windows bootloader problem. What else can I try?
 
Old 11-11-2003, 09:32 PM   #10
/bin/bash
Senior Member
 
Registered: Jul 2003
Location: Indiana
Distribution: Mandrake Slackware-current QNX4.25
Posts: 1,802

Rep: Reputation: 46
What you are seeing is the old lilo boot screen. When you select linux it tries to boot hda6.

You need to go back into rescue mode, mount the partitions under /mnt, chroot /mnt, run lilo,
dd if=/dev/hdc6 of=linuxboot.img bs=512 count=1
Copy linuxboot.img to your windows partition, edit windows ini file and point to the new linuxboot.img.
 
Old 11-12-2003, 07:19 PM   #11
janjack
LQ Newbie
 
Registered: Nov 2003
Posts: 6

Original Poster
Rep: Reputation: 0
Thank you. After running lilo, it can boot to linux.
 
  


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Moving from hdc to hda - Kernel panic goozlq Linux - Hardware 5 08-31-2005 06:06 AM
Kernel panic: No init found. Try passing init= option to kernel. Kramer Linux - General 3 08-12-2004 09:23 PM
Kernal Panic: No init found. Try passing init= option to kernel raees Linux - General 12 03-18-2004 11:10 PM
error "Kernel panic: No init found. Try passing init= option Anauj0101 Linux - Newbie 3 05-06-2003 10:18 PM
Compiled own kernel and got: Kernel panic: No init found. Try passing init= option to fbl Linux - General 12 01-14-2003 03:38 AM


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