Saturday 17 November 2018

macos - OS X 10.6 Snow Leopard no longer mounting an external USB drive


I have a 1TB generic external hard drive containing a single HFS partition. I originally formatted this using Disk Utility and it worked fine. Now, for some reason, it's not auto-mounting when I start up.


Using mount at the command line gives the following error:


$ sudo mount /dev/disk1s2 /Volumes/Test
/dev/disk1s2 on /Volumes/Test: Incorrect super block.

... but if I use the mount_hfs command it works fine, mounts, and is readable.


$ mount_hfs /dev/disk1s2 /Volumes/Test/

fsck gives me an error about a bad super block:


$ fsck /dev/disk1
** /dev/rdisk1 (NO WRITE)
BAD SUPER BLOCK: MAGIC NUMBER WRONG

... but fsck_hfs -fn /dev/disk1s2 doesn't find any problems and reports that the volume appears to be OK.


In Disk Utility, the drive appears to have a single MS-DOS partition with a curious notice about how it appears to be partitioned for Boot Camp:


Screenshot


I have the Boot Camp HFS driver installed in WIndows 7, and that OS sees the drive/partition normally. What's wrong with my disk?



Answer



It looks like the problem was the partition table.


$ diskutil list
/dev/disk0 # The internal hard disk
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *500.1 GB disk0
1: EFI 209.7 MB disk0s1
2: Apple_HFS Macintosh HD 402.5 GB disk0s2
3: Microsoft Basic Data Boot Camp 97.1 GB disk0s3
/dev/disk3 # The external USB drive
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *1.0 TB disk3
1: EFI 209.7 MB disk3s1
2: Microsoft Basic Data 999.9 GB disk3s2
# ^-- Hey, that's not right!

The filesystem was intact, but the HFS+ partition on the external drive was mistakenly flagged as Microsoft Basic Data instead of Apple_HFS. I used the GPT fdisk utility to change its type back to HFS+, and it immediately appeared on the desktop and worked normally again.


No comments:

Post a Comment

Where does Skype save my contact's avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...