# [SOLVED] Mounting an OLD Hard Drive

## Joseph_sys

Can someone refresh my memory how to mount an old hard drive?

On one of my boxes MB went down so I transfered the IDE (HD) to my current system as I'm trying to retrieve information form one of the user on that hard drives.

BIOS recognized the hard drive (that is good) how do I find it and mount it.

"fdisk -l" does not show this disk.

When I boot to BIOS only one disk is detected on first screen SATA (Westen Digital) that is my primary disk.

But when I go to BOOT option I see:

1-disk WD-xxxx

2-dist Maxtor (this is the one I'm trying to mount.)  But fidsk -l is only showing one disk.

The I think the Maxtor HD disk should show up on first screen in BIOS but it doesn't.Last edited by Joseph_sys on Sat Dec 31, 2011 11:02 pm; edited 1 time in total

----------

## krinn

I think you must revert your bios controller from SATA AHCI to compatibility mode to enable the pata mode.

There's high chances then your kernel isn't ready to boot like that and will fail.

But a livecd should handle that easy.

----------

## Hu

You may need, either in lieu of or in addition to krinn's change, additional kernel support.  The fastest way to find the right kernel driver is to feed the output of lspci -n to the Debian GNU/Linux device driver check page.

----------

## Joseph_sys

 *krinn wrote:*   

> I think you must revert your bios controller from SATA AHCI to compatibility mode to enable the pata mode.
> 
> There's high chances then your kernel isn't ready to boot like that and will fail.
> 
> But a livecd should handle that easy.

 

Good suggestion, I booted from Knopix and tried Gentoo Rescue CD (it does not have a file manager, thunar is not there on GUI)

Knoppix does not show files on on the disk I want to transfer files from, though it does see had disk and home directory.

I've tried to su to root but it till does not list any files/directory from old disk.

/dev/sda5  (home/kathy)  new disk

/dev/sdb7  (home/kathy) old home I want to tranfer files from.

Do I need to mount them? How and where ?

----------

## Joseph_sys

 *Hu wrote:*   

> You may need, either in lieu of or in addition to krinn's change, additional kernel support.  The fastest way to find the right kernel driver is to feed the output of lspci -n to the Debian GNU/Linux device driver check page.

 

I don't want to boot from the old disk, I just want to transfer files form /home/kathy/ to new disk /home/kathy

But If I boot from rescue CD it only sees hard driver, homes are not mounted.

If I boot from my current disk: fdisk -l does not see the smaller hard disk /dev/sdb

----------

## Ant P.

Do you have the correct IDE driver enabled in your kernel?

----------

## Joseph_sys

 *Ant P. wrote:*   

> Do you have the correct IDE driver enabled in your kernel?

 

How to find out?

----------

## Ant P.

lspci -k

----------

## Hu

 *Joseph_sys wrote:*   

> Knoppix does not show files on on the disk I want to transfer files from, though it does see had disk and home directory.
> 
> I've tried to su to root but it till does not list any files/directory from old disk.

 That would seem to indicate that there are not any files on the disk.  If you see the directories of that disk, then you must have mounted the disk.  If you do not see files in the directories, then there are no files there.

 *Joseph_sys wrote:*   

> /dev/sda5  (home/kathy)  new disk
> 
> /dev/sdb7  (home/kathy) old home I want to tranfer files from.
> 
> Do I need to mount them? How and where ?

 Yes, you must always mount a filesystem before you can access its files.  Assuming that both the old and new drives use typical Linux filesystems, a regular mount command should work fine: mount -t auto -o rw /dev/sda5 /path/to/new/disk/mount && mount -t auto -o ro /dev/sdb7 /path/to/old/disk/mount.  Mount them wherever you want.  Just be careful not to mount them in the same place or you will not be able to access both at once.

 *Joseph_sys wrote:*   

> I don't want to boot from the old disk, I just want to transfer files form /home/kathy/ to new disk /home/kathy
> 
> But If I boot from rescue CD it only sees hard driver, homes are not mounted.
> 
> If I boot from my current disk: fdisk -l does not see the smaller hard disk /dev/sdb

 Where did I say anything about booting from the old disk?  If you want to access it in any way, you need kernel support for it.  If you boot the rescue CD and homes are not mounted by default, that is normal.  Rescue CDs typically do not try to automatically mount all your partitions, because you may not want or need that.  If you boot the rescue CD and cannot mount the homes manually, then that is a problem.

If you boot from your current disk, then you are probably using the kernel you had when you started this thread.  Since you cannot see the small disk with that kernel, that says you are missing kernel support for it.

 *Joseph_sys wrote:*   

>  *Ant P. wrote:*   Do you have the correct IDE driver enabled in your kernel? 
> 
> How to find out?

 As I wrote previously, check whether you have enabled the drivers recommended by the device driver check page. *Hu wrote:*   

> You may need, either in lieu of or in addition to krinn's change, additional kernel support.  The fastest way to find the right kernel driver is to feed the output of lspci -n to the Debian GNU/Linux device driver check page.

 

----------

## Joseph_sys

Thanks it worked, I was missing some kernel option "jmicron"

My small disk, from which I wanted to copy data has the following layout:

```
Disk /dev/hda: 46.1 GB, 46103371776 bytes

255 heads, 63 sectors/track, 5605 cylinders, total 90045648 sectors

Units = sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System

/dev/hda1   *          63    59071004    29535471    c  W95 FAT32 (LBA)

/dev/hda2        59071005    90045647    15487321+   5  Extended

/dev/hda5        59071068    66235994     3582463+  83  Linux

/dev/hda6        66236058    66734009      248976   82  Linux swap / Solaris

/dev/hda7        66734073    90045647    11655787+  83  Linux
```

hda5 is root

I was trying to mount hda7 (which should be home) but there are no files in there in kathy and my home directory looks strange as well.  

```
syscon4 joseph # mount -t auto -o rw /dev/hda7 /home/temp/

syscon4 joseph # ll /home/temp/

total 8

drwxr-xr-x 29 501 501 4096 Sep 28  2002 joseph

drwxr-xr-x  3 502 502 4096 Mar 28  2002 kathy

syscon4 joseph # ll /home/temp/kathy/

total 4

drwx------ 2 502 502 4096 Mar 28  2002 tmp

syscon4 joseph # ll /home/temp/kathy/tmp/

total 0
```

When I mounted the directory with knoppix I've tried to rsync the directory without looking first but not much was copied only maybe 5-hidden files. 

Where are they?[/code]

----------

## Joseph_sys

```
syscon4 joseph # mount -t auto -o rw /dev/hda5 /home/temp/

syscon4 joseph # cat /home/temp/etc/fstab 

/dev/hda5 / ext3 defaults 1 1

none /dev/pts devpts mode=0620 0 0

/dev/hda7 /home ext3 defaults 1 2
```

fstab on hda HD shows hda7 has home directory.

But it makes me wonder what had happen to those files in home directory.

The motherboard on that  computer that I had pulled the HD out wend down but the hard drive should remain untouched.

----------

## Joseph_sys

SOLVED

I dissected the wrong computer :-/  I happens sometimes.

Found the correct computer.Last edited by Joseph_sys on Sat Dec 31, 2011 11:01 pm; edited 1 time in total

----------

## VoidMage

 *Joseph_sys wrote:*   

> Thanks it worked, I was missing some kernel option "jmicron"

 

Actually, it's still broken '/dev/hda7' pretty much says so.

Check the proper pata driver for the ide contoller chipset.

----------

## Joseph_sys

 *VoidMage wrote:*   

>  *Joseph_sys wrote:*   Thanks it worked, I was missing some kernel option "jmicron" 
> 
> Actually, it's still broken '/dev/hda7' pretty much says so.
> 
> Check the proper pata driver for the ide contoller chipset.

 

It could be, the HD I pulled out was from some kind of old experimental box.

The HD data I was looking for was on a SATA HD.  I connected it to a wrong slot on the MB and it asserted itself as "sda" taking over my primary HD.  Putting it on the slave slot solved the problem.

----------

## VoidMage

 :Rolling Eyes: 

I've meant the problem is hda7, not hda7.

----------

