2

I just bought a Toshiba Canvio 2TB external hard drive. I then installed GParted, and reformatted the drive to ext4 (following the instructions in part 1 & 2, at this blog).

The instructions didn't say anything about this, but I think I should've added a boot flag to the drive, 'cause now it won't automount, and GParted won't show the drive, and fdisk -l doesn't even show the drive. So I'm not sure how to mount it or find a way to add a boot flag... if that's even what I need to do.

How do I get to where I can edit the drive's partitions and stuff? Can I format the unallocated 1.02MB on the drive to boot? The unallocated space does show up in GParted. I really hope I didn't just brick this $100.

UPDATE: Here's the output when I sudo fdisk -l

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x0003ae80

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048   969058303   484528128   83  Linux
/dev/sda2       969060350   976771071     3855361    5  Extended
Partition 2 does not start on physical sector boundary.
/dev/sda5       969060352   976771071     3855360   82  Linux swap / Solaris

...the partition I formatted, was something like /dev/sdb or something like that, but it doesn't show up.

5
  • 1
    Take a look at this answer, it might help.
    – Mitch
    May 31, 2013 at 16:35
  • Nope, when I open Disks, it only shows the internal HD & the DVD drive
    – Zamphatta
    May 31, 2013 at 16:44
  • Can you add the output of sudo fdisk -l?
    – Mitch
    May 31, 2013 at 16:45
  • BTW why do you have ur swap in an extended partition? May 31, 2013 at 17:06
  • The swap was automatically put there like that when I installed Ubuntu.
    – Zamphatta
    May 31, 2013 at 17:20

3 Answers 3

4

Don't worry; your drive is just fine.

When you unmount a drive in Linux (which you had to do in order to format it,) sometimes it won't be re-recognized until you reboot your computer.

Try rebooting, and see if that fixes the problem.

There's nothing that GParted can do anyway that would prevent sudo fdisk -l from noticing the drive. (you did remember sudo, right? ;)

If, for whatever reason, the drive isn't recognized after you reboot, it (likely) wasn't your fault.

After rebooting, if the drive doesn't appear in the launcher, try running GParted again and see if it recognizes the drive. Then check the filesystem on the Ext4 partition (from within GParted.) It'll detect and repair any errors to the filesystem itself. After that, reboot again.

Your partition table is screwed up.

Looking at the output of sudo fdisk -l, I'd have to deduce that your partition table got corrupted. Try opening GParted and going to Device > Create Partition Table, then create a new msdos partition table (the default.) After that finishes, create a new EXT4 partition, but this time tell it to align to Cylinder instead of MiB. (You might lose a tiny bit of space, like .01 GiB tops.)
APPLY the partition creation, then expand the partition to the right, if there's any unused space an that side. (DO NOT move/expand to the left, this will defeat the point of aligning it to Cylinder.)

It seems that the drive shipped with a faulty partition table, which worked with the default formatting (somehow,) but failed when you tried to repartition it.

9
  • You really don't need to reboot the computer, you could just re(set)(boot)? the filesystems with sudo mount -a May 31, 2013 at 16:40
  • rebooting and reconnecting the hard drive didn't fix it.
    – Zamphatta
    May 31, 2013 at 16:41
  • @Zamphatta What is the output of sudo fdisk -l after a reboot? May 31, 2013 at 16:43
  • same output as it was before I rebooted. And no, GParted isn't showing the drive yet either.
    – Zamphatta
    May 31, 2013 at 16:57
  • @Zamphatta darn. I have to go, but try looking up how to use the command-line tool parted to create a new partition table on /dev/sdb. Try doing sudo parted /dev/sdb, then type mklabel msdos, then print and exit. Then reboot and see if GParted recognizes it. May 31, 2013 at 17:09
0

You could try disconnecting the external drive and then entering the following in a terminal:

tail -f /var/log/messages

This will give you a running commentary of what your machine is up to.

Reconnect your drive and see what (if anything) is happens here and if your machine is getting an error or anything when trying to read or mount the drive.

If nothing new appears here then see if any lights on the hard drive are coming on. Perhaps the USB element of the external hard drive enclosure has failed in some way.

I hope this at least points you in the right direction

3
  • Trying tail -f /var/log/messages returns tail: cannot open /var/log/messages' for reading: No such file or directory`. Nothing happened when I reconnected.
    – Zamphatta
    May 31, 2013 at 16:36
  • Sorry - try /var/log/syslog instead and you may need to sudo it Or /var/log/kern.log - it will show you if the drive is even appearing to the Kernel
    – Steve N
    May 31, 2013 at 16:39
  • I have a whole ton of error messages like failed in opening HIDDEV file: /dev/usb/hiddev0. No such file or directory in there. I'm guessing this is related?
    – Zamphatta
    May 31, 2013 at 16:50
0

Don't worry.. not setting a boot flag will not brick your drive (trust me-I've managed to think I've bricked more than one router!)

If your problem is having the drive mount upon boot, realize that the uuid changes upon format, so you will have to issue another sudo blkid and change /etc/fstab accordingly. So your new fstab might look something like this...

UUID={YOUR-UID}    {/path/to/mount/point}   ext4   defaults,errors=remount-ro 0 1

fill in the uuid with the results from sudo blkid and change your mount point path and you should be a-ok.

1
  • sudo blkid and /etc/fstab both only show the sda1 & sd5 partitions. I wouldn't have a clue what to add to it and I seriously can't risk mucking up my internal system 'til I can back stuff up.
    – Zamphatta
    May 31, 2013 at 16:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .