LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-22-2021, 10:14 PM   #1
Brusca.lyfe
LQ Newbie
 
Registered: Mar 2021
Posts: 5

Rep: Reputation: Disabled
mounting ext4 sdcard to work like a FAT32 sdcard


I have a rooted android 4.2.2 tablet. Some generic make up
My /data block is only 0.98gib of space but my internal sdcard is 27gb
I formatted my sdcard (flash memory) to ext4 and mounted the block onto the data mount AND /mnt/sdcard

My storage shows 27gb available for both my internal and flash (sdcard)
And everything runs as was
EXCEPT
Anything new file or folder created or moved on the sdcard comes with only read access. No write and no execute
Apks won't install, media won't play, and etc
UNLESS I manually chmod 777 the file or the entire directory but I can't chmod the entire sdcard because the block now shares memory with the /data and I don't want to mess with those automatic permissions
Changing the umask doesn't work and even if it did it doesn't stick after reboot
I can't get the right syntax for if,then,else statements for new files and directories or to run them every 5 seconds effectively

Basically I'm trying to be able to use my ext4 sdcard under the /mnt/sdcard like a fat32 or vfat without all doing too much work all the time

PS: Also now I can't edit shell scripts in the /system even with root,root explorer and mounting rw
I have to pull it out and edit it elsewhere then push it back. I can push, pull, cp, rm and rename all in the root explorer but not edit with text editor while inside the /system
 
Old 03-23-2021, 01:47 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,965

Rep: Reputation: 7332Reputation: 7332Reputation: 7332Reputation: 7332Reputation: 7332Reputation: 7332Reputation: 7332Reputation: 7332Reputation: 7332Reputation: 7332Reputation: 7332
it looks like a mount problem, probably it is mounted incorrectly. you need to check the permissions.
where did you change umask at all?
 
Old 03-23-2021, 07:25 AM   #3
Brusca.lyfe
LQ Newbie
 
Registered: Mar 2021
Posts: 5

Original Poster
Rep: Reputation: Disabled
It could be.
I changed umask with terminal emulator
I don't have a /etc/profile file for it
Also I mounted like this

Mount -t ext4 /dev/block/mtdblock9 /data
Mount -t ext4 /dev/block/mtdblock9 /mnt/sdcard

My vold.fstab hasn't been changed but it also doesn't seem to do anything anyway because I have to run a script at boot up to mount these and the good.fstab mounts the loops by name

Ex: dev_mount flash /mnt/sdcard auto /dev/block/mtd/by-name/user /dev/block/platform/emmc/by-name/user

I can't even find /dev/block/platform in root explorer so I think that vold.fstab is just a guide
 
Old 03-24-2021, 03:28 AM   #4
Gad
Member
 
Registered: May 2013
Distribution: FreeBSD
Posts: 566

Rep: Reputation: 114Reputation: 114
umask or permissions may solve the issue but best to be careful as to not break any filesystems that should be in the control of root
 
Old 03-24-2021, 12:29 PM   #5
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,844
Blog Entries: 1

Rep: Reputation: 2073Reputation: 2073Reputation: 2073Reputation: 2073Reputation: 2073Reputation: 2073Reputation: 2073Reputation: 2073Reputation: 2073Reputation: 2073Reputation: 2073
Maybe /etc/profile.local?:
Code:
umask 002
 
Old 03-24-2021, 07:00 PM   #6
Brusca.lyfe
LQ Newbie
 
Registered: Mar 2021
Posts: 5

Original Poster
Rep: Reputation: Disabled
Umask changes don't stick after reboot
And there's no profile for it at all
I'm on an Android 4.2.2 so the internal sdcard (flash) and internal memory (/data) are separate

I'm trying to combine them to try to emulate emulated storage like newer Android's

Any suggestions
 
Old 03-24-2021, 07:25 PM   #7
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,844
Blog Entries: 1

Rep: Reputation: 2073Reputation: 2073Reputation: 2073Reputation: 2073Reputation: 2073Reputation: 2073Reputation: 2073Reputation: 2073Reputation: 2073Reputation: 2073Reputation: 2073
Quote:
Originally Posted by Brusca.lyfe View Post
Umask changes don't stick after reboot
Of course not. They're applied at each login when new files are created. If permissions get changed by rebooting, some process is changing them that has nothing to do with umask silently doing its job properly.

When the EXT4 card is not mounted, what are the permissions on the directory to which it normally gets mounted?

When the EXT4 card is mounted to some arbitrary location, are its ownerships or permissions different from when mounted to the usual location?

If this EXT4 card is always to be mounted and used the same, why don't you create an /etc/fstab entry (by volume label, for adminstrative ease) for it with appropriate permissions?

If this EXT4 card is always to be mounted and used the same, why mount it in a generic location (aka /mnt*) where temporarily mounted devices are by convention routinely hosted?
 
Old 03-25-2021, 01:40 AM   #8
Brusca.lyfe
LQ Newbie
 
Registered: Mar 2021
Posts: 5

Original Poster
Rep: Reputation: Disabled
Because I really don't know what the f*** I'm doing
Which is why I'm here
The permissions are the same as the permissions for /data when mounted to /data
But he permissions and ownership when mounted to /mint/sdcard are
Drwxrwxrwx root:root and even if I change it, it changes back in like 5 seconds
I tried making my own vold.fstab in /etc but that doesn't seem to change anything

I'm thinking a device loop from /data/media/0 to /mnt/sdcard would work but then I'd have to make an .img fs in FAT32 and that would only be like partitioning the sdcard instead of actually combining like /storage/emulated/0 does

That's what I'm trying do
 
Old 03-26-2021, 10:20 AM   #9
Brusca.lyfe
LQ Newbie
 
Registered: Mar 2021
Posts: 5

Original Poster
Rep: Reputation: Disabled
Device loop to increase internal storage problems

Quote:
Originally Posted by rtmistler
Moderator edit: Moved from a different thread, this additional question should be addressed here.

@Brusca.lyfe, while I realize also that there was not any actual profanity in your recent post, please do be aware that going much farther is a violation of our site rules.
I'm running android 4.2.2 on a generic tablet.
My internal storage (/data) is only 0.98gb of space
My sdcard is 32gb
I created a device loop from an ext4 .img (on sdcard) that I made and mounted it on /data
Everything runs fine. Smooth and the system even recognizes that I have more storage
But for some reason every new app I install now is gone after reboot
I can reinstall it and all the data is still there but the app is gone

In terminal it shows I have 2 mounts of /data. Both reading the same amount of storage but 2 separate blocks are mounted there now
(The device loop and the special block)

Do I need to make a boot up script for the device loop or just amount the 0.98gb special block permanently?

I'm not sure how to do either. Or is there away to fix these apps not staying installed without doing either?

Last edited by rtmistler; 03-26-2021 at 04:30 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
current sdcard installs try to mount nonexistatnt sdcard justwantin Slackware - ARM 4 02-09-2021 02:15 AM
Mounting a USB disk: FAT32 ok, ext4 not... refaehei Linux - Hardware 12 07-02-2020 11:56 AM
[SOLVED] Prevent auto mounting Android sdcard under Linux Mint fakie_flip Linux - Software 2 04-18-2013 09:51 PM
Formating FAT32, but linux created FAT32 is not like win created FAT32?? Difference? boki15 Linux - Newbie 19 07-21-2010 04:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:08 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration