LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Moving OS Install from PATA to SATA (https://www.linuxquestions.org/questions/linux-hardware-18/moving-os-install-from-pata-to-sata-382598/)

larsenmtl 11-12-2005 10:53 PM

Moving OS Install from PATA to SATA
 
Long Story:

I recently aquired an ASUS T2-AE1 with a very troublesome SIS 182 SATA controller. In order to get a functioning Debian install on this box, I've done the following:

1.) Added an old IDE hard drive into the box and disabled my brand new 250 gig SATA.
2.) Installed Debian Sarge with the 2.6.8 kernel
3.) Upgraded Sarge to Unstable
4.) Installed kernel 2.6.14.1 from Unstable (my SIS 182 was now recognized)

At this point, I wanted to migrate my install to the SATA drive and pitch the IDE. So, I begin by:

1.) Partition and format SATA as Root (sda1 - 20 gigs - EXT2), Swap (sda3 - 500 megs), and the rest as XFS (sda2).
2.) Set Root with boot flag.
3.) Mounted Root (to /newdisk/) and copied everything from the IDE drive.
4.) Modified /boot/grub/menu.lst so that root=/dev/sda1
5.) Modified /boot/grub/device.map so that (hd0) /dev/sda
6.) Modified /etc/fstab switching / from hda1 to sda1
7.) Installed GRUB on SATA with the following:

chroot /newdisk
grub --device-map=/boot/grub/device.map --config-file=/boot/grub/menu.lst
grub> root (hd0,0)
grub> setup (hd0)

8.) Shutdown and removed the IDE drive.

Here comes the problem. When I rebooted, grub kicked in on the SATA drive. I booted my 2.6.14.1 kernel but it dies at:

/bin/cat: /sys/block/hda/dev: No such file or directory
Device /sys/block/hda/dev seems to be down.

Ughh.

What did I miss? Any ideas?

LarsenMTL

Electro 11-13-2005 12:04 AM

Post your fstab before you modified it. Also post the modified fstab. Post a listing of your partitions of each hard drive. You should not have to change device.map. Assuming you only have two hard drives. You just need to change hd0 to hd1 in /boot/grub/menu.lst. If you do not know the number, run grub and type root (<tab> at grub's prompt.

The /sys directory is the new sysfs feature in 2.6.x kernels. Did you forgot to include it in the fstab file. The line below will work.

Code:

none                    /sys            sysfs          defaults        0 0
If you have compile software for SIS 182 SATA controller as module, you have to make a ramdisk file or initrd. You will also need load any modules that is depends like SCSI modules.

larsenmtl 11-13-2005 10:37 AM

Thanks for replying.

Quote:

Post your fstab before you modified it. Also post the modified fstab
Before:
Code:

# /etc/fstab: static file system information.
#
# <file system> <mount point>  <type>  <options>      <dump>  <pass>
proc            /proc          proc    defaults        0      0
/dev/hda1      /              ext3    defaults,errors=remount-ro 0      1
/dev/hda5      none            swap    sw              0      0
/dev/hdb        /media/cdrom0  iso9660 ro,user,noauto  0      0
/dev/fd0        /media/floppy0  auto    rw,user,noauto  0      0

After:
Code:

# /etc/fstab: static file system information.
#
# <file system> <mount point>  <type>  <options>      <dump>  <pass>
proc            /proc          proc    defaults        0      0
/dev/sda1      /              ext3    defaults,errors=remount-ro 0      1
/dev/sda3      none            swap    sw              0      0
/dev/hdb        /media/cdrom0  iso9660 ro,user,noauto  0      0
/dev/fd0        /media/floppy0  auto    rw,user,noauto  0      0

Quote:

Post a listing of your partitions of each hard drive
IDE:
Code:

Disk /dev/hda: 13.6 GB, 13613064192 bytes
255 heads, 63 sectors/track, 1655 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

  Device Boot      Start        End      Blocks  Id  System
/dev/hda1  *          1        1583    12715416  83  Linux
/dev/hda2            1584        1655      578340    5  Extended
/dev/hda5            1584        1655      578308+  82  Linux swap / Solaris

SATA:
Code:

Disk /dev/sda: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

  Device Boot      Start        End      Blocks  Id  System
/dev/sda1  *          1        2433    19543041  83  Linux
/dev/sda2            2434      30339  224154945  83  Linux
/dev/sda3          30340      30401      498015  82  Linux swap / Solaris

Quote:

You just need to change hd0 to hd1 in /boot/grub/menu.lst.
If I'm removing the IDE drive I thought the SATA would become hd0. Don't I need to modify the root= to /dev/sda1 since the SATA won't show up on /dev/hda1

Code:

The /sys directory is the new sysfs feature in 2.6.x kernels.
I've never seen his in any FSTABs. Is this for the SATA drive?

Quote:

If you have compile software for SIS 182 SATA controller as module, you have to make a ramdisk file or initrd. You will also need load any modules that is depends like SCSI modules.
This I believe is the root of my problems. How do I do this?

Thanks. I really appreciate the help.

larsenmtl 11-13-2005 11:32 AM

Electro,

Thank you so much.

Your last comment was the winner. Adding the sata_sis module to my initrd fixed the problem.

These forums rock.


All times are GMT -5. The time now is 08:49 AM.