Related
Hi
My sd card on my Desire has become corrupted. I have a2sd+ on there; I can start from scratch (I accept the risk of installing development ROMs!) but I could really do with getting to the photos I took this morning before the card crashed.
gpart won't find the partitions at all but there's definitely still data on the card - if I strings the card I can see the DOS directory structure.
I used ROM Manager to create a 512MB ext partition with 0MB swap; I tried creating a w95 FAT32 (lba) partition of all the disk except the last 512MB using fdisk, but the partitions won't mount when I do that.
Anyone got an idea what values I should pass to fdisk to get it back?
I have
Disk /dev/sdb: 8017 MB, 8017412096 bytes
247 heads, 62 sectors/track, 1022 cylinders
Units = cylinders of 15314 * 512 = 7840768 bytes
I figured the FAT32 part is probably first, so I calculated the size of a 512MB partition as 65 blocks and assigned the first 956 blocks to the FAT partition, with the rest as the ext partition, but it made no difference.
I tried getting RM to create a partition on a second card I have and when I look at it in fdisk it looks really weird - there's messages about "Partition 1 has different physical/logical beginnings (non-Linux?)" and "Partition 1 does not end on a cylinder boundary"
Is there a way to recreate the partitions that ROM Manager would create without wiping the existing data?
Thanks!
I'm currently dual booting Prime & Ubuntu. If I understand correctly, I have to replace the Ubuntu boot loader with CWM to update Prime. Given the different combinations of 16GB/32GB and dual booting/pure Android/pure Ubuntu, I really want to understand what the partitions are before I start playing. I know enough to know I don't want to copy & paste text that starts with 'sudo dd' into my terminal w/o understanding exactly what it's doing.
Can anyone tell me which partitions serves what purpose? I flashed Ubuntu with flash-linux-android.sh (Android is default, bootable into Ubuntu by holding down volume key during boot).
mmcblk0p1 537MB ext4 (looks androidy, fake asus bios bootanimation.zip)
mmcblk0p2 555MB ext3 (only see lost+found)
mmcblk0p3 2.1 MB ext3 (only see lost+found)
mmcblk0p4 555MB ext3 (only see lost+found)
mmcblk0p5 5.2 MB unknown (?)
mmcblk0p6 524 kB unknown (?)
mmcblk0p7 25 GB ext3 (looks like Prime ROM and prob /sdcard based on size)
mmcblk0p8 4.2 GB ext4 (Ubuntu's / partition)
mmcblk0p9 8.4 MB unknown (?)
mmcblk0p10 8.4 MB unknown (?)
scottt732 said:
I'm currently dual booting Prime & Ubuntu. If I understand correctly, I have to replace the Ubuntu boot loader with CWM to update Prime. Given the different combinations of 16GB/32GB and dual booting/pure Android/pure Ubuntu, I really want to understand what the partitions are before I start playing. I know enough to know I don't want to copy & paste text that starts with 'sudo dd' into my terminal w/o understanding exactly what it's doing.
Can anyone tell me which partitions serves what purpose? I flashed Ubuntu with flash-linux-android.sh (Android is default, bootable into Ubuntu by holding down volume key during boot).
mmcblk0p1 537MB ext4 (looks androidy, fake asus bios bootanimation.zip)
mmcblk0p2 555MB ext3 (only see lost+found)
mmcblk0p3 2.1 MB ext3 (only see lost+found)
mmcblk0p4 555MB ext3 (only see lost+found)
mmcblk0p5 5.2 MB unknown (?)
mmcblk0p6 524 kB unknown (?)
mmcblk0p7 25 GB ext3 (looks like Prime ROM and prob /sdcard based on size)
mmcblk0p8 4.2 GB ext4 (Ubuntu's / partition)
mmcblk0p9 8.4 MB unknown (?)
mmcblk0p10 8.4 MB unknown (?)
Click to expand...
Click to collapse
Years later, I have the same question. Serious bump!
Different hardware and specifics, suerly ( gt p5113, cm10 on internal sd, debian on external sd, eventually i want to boot init from external sd ), but same underlying question: what is the layout of the internal memory card partitions? where is rootfs mounted from? output of mount is opaque wrt this.
Ideas? Links?
Do you have a linux computer that you can use to run olife? There is an option to temporarily flash CWM to upgrade android
I just bought a new Quality micro SD from Samsung, 32GB EVO. I was using a brandless 32GB.
I used Win32DiskImager program (windows) to create images for both SD cards. One has everything installed what I want.
The newer Samsung has only the basic apps like link2SD, rootinternal2external.
The strange part is that there is an difference in the amount of free storage, both are parttioned with the same program.
The only difference is that the amount of partitions:
Black brandless: 3 partitions: Data,App,swap
Samsung: Data , App
But the image file that I pulled from the SD cards is as follows:
Black: 31.691.112.448 MB
Samsung: 31.440.502.784 MB
How come there is an difference?
I want to burn the old image on my new card. I guess I can make a partition of the black SD card about 260MB smaller, then create
a new image again, then burn it. I hope that works.
But is it normal that the amount of storage differs between brands???
I think that yes, regards
[How to] Copy image between different size micro SD
I found a way to copy my larger SD image, made with Win32diskimager, into my smaller Samsung 32GB micro SD:
http://softwarebakery.com/shrinking-images-on-linux
Basicly you have to do:
- Use a tool to access the micro SD and make the last partition XXX MB smaller. This creates unpartitioned space.
- Create a image file from that micro SD: xxxx.img
- Boot into a Linux Operating system, Like Ubuntu 14.04LTS, by installing it on your HD or boot directly from a live CD
- Open a terminal screen. With CTRL+ALT+T, or use the graphical UI to open one terminal.
- in that terminal, execute the command: fdisk -l xxxx.img
- The output of the command looks like the following:
Disk myimage.img: 6144 MB, 6144000000 bytes, 12000000 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000ea37d
Device Boot Start End Blocks Id System
myimage.img1 2048 9181183 4589568 b W95 FAT32
Now we have to calculate where we want to cut the xxxx.img file. We want to cut away the last part that is not allocated to any partition.
Above you see the line "myimage.img1 2048 9181183 4589568 b W95 FAT32".
The last partition ends at 9181183, in your example it will be different ofcourse, just take the end of the last partition.
If you have 2 partitions, then you have 2 lines under:
"Device Boot Start End Blocks Id System"
in this example we have to cut from 9181183+1. Identify also what the block size is. In our example it's 512.
512 is the block size. In your example it might be different. If it's different, execute below command with a different value.
Now we cut away the empty space that is not used in our xxx.img.
Execute in the terminal screen: truncate --size=$[(9181183+1)*512] xxxx.img
The xxxx.img file is now smaller and can be burned into the smaller device.
so I was just trying to dual boot mtk 6582 (qmobile noir I7) I have set up three partitions in sd card
system 1024 MB (Ext 4 )
data 2048 MB (ext 4 )
cache 550 MB (ext 4)
I changed updater script to and replaced mmcblk0p5 to mmcblk1p2 as 2 is partition no on ext SD but it doesn't make any changes to it .
I also edited fstab in bootimg to access these locations instead of [email protected], [email protected] and [email protected] to mmcblk1p2, mmcblk1p3 and mmcblk1p4 respectively but what I see is there is no placement of files in these partitions
what am I doing wrong ?
I used mintool to make partitions and then latter see the state of these partitions after flashing rom as secondary rom
Hi,
After a botched attempt to install LineageOS 17 on my Samsung Galaxy S5, I decided to revert to LOS16. the problem is that I had completely wiped my device in order to install LOS 17, and my only available 16.x ROM was gone, so I found another ROM on a backup site (October 2020 version).
Once installed, this version did not recognize my SD card where I had stored all my user data. Therefore I dumped the partitions on my Linux PC using dd, and let Android reformat the card.
I dumped 2 individual partitions (not the whole device with the partition table), one of 16Mb, and the other about 29Gb (it's a 32Gb SD card).
Now I want to browse my old data on the backup, but I cannot mount or fsck the partition dumps. the superblock is not recognized as ext*, fat, or even f2fs.
This is all the info I have on the 2 partitions:
Bash:
$ sudo fdisk -l klte-sdc1.img
Disk klte-sdc1.img: 16 MiB, 16777216 bytes, 32768 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
$ sudo fdisk -l klte-sdc2.img
Disk klte-sdc2.img: 29.71 GiB, 31897140736 bytes, 62299103 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Also, for comparison, I dumped the partition table of the currently working SD card:
Bash:
$ sudo fdisk -l /dev/sdc
Disk /dev/sdc: 29.72 GiB, 31914983424 bytes, 62333952 sectors
Disk model: MicroSD/M2
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 35D0FC04-06BD-4578-87FB-D6ED991C03A5
Device Start End Sectors Size Type
/dev/sdc1 2048 34815 32768 16M unknown
/dev/sdc2 34816 62333918 62299103 29.7G unknown
As you see, the partition sizes are identical. I can chance it and dd the original partitions into the new ones, but I don't want to lose recent data on the current partition. I could also corrupt the partition headers if the ones in the backups are corrupt, and be back to square 1.
Can anybody help? Which kind of partition or specialized tools shall I look for?
Thanks,
gm