Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

i have a problem accessing the data on my external hard drive. I recently did a fresh install but mistakenly left my external hard drive plugged in.

When I tried to access the data on the external HDD, it says "no files" but recognizes that there is 290 GiB of data on it. The HDD is 350GB big.

I checked the drive with Disk Utility and it showed that the hard drive had a bootable flag. So, in the edit partition, I unchecked this bootablity.

Now it won't mount in Ubuntu and now my XP can't recognize it at all, whereas I could access the data on the XP machine before.

In disk utility, it doesn't give me the option to check the bootable box in again and I can't access the data on XP either.

Any ideas on how to fix it?

share|improve this question
    
have you tried sudo fdisk -l and see if the device is recognized? –  Peachy Jul 17 '12 at 15:28

1 Answer 1

First of all, you should install a utility called GParted: # apt-get install -y gparted. After it reads the hard drive, you will have the opportunity to right click on the partition and restore the bootable flag. On a side note, the bootable flag should not interfere with the ability of Ubuntu to mount the partition.

You should try mounting the system on a LiveCD environment. (The Live CD has GParted installed by default.)

It is a Windows XP partition so I will assume that the drive is formatted as an NTFS drive. For the mount issues, at first you should check the output of # fdisk -cl. It should return some sort of output like this:

root@localdomain:/# fdisk -cl

Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xbb28bb28

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        4570    36700160    7  HPFS/NTFS
/dev/sda2            4570        9730    41447425    5  Extended
/dev/sda5            4570        7059    19998720   83  Linux
/dev/sda6            7060        9232    17447936   83  Linux
/dev/sda7            9232        9730     3998720   82  Linux swap / Solaris

Where the /dev/sd something is the partition's identifier. To mount the partition, you will need to create a folder under the /media path, it will serve as the mount point. Execute the command # mkdir /media/external, then mount the partition with the command # mount -t ntfs-3g /dev/sda1 /media/external, where /dev/sda1 is the identifier we retrieved from the above command output, and /media/external is the folder we just created.

(Note: Commands prefixed with a # in this answer indicate that execution requires elevated, superuser (root) privileges. Under normal circumstances, you will need to prefix all commands with sudo to authorize yourself. So # apt-get install gparted turns $ sudo apt-get install gparted. # indicates a root, $ indicates a normal terminal session.)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.