usb otg multi-partitions HDD - Moto G 2014 LTE Q&A, Help & Troubleshooting

I can mount hdd(ntfs), but only one partition display.
So, how to mount multi-partitions HDD?

I cant solve it...
help me @LuK1337
179 64 15558144 mmcblk1
179 65 15554048 mmcblk1p1
8 0 976729088 sda
8 1 190258176 sda1
8 2 157300736 sda2
8 3 629166080 sda3
[email protected]_ds:/ # mkdir -p /storage/usbdisk 1
[email protected]_ds:/ # mount -o rw -t ntfs /dev/block/sda2 /storage/usbdisk1
mount: No such device
255 | [email protected]_ds :/ # >

bushibaa said:
I cant solve it...
help me @LuK1337
179 64 15558144 mmcblk1
179 65 15554048 mmcblk1p1
8 0 976729088 sda
8 1 190258176 sda1
8 2 157300736 sda2
8 3 629166080 sda3
[email protected]_ds:/ # mkdir -p /storage/usbdisk 1
[email protected]_ds:/ # mount -o rw -t ntfs /dev/block/sda2 /storage/usbdisk1
mount: No such device
255 | [email protected]_ds :/ # >
Click to expand...
Click to collapse
Apparently we do not support ntfs formatted partitions, I'll try to fix that later.
nevermind, we are supporting it.
Try ntfs-3g /dev/block/sda2 /storage/usbdisk1

LuK1337 said:
Apparently we do not support ntfs formatted partitions, I'll try to fix that later.
nevermind, we are supporting it.
Try ntfs-3g /dev/block/sda2 /storage/usbdisk1
Click to expand...
Click to collapse
But the first partition(ntfs) of the hdd displays in mixplorer. I want to mount other partitions. And ntfs-3g still not working.
Thank you!

bushibaa said:
But the first partition(ntfs) of the hdd displays in mixplorer. I want to mount other partitions. And ntfs-3g still not working.
Thank you!
Click to expand...
Click to collapse
Well I mounted my 2 ntfs partitions without any problem so I dunno.

Related

[Q] app2SD - can't mount ext2 partition

Hi, I have an unlocked, rooted Milestone running 2.1-update1.
I am having some issues getting App2SD up and running.
Everything seems to be working fine except for one piece:
I can't mount the ext2 partition of my SDCard.
I have a 16gb sdcard, formatted with two primary partitions, 14.5gb for FAT32 and 1.5gb for ext2.
busybox was installed ok, all the shell scripts seem to have installed fine as well, however, in order for it to work, the "mount_sd.sh" script has to be able to mount the second partition in order to link /data/app to it - but the damn thing won't mount.
I have tried re-partitioning the SD card multiple times, using multiple different partitioners (gparted in Ubuntu, Minitool in XP, even fdisk in the Android shell itself...) but nothing seems to work - I always get the same error:
Code:
# mount -t ext2 /dev/block//vold/179:2 /system/sd
mount -t ext2 /dev/block//vold/179:2 /system/sd
mount: No such device
The device however, most certainly DOES exist:
Code:
# ls /dev/block//vold
ls /dev/block//vold
179:2
179:1
179:0
I have seen that some people use the /dev/block/mmcblk0 instead of /dev/block//vold/179 - I am unsure as to why (anyone know which one I should be using on the Milestone???) but I tried that as well:
Code:
# mount -t ext2 /dev/block/mmcblk0p2 /system/sd
mount -t ext2 /dev/block/mmcblk0p2 /system/sd
mount: No such device
Again, it tells me the device doesn't exist, when it clearly DOES:
Code:
# ls /dev/block/mmc*
ls /dev/block/mmc*
/dev/block/mmcblk0
/dev/block/mmcblk0p1
/dev/block/mmcblk0p2
When I try to verify the partitions are there in the ADB shell, it looks like /dev/block//vold/179 doesn't exist or is some kind of special device (incidentally, does anyone know wtf the double slashes "//" are for?):
Code:
# fdisk /dev/block//vold/179
fdisk /dev/block//vold/179
fdisk: can't open '/dev/block//vold/179'
However, I CAN fdisk /dev/block/mmcblk0, and it gives me the following partition table:
Code:
# fdisk /dev/block/mmcblk0
fdisk /dev/block/mmcblk0
...snip...
Disk /dev/block/mmcblk0: 16.0 GB, 16039018496 bytes
255 heads, 63 sectors/track, 1949 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/block/mmcblk0p1 1 1762 14153233+ b Win95 FAT32
/dev/block/mmcblk0p2 1763 1949 1502077+ 83 Linux
So, it looks like /dev/mmcblk0 is the correct block device, however, mount tells me this:
Code:
# mount
mount
...snip...
/dev/block//vold/179:1 /sdcard vfat rw,dirsync,nosuid,nodev,noexec,uid=1000,gid=101
020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
So, mount is telling me that the first partition is mounted onto /sdcard from /dev/block//vold/179:1
I am confused. The only thing left I need to do in order to get App2SD working on my Milestone, is to mount the bloody second partition of my SD card and link it to the file system, yet the damn thing refuses to mount.
Does anyone know where I am going wrong here?
Which is the correct block device I should even be trying to mount /dev/block/mmcblk0 or /dev/block//vold/179:2?
I don't want to flash to an unofficial 2.2 and I have everything else working just the way I want it, so I'd rather not reset either.
There MUST be a solution somewhere, but I am getting frustrated.
Thanks for any help you can give me!
Hello!
I'm having exactly the same problem... I've been trying to find a solution for this problem for the last 3 hours, but I can't figure out a way...
Can anyody give us a light??
Thanks!
Same question here. Partitioned more than a month ago, but then I reached a dead end. I don't know a reliable way to mount the ext2 partition. I'm familiar with Linux, and I have tried all kinds of crazy shell scripts, but the Android filesystem is still a bit alien to me.
By the way, what is this App2SD that you speak of? It's something different from the Apps2SD app on Froyo, right?
JoeDuncan said:
Code:
# mount -t ext2 /dev/block/mmcblk0p2 /system/sd
mount -t ext2 /dev/block/mmcblk0p2 /system/sd
mount: No such device
Click to expand...
Click to collapse
A shot in the dark would be ext2.ko is not insmodded ... ?
got this problem to on stock US froyo kernel for Samsung Galaxy 5. I also suspected ext2 was missing but it seems compiled into kernel.
Code:
# cat /proc/filesystems
nodev sysfs
nodev rootfs
nodev bdev
nodev proc
nodev tmpfs
nodev debugfs
nodev sockfs
nodev pipefs
nodev anon_inodefs
nodev rpc_pipefs
nodev inotifyfs
nodev devpts
ext2
nodev ramfs
vfat
nodev nfs
rfs
For the MS, you have to insert a ext2 Kernel module, look around here on the forums..
Depending on which module-version you're using try "-t auto" instead of "-t ext2"
Also you should use "/dev/block/mmcblk0p2" if this is your ext2 partition
Besides, there should be some packages available which contain the necessary scripts and files to install this automatically and at boot, applicable as OR-updates
It was my understanding that Apps2SD could not be used on 2.1, you needed 2.2 to use that app. Although I have the same issue with Links2SD which is suppose to work with 2.1. I can't get anything to see an ext2 or 3 or Fat partition.
My amator tries
Hy,
I've got the same problem on Cyanogen and Goapk roms:
mount -t auto /dev/block/mmcblk0p2 /sd-ext
doesn't work
I verified sd-ext was present
mkdir /sd-ext
Nothing changed.
My mount description is somethime using vold instead of mmcblk0p... I don't really understand.
However I succeeded to mount sdext by using busybox (on goapk rom)
busybox mount -r -w -t auto /dev/block/mmcblk0p2 /sd-ext
result mount:
rootfs / rootfs rw 0 0
tmpfs /dev tmpfs rw,mode=755 0 0
devpts /dev/pts devpts rw,mode=600 0 0
proc /proc proc rw 0 0
sysfs /sys sysfs rw 0 0
tmpfs /mnt/asec tmpfs rw,mode=755,gid=1000 0 0
/dev/block/mtdblock3 /system yaffs2 ro 0 0
/dev/block/mtdblock5 /data yaffs2 rw,nosuid,nodev 0 0
/dev/block/mtdblock4 /cache yaffs2 rw,nosuid,nodev 0 0
/dev/block/vold/179:1 /mnt/sdcard vfat rw,dirsync,nosuid,nodev,noexec,uid=1000,g
id=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-
1,shortname=mixed,utf8,errors=remount-ro 0 0
/dev/block/vold/179:1 /mnt/secure/asec vfat rw,dirsync,nosuid,nodev,noexec,uid=1
000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso
8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
tmpfs /mnt/sdcard/.android_secure tmpfs ro,size=0k,mode=000 0 0
/dev/block/mmcblk0p2 /sd-ext ext2 rw,errors=continue 0 0
Just in case, If somebody can help me:
*I have a symlink /data/drm =>/data/local :how to unsymlink it? (unbind isn't present and replacement doesn't work:" Invalid cross-device link")
*perl script are unable to decompresse boot.img, how to change init.rc in this case?
thanks
symlinks
lamidesbetes said:
*I have a symlink /data/drm =>/data/local :how to unsymlink it? (unbind isn't present and replacement doesn't work:" Invalid cross-device link")
Click to expand...
Click to collapse
Symlinks can be removed with the rm command.
The "cross device link" error happens when one uses the ln command without the "-s" option (so attempting a hard link instead of symlink).

[Q] Original Partition Layout

Just wondering if anyone has the original nook color's partition layout. I attempted to push HoneyComb to emmc with dd; however, that didn't work the way I expected. Now I'm missing the correct partition layout. In other words, I just need
fdisk -l /dev/mmcblk0
So I can correctly setup the partitions again and install Stock again.
Any word on this would be greatly appreciated.
Thanks.
bdkoepke said:
Just wondering if anyone has the original nook color's partition layout. I attempted to push HoneyComb to emmc with dd; however, that didn't work the way I expected. Now I'm missing the correct partition layout. In other words, I just need
fdisk -l /dev/mmcblk0
So I can correctly setup the partitions again and install Stock again.
Any word on this would be greatly appreciated.
Thanks.
Click to expand...
Click to collapse
I suspect that's the least of your worries if you did a dd to the DEVICE rather than partitions...... Geez.
Code:
# busybox fdisk -l /dev/block/mmcblk0
Disk /dev/block/mmcblk0: 7944 MB, 7944011776 bytes
255 heads, 63 sectors/track, 965 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/block/mmcblk0p1 * 1 9 72261 c Win95 FAT32 (LBA)
/dev/block/mmcblk0p2 10 18 72292+ c Win95 FAT32 (LBA)
/dev/block/mmcblk0p3 19 56 305235 83 Linux
/dev/block/mmcblk0p4 57 935 7060567+ 5 Extended
/dev/block/mmcblk0p5 57 114 465853+ 83 Linux
/dev/block/mmcblk0p6 115 236 979933+ 83 Linux
/dev/block/mmcblk0p7 237 281 361431 83 Linux
/dev/block/mmcblk0p8 282 935 5253223+ c Win95 FAT32 (LBA)
Thanks
I will let you know how I make out.
(If it doesn't work, then there is probably just a little bit of boot code in the beginning of the device, but I suspect that it simply runs the boot code from the first partition. This is how it is done in OpenBoot, and pretty much every other system besides x86/bios)
Perhaps I should have done a full dd backup beforehand.
bdkoepke said:
Thanks
I will let you know how I make out.
(If it doesn't work, then there is probably just a little bit of boot code in the beginning of the device, but I suspect that it simply runs the boot code from the first partition. This is how it is done in OpenBoot, and pretty much every other system besides x86/bios)
Perhaps I should have done a full dd backup beforehand.
Click to expand...
Click to collapse
In the developers forums theres a recovery thread that has the partitions backed up. As for Honeycomb on internal I will be posting an install image in a bit under an hour (it's uploading now) that will allow you to use honeycomb on internal.
Thank you khaytsus and MattJ951.
I was able to get this to work properly after restoring the partition layout.
Something of interest, there are 935 cylinders allocated in the default partition layout (assuming khaytsus didn't modify it at all). There are actually 965 cylinders, so there is some extra space there for the vfat partition.
Thanks again.
bdkoepke said:
Thank you khaytsus and MattJ951.
I was able to get this to work properly after restoring the partition layout.
Something of interest, there are 935 cylinders allocated in the default partition layout (assuming khaytsus didn't modify it at all). There are actually 965 cylinders, so there is some extra space there for the vfat partition.
Thanks again.
Click to expand...
Click to collapse
Heh, no, rooted stock B&N ROM. Even knowing how fixable it is, I haven't experimented beyond booting NF or HC off SD.
So I have been able to get stock loaded again, but it can't detect the Mac Address/Serial Number... (Uh oh...)
Now this isn't the end of the world, but I can't use Market.apk on stock roms.
As I understand it:
/dev/block/mmcblk0p1 /boot (This should be fine, you can dd this)
/dev/block/mmcblk0p2 /rom (I'm guessing this is what I'm missing)
/dev/block/mmcblk0p3 /emmc (I just copied factory.zip here, there are no other files)
/dev/block/mmcblk0p5 /system (This should be fine...)
/dev/block/mmcblk0p6 /data (This is definitely fine to dd)
/dev/block/mmcblk0p7 /cache (Definitely fine as well)
/dev/block/mmcblk0p8 /sdcard (And also fine...)
So I'm just wondering what the original files are in /rom and /emmc.
I can't imagine the final blocks (935 and on) being used for hard-coded serial numbers/etc. That would be pretty stupid... Also the dual/froyo would clear these values.
I'm assuming the identity information is in /rom and /emmc.
Any word on this would be appreciated.
bdkoepke said:
So I have been able to get stock loaded again, but it can't detect the Mac Address/Serial Number... (Uh oh...)
Now this isn't the end of the world, but I can't use Market.apk on stock roms.
As I understand it:
/dev/block/mmcblk0p1 /boot (This should be fine, you can dd this)
/dev/block/mmcblk0p2 /rom (I'm guessing this is what I'm missing)
/dev/block/mmcblk0p3 /emmc (I just copied factory.zip here, there are no other files)
/dev/block/mmcblk0p5 /system (This should be fine...)
/dev/block/mmcblk0p6 /data (This is definitely fine to dd)
/dev/block/mmcblk0p7 /cache (Definitely fine as well)
/dev/block/mmcblk0p8 /sdcard (And also fine...)
So I'm just wondering what the original files are in /rom and /emmc.
I can't imagine the final blocks (935 and on) being used for hard-coded serial numbers/etc. That would be pretty stupid... Also the dual/froyo would clear these values.
I'm assuming the identity information is in /rom and /emmc.
Any word on this would be appreciated.
Click to expand...
Click to collapse
/dev/block/mmcblk0p2 contains the device specific information...
/dev/block/mmcblk0p3 contains factory.zip and a backup of /rom/devconf which also contains device specific info.
I think my mmcblk0p3 is hosed... thus my 8 failed boots always fails to install... I have yet to be able to mount it in adb to push new factory.zip... would love to get this fixed.
Got it... had to mke2fs /dev/block/mmcblk0p3 then i could copy mmcblk0p2's devconf and push factory.zip to it.... 8 failed boots work as it should now.
DizzyDen said:
/dev/block/mmcblk0p2 contains the device specific information...
/dev/block/mmcblk0p3 contains factory.zip and a backup of /rom/devconf which also contains device specific info.
I think my mmcblk0p3 is hosed... thus my 8 failed boots always fails to install... I have yet to be able to mount it in adb to push new factory.zip... would love to get this fixed.
Got it... had to mke2fs /dev/block/mmcblk0p3 then i could copy mmcblk0p2's devconf and push factory.zip to it.... 8 failed boots work as it should now.
Click to expand...
Click to collapse
DizzyDen, I am having the same problem i.e. 8 failed boots always fails to install. I am also unable to boot a CM7 image off of uSD card (hangs at Android) step. I can boot into CWM but it fails on installing a stock build.
I am hoping maybe my problems are related to yours. How did you accomplish the above? What tools did you use. I am fairly tech literate but a little loss with the tools and procedures for the Nook Color. I have tried several posts on restoring to stock non of which have worked. My assumption is that my partitions are messed up somehow such that it prevents my Nook from booting stock. I don't know why I have the same problem booting an image from a uSD card but it hangs on those. I am desperate at this point and any help would be much appreciated!
Thanks,
John
JoJa15 said:
DizzyDen, I am having the same problem i.e. 8 failed boots always fails to install. I am also unable to boot a CM7 image off of uSD card (hangs at Android) step. I can boot into CWM but it fails on installing a stock build.
I am hoping maybe my problems are related to yours. How did you accomplish the above? What tools did you use. I am fairly tech literate but a little loss with the tools and procedures for the Nook Color. I have tried several posts on restoring to stock non of which have worked. My assumption is that my partitions are messed up somehow such that it prevents my Nook from booting stock. I don't know why I have the same problem booting an image from a uSD card but it hangs on those. I am desperate at this point and any help would be much appreciated!
Thanks,
John
Click to expand...
Click to collapse
If you boot off a CWR sd... adb shell into NC... do a fdisk -l mmcblk0... verify your info against this one:
Code:
~ # fdisk -l /dev/block/mmcblk0
fdisk -l /dev/block/mmcblk0
Disk /dev/block/mmcblk0: 7944 MB, 7944011776 bytes
255 heads, 63 sectors/track, 965 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/block/mmcblk0p1 * 1 9 72261 c Win95 FAT32 (LBA)
/dev/block/mmcblk0p2 10 18 72292+ c Win95 FAT32 (LBA)
/dev/block/mmcblk0p3 19 56 305235 83 Linux
/dev/block/mmcblk0p4 57 935 7060567+ 5 Extended
/dev/block/mmcblk0p5 57 114 465853+ 83 Linux
/dev/block/mmcblk0p6 115 236 979933+ 83 Linux
/dev/block/mmcblk0p7 237 281 361431 83 Linux
/dev/block/mmcblk0p8 282 935 5253223+ c Win95 FAT32 (LBA)
as long as the partition is present as listed above...
mke2fs /dev/block/mmcblk0p3
You will now have a file system on the mmcblk0p3 partition that you can mount to /emmc...
mount /dev/block/mmcblk0p3 /emmc
exit from adb shell
You can then push the sideload.zip (or factory zip... fyi 1.1.0 will not work)...
adb push sideload.zip /emmc/factory.zip (replace sideload.zip with whatever zip file you intend to use for the 8 failed boot recovery file)
you will want to do the following in a blank folder on your computer... keeps cleanup a lot easier....
I then pulled mmcblk0p2 to my computer and zipped the contents to rombackup.zip and pushed it to mmcblk0p2 also...
adb shell mkdir /temp
adb shell mount /dev/mmcblk0p2 /temp
adb pull /temp
zip everything you pulled from mmcblk0p2 into a zip file named rombackup.zip
then push it to /emmc
adb shell push rombackup.zip /emmc
ALTERNATIVELY: the first time I did this... I merely copied the devconf folder from mmcblk0p2 to mmcblk0p3...
adb shell
cd /temp
cp -a devconf /emmc
and it seemed fine... so I don't know if you MUST do the rombackup or not... also note....
I did delete all the files and did the zip as mentioned above.
I am not 100% certain of exactly WHAT rombackup is supposed to have in it....I just know that what I listed (both methods) has worked so far.
I kind of like the idea of the cp instead... seems it would be eaiser to just cp them back should anything ever happen to mmcblk0p2... but currently have my version of rombackup.zip trying to stay with stock setup.
Hoping someone else will pull the rombackup.zip from theirs and give me the filestructure in it.
I hope this has been explicit enough... if you need any more help let me know.
ALSO... the CM7 off uSD... are you by chance using one larger than 8 Gb? We've discovered an issue with the mke2fs on 16 Gb cards.
Thanks DizzyDen, currently I have not been able to get ADB to work. I have it installed but it does not see my device when in CWM. I did get a Froyo and Honeycomb off of uSD booting which is good. I can probably add market place and then get ADB wi-fi app to do my copying to the nook. Once I get that setup I will follow your instructions above and report back.
You might want to mount mmcblk0p3 to /emmc before you do any of the more advanced stuff I listed... just to make sure.... IF it mounts... list files before you do anything else.
I was having issues mounting the partition... that's why I had to go to the extent of formatting it.... you may be luckier and only have a corrupt factory.zip
DizzyDen said:
You might want to mount mmcblk0p3 to /emmc before you do any of the more advanced stuff I listed... just to make sure.... IF it mounts... list files before you do anything else.
I was having issues mounting the partition... that's why I had to go to the extent of formatting it.... you may be luckier and only have a corrupt factory.zip
Click to expand...
Click to collapse
OK, I got ADB working now but it seems fairly complex. Please bear with me as I am a newb when it comes to ADB. I did ADB Shell and then the command you listed. Here is the output:
Code:
# fdisk -l /dev/block/mmcblk0
fdisk -l /dev/block/mmcblk0
Disk /dev/block/mmcblk0: 7944 MB, 7944011776 bytes
255 heads, 63 sectors/track, 965 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/block/mmcblk0p1 * 1 9 72261 c Win95 FAT32 (LBA)
/dev/block/mmcblk0p2 10 18 72292+ c Win95 FAT32 (LBA)
/dev/block/mmcblk0p3 19 56 305235 83 Linux
/dev/block/mmcblk0p4 57 965 7301542+ 5 Extended
Let me know what I need to do next.
Comparing your listing and mine it appears I am missing the 5-8 partitions. Also my mmcblk0p4 partition has a different ending then yours. So how do I go about adding the 5-8 partitions back and fixing the mmcblk0p4 one?
Those are partitions that are actually created on the logical partition mmcblk0p4... as you can see in the listing I posted.
Did you use ADB from and installed ROM or did you use a cwm bootable uSD ?
anyway to check your recovery options....
in adb mount mmcblk0p3 to /emmc and list its contents:
adb shell
mount /dev/block/mmcblk0p3 /emmc
ls /emmc
See if it has either recovery file... or both... or nothing
Post back whe you can and we'll go further.
If you want I could post the img files I got of ALL my partitions... well... won't share my mmcblk0p2 or mmcblk0p3 since they have my device specific information. They may help in getting your partitions straightened out.
Another option would be that we could use teamviewer to remote connect and look through it.
DizzyDen said:
Those are partitions that are actually created on the logical partition mmcblk0p4... as you can see in the listing I posted.
Did you use ADB from and installed ROM or did you use a cwm bootable uSD ?
Click to expand...
Click to collapse
I used ADB from my PC connecting to my nook that was running a bootable Froyo build from a uSD card
One other note, when booting from CWM on the uSD card when I try to do the fdisk command I get the following. I was still able to mount the partitions though in the shell example later in this message.
Code:
~ # fdisk -l mmcblk0
fdisk -l mmcblk0
fdisk: can't open 'mmcblk0': No such file or directory
~ #
anyway to check your recovery options....
in adb mount mmcblk0p3 to /emmc and list its contents:
adb shell
mount /dev/block/mmcblk0p3 /emmc
ls /emmc
See if it has either recovery file... or both... or nothing
Post back whe you can and we'll go further.
Click to expand...
Click to collapse
Here is what it shows. This is connecting to ADB via my PC with the nook booting into CWM on a uSD card. I do not have CWM installed on the Nook.
Code:
~ # mount /dev/block/mmcblk0p3 /emmc
mount /dev/block/mmcblk0p3 /emmc
~ # ls /emmc
ls /emmc
factory.zip lost+found rombackup.zip
~ # mount /dev/block/mmcblk0p1 /boot
mount /dev/block/mmcblk0p1 /boot
~ # ls boot
ls boot
charging.zip romrestore.zip uImage uRecImg
mlo u-boot.bin uRamdisk uRecRam
~ # mount /dev/block/mmcblk0p2 /rom
mount /dev/block/mmcblk0p2 /rom
mount: mounting /dev/block/mmcblk0p2 on /rom failed: No such file or directory
~ # mount /dev/block/mmcblk0p4 /system
mount /dev/block/mmcblk0p4 /system
mount: mounting /dev/block/mmcblk0p4 on /system failed: Invalid argument
~ # mount /dev/block/mmcblk0p5 /system
mount /dev/block/mmcblk0p5 /system
mount: mounting /dev/block/mmcblk0p5 on /system failed: No such file or director
y
~ # mount /dev/block/mmcblk0p6 /data
mount /dev/block/mmcblk0p6 /data
mount: mounting /dev/block/mmcblk0p6 on /data failed: No such file or directory
~ # mount /dev/block/mmcblk0p7 /cache
mount /dev/block/mmcblk0p7 /cache
mount: mounting /dev/block/mmcblk0p7 on /cache failed: No such file or directory
~ # mount /dev/block/mmcblk0p8 /sdcard
mount /dev/block/mmcblk0p8 /sdcard
mount: mounting /dev/block/mmcblk0p8 on /sdcard failed: No such file or director
If you want I could post the img files I got of ALL my partitions... well... won't share my mmcblk0p2 or mmcblk0p3 since they have my device specific information. They may help in getting your partitions straightened out.
Another option would be that we could use teamviewer to remote connect and look through it.
Click to expand...
Click to collapse
I'll PM you.
I really appreciate all the help!
I've been doing mine from bootable CWR SD... just to get the commands and make sure I am seeing actual internal emmc...
THAT may be why you can't get list of mmcblk0... not certain... but I responded to your pm's.
You couldn't get fdisk -l mmcblk0 to work cause I gave you the wrong command... it should be...
fdisk -l /dev/block/mmcblk0
The same as you did earlier....
It does look like we may get away with just replacing your factory.zip file...
I can send you the 1.0.1 file... the newest 1.1.0 won't work for recover for whatever reason B&N did it.
You are getting the fails (I think) because you are trying to mount all those partitions to /system...
Try this:
adb shell
mkdir /tmp4
mount /dev/block/mmcblk0p4 /tmp4
If that works... try doing the same for the remainder (5,6,7,8) increasing the tmpx each time... to match the partition you are trying to mount.
If it DOES NOT work... then I would suspect because of corrupt mmcblk04p partition... and we'll find out together if the factory.zip will fix that or if we have to go other methods.
With correct fdisk command
Code:
c:\android-sdk-windows\platform-tools\rombackup>adb shell
~ # fdisk -l /dev/block/mmcblk0
fdisk -l /dev/block/mmcblk0
Disk /dev/block/mmcblk0: 7944 MB, 7944011776 bytes
255 heads, 63 sectors/track, 965 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/block/mmcblk0p1 * 1 9 72261 c Win95 FAT32 (LBA)
/dev/block/mmcblk0p2 10 18 72292+ c Win95 FAT32 (LBA)
/dev/block/mmcblk0p3 19 56 305235 83 Linux
/dev/block/mmcblk0p4 57 965 7301542+ 5 Extended
~ #
Looks like we will be trying to fix mmcblk0p4.... I'm gonna have to reseach exactly how to repartition it (maybe my mmcblk0p4 dd image will fix that) and how to fix the logical partitions that should be on that partition.
Will talk to ya in a bit.
here.....
DizzyDen said:
Looks like we will be trying to fix mmcblk0p4.... I'm gonna have to reseach exactly how to repartition it (maybe my mmcblk0p4 dd image will fix that) and how to fix the logical partitions that should be on that partition.
Will talk to ya in a bit.
here.....
Click to expand...
Click to collapse
That file at least helped me see my other partitions:
Code:
~ # dd if=/sdcard/mmcblk0p4-logical.img of=/dev/block/mmcblk0p4
dd if=/sdcard/mmcblk0p4-logical.img of=/dev/block/mmcblk0p4
2+0 records in
2+0 records out
1024 bytes (1.0KB) copied, 0.013641 seconds, 73.3KB/s
~ # fdisk -l /dev/block/mmcblk0
fdisk -l /dev/block/mmcblk0
Disk /dev/block/mmcblk0: 7944 MB, 7944011776 bytes
255 heads, 63 sectors/track, 965 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/block/mmcblk0p1 * 1 9 72261 c Win95 FAT32 (LBA)
/dev/block/mmcblk0p2 10 18 72292+ c Win95 FAT32 (LBA)
/dev/block/mmcblk0p3 19 56 305235 83 Linux
/dev/block/mmcblk0p4 57 965 7301542+ 5 Extended
/dev/block/mmcblk0p5 57 114 465853+ 83 Linux
/dev/block/mmcblk0p6 115 236 979933+ 83 Linux
/dev/block/mmcblk0p7 237 281 361431 83 Linux
/dev/block/mmcblk0p8 282 965 5494198+ c Win95 FAT32 (LBA)
~ #
Now I need to figure out why my 4 and 8 partitions end at 965 instead of 935. I a going to try a factory reset first and then if that does not work try messing with resizing the partition.
John, glad we got it working for you... might want to check the fdisk -l /dev/block/mmcblk0 now and see if it still shows mmcblk0p2 ending at 965 after the factory reset and data clear.
Nonetheless... I'm glad we got the 8 failed boots/factory resets working for you.
I'm sure we can mess with parted enough to fix it... or REALLY mess it up ;-)
BTW... in messing with this... we have you enough posts now to post in the dev forums

[Help] Changing Around Mountpoints for sdcard and extSdCard?

Hey guys.
Some previous Samsung devices had no external storage at all but still mapped the biggest flash partition to /mnt/sdcard.
The Galaxy Tab 2 7.0 has a Micro SD card slot on it (one of the reasons I bought the thing!), but I guess for compatibility they still mount an internal flash storage partition to /sdcard. The actual micro SD card gets mounted to freaking /mnt/extSdCard.
Why does this matter?
Basically, tons of stuff in Android is setup to dump the large files to /sdcard by default. Things like games that require an extra download, the Camera app, etc. I've got a 32GB microSD card in there, and it makes me really frustrated that stuff won't just automatically use that.
So. What I'm looking to do is switch them around, so the internal fake flash partition ends up mounting to /mnt/extSdCard and the REAL microSD card mounts to /mnt/sdcard. That way my big huge card is where most data will end up automagically. Ultimately if I could just dump the internal "sdcard" partition and give that space to other parts of the system, that'd be sweet, but at this point I'm still kindof in la la land with Android, so I'll be happy just to get the mounts flipped around.
I do Linux stuff for work, and use a 5-disk file server at home running Ubuntu Server, so I approached this problem in a Linux way: why not mount via fstab??
Turns out Android doesn't actually directly have a /etc/fstab. Instead you've got /system/etc/vold.fstab.
From my brief research, this file appears to work pretty much the same way as fstab in Linux.
However, the stock one doesn't contain any mountpoint for the fake internal sdcard. vold.fstab seems to tell the vold executable what to do during boot-time.
My first problem: the vold.fstab file on my device doesn't contain any mount instructions for the /sdcard device.
Not a problem, I have SSH and WinSCP working, so I got a read on the mount points likeso:
Code:
127|[email protected]:/dev/block # cat /proc/mounts
rootfs / rootfs ro,noatime 0 0
tmpfs /dev tmpfs rw,nosuid,noatime,mode=755 0 0
devpts /dev/pts devpts rw,noatime,mode=600 0 0
proc /proc proc rw,noatime 0 0
sysfs /sys sysfs rw,noatime 0 0
none /acct cgroup rw,noatime,cpuacct 0 0
tmpfs /mnt/asec tmpfs rw,noatime,mode=755,gid=1000 0 0
tmpfs /mnt/obb tmpfs rw,noatime,mode=755,gid=1000 0 0
none /dev/cpuctl cgroup rw,noatime,cpu 0 0
/dev/block/platform/omap/omap_hsmmc.1/by-name/FACTORYFS /system ext4 ro,noatime,barrier=1,data=ordered 0 0
/dev/block/platform/omap/omap_hsmmc.1/by-name/DATAFS /data ext4 rw,nosuid,nodev,noatime,barrier=1,data=ordered,noauto_da_alloc,discard 0 0
/dev/block/platform/omap/omap_hsmmc.1/by-name/CACHE /cache ext4 rw,nosuid,nodev,noatime,errors=panic,barrier=1,nomblk_io_submit,data=ordered 0 0
/dev/block/platform/omap/omap_hsmmc.1/by-name/EFS /efs ext4 rw,noatime,barrier=1,data=ordered 0 0
/sys/kernel/debug /sys/kernel/debug debugfs rw,noatime 0 0
/dev/fuse /mnt/sdcard fuse rw,nosuid,nodev,noatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
/dev/block/vold/179:25 /mnt/extSdCard vfat rw,dirsync,nosuid,nodev,noexec,noatime,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
OK. so the vold.fstab file contains:
Code:
## Vold 2.0 Generic fstab
## - San Mehat ([email protected])
##
#######################
## Regular device mount
##
## Format: dev_mount <label> <mount_point> <part> <sysfs_path1...>
## label - Label for the volume
## mount_point - Where the volume will be mounted
## part - Partition # (1 based), or 'auto' for first usable partition.
## <sysfs_path> - List of sysfs paths to source devices
######################
# external sdcard
dev_mount sdcard /mnt/extSdCard auto /devices/platform/omap/omap_hsmmc.0/mmc_host/mmc1
#usb host device
dev_mount usbdisk /mnt/usbdisk auto /devices/platform/omap/musb-omap2430/musb-hdrc/usb1
So, I have made a backup of my vold.fstab file, but I'm a little gun shy about making changes to it, particularly adding a new line for the "internal" sdcard. I know there are a couple of other ways to probably do this, like an init.d shell script that just executes the needed mount commands, and I'm honestly not sure if putting an entry for /mnt/sdcard into vold.fstab will override the mounts that are (I guess?) coming from the ramdisk init sequence. Any input, XDA devs?
Go for it :thumbup:
Sent from my GT-P3100 using xda app-developers app
I have the same Problem on my Galaxy Tab2 7.0 WIFI (GT-P3110 8 GB). I found a temporary Soloution for me. The App that i use is LINK2SD. You should have two partitions on SD card and both should be primary.
The first FAT partition is your standard sdcard (mountetd on extSdCard). The second partition /data/sdext2 is used for application files and can be ext2, ext3, ext4 or FAT32. Here are more informations about it: http://rootzwiki.com/topic/24500-if...move-apps-to-sd-card/page__st__10#entry701146
In this thread are the same Question: http://forum.xda-developers.com/showthread.php?t=1679037
I think it will read the changes. For example on the htc rezound the firmware update for ics changed the mount points from what was used in gb.So in order to run a gb Rom on ics firmware and vice versa the Fix was swaping vstab. Figure as long as u only mess with the sd mounts internal and ext. It will still boot and u can swap file as needed for testing.
Sent from my ADR6425LVW using xda premium
I'll try and figure it out.
Already found one thing: running the mount command with no switches will list all current mounts (can't believe I forgot that!).
DivinityCycle said:
I'll try and figure it out.
Already found one thing: running the mount command with no switches will list all current mounts (can't believe I forgot that!).
Click to expand...
Click to collapse
Im workin on it too. Im used to seeing them on separate lines. Ill let u know if i beat ya to it lol
Sent from my GT-P3113 using xda premium
Something else useful that I found:
Code:
[email protected]:/dev/block # cat /proc/partitions
major minor #blocks name
179 0 7634944 mmcblk0
179 1 20480 mmcblk0p1
179 2 2048 mmcblk0p2
179 3 2048 mmcblk0p3
179 4 8192 mmcblk0p4
179 5 8192 mmcblk0p5
179 6 8192 mmcblk0p6
179 7 716800 mmcblk0p7
259 0 20480 mmcblk0p8
259 1 1433600 mmcblk0p9
259 2 4886511 mmcblk0p10
259 3 524288 mmcblk0p11
179 16 2048 mmcblk0boot1
179 8 2048 mmcblk0boot0
179 24 30318592 mmcblk1
179 25 30314496 mmcblk1p1
and
Code:
[email protected]:/dev/block # df
Filesystem Size Used Free Blksize
/dev 347M 48K 347M 4096
/mnt/asec 347M 0K 347M 4096
/mnt/obb 347M 0K 347M 4096
/system 1G 259M 1G 4096
/data 4G 2G 2G 4096
/cache 688M 58M 630M 4096
/efs 19M 4M 15M 4096
/mnt/extSdCard 28G 13G 15G 32768
/mnt/sdcard 4G 2G 2G 4096
I'm pretty sure the partitions listed are found at /dev/block/mmcblk0pX, so maybe that's what needs to be mounted. I've not been successful yet in mounting anything manually but I just found this stuff, so hopefully will have it soon.
Hey DivinityCycle,
This post and tool in the S3 forum might be useful to you as it does the exact same thing in the GS3.
http://forum.xda-developers.com/showthread.php?t=1772234
If I recall correctly it needs a kernel with init.d support. But I think it will definitely help.
Rgrds
Sent from my GT-I9300
I have this in mine i didnt see it in yours
#storage_struct = series, "/mnt/sdcard/extStorages"
#storage_struct = parallel
Making progress, I was able to mount the "external" sdcard to my test mountpoint using:
mount -t vfat -o umask=0000 /dev/block/vold/179:25 /mnt/testing
So, that's part of the puzzle figured out. Now, just need to sort of out the internal "sdcard" device path and then I guess I can try throwing stuff into vold.fstab
OK I believe I have a solution will work, based on the init.d script inside the package Mattiadj made and Rostol linked me to (thanks!).
I modified his init.d script likeso:
Code:
sleep 2
mount -o remount,rw /
mkdir -p /data/internal_sd
mount -o bind /mnt/sdcard /data/internal_sd
mount -t vfat -o umask=0000 /dev/block/vold/179:25 /mnt/testing
mount -o bind /data/internal_sd /mnt/extSdCard
vold has to be used for external storage. The internal storage isn't very flexible, which is why that guy's script just binds it up during boot time rather than some other method of mounting it.
I have just run the commands in a terminal one by one and they all appear to do exactly what they "should", and I have verified that the result is the "real" sdcard being mounted to /mnt/sdcard, which ALSO makes it accessible at /sdcard (which I think is just a symlink). That's the default target for most apps, so after installing this init.d script I think everything should "just work".
Obviously you could adjust the mount point for the "internal" sdcard space as needed.
Working on the script and installation bit now.
/mnt/sdcard
/dev/fuse fuse rw,nosuid,nodev,relatime,user_id=1023,group_id=1023,default_permissions,allow_other
---------- Post added at 11:55 PM ---------- Previous post was at 11:54 PM ----------
Nice
OK I am having some problems getting the init.d script to work properly.
My working code is:
Code:
#!/system/bin/sh
LOG=/data/local/tmp/sdcard.txt
exec 3>&1 4>&2 >$LOG 2>&1
echo "Script start"
echo "Sleeping 2 seconds"
sleep 2
echo "Now attempting to remount root filesystem RW"
mount -o remount,rw /
echo "Make the internal_sd directory"
mkdir -p /data/internal_sd
echo "Bind the internal sdcard to the new folder"
mount -o bind /mnt/sdcard /data/internal_sd
echo "Mount the real sdcard"
mount -t vfat -o umask=0000 /dev/block/vold/179:25 /mnt/sdcard
echo "Bind the internal_sd directory to the extSdCard mountpoint"
mount -o bind /data/internal_sd /mnt/extSdCard
echo "Script done"
Basically I am logging the output to /data/local/tmp/sdcard.txt, so I can debug.
In that log, it gets as far as the first mount command, and then things go off the rails:
Code:
Script start
Sleeping 2 seconds
Now attempting to remount root filesystem RW
Make the internal_sd directory
Bind the internal sdcard to the new folder
mount: Invalid argument
Mount the real sdcard
mount: No such file or directory
Bind the internal_sd directory to the extSdCard mountpoint
Script done
What's messed up is, the same mount command (with the bind) works fine once the device is all the way booted up.
Its just during the "init" sequence that it has a problem. I have no idea why
We had a similar thing for my Droid x2. You my want to check out this thread http://forum.xda-developers.com/showthread.php?p=16875467 and contact the dev.
Sent from my GT-P3113 using xda premium
That guy did it via vold.fstab, which is interesting.
The relevant stuff:
Code:
# external sd card
dev_mount sdcard /mnt/sdcard:none:lun1 auto /devices/platform/tegra-sdhci.2/mmc_host/mmc2 /devices/platform/tegra-sdhci.2/mmc_host/mmc1
# internal eMMC
dev_mount sdcard_ext /mnt/sdcard-ext 18 /devices/platform/tegra-sdhci.3/mmc_host/mmc0
I am honestly not too sure what I'm looking at there, so I'm gonna try some stuff in vold.fstab next.
OK, I am too tired to keep messing around with this for tonight, so I am trying out a new method: I moved my init script over to /data and then used Script Manager to make it run as root as boot time.
This is obviously not a permanent fix, but should be OK for tonight.
Basically my big problem is I don't know the syntax for vold.fstab to mount the internal sdcard to a new mount point...
Ahh the joys of doing weird hacky stuff to your tablet... I pretty much gave up on the vold.fstab working in the short term, and instead just tried setting my init script up as just a regular "run at launch" script using Script Manager.
The version of my script that I posted had unforeseen consequences. For whatever reason, doing a "bind" of /mnt/sdcard like I was doing caused all sorts of things to stop working. Like, Script Manager was locking up, as was Root Explorer!
The best one was that when my alarm clock went to go off this morning it crashed, and I was late for work! LOL
Sooo yeah, that's pretty special. I had to use Terminal Emulator to fix my stuff on the bus on the way to work
I have revised my script and it now works perfectly with the caveat that I'm simply unmounting the internal "sdcard" partition and letting it sit there unused.
Code:
#!/system/bin/sh
LOG=/data/local/tmp/sdcard.txt
exec 3>&1 4>&2 >$LOG 2>&1
echo "Script start"
echo "Unmount internal sdcard"
umount /mnt/sdcard
echo "Mount the real sdcard"
mount -t vfat -o umask=0000 /dev/block/vold/179:25 /mnt/sdcard
echo "Script done"
I believe because of vold.fstab the microSD card still gets mounted to /mnt/extSdCard. My script puts it at /mnt/sdcard as well. This seems to work OK because then the few programs that are smart enough to access the card via /mnt/extSdCard still can get to it, but everything else that works on the regular sdcard also goes to the sdcard as well.
I have tested out the camera, music player, Root Explorer, Script Manager, etc. Everything I have tried works exactly as expected.
The next thing I'll need to test out is if this script can be used as an init.d script instead of needing Script Manager to set it up to run at boot.
I figure the only other things to do are:
1-figure out what's needed to be able to mount the internal "sdcard" partition to a different mount point
or
2-figure out how to delete the "sdcard" partition and then just give that extra space to one of the other flash partitions (probably /system?)
I really am hoping you get this figured out and it can be used by us common folk. (I'm no hacker) Lol :thumbup:
Sent from my GT-P3113 using xda premium
Wow, while working on my init.d script, I managed to make my system freeze at the bootup animation. I "unlocked" things by reflashing my ROM.
Good thing its a slow day at the office...
i really hope u can get this working, would love it

[SOLVED] How to restore damaged Internal SD card partition layout? Tried everything.

I did something really bad to my INTERNAL SD CARD partition layout, so now I have
I have the i8190N model
Code:
~ # cat /proc/partitions
major minor #blocks name
179 0 7634944 mmcblk0
179 1 7634936 mmcblk0p1
179 64 2048 mmcblk0boot1
179 32 2048 mmcblk0boot0
179 96 3866624 mmcblk1
179 97 3862528 mmcblk1p1
~ # df
Filesystem 1K-blocks Used Available Use% Mounted on
tmpfs 411756 48 411708 0% /dev
~ # mount
rootfs on / type rootfs (rw)
tmpfs on /dev type tmpfs (rw,nosuid,relatime,mode=755)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
~ # parted /dev/block/mmcblk0
GNU Parted 1.8.8.1.179-aef3
Using /dev/block/mmcblk0
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
print
Warning: /dev/block/mmcblk0 contains GPT signatures, indicating that it has a
GPT table. However, it does not have a valid fake msdos partition table, as it
should. Perhaps it was corrupted -- possibly by a program that doesn't
understand GPT partition tables. Or perhaps you deleted the GPT table, and are
now using an msdos partition table. Is this a GPT partition table?
Yes/No?
As you can see, there is no /system, /cache and other stuff, that should be there.
My ClockWorkMod recovery tool can't mount anything (/cache, /system, nothing)
I really did everything I could. I tried: restore from backup (I have one, made with recovery tool), install new ROM (With recovery tool), install stock firmware and stock kernel in ODIN mode. I even tried some PIT file: nothing did absolutely nothing to my status.
Frankly I miss some important part in understanding of filesystem, partitions, images, what is ROM, what is stock kernel etc ...
What should I do?
UPDATE:
Short answer: user right PIT file and burn it with Odin3. Long answer in post below.
Found interesting file:
Code:
~ # tail ./etc/recovery.fstab
/system ext4 /dev/block/mmcblk0p22
/cache ext4 /dev/block/mmcblk0p23
/data ext4 /dev/block/mmcblk0p25 length=-16384
/efs ext4 /dev/block/mmcblk0p11
/boot emmc /dev/block/mmcblk0p20
/recovery emmc /dev/block/mmcblk0p21
/preload ext4 /dev/block/mmcblk0p24
/modem ext4 /dev/block/mmcblk0p12
/sdcard datamedia /dev/null
/external_sd vfat /dev/block/mmcblk1p1
~ # tail ./etc/fstab
/dev/block/mmcblk0p23 /cache ext4 rw
/dev/block/mmcblk0p25 /data ext4 rw
/dev/block/mmcblk0p22 /system ext4 rw
/dev/null /sdcard datamedia rw
And here is more info
Code:
~ # ls -la /dev/block/mmcblk*
brw------- 1 root root 179, 0 Jan 1 10:30 /dev/block/mmcblk0
brw------- 1 root root 179, 32 Jan 1 09:28 /dev/block/mmcblk0boot0
brw------- 1 root root 179, 64 Jan 1 09:28 /dev/block/mmcblk0boot1
-rw-rw-rw- 1 root root 16777216 Jan 1 10:07 /dev/block/mmcblk0p20
-rw-r--r-- 1 root root 0 Jan 1 10:07 /dev/block/mmcblk0p22
brw------- 1 root root 179, 96 Jan 1 09:28 /dev/block/mmcblk1
brw------- 1 root root 179, 97 Jan 1 09:28 /dev/block/mmcblk1p1
This is what kind of stuff I get in CWM:
Code:
-- Wiping cache...
Formatting /cache...
Need size of filesystem
E:format_volume: make_extf4fs failed on /dev/block/mmcblk0p23
Cache wipe complete.
W:failed to mount /dev/block/mmcblk0p23 (Block device required)
E:Can't mount /cache/recovery/log
E:Can't open /cache/recovery/log
W:failed to mount /dev/block/mmcblk0p23 (Block device required)
E:Can't mount /cache/recovery/last_log
E:Can't open /cache/recovery/last_log
W:failed to mount /dev/block/mmcblk0p23 (Block device required)
W:Can't unlink /cache/recovery/command
Formatting /data...
warning: get_file_size: Computed filesystem size less than 0
Need size of filesystem
E:format_volume: make_extf4fs failed on /dev/block/mmcblk0p25
Error formatting /data!
W:failed to mount /dev/block/mmcblk0p23 (Block device required)
E:Can't mount /cache/recovery/log
E:Can't open /cache/recovery/log
Have you tried to flash stock firmware again with re partition ticked and the pit file? Using the pit file make sense only if you flash the whole firmware with it
Inviato dal mio GT-I8190 con Tapatalk 2
Byteater said:
Have you tried to flash stock firmware again with re partition ticked and the pit file? Using the pit file make sense only if you flash the whole firmware with it
Click to expand...
Click to collapse
As I wrote in initial post - yes, I did. But maybe I used wrong pit file =\
Btw, looks like I have everything in console buffer (full history of distraction actions)
In the beginning I had this:
Code:
cat /proc/partitions
major minor #blocks name
7 0 2111 loop0
179 0 7634944 mmcblk0
179 1 128 mmcblk0p1
179 2 384 mmcblk0p2
179 3 1024 mmcblk0p3
179 4 1024 mmcblk0p4
179 5 512 mmcblk0p5
179 6 512 mmcblk0p6
179 7 512 mmcblk0p7
179 8 512 mmcblk0p8
179 9 1024 mmcblk0p9
179 10 1024 mmcblk0p10
179 11 16384 mmcblk0p11
179 12 16384 mmcblk0p12
179 13 16384 mmcblk0p13
179 14 51200 mmcblk0p14
179 15 64 mmcblk0p15
179 16 14336 mmcblk0p16
179 17 2048 mmcblk0p17
179 18 2048 mmcblk0p18
179 19 16384 mmcblk0p19
179 20 16384 mmcblk0p20
179 21 16384 mmcblk0p21
179 22 1228800 mmcblk0p22
179 23 860160 mmcblk0p23
179 24 327680 mmcblk0p24
179 25 4945920 mmcblk0p25
179 64 2048 mmcblk0boot1
179 32 2048 mmcblk0boot0
179 96 3872256 mmcblk1
179 97 3868160 mmcblk1p1
254 0 2110 dm-0
Code:
/ $ df
Filesystem Size Used Free Blksize
/dev 402.1M 84K 402M 4096
/mnt/asec 402.1M 0K 402.1M 4096
/mnt/obb 402.1M 0K 402.1M 4096
/dev/shm 402.1M 0K 402.1M 4096
/system 1.2G 414.5M 766.6M 4096
/modemfs 15.7M 4.3M 11.4M 4096
/cache 826.8M 84.8M 742M 4096
/efs 15.7M 4.5M 11.2M 4096
/preload 315M 64.2M 250.8M 4096
/data 4.6G 4G 699.2M 4096
/mnt/.lfs: Function not implemented
/storage/sdcard0 4.6G 4G 699.2M 4096
/mnt/asec/com.spruds.transport.pro.tallin-1 2M 888K 1.1M 4096
/storage/sdcard1 3.7G 905.7M 2.8G 32768
Even before everything went wrong I tried to use parted command and get an error
Code:
~ # parted /dev/block/mmcblk0
GNU Parted 1.8.8.1.179-aef3
Using /dev/block/mmcblk0
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) list
list
check NUMBER do a simple check on the file system
cp [FROM-DEVICE] FROM-NUMBER TO-NUMBER copy file system to another partition
.....
.....
copyright information of GNU Parted
(parted) print
print
Error: Unable to satisfy all constraints on the partition.
This is fdisk print before disaster
Code:
~ # fdisk /dev/block/mmcblk0
The number of cylinders for this disk is set to 954368.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Command (m for help): p
Disk /dev/block/mmcblk0: 7818 MB, 7818182656 bytes
1 heads, 16 sectors/track, 954368 cylinders
Units = cylinders of 16 * 512 = 8192 bytes
Device Boot Start End Blocks Id System
/dev/block/mmcblk0p1 1 954368 7634943+ ee EFI GPT
Partition 1 does not end on cylinder boundary
And then I deleted it
Code:
~ # fdisk /dev/block/mmcblk0
The number of cylinders for this disk is set to 954368.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Command (m for help): p
Disk /dev/block/mmcblk0: 7818 MB, 7818182656 bytes
1 heads, 16 sectors/track, 954368 cylinders
Units = cylinders of 16 * 512 = 8192 bytes
Device Boot Start End Blocks Id System
/dev/block/mmcblk0p1 1 954368 7634943+ ee EFI GPT
Partition 1 does not end on cylinder boundary
Command (m for help): d
Selected partition 1
Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table
fdisk: WARNING: rereading partition table failed, kernel still uses old table: Device or resource busy
To be honest, I've never seen a problem like that. In Odin there's an option to erase all nand. I don't know if this would help you, since you should have an efs backup and I don't know if it will bring consequences.
Inviato dal mio GT-I8190 con Tapatalk 2
Try firmware posted here, with pit-file.
It's worth a try. It has saved me a few times, but from other problems.
tys0n said:
Try firmware posted here, with pit-file.
It's worth a try. It has saved me a few times, but from other problems.
Click to expand...
Click to collapse
I have "some" goldenxx.pit file already. And I took original firmware from some semi-official sources. Though I didn't have this CSC file. Also In original article (on 4pda.ru) they say NOT TO use this firmware with I8190N (which I have) ...
soswow said:
I have "some" goldenxx.pit file already. And I took original firmware from some semi-official sources. Though I didn't have this CSC file. Also In original article (on 4pda.ru) they say NOT TO use this firmware with I8190N (which I have) ...
Click to expand...
Click to collapse
Oh sorry. My mistake. I missed it was i8190N.
Sent through time and space from my s3mini/CM10.
Found it!
I found it!
The answer was in PIT file, because as it says here:
you will only need to use this if a firmware update needs to change your partition layout (very very unlikely) or if you mess up you partition table (you don’t want to do this)
Click to expand...
Click to collapse
Which is definitely my case.
So, I tried that GT-I8190N and GT-I8190 should be used with different PIT files (I tried to use for GT-I8190 one). So I found long list of PIT files here
Thank you everyone for help.

[Solved] /efs partition gone

Hello, [Solution lower in this thread]
My /EFS partition is gone. I dont know why, because I wasnt doing anything with my phone at that moment. Until this problem I was running cyanogenmod nightly. The battery was wasted I think because it feels slightly thicker than normal. I already replaced it.
I have an efs.img made with SA manager.
Symptoms:
Bootloop
Original recovery says:
Code:
E: failed to mount /efs (invalid argument)
I can get into recovery & download mode.
I can still flash philz custom recovery.
When in cwm I can still flash a zip with a rom, but it wont start.
These are the steps I tried to get my phone working again:
ODIN
Flashed stock jellybean with original pit file, and checked "clear efs" in odin 3.09.
Custom Recovery
Connected with ADB, and executed the following commands:
Code:
But as you can see that doesnt help much.
I tried several other things, but they boil down to the same. I used an aroma efs restore tool, but it just executes the dd command and fails the same way.
jogai said:
Hello,
My /EFS partition is gone. I dont know why, because I wasnt doing anything with my phone at that moment. Until this problem I was running cyanogenmod nightly. The battery was wasted I think because it feels slightly thicker than normal. I already replaced it.
I have an efs.img made with SA manager.
Symptoms:
Bootloop
Original recovery says:
Code:
E: failed to mount /efs (invalid argument)
I can get into recovery & download mode.
I can still flash philz custom recovery.
When in cwm I can still flash a zip with a rom, but it wont start.
These are the steps I tried to get my phone working again:
ODIN
Flashed stock jellybean with original pit file, and checked "clear efs" in odin 3.09.
Custom Recovery
Connected with ADB, and executed the following commands:
Code:
~ # mount
mount
rootfs on / type rootfs (rw)
tmpfs on /dev type tmpfs (rw,seclabel,nosuid,relatime,mode=755)
devpts on /dev/pts type devpts (rw,seclabel,relatime,mode=600)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,seclabel,relatime)
selinuxfs on /sys/fs/selinux type selinuxfs (rw,relatime)
tmpfs on /tmp type tmpfs (rw,seclabel,relatime)
tmpfs on /storage type tmpfs (rw,seclabel,relatime,mode=050,gid=1028)
tmpfs on /mnt/secure type tmpfs (rw,seclabel,relatime,mode=700)
tmpfs on /mnt/fuse type tmpfs (rw,seclabel,relatime,mode=775,gid=1000)
/dev/block/mmcblk0p7 on /cache type ext4 (rw,seclabel,relatime,user_xattr,barrier=1,journal_async_commit,data=ordered)
/dev/block/vold/259:3 on /storage/sdcard0 type vfat (rw,dirsync,nosuid,nodev,noexec,relatime,uid=1023,gid=1023,fmask=0007,dmask=0007,allow_uime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
~ # mke2fs /dev/block/mmcblk0p3
mke2fs /dev/block/mmcblk0p3
mke2fs 1.41.14 (22-Dec-2010)
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
Stride=0 blocks, Stripe width=0 blocks
160 inodes, 1280 blocks
64 blocks (5.00%) reserved for the super user
First data block=1
Maximum filesystem blocks=1310720
1 block group
8192 blocks per group, 8192 fragments per group
160 inodes per group
Writing inode tables: done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 27 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
~ # dd if=/storage/sdcard0/efs.img of=/dev/block/mmcblk0p3 bs=4096
dd if=/storage/sdcard0/efs.img of=/dev/block/mmcblk0p3 bs=4096
dd: writing '/dev/block/mmcblk0p3': No space left on device
321+0 records in
320+0 records out
1310720 bytes (1.3MB) copied, 0.035800 seconds, 34.9MB/s
~ # chown 1001:radio /efs/nv_data.bin
chown 1001:radio /efs/nv_data.bin
chown: /efs/nv_data.bin: No such file or directory
But as you can see that doesnt help much.
I tried several other things, but they boil down to the same. I used an aroma efs restore tool, but it just executes the dd command and fails the same way.
Click to expand...
Click to collapse
so hold on!
the dd is failing because the img file is larger than the partition
why?
https://github.com/CyanogenMod/andr...common/blob/cm-11.0/rootdir/fstab.smdk4210#L9
i dont have an exynos4 device, but it seems p1 is /efs. and you are flashing p3, wtf!!! its a miracle if the phone is not fully bricked!! also, was efs mounted while you dd'ed? that would have corrupted it! not to mention using chown on it.
seriously, please stop randomly touching things and be very sure of what you do next or you'll have an unrecoverable brick soon.
p2 and p3 seem to be the bootloaders:
https://gitlab.com/ameer1234567890/...part_layouts/raw/partlayout4nandroid.GT-N7000
so. have you tried rebooting the phone after this? do you still have recovery and download mode?
if so, you need to recover p3 somehow. google a method then ASK before doing anything.
go to recovery and adb shell to it.
use blockdev command to find out the sizes of partitions p1 p2 and p3.
compare it to the size of the alleged-efs.img file you have, which apparently may actually be anything but.
unmount everything from recovery, then you can just adb pull /dev/your/desired/partition.
(i havent seen this used anywhere in xda, but i use it all the time. easier than dd'ing)
get images of your current p1 p2 and p3.
check that p3 and alleged-efs.img match (except for size) to verify that p3 was actually overwritten.
check the contents of alleged-efs.img and verify that it actually is an efs partition image.
dont make any further changes, and post the result of EVERYTHING here
Yes. Can confirm p1 is EFS.
This is N7000 partition table print by parted.
Model: MMC VYL00M (sd/mmc)
Disk /dev/block/mmcblk0: 15.8GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 4194kB 25.2MB 21.0MB ext4 EFS
2 25.2MB 26.5MB 1311kB SBL1
3 27.3MB 28.6MB 1311kB SBL2
4 29.4MB 37.7MB 8389kB PARAM
5 37.7MB 46.1MB 8389kB KERNEL
6 46.1MB 54.5MB 8389kB RECOVERY
7 54.5MB 264MB 210MB ext4 CACHE
8 264MB 281MB 16.8MB MODEM
9 281MB 1174MB 893MB ext4 FACTORYFS
10 1174MB 3322MB 2147MB ext4 DATAFS
11 3322MB 15.2GB 11.9GB fat32 UMS
12 15.2GB 15.8GB 537MB ext4 HIDDEN
The efs backup image in my phone is about 20mb.
GL.
you havent answered my questions.
so. have you tried rebooting the phone after this? do you still have recovery and download mode?
go to recovery and adb shell to it.
use blockdev command to find out the EXACT sizes of partitions p1 p2 and p3.
or use any other command you want.
compare it to the EXACT size of the alleged-efs.img file you have.
apparently it might be a match for p1, which is good.
get images of your current p1 p2 and p3:
unmount everything from recovery, then you can just adb pull /dev/your/desired/partition.
(i havent seen this used anywhere in xda, but i use it all the time. easier than dd'ing)
this is another way to find the exact partition sizes by the way: looking at the image sizes
check that p3 and alleged-efs.img match (except for size) to verify that p3 was actually overwritten.
do you absolutely trust that your alleged-efs.img is a good efs backup? you can mount it read only in your linux pc and check the contents of it to verify that it actually is an efs partition image. or you can just be sure that it is the right image. or you can pm it to me and i can check that.
you can pm the 4 partition images so i can see whats going on.
i think the phone has two equal bootloader copies (because corruption means unrecoverable brick) and you borked one. that's why it might be still booting. we need to restore p3 asap. please google the subject and check my asumption if you can.
---------- Post added at 03:31 PM ---------- Previous post was at 02:35 PM ----------
of course if you are lazy you can just:
dd if=/storage/sdcard0/efs.img of=/dev/block/mmcblk0p1
or:
adb push your/pc/dir/efs.img /dev/block/mmcblk0p1
MAKE SURE that the efs partition is not mounted before doing those.
you dont need any kind of chown if the backup is ok.
you need to recover p3. it could be as simple as:
adb pull /dev/block/mmcblk0p2 sbl.img
adb push sbl.img /dev/block/mmcblk0p3
if the two copies are the same, BUT DONT DO ANYTHING UNTIL YOU ARE VERY SURE!
if you use, say, odin now, and the writing of p2 gets interrupted for any reason, there wont be p3 to boot! so device is bricked FOREVER. no recovery possible without JTAG. you need to fix this ASAP.
your first TO-DO: verify the assumption that p2 and p3 are supposed to be two bit-by-bit exact copies of the bootloader.
any rom that contains a bootloader is extremely dangerous to flash at this time. this includes stock.
Thanks for your concern!
I got my instructions from here: http://techbeasts.com/2013/11/29/how-to-restore-and-back-up-efs-data-on-samsung-galaxy-devices/
Thats why I was tring p3. The aroma backup tool did try the same partition.
I tried all this several times, and tried to odin flash several times. The phone is still not bricked and I still can get to download & recovery just fine.
I'm at work now, but will post my findings asap.
jogai said:
Thanks for your concern!
I got my instructions from here: http://techbeasts.com/2013/11/29/how-to-restore-and-back-up-efs-data-on-samsung-galaxy-devices/
Thats why I was tring p3. The aroma backup tool did try the same partition.
I tried all this several times, and tried to odin flash several times. The phone is still not bricked and I still can get to download & recovery just fine.
I'm at work now, but will post my findings asap.
Click to expand...
Click to collapse
I would try to restore efs first to see how it goes. I suspect SBL2 maybe not important!
forest1971 said:
I would try to restore efs first to see how it goes. I suspect SBL2 maybe not important!
Click to expand...
Click to collapse
SBL2 is probably the 2nd copy of the bootloader. if SBL1 gets damaged (eg: interrupted odin) the phone is bricked and unbrickable, except by taking it to a JTAG house.
if you are not going to reseach this, at least copy p2 over p3:
adb pull /dev/block/mmcblk0p2 sbl.img
adb push sbl.img /dev/block/mmcblk0p3
Code:
~ # dd if=/dev/block/mmcblk0p2 of=sdcard/sbl1.img
dd if=/dev/block/mmcblk0p2 of=sdcard/sbl1.img
2560+0 records in
2560+0 records out
1310720 bytes (1.3MB) copied, 0.400897 seconds, 3.1MB/s
~ # dd if=/dev/block/mmcblk0p3 of=sdcard/sbl3.img
dd if=/dev/block/mmcblk0p3 of=sdcard/sbl3.img
2560+0 records in
2560+0 records out
1310720 bytes (1.3MB) copied, 0.161615 seconds, 7.7MB/s
Result:
https://filetea.me/t1sxlmPdQ9xSe2qh94HX82wMQ
https://filetea.me/t1sVUTXpxrWQ2mRSIx600aCqg
Code:
~ # dd if=sdcard/efs.img of=/dev/block/mmcblk0p1
dd if=sdcard/efs.img of=/dev/block/mmcblk0p1
40960+0 records in
40960+0 records out
20971520 bytes (20.0MB) copied, 6.726656 seconds, 3.0MB/s
Seems to work!
Code:
~ # mkdir /efs
mkdir /efs
~ # busybox mount -w -t ext4 /dev/block/mmcblk0p1 /efs
busybox mount -w -t ext4 /dev/block/mmcblk0p1 /efs
I think its strange I had to make /efs, and after reboot its seems gone:
Code:
~ # mount
mount
rootfs on / type rootfs (rw)
tmpfs on /dev type tmpfs (rw,seclabel,nosuid,relatime,mode=755)
devpts on /dev/pts type devpts (rw,seclabel,relatime,mode=600)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,seclabel,relatime)
selinuxfs on /sys/fs/selinux type selinuxfs (rw,relatime)
tmpfs on /tmp type tmpfs (rw,seclabel,relatime)
tmpfs on /storage type tmpfs (rw,seclabel,relatime,mode=050,gid=1028)
tmpfs on /mnt/secure type tmpfs (rw,seclabel,relatime,mode=700)
tmpfs on /mnt/fuse type tmpfs (rw,seclabel,relatime,mode=775,gid=1000)
/dev/block/mmcblk0p7 on /cache type ext4 (rw,seclabel,relatime,user_xattr,barrier=1,journal_async_commit,data=ordered)
While in fstab.smdk4210:
Code:
# Android fstab file.
#<src> <mnt_point> <type> <mnt_flags and options> <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
# data partition must be located at the bottom for supporting device encryption
/dev/block/mmcblk0p9 /system ext4 ro,noatime wait
/dev/block/mmcblk0p7 /cache ext4 noatime,nosuid,nodev,journal_async_commit,errors=panic wait,check_spo
/dev/block/mmcblk0p1 /efs ext4 noatime,nosuid,nodev,journal_async_commit,errors=panic wait,check_spo
/dev/block/mmcblk0p10 /data ext4 noatime,nosuid,nodev,discard,noauto_da_alloc,journal_async_commit,errors=panic wait,check_spo,encryptable=/efs/metadata
/dev/block/mmcblk0p12 /preload ext4 noatime,nosuid,nodev,journal_async_commit wait
# vold-managed volumes ("block device" is actually a sysfs devpath)
/devices/platform/dw_mmc/mmc_host/mmc0/mmc0 auto auto defaults voldmanaged=sdcard0:11,nonremovable,noemulatedsd
/devices/platform/s3c-sdhci.2/mmc_host/mmc1 auto auto defaults voldmanaged=sdcard1:auto
/devices/platform/s3c_otghcd/usb auto auto defaults voldmanaged=usbdisk0:auto
# recovery
/dev/block/mmcblk0p5 /boot emmc defaults recoveryonly
/dev/block/mmcblk0p6 /recovery emmc defaults recoveryonly
/dev/block/mmcblk0p8 /modem emmc defaults recoveryonly
Odin'd & working again!
Many thanks to everyone who wanted to help this dumbass out! Much appreciated!
I think its strange I had to make /efs, and after reboot its seems gone:
Code:
~ # mount
mount
rootfs on / type rootfs (rw)
Click to expand...
Click to collapse
/ is rootfs which is a special instance of tempfs (which is a ram drive). nothing you put in / will survive a reboot.

Categories

Resources