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

Questions about hardware, drivers and peripherals
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Hasaf

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

Post by Hasaf »

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?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
SimonTS

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

Post by SimonTS »

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.
linXea

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

Post by linXea »

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.
Hasaf

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

Post by Hasaf »

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.
hemimaniac

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

Post by hemimaniac »

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...........?
SimonTS

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

Post by SimonTS »

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.
Hasaf

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

Post by Hasaf »

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?
unexistance

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

Post by unexistance »

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,
SimonTS

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

Post by SimonTS »

@ 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.
DSpencer

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

Post by DSpencer »

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.
Locked

Return to “Hardware Support”