Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am sorry if I am posting this post when it is already somewhere else, but I couldn't find it.
I have older laptop, I bought new harddisk. I wanted to copy old HDD to new one. I have copied all the content by partimage and subsequently restored grub. I had to change content of /boot/grub/menu.lst
to:
root (hd0,4)
kernel /boot/vmlinuz26 root=/dev/hda5 ro
I also changed sda5 to hda5 in /etc/fstab and /etc/mtab
while booting the system I got few errors referring to /dev/hda5 (while in the system is probably /dev/sda5).Here is one of them:
Error: root fs cannot be detected.
Root device '/dev/hda5' doesn't exist
It seems that the problem is different part of partition on disk
Does anyone have suggestion what I can do to correct those links.
Thank you for any help
Changing root=/dev/sda5 to root=/dev/hda5 suggests you removed the old SATA drive and installed a PATA drive (different interface...connection). If you installed the same type of hard drive as the original, this should not have been changed.
to:
root (hd0,4)
kernel /boot/vmlinuz26 root=/dev/hda5 ro
In the "from", you have root (hd0,6) which does not correspond with "root=/dev/sda5", is this a typo?
You could probably boot with the Fedora installation disk and type: linux rescue at the boot prompt after hitting the appropriate (Fx) key for other options. When you eventually get another prompt, type: fdisk -l and post the output of that command here. Also, can you post the /boot/grub/menu.lst file. This information should hold all the relevant information to configure things properly.
The disk type is the same, both are IDE-ATA disks, one is Seagate 100Gb and the old Toshiba 60Gb. It is in the laptop so I couldn't change type.
The system I am "restoring" is Arch Linux, so I am not sure if Fedora rescue would work.
the output of fdisk -l Disk /dev/hda: 100.0 GB, 100030242816 bytes
255 heads, 63 sectors/track, 12161 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 1530 12289693+ 7 HPFS/NTFS
/dev/hda2 1531 6672 41303115 7 HPFS/NTFS
/dev/hda3 6673 12161 44090392+ 5 Extended
/dev/hda5 6673 11906 42042073+ 83 Linux
/dev/hda6 11907 12161 2048256 82 Linux swap / Solaris
Disk /dev/sda: 60.0 GB, 60011642880 bytes
255 heads, 63 sectors/track, 7296 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 1275 10241406 7 HPFS/NTFS
/dev/sda2 1276 4108 22756072+ 7 HPFS/NTFS
/dev/sda3 4109 7296 25607610 5 Extended
/dev/sda5 4109 7143 24371392+ 83 Linux
/dev/sda6 7143 7296 1235776+ 82 Linux swap / Solaris
the output of old /boot/grub/menu.lst # Config file for GRUB - The GNU GRand Unified Bootloader
# /boot/grub/menu.lst
# general configuration:
timeout 5
default 0
color light-blue/black light-cyan/blue
# (0) Arch Linux
title Arch Linux
root (hd0,6)
kernel /boot/vmlinuz26 root=/dev/sda5 ro
initrd /boot/kernel26.img
# (1) Windows
title Windows
rootnoverify (hd0,0)
#makeactive
chainloader +1
I have changed the (hd0,6) to (hd0,4) cause of output of grub command find /boot/grub/stage1.
I have changed sda5 to hda5 cause I have found that the copied arch linux on new HDD is on hda5
Yes, and as of kernel 2.6.20, all hard drives are seen as SCSI regardless, not all distributions made this switch right away, some only implemented this in the 2.6.21 kernel etc., some probably still do not implement the change. So even if you have a PATA disk, if your distribution has implemented the change it will have to be /dev/sd(x) not /dev/hd(x). The (a) is for the first hard drive, the second would be (b) and so on. Grub uses numbers rather than letters to identify the disk order, and grub starts counting from (0), not (1).
I was hoping the menu.lst would show which kernel you were running as I mistakenly assumed it was your Fedora Core 3 distribution in your profile you had installed. But apparently the menu.lst is from Arch which does not specify the kernel version, as this is where I was hoping to see if you should be using /dev/sda rather than /dev/hda.
Apparently your Arch Linux has implemented the change, which now limits you to 15 partitions like an SCSI SATA drive rather than the normal 63 partitions for a PATA disk.
IDE (Integrated Drive Electronics), is actually the name of a consortium whose goal was to integrate the ATA interface into various electronic drives like tape drives, optical drives etc. The interface is ATA and when hard drive manufacturers added a second head to ATA hard drives bringing the total to two heads (one for reading, one for writing), now hard drives could read and write at the same time compared to only one or the other when drives only had one head. This is where data now ran up and down the ATA cable at the same time when the drive performed reads and writes at the same time in parallel (8 bits each way), and the name of the hard drive changed from ATA to PATA (Parallel ATA).
I have done my data migration with help of partimage on SystemRescueCd (live linux distro). It was the SystemRescueCd which mixed up those HDD. That's why I changed sda to hda. On my laptop I am using arch linux and that one seems to work with sda. I am using FC3 at work so I still keep it in my profile. Again thanx
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.