Skip to main content

Linux AS 4 wont boot after using dd

More
17 years 2 months ago #20281 by gainil
Hi,

I have RedHat AS 4 installed on 80 GB IDE drive. Upgraded the system with 80GB SATA. After upgrading hardware I used dd if=/dev/hda of=/dev/sda

After rebooting i get "Kernel Panic" Error.


Can any one tell how I can correct it ?


Regards

gainil.
More
17 years 2 months ago #20284 by nske
If the two hard drives do not have the exact same geometry, backing up/restoring the full disk with dd won't work.

I suggest you make a backup of the files of each partition with tar, recreate the partitions manually in the new hard disk, and exctract each tarball in the appropriate partition. Remember to use the preserve permissions option of tar (-p).

You can view/create partitions with fdisk or cfdisk.
You can create filesystems on partitions with mkfs.[filesystem_name] (make sure you create filesystems of the same type)

After you extract the tarballs on the new disk, you will need to edit the newly copied /etc/fstab and the configuration file of grub (usually /boot/grub/menu.lst), because SATA drives are named differently in linux. If you only have one SATA/SCSI disk, you would need to rename all occurrences of hda to sda.
More
17 years 1 month ago #20355 by gainil
Hi

Both the harddisks are of same geometry. I checked the SATA on other Linux, it shows all the partitions proper.

below are the fdisk results for IDE and SATA

-- IDE

[root@test.linux]# fdisk -l

Disk /dev/hdd: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdd1 * 1 1305 10482381 7 HPFS/NTFS
/dev/hdd2 1306 1318 104422+ 83 Linux
/dev/hdd3 1319 9475 65521102+ 83 Linux
/dev/hdd4 9476 9729 2040255 f Win95 Ext'd (LBA)
/dev/hdd5 9476 9729 2040223+ 82 Linux swap
[root@test.linux]#

-- SATA

[root@test.linux]# fdisk -l

Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 1305 10482381 7 HPFS/NTFS
/dev/sda2 1306 1318 104422+ 83 Linux
/dev/sda3 1319 9475 65521102+ 83 Linux
/dev/sda4 9476 9729 2040255 f Win95 Ext'd (LBA)
/dev/sda5 9476 9729 2040223+ 82 Linux swap

[root@test.linux]#


Can any one tell how I can correct it ?

Pls refer to the below mentioned website

www.linuxquestions.org/questions/showthread.php?t=536059

Regards
More
17 years 1 month ago #20438 by gainil
Hi

Below is the error that it gives while booting up.

VFS: Cannot open root device "LABEL=/" or 00:00
Please append a correct "root=" boot option
Kernel Panic: VFS: Unable to mount root fs on 00:00

/boot/grub/menu.lst looks like this
___________________________
# 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,1)
# kernel /vmlinuz-version ro root=/dev/hdd3
# initrd /initrd-version.img
#boot=/dev/hdd
default=0
timeout=10
splashimage=(hd0,1)/grub/splash.xpm.gz
title Red Hat Linux (2.4.20-8)
root (hd0,1)
kernel /vmlinuz-2.4.20-8 ro root=LABEL=/
initrd /initrd-2.4.20-8.img
title DOS
rootnoverify (hd0,0)
chainloader +1
_______________________


Any solution for this?

Regards
More
17 years 1 month ago #20455 by nske

kernel /vmlinuz-2.4.20-8 ro root=LABEL=/

Try labeling the / partition with the command "e2label" first. Or replace "root=LABEL=/" on grub's configuration file with "root=/dev/sda1" (or whatever device root filesystem lies on)
Time to create page: 0.134 seconds