LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 11-12-2005, 10:53 PM   #1
larsenmtl
LQ Newbie
 
Registered: Feb 2004
Posts: 23

Rep: Reputation: 15
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
 
Old 11-13-2005, 12:04 AM   #2
Electro
LQ Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
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.
 
Old 11-13-2005, 10:37 AM   #3
larsenmtl
LQ Newbie
 
Registered: Feb 2004
Posts: 23

Original Poster
Rep: Reputation: 15
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.
 
Old 11-13-2005, 11:32 AM   #4
larsenmtl
LQ Newbie
 
Registered: Feb 2004
Posts: 23

Original Poster
Rep: Reputation: 15
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
SATA detected, but PATA not bioboi69 Linux - Hardware 0 10-23-2005 07:19 AM
mixed SATA PATA HD dual boot install - need help pfschim Linux - Newbie 12 03-24-2005 06:10 AM
PATA with SATA cherif Linux - Hardware 3 12-08-2004 01:38 PM
FC2 Boot with PATA and SATA chinkai80 Fedora - Installation 0 08-02-2004 10:17 PM
6300ESB SATA/PATA Controller nicholai Linux - Hardware 0 05-21-2004 07:48 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 11:23 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration