LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Kernel Panic! Calm down (https://www.linuxquestions.org/questions/linux-hardware-18/kernel-panic-calm-down-131104/)

graffitici 01-03-2004 06:21 AM

Kernel Panic! Calm down
 
Hi,

Today I felt bolder than yesterday, and thus decided to attempt a "harddrive swap". I bought a new harddisk couple of weeks ago and hooked it up as slave until I'll have time to migrate my linux partitions. That day had come.

However I failed again. Here's what happened.
I first booted using the Redhat CD in rescue mode and copied everything on a new partition (created using partitionmagic) with the command cp -pR.
I then changed the IDE cables as to make the new disk primary master. Then I powered the pc and booted again using the rescue cd. I invoked grub and did the following:
root (hd0,1)
setup (hd0)

I also tweaked the grub.conf file since the partition numbering had changed (the boot used to be (hd0,0)).
Finally I crossed my fingers and rebooted. Naturally it didn't work. Here is the exact error messaging during boot-up.

Mounting root filesystem
VFS: Can't find ext3 filesystem on dev ide0(3,6).
mount: error 22 mounting ext 3
pivotroot: pivot_root(/sysroot,/sysroot/initrd) failed:2
umount /initrd/proc failed:2
Freeing unused kernel memory: 128k freed
Kernel panic: No init found. Try passing init= option to kernel

Now I have checked the grub.conf file for further changes but couldn't find any (I appended it to this message)

Do you know how I shoud proceed?

I couldn't understand the line root=LABEL=/
Anaconda says it should be root=/dev/hda6
However it boots correctly in my current system. Is that the part I have to change?

Thanks in advance,
Bibby

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/hda6 (root is not hda6 anymore, it is hda3)
# initrd /initrd-version.img
#boot=/dev/hda
default=0
timeout=5
splashimage=(hd0,1)/grub/tigutz.xpm.gz
title Red Hat Linux 9
root (hd0,1)
kernel /vmlinuz-2.4.20-8 ro root=LABEL=/ hdd=ide-scsi apm=off acpi=off
initrd /initrd-2.4.20-8.img
title Windows
rootnoverify (hd0,1)
chainloader +1

michaelk 01-03-2004 07:18 AM

RH uses partiton labels in the fstab instead of /dev/. You didn't create labels on the new drive so it can't find anything.

To create partition labels use label2fs.

320mb 01-03-2004 07:25 AM

Re: Kernel Panic! Calm down
 
Quote:

Originally posted by graffitici
Hi,
I then changed the IDE cables as to make the new disk primary master.
Ah ha, did you change the jumper on the back of the drive itself??
:scratch:

graffitici 01-03-2004 08:50 AM

Quote:

Originally posted by michaelk
RH uses partiton labels in the fstab instead of /dev/. You didn't create labels on the new drive so it can't find anything.

To create partition labels use label2fs.

What do I need to do now then? This?:
Swap cables again and boot with the RH rescue cd.
mount the partition and chroot to it.
invoke the command label2fs.

How does that work? Do I specify a label along with a drive such as label2fs / /dev/hda3

I am asking all these questions since I won't have the opportunity to connect to the internet during the process, and I have to know precisely what I'll have to do.

Quote:

Ah ha, did you change the jumper on the back of the drive itself??
No I didn't change them, since the jumpers are in the "cable select" position. Since I play with them often I decided to use this mode to avoid mingling with the jumpers every time.


Thanks to both of you for your answers!

michaelk 01-04-2004 04:33 PM

http://www.die.net/doc/linux/man/man8/tune2fs.8.html
Here is the correct utility
http://www.die.net/doc/linux/man/man8/e2label.8.html

mounting and chroot will probably not work because your fstab file still references labels and not /dev/hdax.

Either change fstab and grub.conf to /dev/hdax or add labels to your partitions.


All times are GMT -5. The time now is 10:40 AM.