# Changing hard drives.... upgrading to SATA....

## hollywoodb

well, i have a bad blocks problem on my HD.....

reiserfsck --rebuild-tree managed to save me, I'm on my system now....

anyways I'm going to upgrade to a serial ata drive, what do I need to enable in kernel (2.6.5 mm-sources) so that when I do the switch my sata drive will be bootable?

also, what's the best way to transfer over my filesystem? I hear dd_rescue is good....

should this be a generally smooth process?

will the drive still be /dev/hda? if not, will this cause problems, or could I just symlink it to /dev/hda from the liveCD? (i'm using udev, and I know my way around it, so linking /dev entries wouldn't be a problem)

----------

## Helena

 *hollywoodb wrote:*   

> well, i have a bad blocks problem on my HD.....
> 
> reiserfsck --rebuild-tree managed to save me, I'm on my system now....
> 
> anyways I'm going to upgrade to a serial ata drive, what do I need to enable in kernel (2.6.5 mm-sources) so that when I do the switch my sata drive will be bootable?
> ...

 There are several issues at hand here. I´ll line out the basic steps.

1. Recompile your kernel with support for the SATA chip you are using

2. Transfer all relevant partitions from the old IDE to the new SATA disk.

3. Modify some important config files to make the system bootable from a SATA disk

4. Disconnect the IDE disk and reboot

Answering your questions:

 *hollywoodb wrote:*   

> will the drive still be /dev/hda? if not, will this cause problems, or could I just symlink it to /dev/hda from the liveCD? (i'm using udev, and I know my way around it, so linking /dev entries wouldn't be a problem)

 1. No the drive will be called /dev/sda. You have to modify at least /etc/fstab and /boot/grub/grub.conf. It could also be that you have to reinstall GRUB.

 *hollywoodb wrote:*   

> also, what's the best way to transfer over my filesystem? I hear dd_rescue is good....
> 
> 

 2. I don´t know about the best way. Th method I use is Windows-based and it seems you are looking for a Linux-based method...

----------

## Angrybob

FYI, on my motherboard (Asus A7V600) my SATA drive shows up as /dev/hde

----------

## Helena

 *Angrybob wrote:*   

> FYI, on my motherboard (Asus A7V600) my SATA drive shows up as /dev/hde

 That is not what one would expect, is it? In the (2.6) kernel configuration, serial ATA is listed under SCSI device support / SCSI low-level drivers. It seems natural then to enable also SCSI disk support which I have in fact done myself and see most others do. What method did you use?

----------

## Pusikas

 *hollywoodb wrote:*   

> also, what's the best way to transfer over my filesystem? I hear dd_rescue is good....

 

I did the follwoing to move the contents of my root partition and get the new partition to boot. It's not fast, but worked out nicely. This only works, if /boot is a separate partition.

1. Create the new partition and create a filesystem on it, that is supported by your kernel

2. Mount the new partition, say, to /mnt/backup

3. Mount the root partition in a separate dir. This is necessary to get the contents of the /dev dir, which are needed upon boot. Let's say it's in /mnt/root. If you do the following stuff with / instead of the /mnt/root, /dev stays empty because udev is mounted into /dev. 

4. cd /mnt/root

5. tar lcf - .|(cd /mnt/backup; tar xpvf - )

6. Change /mnt/backup/etc/fstab so that your new partition is root

7. Change /boot/grub/grub.conf so that root= points to your new partition

8. Reboot. If you have at least two entries in your grub.conf, you can always return to your old root partition. Just leave the root= for the second entry with its old value for some time.

----------

## Angrybob

 *Helena wrote:*   

>  *Angrybob wrote:*   FYI, on my motherboard (Asus A7V600) my SATA drive shows up as /dev/hde That is not what one would expect, is it? In the (2.6) kernel configuration, serial ATA is listed under SCSI device support / SCSI low-level drivers. It seems natural then to enable also SCSI disk support which I have in fact done myself and see most others do. What method did you use?

 

yeah I have also built all the SCSI stuff as modules, but I haven't loaded any of them... I'm away from my main computer for the next month so I can't check.. but it definately shows up as /dev/hde both with devfs and udev

----------

## wdimmit

Most SATA motherboards feature several modes for the SATA controller, among which are usually "compatable" and "enhanced" the prior makes the SATA channels appear to be standard IDE channels (ie. SATA 1 and 2 become hdc and hdd) while the latter lets the SATA channels show up in native mode, where the drives will be recognized as sda / sdb

Peace,

will

----------

## Nitroflea

mmm...I compiled my 2.6.3 kernel with "Silicon Image Chipset Support" enabled in the "PCI IDE Chipset Support" section of "Device Drivers->ATA/ATAPI/MFM/RLL" and then my drive is picked up as /dev/hde.

Does enabling the SCSI support provide better performance?

Is there a CPU overhead involved in the IDE support?

I've also noticed that my hd busy led ain't working....any ideas?

oh, I don't have an enterprise SATA drive. Mine is the WesternDigital 120GB SATA.   :Very Happy: 

----------

## RaaR

SCSI support for the Silicon Image controller is considered buggy at the moment.

As for your harddrive led not working, that's probably just a loose cable, it shouldn't be software related.

----------

## Nitroflea

thanks RaaR...but the led works in windows.   :Question:   :Question:   :Confused:  its really starting to irritate me.

I shall not rest until I see the return of that glimmering orange...errr...flashy thingy.   :Laughing:   :Laughing: 

----------

## SuperLag

I'm a little late, but I was searching for info on this board as I plan on installing Gentoo on a system that has this board and S-ATA drives.

I was curious to know what the best path would be, to do a Stage 1 install.  are there any of the LiveCDs that have S-ATA support loaded at boot time?

I wanted to offer some helpful advice for doing a drive to drive copy of an install, using an all Linux method.  The steps I take are as follows:

1.  connect up both drives, with the destination drive connected as sda or hda (or whatever your priimary location of choice is) for the sake of my example, let's assume /dev/hda, and the original drive, jumpered and connected as /dev/hdb

2. boot with LiveCD

3. mkdir /mnt/src /mnt/dest

3. mount /dev/hdb3 /mnt/src

4. mount /dev/hda3 /mnt/dest

5. cd /mnt/src

6. find ./ -xdev | cpio -pvdm /mnt/dest

7. cd

8. umount /mnt/src /mnt/dest

9. mount /dev/hdb1 /mnt/src

10. mount /dev/hda1 /mnt/dest

11. cd /mnt/src

12. find ./ -xdev | cpio -pvdm /mnt/dest

13. cd 

14  umount /mnt/src /mnt/dest

15. shutdown, disconnect original drive

16.  reboot, with LiveCD

17. mount up partitions... enter chroot...  reinstall GRUB

18. exit chroot, unmount, reboot... voila!

A little lenghy, on paper (so to speak), but it doesn't matter if the destination drive is a different size... it preserves symlinks, and permissions, and ownership.  Works very well.

Cheers.

----------

## Helena

 *akulbe wrote:*   

> I'm a little late, but I was searching for info on this board as I plan on installing Gentoo on a system that has this board and S-ATA drives.
> 
> I was curious to know what the best path would be, to do a Stage 1 install.  are there any of the LiveCDs that have S-ATA support loaded at boot time?
> 
> I wanted to offer some helpful advice for doing a drive to drive copy of an install, using an all Linux method.  The steps I take are as follows:
> ...

 Thanks akulbe for your info, something I was in need of! Wonderful, this linux... the actual copying is done in step 6/12, could you briefly explain this command?

As to your LiveCD question, any 2.6 kernel based LiveCD will do. I have used an experimental one from last year, which I no longer see on my local Gentoo mirror. I have heard that the new 2004.0 LiveCD, which uses a 2.4 based kernel by default can also be used in 2.6 mode but can't tell you how.

----------

