External drive is read only, I want to write to it

Questions about hardware,drivers and peripherals
Forum rules
Before you post please read this

External drive is read only, I want to write to it

Postby Hasaf on Fri Apr 08, 2011 10:36 am

I have a Western Digital "My Book LX" WDBACH0020HAL. Before I left for China it was connected to my Mac and is formatted to, "hfsplus."

I am now here, in China and I have plugged it into my Linux computer. I can read it. However, I can not write to, or execute from, the drive.

I want to be able to write to the drive, as my plan was to use it to store photos, and the like, while here. I have tried chmod to no avail.

sudo chmod -v -rwx /media/My*
chmod: changing permissions of `/media/My Book': Read-only file system
failed to change mode of `/media/My Book' to 0000 (---------)


and

sudo chmod -v a=rwx /media/My*
chmod: changing permissions of `/media/My Book': Read-only file system
failed to change mode of `/media/My Book' to 0777 (rwxrwxrwx)


Both got me nowhere. Is there anything I can do (that will not destroy the data that is currently on the drive) to make the drive writeable?
Hasaf
Level 1
Level 1
 
Posts: 11
Joined: Fri Apr 01, 2011 6:12 am

Linux Mint is funded by ads and donations.
 

Re: External drive is read only, I want to write to it

Postby SimonTS on Fri Apr 08, 2011 10:56 am

Hi there,

There are certain issues with HFS file systems on Linux. The big question is "Does this drive of yours have journaling enabled?" If it does then you need to disable that from the MAC OS - I'd guess that it is as that seems to be the default.
User avatar
SimonTS
Level 6
Level 6
 
Posts: 1272
Joined: Thu Feb 24, 2011 5:19 pm
Location: Bristol, United Kingdom

Re: External drive is read only, I want to write to it

Postby linXea on Fri Apr 08, 2011 11:01 am

With root-account enabled in OSX and set root for the hfs+ formatted drive you should be able to cross-read/write between linux and OSX. I don't think any regular user-account will be able to write to the hfs+ partition only root, which is highly dangerous. The preferred thing to do would be to reformat the drive to a linux native format. In OSX you can activate ext2 support, to access and use linux drive permissions.
Image
Dektop: AMD Quad-Core, 4GB RAM, ATI HD3650silent, 33TB harddrive
Laptop: Lenovo Thinkpad x201, Intel core2centrino P9600, 4GB RAM, 750gb
User avatar
linXea
Level 3
Level 3
 
Posts: 182
Joined: Mon Aug 31, 2009 7:06 am
Location: Uppsala, Sweden

Re: External drive is read only, I want to write to it

Postby Hasaf on Fri Apr 08, 2011 11:12 am

Interesting suggestions. The only problem is that I do not have access to an OSx computer. Much like Linux, they are rarely seen other than in the hands of foreigners.

It looks like my only option may be to mail this drive back to the US and purchase another drive. . . not quite what I wanted to do.
Hasaf
Level 1
Level 1
 
Posts: 11
Joined: Fri Apr 01, 2011 6:12 am

Re: External drive is read only, I want to write to it

Postby hemimaniac on Fri Apr 08, 2011 11:27 am

Hasaf wrote:Interesting suggestions. The only problem is that I do not have access to an OSx computer. Much like Linux, they are rarely seen other than in the hands of foreigners.

It looks like my only option may be to mail this drive back to the US and purchase another drive. . . not quite what I wanted to do.


Well im sure you must know someone with a mac, pull the info off it then reformat to a fs that linux can use...........?
"Linux allows for one thing above all else - 'A user can truly be themselves!'"
Image
User avatar
hemimaniac
Level 5
Level 5
 
Posts: 508
Joined: Thu Feb 04, 2010 1:26 pm
Location: London ON

Re: External drive is read only, I want to write to it

Postby SimonTS on Fri Apr 08, 2011 11:40 am

Having a look around, there is a thing called "Linux HFS+ Support" which may or may not help - http://sourceforge.net/projects/linux-hfsplus/ Looks like it has been discontinued, but it's worth looking to see if it's in the repos or try downloading from here - http://www.ardistech.com/hfsplus/

There's also a hint from a Mac site - http://hints.macworld.com/article.php?s ... 0060024871 - concerning Truecrypt drive and turning journaling off, but it may help a little.
User avatar
SimonTS
Level 6
Level 6
 
Posts: 1272
Joined: Thu Feb 24, 2011 5:19 pm
Location: Bristol, United Kingdom

Re: External drive is read only, I want to write to it

Postby Hasaf on Fri Apr 08, 2011 8:34 pm

hemimaniac wrote:
Hasaf wrote:Interesting suggestions. The only problem is that I do not have access to an OSx computer. Much like Linux, they are rarely seen other than in the hands of foreigners.

It looks like my only option may be to mail this drive back to the US and purchase another drive. . . not quite what I wanted to do.


Well im sure you must know someone with a mac, pull the info off it then reformat to a fs that linux can use...........?


In fact, no. I am in China. As such, I know no one who uses a Mac; and, other than me, Linux. I once saw a Mac in a store in Xian, a major city about 12 hours away.

I also saw Linux in a computer at a different store in Xian once. Of course, the moment that the sales man saw me looking at it; and before I said anything, he assured me that if I actually purchased the computer they would remove the Linux and put Windows on it.

Thanks for the answers though, I suspected that the only solution involved purchasing another drive. Drives are expensive here (as are all computer parts) however, I will just have to give in and get one, now comes the challenging if trying to find one (and a bigger challenge, to find one that actually is what the vendor says it is).

What simple terminal commands would be recommended to check the drive information (ideally: size, manufacturer, series, and formatting). Also, what, other than quickly creating a folder and a file, should be done to insure that I can write to the drive?

*************

Here is a crazy question, Can I reformat the unused portion of the drive while leaving the data in the in-use portion of the drive intact?
Hasaf
Level 1
Level 1
 
Posts: 11
Joined: Fri Apr 01, 2011 6:12 am

Re: External drive is read only, I want to write to it

Postby unexistance on Fri Apr 08, 2011 11:24 pm

Hi,

I think you can safely try to install HFS support in mint, just do

- <Alt>+<F2>
- gksudo synaptic<Enter>
- Enter password
- Install hfs* (got three of them)
- re-login to be safe
- try putting in the drive

Regards,
:: Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved ::
unexistance
Level 5
Level 5
 
Posts: 646
Joined: Tue Aug 05, 2008 12:28 am
Location: Malaysia

Re: External drive is read only, I want to write to it

Postby SimonTS on Sat Apr 09, 2011 3:46 am

@ unexistance,

The problem seems to be, according to almost everything I've read, that Apple enable 'journaling' by default on their HFS+ drives, which is unable to be used by Linux as a read/write system - read only support.

@ Hasaf,

If you've got to send your existing drive back to the US, couldn't you get somebody there to purchase a new drive and send it to you - damn sight cheaper than buying one in China I'd have thought.
User avatar
SimonTS
Level 6
Level 6
 
Posts: 1272
Joined: Thu Feb 24, 2011 5:19 pm
Location: Bristol, United Kingdom

Re: External drive is read only, I want to write to it

Postby DSpencer on Sat Mar 30, 2013 6:17 pm

I realize that this is an old thread but I thought it might be useful to give, for possible future queries, my experience with this problem.
In my case I had decided to make a serious attempt to essentially replace my Mac mini and Mac OS X with Linux (and I've ended up with Mint) for nearly everything I did on my Mac, especially digitizing my large collection of vinyl LPs, plus gramophone records (and similar 78's) as well as some cassette tapes, and also for my digital photography. I had two external hard drives connected (through usb) to my Mac mini, the larger one being a 2 TB drive that is really an internal 3.5" hard drive but in a dock. This drive has three hfsplus partitions and initially I had no problems mounting them (automatically) as 'rw' in my new Mint KDE system. Then one day I tried to write to one of those partitions and it failed. I checked with 'mount' and discovered that 2 of the hfsplus partitions had mounted 'rw' (as usual) but one was now 'ro'. So I messed around with partitions, mounting the partition with 'pumount' and "w", mounting it as root as "w'" and nothing succeeded. I fooled around with permissions and nothing. Finally I connected the dock with that drive to my MacBook, opened up 'Disk Utility' and had it repair that partition. In the first pass it said it corrected partition table errors but that the partition was too badly damaged for it to fully repair. I ignored that ominous warning and had 'Disk Utility' try again, and it was in fact able to fix it. When I moved the dock and drive back to my linux box the 'bad' partition mounted fine, and as 'rw'.
So at least in my case the failure to mount the one external hfsplus partition properly (as 'rw') was in fact only because the partition had errors. And so my suggestion to anyone else with this problem is to first try to repair the bad drive/partition. As the original poster noted, being in China he has essentially no access to Macs (because they are very uncommon and if he is 12 hours outside of Xi'an then he must be in the western boonies of China)) and I suspect linux is much the same. However, if you install, on your linux system, the package called 'hfsprogs' (and of course you must already have the package 'hfsplus' installed to mount those partitions) but 'hfsprogs' gives you two utilities, "fsck.hfsplus" and "mkfs.hfsplus", with the first being what you need here, the version of 'file system check' that knows hfsplus formats. You would mount the drive to find out what device it is assigned (so for me it happened to be "/dev/sdc2"), then umount that partition and run 'fsck.hfsplus' on the partition, of course in a terminal window.
There are certainly possible complications in setting up any removable drive (including usb thumb drives, memory cards, and so on) with journalling, if you actually connect that device up to more than one computer. I found that out the hard way with a usb memory stick and I believe that the problem is that when drives are journalled there is some information specific to the host computer written to the storage device. When you move it around to different systems apparently things can go wrong eventually.
DSpencer
Level 1
Level 1
 
Posts: 8
Joined: Tue Aug 19, 2008 4:10 pm
Location: Fall River, Nova Scotia, Canada

Linux Mint is funded by ads and donations.
 

Return to Hardware Support

Who is online

Users browsing this forum: No registered users and 8 guests