LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Mounting Hard drive partition as writable with -rw swich using mount command (https://www.linuxquestions.org/questions/linux-newbie-8/mounting-hard-drive-partition-as-writable-with-rw-swich-using-mount-command-528703/)

fultron 02-13-2007 12:03 PM

Mounting Hard drive partition as writable with -rw swich using mount command
 
I've been having problesm mounting /dev/hda2 as a read/write filesystem. I am pretty sure i am doing this right, and I have read the man file and googled for more information. Here is what i tried:

sudo mkdir /mnt/hda2
sudo mount /dev/hda2 /mnt/hda2 -rw
sudo chmod 777 /mnt/hda2

When I run the third command, I am told that the filesystem is mounted read only. Didn't the -rw switch mount it as read/write? What am I doing wrong?

nirmaltom 02-13-2007 12:22 PM

hi,
-r switch for read only
-w switch for read/write

dont give both
so either give -w or -o rw

regards,
Tom.

fultron 02-13-2007 12:28 PM

Quote:

Originally Posted by nirmaltom
hi,
-r switch for read only
-w switch for read/write

dont give both
so either give -w or -o rw

regards,
Tom.


Thanks for the response tom.

However, mount /dev/hda2 /mnt/hda2 -w still only mounts the partition read only. same with -o rw

Is there any UI in UBUNTU to do this?

nirmaltom 02-13-2007 12:47 PM

hi,
is the filesystem ntfs?
if not,give the mount command as

mount -t <fstype> -o rw <devicename> <mountpoint>

if ntfs,u have to download ntfs-3g driver.
regards,
Tom.

oskar 02-13-2007 12:47 PM

system - administration - disks.

Most of the time the auto detection feature works, but when in doubt specify the filesystem, like:
mount -t vfat ...
for example

edcompsci 07-14-2012 01:26 AM

just a note about mounting sd cards
 
I was having nothing but trouble for the longest time mounting my sd cards with my usb card reader and thought it was either my internal hardware or just Linux to blame. Even after I switched to a newer motherboard (to take advantage of hardware virtualization) the usb card reader didn't work well. I also often suspected the usb hub I use was to blame but then trying bypassing it I could still have trouble.

So what hasn't giving me any trouble at all with the card reader is I got an internal 3.5" card reader which includes a usb port on it, and every single time I plug my card reader into the usb port on the internal card reader it picks it up in a matter of seconds. Still, though on this new internal card reader, the actual sd card reader included on it doesn't seem to want to read any sd cards. Still, I am happy, no more toying for minutes to hours trying just to access my files, and yes I was trying to mount command and the different switches, and chown and chmod and ls /dev | grep sd and df and getting pretty frustrated.


This is on Ubuntu Lucid 64bit.

bcyork 08-14-2013 01:30 PM

I'm trying to do the same thing and keep getting read-only file system

Have mounted the drive with:
mount -t hfsplus -o rw /dev/sde2 /mnt/machd
mount -t hfsplus /dev/sde2 /mnt/machd -rw
(The MAN documents specify rw as for read/write not w by itself under the 'Mount Options')

I've tried chmod 777 the mounted drive and still get a read-only directory. Logged in as root, Debian 6. Any solution that doesn't involve using fstab?

Thanks
Brian

yancek 08-14-2013 02:47 PM

I don't use Debian but you might take a look at the link below. It's more likely a matter of not having the right programs installed to do this as Apple is notoriously proprietary. If the link below doesn't do it, I got a number of results from google with "hfsplus filesystem debian linux".

http://raamdev.com/2008/mounting-hfs...ess-in-debian/

lleb 08-14-2013 02:50 PM

Quote:

Originally Posted by fultron (Post 2629102)
Thanks for the response tom.

However, mount /dev/hda2 /mnt/hda2 -w still only mounts the partition read only. same with -o rw

Is there any UI in UBUNTU to do this?

if the automagically mounter did not detect the drive then no.

what type of drive is this? hda is typically IDE connection.

what is the file system type? ext2/3/4, NTFS, FAT32, other?

answer those questions and we will be more then happy to help troubleshoot what is going on.

also have you verified that the device is labeled /dev/hda# either via fdisk -l or by monitoring /var/log/messages as you connect the drive if it is external, if it is internal you will still find it there, but you will have to dig much deeper to locate the data.

bcyork 08-14-2013 06:13 PM

Hfs+ formatted 2.5" usb external drive

lleb 08-14-2013 08:11 PM

Quote:

Originally Posted by bcyork (Post 5009435)
Hfs+ formatted 2.5" usb external drive

ok so its formatted for OSx.

As you have not stated the flavor of linux you are using but you are issuing sudo commands im guessing you are running Ubuntu:

Code:

1) sudo apt-get install hfsplus hfsprogs hfsutils

2) mount -o force -t hfsplus /dev/XXX /mnt/foo

3) Enjoy

a fast google search for Hfs+ mount read write in Ubuntu came up with the above answer.

bcyork 08-15-2013 04:09 PM

Quote:

Originally Posted by lleb (Post 5009480)
As you have not stated the flavor of linux you are using but you are issuing sudo commands im guessing you are running Ubuntu:

Did in my first post. Debian 6. Perhaps I shouldn't hijack an old thread that came up in searches to be helpful for someone later.

Already tried the -o force option and even though it worked. It killed SSH and couldn't connect after.

lleb 08-16-2013 06:56 AM

Quote:

Originally Posted by bcyork (Post 5009994)
Did in my first post. Debian 6. Perhaps I shouldn't hijack an old thread that came up in searches to be helpful for someone later.

Already tried the -o force option and even though it worked. It killed SSH and couldn't connect after.

yes always a bad idea to hijack an other thread. well i will say this, HFS+ support in linux is more experimental then NTFS ever has been. i just use a mac and scp or rsync the data around that way i dont have to fight with the issues you are dealing with now.


All times are GMT -5. The time now is 07:33 AM.