LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   kernel panic:no init found after changing from hda to hdc (https://www.linuxquestions.org/questions/linux-general-1/kernel-panic-no-init-found-after-changing-from-hda-to-hdc-114430/)

janjack 11-10-2003 10:11 AM

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

/bin/bash 11-10-2003 12:08 PM

Go back into rescue mode and edit /etc/fstab and change all /dev/hdaX to /dev/hdcX

janjack 11-10-2003 07:13 PM

I have tried changing the fstab, but the result is still the same. Still kernel panic. Pls help!

/bin/bash 11-10-2003 07:20 PM

Could you post your /etc/lilo.conf and /etc/fstab files.

janjack 11-11-2003 07:23 AM

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?

/bin/bash 11-11-2003 09:22 AM

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

janjack 11-11-2003 10:53 AM

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?

/bin/bash 11-11-2003 07:20 PM

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?

janjack 11-11-2003 09:05 PM

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?

/bin/bash 11-11-2003 09:32 PM

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.

janjack 11-12-2003 07:19 PM

Thank you. After running lilo, it can boot to linux.
:)


All times are GMT -5. The time now is 04:39 PM.