Newly formatted ext4 is read only


F_Slim

IDDQD
Joined
Aug 25, 2010
Messages
1,430
Age
45
Location
Germany
Hi,

I'm a bit lost on this one:
I got a new 128GB SD card and want to create 2 partitions: half ext4, half fat32 (or anything else Windows likes).
Formatting seems to work fine, everything is ok with the fat32 partition, but the ext4 partition is read only!
fsck claims that everything is fine. I tried re-formatting (using gparted and also mkfs.ext4 on the commandline).
But I can still only mount as read only (drwxr-xr-x).
I also tried to format the entire card as ext2 or ext4. I obviously miss something. Do I need a special partition table? (I tried msdos and gpt)
Do I need a special driver?
 
You need to give your user permission to access the ext4 partition, (chown is your friend here) if you've not done that already.
 
Wow, I never even thought of my / folder having owner and perms, but 'ls -ld /' confirms is does. That not having root write or other read shouldn't stop you mounting it rw though - subfolders could have appropriate r/w/x perms, and though you'd have to guess your way in without other read perms, it could still be writable within.

What happens if you 'mount -o remount,rw' it?

Edit: Just noticed he's listing dir permissions, not mount options, so in all likelihood it's already mounted rw. Also, that dir perm he gave was read write as indicated by the letters r and w in it. Only question is who the owner is, as Wally already gave a fix for.
 
Last edited:
You could try sudo rm rf /*

;)

Note: Don't actually run this command unless you have really good backups - Binky
 
Last edited by a moderator:
I don't think ownership is a problem, all mount-points are owned by root:root. It just mounts it as read only. My 64GB SD-card has the same setup, a fat32 and a ext4 partition, I tried to do the same with the 128GB card to replace the 64GB for more space.

Checking dmesg (which I should have done earlier) yields:
mmc1: new high speed SDXC card at address 0007
mmcblk1: mmc1:0007 SD128 116 GiB
mmcblk1: p1 p2
FAT-fs (mmcblk1): bogus number of reserved sectors
FAT-fs (mmcblk1): Can't find a valid FAT filesystem
FAT-fs (mmcblk1): bogus number of reserved sectors
FAT-fs (mmcblk1): Can't find a valid FAT filesystem
EXT4-fs (mmcblk1p2): Unrecognized mount option "umask=0" or missing value
EXT4-fs (mmcblk1p2): mounted filesystem with ordered data mode. Opts: (null)

I don't get the FAT-part, since the fat32 partition is there and I can access it. Have I exceeded some size-limit, or should I use exFAT and install the exFAT driver on the Pandora?
The part from the EXT4 partition sounds like it might be the cause of the problem, but I have no idea what it means :$

You could try sudo rm rf /*

;)
It still sais "Permission denied" on the read only ext4 partition, but I gained a lot of space on my second SD-Card! :p:D
 
Ownership is the problem. You need to use chown to change ownership to your user:user, or whatever your user name is, not root:root.
 
ls -l /media/
total 40
drwxr-xr-x 3 root root 4096 Jun 12 10:22 EXT4
drwxrwxrwx 2 root root 16384 Jun 12 10:48 FAT32
drwxrwxrwx 4 root root 4096 Aug 8 2015 ext4
drwxrwxrwx 16 root root 16384 Jan 1 1970 fat32
drwxrwxrwt 2 root root 40 Jun 12 10:15 ram

First 2 are the new 128GB card, second 2 are my old 64GB card. Only the first partition gives me problems because (as you can see) it is mounted as read only.
If ownership is the problem, why only with this partition while all my other partitions are root:root and can be accessed?
 
Very strange, i only have ram partition as root:root.

Other EXT4 partitions i have on 2 SD cards are owned by canseco:users.

Only root or using sudo should be able to write to those partitions.
 
When i am right then should this solve your Problem:
Code:
 sudo chown hereyourUsername:users /media/hereNameOfDirectory

Had that Problem with some Ext Cards and this Command helped me everytime :)
 
well, chown myuser:users doesn't change anything, it is still mounted as read only. (No: chmod +w doesn't work either).
Code:
mount -o remount,rw,umask=000
tells me:
mount: /media/EXT4 not mounted already, or bad option
dmesg sais:
EXT4-fs (mmcblk0p1): Unrecognized mount option "umask=000" or missing value

I booted Linux on my laptop and tried to mount the SD card, and there it's also read only.
Something is wrong with formatting the card, but I have no idea what. I don't have too much experience with SD-cards and file systems. Is it possible that the card's controller does not support certain partition tables or file systems?
Do I have to do some voodoo with the partition table or use some advanced settings?
 
Is it still read only if you try to write to it as root?

If you can give us the output of a 'mount' call (with no arguments) that will settle whether it's actually mounted read only, or something else (probably simpler) is at fault.

Edit: I just checked the ownership of my /media folder contents, and my sd card was owned by levi:levi. I don't know offhand how the automounter decides what user to create mount points under - I don't use an automounter on my other devices. You say the chown command did nothing - did it report an error? Having a group called 'users' is unusual by the way. What OS are your running?
 
Last edited:
Mounting manually without options sais it can't recognize the filesystem, then tries ext4 and it actually mounts it as rw.
I even managed to wirte a file ...
Now I'm 100% confused.
Then why is it mounted as read only when mounting automatically? Even on different systems?

Probably I'll just give up on ext4 and just use exFAT. It will probably save me a lot of trouble.

EDIT: make that fat32 or ntfs, since there doesn't seem to be solid exFAT support on the Pandora ...
 
Last edited:
Did you try to answer any of the questions I asked in my previous post? Fair enough if you just use exFAT instead, but you've piqued my interest and I'd like to know what's going on now!
 
I run SuperZaxxon. Yes, the group "users" probably doesn't make any sense, I just picked it up from one of the posts above, it should be username:username.
When I said chown didn't change anything I meant to say that it made no difference. There was no error, ownership did change.
Maybe I'll read up on the topic and try again more systematically at some point.
 
YOu can always use sudo. That's how I usually access files on extX partitions and chown directories I want myself to be able to access.
 
I just had this. I chown'ed the mount point and then after restarting PNDManager, it suddenly decided to allow me to choose that partition as a valid location for installing software.
 
Back
Top