looks like my SGS2 corrupted it's /system and /data ext4 partitions so now they're read-only:
/dev/block/mmcblk0p9 /system ext4 ro,relatime,barrier=1,data=ordered 0 0
/dev/block/mmcblk0p10 /data ext4 ro,nosuid,nodev,noatime,barrier=1,data=ordered,noauto_da_alloc,discard 0 0
so now it's pretty much unusable.
how can I force fsck of those partitions or otherwise remount them as read-write?
borism3000 said:
looks like my SGS2 corrupted it's /system and /data ext4 partitions so now they're read-only:
/dev/block/mmcblk0p9 /system ext4 ro,relatime,barrier=1,data=ordered 0 0
/dev/block/mmcblk0p10 /data ext4 ro,nosuid,nodev,noatime,barrier=1,data=ordered,noauto_da_alloc,discard 0 0
so now it's pretty much unusable.
how can I force fsck of those partitions or otherwise remount them as read-write?
Click to expand...
Click to collapse
Hmm ... let me guess ...
You have a real problem, if you want to keep the information in those partitions.
I would recommend to make a factory reset and flash the ROM you want to have with pit file and re-partion option in Odin.
Good luck !
I have same problem,
So there is no solutions at all?
What about booting into recovery then using a adb shell to run fsck on the partitions.
Note system is supposed to be read only but it couldn't hurt to check it.
If you are reading this, DON'T TRY IT UNLESS IT'S VERIFIED BY SOMEONE IN THIS THREAD.
First of all, this is my first post here in xda, so I'll try it to be as helpfull as possible to other users doing a guide of how to backup your international i9100 to an Odin flashable rom, so you can restore all of your configurations at once, including installed programs, accounts... everything in your phone.
But why? I want to backup my S2 to an Odin rom before I try ICS 4.0.3, because it could take my several ours to restore everything to the way it was before updating in case I don't like it. Yes, I know what Titanium backup is, I have my phone rooted and I do a programmed backup each day at 3am. But I still want to be able to do it in just ONE step with Odin without dealing with Titanium backup's filters and system's apps.
So it's a great way to restore your phone to it's previous state for all of you that install a new rom and doesn't like how it works, or may be you are having issues after upgrading, or just want to take a look and go back quickly. Just one step and three minutes with Odin.
But in the case of ICS 4.0.3 you have to repartition your phone both ways, when upgrading and when downgrading, and that's first rule of the Odin's club: Don't touch the repartition option (of course, it's also second rule ).
Anyway, I'm posting a guide to do it in i9100 that HAS TO BE VERIFIED by someone with enough knowledge about how the partitioning works. It must work fine if you stay between 2.x versions without repartitioning, but as I told before, I don't know for sure, as I'm a bit confused about which partition is each one and which ones are needed to be backed up.
So please, if someone has enough knowledge to do it safely, post a reply with corrections to this method.
Here is the guide
HOW TO BACKUP A PARTITION
To backup a partition, you must open a terminal emulator, or conect from your computer via adb shell, and use dd command (duplicate disk) in su mode to create a backup of your partitions. Don't ask me how, if you don't know, you shouldn't be reading this. You will compress them later to load them in Odin.
ABOUT PARTITIONS
Each device has different names for the same partitions. For example, /system partition might be /dev/block/mmcblk0p9 in i9100, but in Samsung Continuum it's /dev/block/stl9.
So, in Galaxy SII partitions are (taken from here by HellcatDroid)
To see them in your device, open an adb shell, and type cat /proc/mounts. If you do it in i9100, you will find something like this:
Code:
~ # cat /proc/mounts
cat /proc/mounts
rootfs / rootfs ro,relatime 0 0
tmpfs /dev tmpfs rw,relatime,mode=111 0 0
devpts /dev/pts devpts rw,relatime,mode=600 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,relatime 0 0
none /acct cgroup rw,relatime,cpuacct 0 0
tmpfs /mnt/asec tmpfs rw,relatime,mode=755,gid=1000 0 0
tmpfs /mnt/obb tmpfs rw,relatime,mode=755,gid=1000 0 0
tmpfs /mnt/usb tmpfs rw,relatime,mode=755,gid=1000 0 0
tmpfs /app-cache tmpfs rw,relatime,size=7168k 0 0
none /dev/cpuctl cgroup rw,relatime,cpu 0 0
[B]/dev/block/mmcblk0p9 /system ext4 ro,relatime,barrier=1,data=writeback,noauto_da_alloc,discard 0 0
/dev/block/mmcblk0p7 /cache ext4 rw,nosuid,nodev,noatime,barrier=1,data=writeback,noauto_da_alloc,discard 0 0
/dev/block/mmcblk0p1 /efs ext4 rw,nosuid,nodev,noatime,barrier=1,data=writeback,noauto_da_alloc,discard 0 0
/dev/block/mmcblk0p10 /data ext4 rw,nosuid,nodev,noatime,barrier=1,data=writeback,noauto_da_alloc,discard 0 0
/dev/block/mmcblk0p4 /mnt/.lfs j4fs rw,relatime 0 0[/B]
So... How do I backup partitions
According to HellcatAndroid, and for Galaxy S2 i9100, you have to backup using this commands:
Code:
dd if=/dev/block/mmcblk0p1 of=/sdcard/p1-EFS.img bs=4096
dd if=/dev/block/mmcblk0p4 of=/sdcard/p4-PARAM.img bs=4096
dd if=/dev/block/mmcblk0p5 of=/sdcard/p5-KERNEL bs=4096
dd if=/dev/block/mmcblk0p8 of=/sdcard/p8-MODEM.bin bs=4096
dd if=/dev/block/mmcblk0p9 of=/sdcard/p9-FACTORYFS.rfs bs=4096
dd if=/dev/block/mmcblk0p12 of=/sdcard/p12-HIDDEN.img bs=4096
but as you see, not all of them are visible, but all of them will backup.
Some authors also claim you need to mount filesystem as RW (mount -o rw,remount /dev/block/mmcblk0p9 /system). It worked for me without mounting it as RW.
Someone please confirm this step is enough to backup everything, and there is no need to remount as RW.
If you want to backup your data, run Someone please confirm this step is correct
Code:
dd if=/dev/block/mmcblk0p10 of=/sdcard/p10-DATA bs=4096
Creating Odin image
Next step is to create the tarball of the dumped partitions. Copy or move the generated .img files to another folder, and create the tarball typing the following command into a linux terminal (you can do it in a VM or in cywin):
Code:
tar -H ustar -c p9-FACTORYFS.rfs p8-MODEM.bin p5-KERNEL > i9100backup.tar
If you want to add your data, you must run instead Someone please confirm this step is correct
Code:
tar -H ustar -c p9-FACTORYFS.rfs p8-MODEM.bin p5-KERNEL p10-DATA > i9100backup.tar
After that, add the md5 checksum:
Code:
md5sum –t i9100backup.tar >> i9100backup.tar
mv i9100backup.tar i9100backup.tar.md5
And that's all, i9100backup.tar.md5 is your Odin rom.
CONSIDERATIONS IF YOU ARE MOVING TO ICS FROM GINGERBREAD AND BACK
Someone please confirm this step is correct
When you upgrade to ICS, you have to tick repartition option, and do it again when downgrading. So you will need a .PIT file with information about your partition table to be able to do it right without bricking your phone.
So if you want to enable your rom to be used for a downgrade from ICS, you must run
Code:
dd if=/dev/block/bml2 of=/sdcard/FILENAME.pit bs=4096
and add it to the rom when creating the tarball. READ BELOW
In this case, bml2 is for Galaxy S, NOT FOR GALAXY S2 I9100, so please someone help finding i9100 filesystem.
WARNING
Doing this step wrong, can brick your phone permanently.
Sources:
How to build ODIN flashable ROMs for Samsung Galaxy S Series
[Q] How to Backup and Restore Original Shipped Firmware? For warranty.
Creating Custom ROMs/Backups for Odin
Why just not use CWM to make a backup. Then flash a ROM from Intratech them recover your backup.
Sent from my GT-I9100 using XDA App
Odd guide post to help other users when the OP requires confirmation of a number of commands from others its pointless .
New phone download your firmware from branded provider roms post or via CHECKFUS .
Or a stock rom ..
You can then flash roms or not .
jje
That will leave you with the backup you did with cwm, just like you were, without the possibility to try ics due to the repartition issue. Also, with a new rom, cwm version might be changed, and backups from older versions won't work.
I've tagged the thread as question, not as guide. Maybe the title is a bit confusing but I'm looking for help from someone who knows better than me to make a guide to backup with odin, with repartition included, and safely. It could be really useful during transition to first versions if ICS.
Any help with partitions in i9100, Odin ant .PIT files is appreciated.
First of all I can say one thing - it is ALWAYS better to dump read only partition. So mounting /system as RW is a BAD idea. Well. you can't mounta ll partitions as R/O because phone is using them and you could break something, but where you can (system) dump while it's mounted as read only. Dumping restoring read-write partition will cause a possible lost blocks and will force a check, which will hopefully fix file system without permanent damage.
Now I was searching for information about i9100 partitions and backup/restore using dd and odin (or restore via something else). It's easy to answer Why, not easy to answer how.
Why?
1. Updating kernel image voids the phone warranty. So if you use CWM to make a backup - you already updated the kernel and you will be backing up the updated kernel.
1a. You'll say "you can use stock image". Well yes, but the phone has a serial number, from which they can see exactly which version your software should be. I've searched about sock kernels and they do not provide all versions of stock kernels. Yes, there is almost no difference in how your phone behaves if you don't get exact version for your location, but they will know that you've updated the kernel -> no warranty
2. Come one guys DD is universal. It's format doesn't change, simply because it's raw 1:1, byte-to-byte copy. I've already tried to use backup tools and they don't even detect if the phone, software, OS and kernel are the correct versions to allow backup. Sometimes they crash. When using dd it is all in your hands. If there is a mistake - it's yours. Yes, big responsibility, but it's the only way to be sure when you are about to update kernel.
3. For dd you need root. Yes, but root is reversable. you can restore the system like it was before rooting.
However...
Partitioning is kind-a tricky. I couldn't find any information about partitioning, partition files (.pit) and how to make them. Maybe it's because in forums read a lot of noobs and developers don't post that kind of info to save them troubles.
Are you sure that this is correct for galaxy S:
dd if=/dev/block/bml2 of=/sdcard/FILENAME.pit bs=4096
do they have a partition to store partition information ... that would be stupid
I wander what will happen if I dump the whole drive - like:
dd if=/dev/block/mmcblk0 of=/sdcard/galaxyS2.img bs=4096
Is there a way to make a restore script and run it in recovery mode. I guess I can compile/find static version of dd, but I'm not sure how recovery scripts work.
I'll appreciate Some links that lead to the right readings about making recovery images/scripts for update...
I'm trying to port CWM for my device.
I need to replace iunin with CWM.
The problem is that I cannot extract the recovery img. I have a recovery.img but cannot edit/mount it (tried as ext2/3/4, gzip and so on).
Recovery is flashed as fastboot flash recovery.img (what type of image is this .img file??).
Here are is the recovery fstab:
Code:
# mount point fstype device
/sdcard vfat /dev/block/mmcblk1p1
/system ext4 /dev/block/mmcblk0p2
/cache ext3 /dev/block/mmcblk0p4
/data ext4 /dev/block/mmcblk0p3
/kernel mtd kernel
/ramdisk mtd ramdisk
/misc mtd misc
/boot mtd boot
/recovery mtd recovery
/bootloader mtd bootloader
/radio mtd radio
I have read http://android-dls.com/wiki/index.php?title=HOWTO:_Unpack,_Edit,_and_Re-Pack_Boot_Images and similar posts but they don't work for me (no Android magic...).
Please point me in the right direction, how to mount this recovery.img file - that's all I need.
Thank you!
mexusbg said:
I'm trying to port CWM for my device.
I need to replace iunin with CWM.
The problem is that I cannot extract the recovery img. I have a recovery.img but cannot edit/mount it (tried as ext2/3/4, gzip and so on).
Recovery is flashed as fastboot flash recovery.img (what type of image is this .img file??).
Here are is the recovery fstab:
Code:
# mount point fstype device
/sdcard vfat /dev/block/mmcblk1p1
/system ext4 /dev/block/mmcblk0p2
/cache ext3 /dev/block/mmcblk0p4
/data ext4 /dev/block/mmcblk0p3
/kernel mtd kernel
/ramdisk mtd ramdisk
/misc mtd misc
/boot mtd boot
/recovery mtd recovery
/bootloader mtd bootloader
/radio mtd radio
I have read http://android-dls.com/wiki/index.php?title=HOWTO:_Unpack,_Edit,_and_Re-Pack_Boot_Images and similar posts but they don't work for me (no Android magic...).
Please point me in the right direction, how to mount this recovery.img file - that's all I need.
Thank you!
Click to expand...
Click to collapse
Just to clarify you are trying to mount the recovery.img on your PC?
thewadegeek said:
Just to clarify you are trying to mount the recovery.img on your PC?
Click to expand...
Click to collapse
Yeah I'm trying to mount the recovery.img and replace iunin recovery files with cwm's files.
I tried:
gunzip -c ../your-ramdisk-file | cpio -i
gzip: recovery.img: not in gzip format
cpio: premature end of archive
./split_bootimg.pl recovery.img
Android Magic not found in recovery.img. Giving up.
Also I don't have /dev/mtd/ ....
I've attached the recovery.img file if someone want's to check it out.
EDIT: I tired dsixda-Android-Kitchen and still cannot mount/unpack recovery.img.
EDIT2: List of other files in the update.zip:
zImage-GB-v746-2703 - KERNEL
system-GB-1.3-2703.ext4 (EXT4 image) - System
ramdisk-uboot-GB-1.3-2703.img - ramdisk
ramdisk-recovery-uboot-GB-1.0.img - recovery
Link to the whole firmware: https://dl.dropbox.com/u/41124284/A8HD/Firmware/um2703-GB-1.3-sdUp-381.zip
Please help me.
Could someone please help me with this recovery.fstab file for the hisense sero 7 lt tablet? It looks like the partitioning is messed up but im not completely sure. Im trying to make a partition file for android kitchen and thats why i need help with this recovery.fstab.
i cant attach the recovery.fstab so i'll copy and paste whats in it
recovery.fstab
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
/boot mtd boot
/cache ext4 /dev/block/mtd/by-name/cache
/data ext4 /dev/block/mtd/by-name/userdata
/kernel mtd kernel
/misc mtd misc
/recovery mtd recovery
/sdcard vfat /dev/block/mtd/by-name/user lun=/sys/class/android_usb/android0/f_mass_storage/lun/file
/external_sd vfat /dev/block/mmcblk0p1 /dev/block/mmcblk0 lun=/sys/class/android_usb/android0/f_mass_storage/lun1/file
/sd-ext auto /dev/block/mmcblk0p2
/system ext4 /dev/block/mtd/by-name/system
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Thank you for helping me!!
Well, I'm also in the progress of trying to figure this out, but try this:
get an ADB shell, or use a terminal app from the Play Store,
and execute:
Code:
cat /proc/mtd
That should give a list of partitions and their dev codes.
Tip: when posting files or code, try to make use of the code tags,
text inside them will be displayed with a monospaced font, so things will be more readable.
See more info here.
Thanks for the tip and I figured it out by using
cat /proc/partitions and cat /proc/mtd
Click to expand...
Click to collapse
those commands gave me the names of the partitions and what block number they are. Credit goes to Abdul_pt for giving me the partitions command credit goes to you hamc0re for helping me with the mtd command
Sent from my Amazon Otter2 using Tapatalk
Hey guys, I was recently given a Galaxy Tab 3 Lite (SM-T110) and have found very little roms considering its an old tablet and none are with my latest stock firmware. That said, I'm trying to implement this tablet into dsixda's kitchen but am having a little bit of trouble.
I have set up the kitchen successfully on Windows 10 using cygwin and have even complied a rom successfully but the problem is when I flash it it gives me errors about boot.img mounting points. I pretty much have 3 questions:
1. Cant find my boot mnt point and was wondering if someone can help me find it? (ill attach my recovery.fstab file in the bottom for you to see)
2. Dont really know if I need that "fix_boot2=yes" line? "fix_boot=yes" line? Or none? How can I tell if i need it?
3. Since boot mount point is not inside recovery.fstab file, does that mean it is not need to be mentioned?
I made a file called "goyawifi" inside the edify_defs folder with the following info inside it:
# Samsung Galaxy Tab 3 Lite SM-T110
change_mnt=yes
param1=ext4
param2=EMMC
param1_sdcard=vfat
param2_sdcard=MTD
sys_mnt=\/dev\/block\/mmcblk0p15
cache_mnt=\/dev\/block\/mmcblk0p14
boot_mnt=\/dev\/block\/mmcblk0p15
data_mnt=\/dev\/block\/mmcblk0p16
sdcard_mnt=\/dev\/block\/mmcblk1p1
fix_boot2=yes
And this is my recovery.fstab info:
#mount point fstype device [device2]
/mrd emmc /dev/block/mmcblk0p1
/mrd1 emmc /dev/block/mmcblk0p2
/mep2 emmc /dev/block/mmcblk0p3
/efs ext4 /dev/block/mmcblk0p4
/dtim emmc /dev/block/mmcblk0p5
/recovery emmc /dev/block/mmcblk0p9
/kernel emmc /dev/block/mmcblk0p10
/radio emmc /dev/block/mmcblk0p11
/custom ext4 /dev/block/mmcblk0p12
/preload ext4 /dev/block/mmcblk0p13
/cache ext4 /dev/block/mmcblk0p14
/system ext4 /dev/block/mmcblk0p15
/data ext4 /dev/block/mmcblk0p16 length=-16384
/sdcard vfat /dev/block/mmcblk1p1 /dev/block/mmcblk1
/mnt/sdcard vfat /dev/block/mmcblk1p1 /dev/block/mmcblk1
Can anyone please help me to start customizing/flashing my rom? Thanks in advance...
FWI: When I say "successfully compiled a rom" I mean that the kitchen makes a rom, but upon flashing it, it gives me an error. Something about boot.img not mounted right
Bump! 45 views and no replies? So many developers here, surely someone knows the answer to my problems
Tried again to build a rom using dsixda's Android Kitchen, would like to find boot mount points... can anybody help?
Sorry, I don't have this device to test, but I think you should check "/kernel emmc /dev/block/mmcblk0p10"
Here should be the kernel image and maybe not the whole boot.img !
As you already know , boot.img have a kernel image and a ramdisk .... but on your device , ramdisk may be under /system ... I'm not 100% sure ... but from what you've posted so it seems !
So, there is no partition on your device for boot.img ... anyway you can make a custom rom also in this case, but you should know how to flash the new kernel image and also the ramdisk !
Unfortunately Samsung has made this device quite difficult for development, but not impossible .
Good luck !