20070519 mounting usb hard drive formatted ntfs - plembo/onemoretech GitHub Wiki

title: mounting usb hard drive formatted ntfs link: https://onemoretech.wordpress.com/2007/05/19/mounting-usb-hard-drive-formatted-ntfs/ author: lembobro description: post_id: 712 created: 2007/05/19 00:06:00 created_gmt: 2007/05/19 00:06:00 comment_status: open post_name: mounting-usb-hard-drive-formatted-ntfs status: publish post_type: post

mounting usb hard drive formatted ntfs

Got myself into this jam when I set perms on my Western Digital “My Book” portable usb hard drive.

Out of the box, the “My Book” comes formatted FAT32, which Linux can read and write to. My CentOS workstation recognizes and automounts the drive using Nautilus in my nonpriviledged user session. An ls -l shows the disk as being owned by me, the session user.

Under these circumstances in is A VERY BAD THING ™ to try and impose ext3 permissions on any disk file. Basically it hoses the disk formatting and makes it unwritable either in Linux or Windows. Me, I did a “chown -R me:me *” at the disk root, followed by a “chmod -R ugo+rw *”. Real smart.

Because I had alot of data on the disk I though I’d try my luck at converting it to NTFS from a Widows machine. As I expected, the filesystem was repaired, but now the disk was coming up “Read-Only” when mounted by Nautilus. A simple umount and then mount as root didn’t fix the problem (I created a directory called /media/usbdisk to mount /dev/sdb1 on).

Then I read up on the ntfs-3g driver.

mount -t ntfs-3g /dev/sdb1 /media/usbdisk -o force

I did get this error message:

$LogFile indicates unclean shutdown (0, 1)WARNING: Forced mount, reset $LogFile.WARNING: Deficient Linux kernel detected. Some driver features are         not available (swap file on NTFS, boot from NTFS by LILO), and         unmount is not safe unless it’s made sure the ntfs-3g process         naturally terminates after calling ‘umount’. If you wish this         message to disappear then you should upgrade to at least kernel         version 2.6.20, or request help from your distribution to fix         the kernel problem. The below web page has more information:         http://ntfs-3g.org/support.html#fuse26

But when I checked, the disk was now fully writable by root.

While this was an oh-so-fun exercise, my plan is to backup the usb disk and then wipe it clean by restoring it’s original FAT32 formatting. The moral of the story is to always
read the directions” — of course in this case there were no directions because WD refuses to acknowledge the existence of the Linux operating system. Well, now you’ve been warned.

Copyright 2004-2019 Phil Lembo