I want to change the data mount point into an image inside the actual data partition.
My stock fstab has this:
Code:
/dev/block/bootdevice/by-name/userdata /data ext4 noatime,nosuid,nodev,barrier=0,noauto_da_alloc,discard wait,check,encryptable=footer,quota
Would it work to do like this ?
Code:
/dev/block/bootdevice/by-name/userdata /pre_data ext4
/pre_data/media/0/data.img /data ext4 noatime,nosuid,nodev,barrier=0,noauto_da_alloc,discard wait,check,encryptable=footer,quota
It bootloops ...
Found out how to do it:
Changed the data mount point in the fstab
Code:
#from
/dev/block/bootdevice/by-name/userdata /data <options>
#to
/dev/block/bootdevice/by-name/userdata /preData <options>
Then I located the mount_all command on my init files, in my case it was in /vendor/etc/init/hw/init.target.rc, on fs and bind mounted /preData/a to /data :
Code:
#from
on fs
mount_all fstab.qcom
#to
on fs
mkdir /preData
chmod 771 /preData
chown system system /preData
mount_all fstab.qcom
mount none /preData/a /data bind
So the image is renamed from data.img to "a"?
Related
I have not seen these mount points posted anywhere for handy reference...
These are mount points for CWM and ADB
•mmcblk0p1 - Boot (vfat)
•mmcblk0p2 - Rom
•mmcblk0p3 - Device specific files (serial number, etc) and Factory.zip (flashable zip that returns NC to factory settings)
•mmcblk0p4 - Logical Partition (Nothing of use here)
•mmcblk0p5 - System
•mmcblk0p6 - Data
•mmcblk0p7 - Cache (vfat)
•mmcblk0p8 - Media (vfat)
These are mount points for Nooter .2
•mmcblk0p1 - SDCARD
•mmcblk1p1 - Boot (vfat)
•mmcblk1p2 - Rom
•mmcblk1p3 - Device specific files (serial number, etc) and Factory.zip (flashable zip that returns NC to factory settings)
•mmcblk1p4 - Logical Partition (Nothing of use here)
•mmcblk1p5 - System
•mmcblk1p6 - Data
•mmcblk1p7 - Cache (vfat)
•mmcblk1p8 - Media (vfat)
Lol, I thought this thread said "moot" points
modembug said:
I have not seen these mount points posted anywhere for handy reference...
Click to expand...
Click to collapse
Besides here, you mean?
Your info is wrong. mmcblk0 is the emmc. mmcblk1 is the sdcard.
Also, the stock file system types are ext2 for system, ext3 for data. Gingerbread uses ext4 for both.
dangit i suck! I looked on nook devs last night for that list and didnt find it!
I have updated the mount points to reflect both nooter and adb/cwm...
fattire said:
Besides here, you mean?
Your info is wrong. mmcblk0 is the emmc. mmcblk1 is the sdcard.
Also, the stock file system types are ext2 for system, ext3 for data. Gingerbread uses ext4 for both.
Click to expand...
Click to collapse
In the guide modembug linked on AndroidCentral (see here: http://forum.androidcentral.com/bar...how-install-nookie-froyo-internal-memory.html), it says to do this:
Code:
mount -o remount,rw /dev/block/mmcblk1 /
mkdir tmpfolder
mount /dev/block/mmcblk0p5 tmpfolder
cd tmpfolder
rm -r *
cd ..
mount /dev/block/mmcblk0p6 tmpfolder
cd tmpfolder
rm -r *
cd ..
umount tmpfolder
rmdir tmpfolder
Why is this necessary? Specifically, why the remount to rw of /, when you could just create a directory in /data for this purpose?
Also, why is it apparently not necessary to delete the contents of /boot (mmcblk0p1) but it is for /system and /data?
starkruzr said:
In the guide modembug linked on AndroidCentral (see here: http://forum.androidcentral.com/bar...how-install-nookie-froyo-internal-memory.html), it says to do this:
Code:
mount -o remount,rw /dev/block/mmcblk1 /
mkdir tmpfolder
mount /dev/block/mmcblk0p5 tmpfolder
cd tmpfolder
rm -r *
cd ..
mount /dev/block/mmcblk0p6 tmpfolder
cd tmpfolder
rm -r *
cd ..
umount tmpfolder
rmdir tmpfolder
Why is this necessary? Specifically, why the remount to rw of /, when you could just create a directory in /data for this purpose?
Also, why is it apparently not necessary to delete the contents of /boot (mmcblk0p1) but it is for /system and /data?
Click to expand...
Click to collapse
Boot gets overwritten data and system leave remnants i.e. dalvik cache which causes boot issues
Sent from my PC36100 using XDA App
I converted my card to ext4 and need to change the default mount options. Right now they are:
Code:
/dev/block/vold/179:33 /mnt/media_rw/sdcard1 ext4 rw,dirsync,context=u:object_r:sdcard_external:s0,nosuid,nodev,noexec,noatime 0 0
/dev/fuse /storage/sdcard1 fuse rw,nosuid,nodev,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
But I need to replace it with
Code:
/dev/block/vold/179:33 /storage/sdcard1 ext4 rw,noatime,nosuid,nodev wait
So far, everything I tried failed:
- Editing fstab.qcom is useless because it is being recreated at each boot.
- adding a umount/mount init script
Code:
#!/system/bin/sh
VOLD="$(mount | grep -E -o -m 1 ".{0,0}179:.{0,2}")"
sleep 8
su
umount /storage/sdcard1
umount /mnt/media_rw/sdcard1
mount -rw -t ext4 -o noatime,nosuid,nodev /dev/block/vold/$VOLD /storage/sdcard1
is also useless, because although it works, it only kicks in AFTER the system is already on the desktop, which is too late.
This is all on Android 4.3.1 (but it's the same story with 4.4)
Why I want to do it?
Because although ext4 sdcard is mounted fine with read and write, the system does not see it as external anymore. As a result, many, many apps just won't work claiming there is no sdcard in the system. Even DiskUsage app does not see it.
I suppose this is because it is mounted either with FUSE or remounted directly as ext4 too late (after the system completed boot).
Any ideas?
Hi, did anybody tried a sdcard with a fat and ext4 partition? I'm getting error "could not create target file" while writing to ext4.
I followed these steps:
Parted sdcard with parted from CWM Recovery. SDcard is ADATA MicroSDHC 64GB =2GB Fat, 62 GB EXT4
Code:
umount /storage/sdcard1
parted /dev/block/mmcblk1
mklabel
msdos
unit MB
print
mkpartfs primary fat32 0 2048
mkpartfs primary ext2 2048 67109
print
quit
Update FS to EXT4:
Code:
tune2fs -O extents,uninit_bg,dir_index /dev/block/mmcblk1p2
Set Journal to writeback mode:
Code:
tune2fs -O ^has_journal /dev/block/mmcblk1p2
tune2fs -o journal_data_writeback /dev/block/mmcblk1p2
Check FS:
Code:
e2fsck -f /dev/block/mmcblk1p2
Mount:
Code:
mount -t ext4 -o rw,nosuid,nodev,nodiratime,noatime,data=writeback,barrier=0,journal_checksum /dev/block/mmcblk1p2 /storage/sdcard1
Now when I copy from Internal sd to ext4, write error appear. Any solution?
Device: THL T100S
Chip: MTK 6592
Ram: 2GB
Android: 4.2.2
Rooted, Insecure boot.img
tony753 said:
Hi, did anybody tried a sdcard with a fat and ext4 partition? I'm getting error "could not create target file" while writing to ext4.
I followed these steps:
Parted sdcard with parted from CWM Recovery. SDcard is ADATA MicroSDHC 64GB =2GB Fat, 62 GB EXT4
Code:
umount /storage/sdcard1
parted /dev/block/mmcblk1
mklabel
msdos
unit MB
print
mkpartfs primary fat32 0 2048
mkpartfs primary ext2 2048 67109
print
quit
Update FS to EXT4:
Code:
tune2fs -O extents,uninit_bg,dir_index /dev/block/mmcblk1p2
Set Journal to writeback mode:
Code:
tune2fs -O ^has_journal /dev/block/mmcblk1p2
tune2fs -o journal_data_writeback /dev/block/mmcblk1p2
Check FS:
Code:
e2fsck -f /dev/block/mmcblk1p2
Mount:
Code:
mount -t ext4 -o rw,nosuid,nodev,nodiratime,noatime,data=writeback,barrier=0,journal_checksum /dev/block/mmcblk1p2 /storage/sdcard1
Now when I copy from Internal sd to ext4, write error appear. Any solution?
Device: THL T100S
Chip: MTK 6592
Ram: 2GB
Android: 4.2.2
Rooted, Insecure boot.img
Click to expand...
Click to collapse
are you sure your kernel supports ext4 SD partition ?
try leaving it as ext2 and mount as that see if error appears
if not then u can try ext3 and if no error stay with that
IGGYVIP said:
are you sure your kernel supports ext4 SD partition ?
try leaving it as ext2 and mount as that see if error appears
if not then u can try ext3 and if no error stay with that
Click to expand...
Click to collapse
Mount as EXT2 failed. e2fsck: Bad magic number in super-block
What I want to do is partition my sdcard into 2 parts, 1 fat32 and the second as ext3. Mount both partitions at startup so i get /sdcard (fat) and /sdcardext3 (ext). Then create 2 folders /sdcardext3/apps and /sdcardext3/apps-private then delete the /data/apps and /data/apps-private folders and replace them with links to the folders on the sdcard 2nd partition I just created. Is this possible? I guess I'll be having to muss around with fstab but I'm not too well versed on that. Anyone got any tips on how I can achieve this. I know there are apps like foldermount and link2sd but they only work on a per app basis, i want a full "do it and forget it" solution that doesn't rely on an app.
Cheers
EDIT:
I'm seeing these 3 lines in /init.rc
Code:
mount rfs /dev/stl11 /data nosuid nodev usedm check=no
chown system system /data
chmod 0771 /data
Is it possible to create and format an rtf partition on the sdcard, then extract, change and repack the ramdisk image with the following changes?
Code:
mount rfs /dev/block/vold/179:2 /data nosuid nodev usedm check=no
chown system system /data
chmod 0771 /data
To move the data folder completely off the phone internal memory. My phone only has 512MB and my external SD is 64GB so I won't cry at the wasted half a gig.
So far I've managed to:
extract the boot.img from the stock firmware I'm using. Using a linux box with abootimg installed (apt-get abootimg)
I split it up into the kernel (zImage) and the ramdisk (initrd.img) .
Unpacked and cpio-ed initrd.img to files.
Edited init.rc and found two instances of
Code:
mount rfs /dev/stl11 /data nosuid nodev usedm check=no
in the file
Replaced /dev/stl11 with /dev/block/mmcblk0p2 and replaced rfs with ext3.
Combined the kernel and ramdisk back together with gzip, cpio and abootimg (newboot.img) and dumped it onto the phone using adb along with the flash_image command (which wasn't on the phone as standard).
Had to copy flash_image (in fact I had to cat flash_image >/data/flash_image because there's no cp command as standard either) to /data as it needed executable privs, chmod 777 /data/flash_image to allow it to execute,
Then execute /data/flash_image boot /sdcard/newboot.img
Reboot phone
Phone;s stuck on the Samsung splash screen, pah. Was worth a try anyway.
Hi, i'm searching for the boot partition on Xperia mini pro and i can't find it. On other devices it's usually '/dev/block/mtdblockx' but on this device it's not.
There is no /boot directory at all. I'm wondering why we should use fastboot to flash boot.img instead of flashing it with the device itself ? (like some other devices)
I'm using Legacy xperia cm 13.0 and i this is 'fstab.semc' file in the root directory:
Code:
# Android fstab file.
#<src> <mnt_point> <type> <mnt_flags> <fs_mgr_flags>
# The filesystem that contains the filesystem checker binary (typically /system) cannot
# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK
/dev/null /boot mtd defaults defaults
/dev/null /recovery mtd defaults defaults
/dev/block/mtd/by-name/system /system yaffs2 ro wait
/dev/block/mtd/by-name/cache /cache yaffs2 rw,noatime,nosuid,nodev wait
/dev/block/mmcblk0p1 /data f2fs rw,discard,nosuid,nodev,noatime,nodiratime,inline_xattr wait,check,formattable
/dev/block/mmcblk0p1 /data ext4 noatime,nosuid,nodev,data=ordered,noauto_da_alloc,journal_async_commit,errors=panic wait,check
# Vold managed devices
/devices/platform/msm_hsusb_host.0* auto auto defaults voldmanaged=usb:auto
# zRAM
/dev/block/zram0 none swap defaults zramsize=134217728
How is this possible? Why it's pointing to /dev/null ?
I'm just wondering which partition fastboot uses to flash the kernel img ? And is this possible for us to find the partition and flash the kernel with phone using dd ?
Can anyone explain it to me?
Thank you.