[Q] Create EXT3 Partition in Nexus S - Nexus S Q&A, Help & Troubleshooting

Hello,
I was wondering if someone could guide me with how to create a ext3 partition in Nexus S.
I tried creating a partition in sdcard using recovery and gparted. recovery keeps failing. says i am not using parted v1.8. etc. And gparted is rendering sdcard corrupted.
Any pointers?
ANB

Why would you want ext3 over the faster default ext4? As for the sd partitioning problem, I would leave it alone in gparted. It does the same thing for me, but shows up un-formatted. I wouldn't dare format it with a partition manager. I did that to a Droid Incredible once and soft bricked it. Took me days how to figure out how to re-partition the partitions. Just a word of advice.

Partition
Sorry,
I want to make a ext4 partition. We have paritions for boot, data, system, sdcard, misc etc.
I was trying to boot into debian in android with chroot. I was wondering if its possible to boot debian natively in Android. Right now, the display and frame buffer is not accessible when i chroot. I just need a partition, to put the debian image into. I dont know how to make this happen.
Any suggestions?
Thank you,
ANB

Related

[INFO] Clarification: reformatting ext partition

I'm posting this because I am seeing lots of confusion in this area.
Most of the guides found on this forum as well as answers given in the q/a section pertaining to this give the following advice for formatting/wiping a ext parition:
Code:
rm -rf /system/sd/*
Although this may fix a lot of problems it does not really reformat the partion.
"rm -rf" just means "remove(delete) --recursively(subfolders as well) --force(don't ask if ok)". This only deletes the files by removing the inode entries from the filesystem table.
To truly reformat and ensure there are no remnants on the partition you need to make a new filesystem on that partition. This will build a new inode table completely instead of just removing entries in the table.
Enter recovery console (filesystem should NOT be mounted when formatted)
Code:
mke2fs /dev/block/mmcblk0p2 #for ext2 partitions
mke2fs -j /dev/block/mmcblk0p2 #for ext3 partitions
"mke2f2" means "make extended2 filesystem"
"-j" means "add a journal"(ext2+journal=ext3)
Hope this helps
Printing this out right now this is a keeper
Thankyou
Thanks buddy...printing now...
Ok, even though I am just begining at Linux I do understand the difference here between the 2 methods (its like the quick format option under windows). My question is, does it matter? Can you explain why the quick method may be detramental or unsafe.
Thanks for the advice dumfuq, but what if you have a ext4 partition?
Total Noob:
I've just been removing the partition and creating a new one.. is that just as effective (obviously the longer route)?
Also, how would you go about reformatting a linux-swap partition? Again, I've just been removing and recreating every time I flash.. I realize this isn't the fastest way.
Thanks a lot. This is very helpful.
Baldyman1966 said:
Ok, even though I am just begining at Linux I do understand the difference here between the 2 methods (its like the quick format option under windows). My question is, does it matter? Can you explain why the quick method may be detramental or unsafe.
Click to expand...
Click to collapse
I don't think just deleting the files is detrimental or unsafe...its just not formatting. For the most part it doesn't matter but if you want a fresh filesystem make a new one.
Thanks for the advice dumfuq, but what if you have a ext4 partition?
Click to expand...
Click to collapse
It should be
Code:
mke2fs -T ext4 /dev/block/mmcblk0p2
But I haven't tried it
I've just been removing the partition and creating a new one.. is that just as effective (obviously the longer route)? Also, how would you go about reformatting a linux-swap partition? Again, I've just been removing and recreating every time I flash.. I realize this isn't the fastest way
Click to expand...
Click to collapse
Yup...just as effective.
For swap
Code:
mkswap /dev/block/mmcblk0p3
But I don't think it is usually necessary to remake the swap after the initial creation (could be wrong on that though and I guess it can't really hurt)
This thread should be listed in the "Informative Links" sticky
simliarly, how would you go about removing the entire ext3 partition, so reclaim that 500mb back into the fat32? i have a htc magic and no longer need apps2sd, so having a ext partition isnt neccesary in my case. i rather use that extra 500mb for media and storage.
is there a special command to do this? i dont want to reformat the entire card since i have a lot of stuff on my fat32. i was hoping there was an easy way. thanks for any advice!
NguyenHuu said:
simliarly, how would you go about removing the entire ext3 partition, so reclaim that 500mb back into the fat32? i have a htc magic and no longer need apps2sd, so having a ext partition isnt neccesary in my case. i rather use that extra 500mb for media and storage.
is there a special command to do this? i dont want to reformat the entire card since i have a lot of stuff on my fat32. i was hoping there was an easy way. thanks for any advice!
Click to expand...
Click to collapse
Not really.
To do this you have to modify the partition table. Personally I would just back up the data, use fdisk (available in recovery console) to delete old and create new partitions, use windows to format the new fat32 partition created with fdisk, and then restore the data.
However since you don't want to reformat, you could try using gparted(or even parted for that matter) to remove the ext3 partition and resize the fat32. Still probably want to backup first though. There are a few tutorials already that walk you through adding an ext3 partition without losing your fat32. It shouldn't be to hard to follow one of them and tweak the commands to remove ext3 and expand the fat32.
thanks for all the advice, i have removed the ext partitions and resize my fat32 successful without data lost. i backed up just in case too. thanks.

[Q] When formatting EXT4 Partition, It doesn't stay?

I tried using MiniTool Partition Wizard to format my android sd card, I split the first half to be fat32 and the second half to be ext4, when I do that though the ext4 partition doesn't stay... I even tried twrp to partition it, to no avail it said it wasn't able to create the ext4 partition but the fat32 partition was made successfully.
**NOTE**
Apparently, you need a swap partition to be able to have ext4? Well, I created one and now everything works fine and dandy, before I didn't have one and it worked great...
You dont need swap for ext partitions.. there is no connection between them.
I dont know much about those tools but if you create partition through recovery.. first it makes ext2 partition later you need to upgrade it to ext4.
rr0yy said:
You dont need swap for ext partitions.. there is no connection between them.
I dont know much about those tools but if you create partition through recovery.. first it makes ext2 partition later you need to upgrade it to ext4.
Click to expand...
Click to collapse
If I could post link I would, but since I cannot mostly because to the site I'm not a developer (stupid rules) and claims I cannot post anything truly helpful, so as an effect cannot post links to my recovery.
My recovery (ZenGarden 2.0.2.7-T) can create an ext2, ext3 and ext4 partition; the use chooses which format and because of Windows limitations you cannot have more then two partitions on an external drive.

[Q] [ZTE V970M] Formatting [email protected] as ext4 and moving /data to it. Possible?

Hey guys
Recently I've got a ZTE V970M (MT6577) phone and so far it's awesome. However, some people have been asking for a way to extend the /data partition because some games are heavy 'n stuff. That's alright.
There is a method which resizes the partitions by altering the MBR on the EMMC and that way the /data partition ends up with 2GB (from [email protected]) + 512MB (the assigned for /data), but I want to do something different, without having to edit the MBR that way. Dunno, it's fishy imo.
My idea was to format [email protected] (which comes in vfat) as ext4 and then editing init.rc and change the partition mount points from [email protected] to [email protected]
If I do that without formatting, the phone boots but it asks for an encryption key. Reading on the net, it's not asking for an encryption key, it's the fallback mode for when it can't mount the /data partition and then it believes it's encrypted, but it isn't.
If I format the [email protected] to ext4 (mke2fs -T ext4 /dev/block/mmcblk0p6), parted shows it's on ext4 and all that shiz, but the phone seems to disconnect itself from ADB once it finishes booting, and hangs in bootloop. Since I can't ADB it, I don't know wtf is going on with the phone. Something tells me I'm close to reaching the goal though.
Looking on the net I found this useful link -> http://blog.kangkang.org/index.php/archives/242 which talks about extending /data the way I want to do (for the Tegra2 one, but it shouldn't matter). However, Chinese isn't my main or secondary language (lol) and google translate does an horrible job at translating it.
So, anyone got ideas on how to extend such partition? I just want to swap the normal /data partition with the internal SDcard partition, so in theory if I format it to ext4 and swap the mount points it should work, it's just a swap, but why it isn't?
Any ideas are greatly appreciated!
Thanks in advance!
- DARKGuy
I hate bumping but, nobody yet? I've seen this being done in other phones... any ideas?
I can't believe no one has an idea yet... come on, this is XDA... wtf is up?
Yeah, I wanna know this too. If formatting the EMMC on my Note1 to anything other that the FAT32 will help?

[Q] sd card second partition

which one is better? ext2, ext3, ext4 or FAT32? and using what tools I should partition the sdcard?
I am using cm9.2.2
before that, I partition sdcard with Amonra Recovery with ext2 and use link2sd and have a problem, some times sdcard removed unexpected, when I reboot sdcard is not read, I pull out the sdcard and insert, and sdcard read normally. I reboot and sdcard not read again, I do this many time and finally can read sdcard. but it happens over and over again. I try to format the phone and install app, move app like unrooted phone, the sdcard work fine..when I try use ext2 with link2sd some times its happend again.,
help me..sorry for my bad english, I am Indonesian.
thank you before..
If you want to know what other people use to do this here I come:
How I make the ext partition:
Minitool partition wizard (windows)
Gparted (Linux)
Clockwork 6.0 (only for CM10+)
I didn't have any trouble with that programs, but be careful with the Clockwork because formats ALL the SD card, the ext and the fat partition, so make sure you do a backup of the SD.
Format of the second partition:
Always ext4
Link App
Link2sd is the best, other caused troubles over the time (reboots, not reading the sd, not reading the ext partition, etc)
chalo99 said:
If you want to know what other people use to do this here I come:
How I make the ext partition:
Minitool partition wizard (windows)
Gparted (Linux)
Clockwork 6.0 (only for CM10+)
I didn't have any trouble with that programs, but be careful with the Clockwork because formats ALL the SD card, the ext and the fat partition, so make sure you do a backup of the SD.
Format of the second partition:
Always ext4
Link App
Link2sd is the best, other caused troubles over the time (reboots, not reading the sd, not reading the ext partition, etc)
Click to expand...
Click to collapse
before that, I've use ext4, but cm9 not support, I change the kernel and still not support ext4, when I use ext3 its work fine..,
mirul_up said:
before that, I've use ext4, but cm9 not support, I change the kernel and still not support ext4, when I use ext3 its work fine..,
Click to expand...
Click to collapse
I used ext4 in all CM from 7 to 11 and no trouble, but always formatting after every wipe with gparted or minitool, because Clockwork 5.0 seem to not format well the ext partition, so after every wipe you should reformat with those programs.
From my experience use ext3, it is good and compatible with everything, allmost
maharu567 said:
From my experience use ext3, it is good and compatible with everything, allmost
Click to expand...
Click to collapse
+1
EXT4 has a tendency to corrupt
(At least for me )
Sent from my GT-I9082 using Tapatalk
Ext4 works great.
(Partition it with AmonRa recovery for a 100% guarantee of success, buggs with clockwork)
Sent from my LG-P500 using xda premium

Unable to create second partition on SD card

I've been trying to partition my SD card, but all steps I take to try and diagnose why I am unable to partition the card is getting me nowhere.
Initially, I used gparted on my laptop to partition the SD card with a v-fat partition and a f2fs partition, both primary partitiond. This was when I found out that no matter what I do the second partition on the SD card, it doesn't seem like the format actually takes. Whatever tool I use complete the partitioning and formatting steps successfully by all appearances but it doesn't seem like the partition is ever actually formatted. What I mean by that is that no matter what the second partition is it never mounts. I get an invalid argument error or bad super blocks and so forth. I can make the first partition anything I want: fat, v-fat, f2fs, ext4 and so forth and that will mount in my terminal without issue, but no matter what I do the 2nd partition always fails to mount. I've also noticed that blkid never has any fs info for the second partition. It gives me the partition UUID and that's all, while the first partition has both part UUID & fs UUID.
I've even gone so far as to just recently get a brand new SD card thinking that perhaps the first SD card was corrupted but I'm still getting the exact same behavior. Also of note is that in gparted when I try to create a secondary partition, I'm unable to mount the second partition so I don't think it has anything to do with my device. I've tried using fdisk, gdisk, parted in the terminal and I've tried using extended partitions and logical partitions and only primary partitions. I've done this before in the past so I know that it is possible.
It almost seems like the SD cards that I have are simply not capable of being partitioned in any way but it's strange that I now have two 512 GB SD cards and they're both giving the exact same behavior so I'm thinking that I'm missing something obvious. Any help anyone could provide as far as trying to figure this out or debug what's going on what I'm doing wrong would be greatly appreciated.
Thanks,
Ryan
only the first partition is mounted from vold. that is normal behaviour on every device. if you want have all partitions mounted automatically install LineageOS.
furthermore, although sdcardfs supports ext4, f2fs, for file transfer via USB MTP afaik fat32, exfat or ntfs is required.
what do you need f2fs partition for? maybe I can point you to workaround.
aIecxs said:
only the first partition is mounted from vold. that is normal behaviour on every device. if you want have all partitions mounted automatically install LineageOS.
furthermore, although sdcardfs supports ext4, f2fs, for file transfer via USB MTP afaik fat32, exfat or ntfs is required.
what do you need f2fs partition for? maybe I can point you to workaround.
Click to expand...
Click to collapse
I don't need anything to mount automatically. I'm saying I can't manually mount these partitions. I also don't need f2fs, that was just an example. I've tried multiple partitions that are just fat, ext4 and many other combinations. Under no partition scheme can I get anything other than the first partition to mount--using the mount command as root.
can you please try gdisk binary from here
https://forum.xda-developers.com/t/...-on-qmobile-z8-with-bricked-dead-emmc.3712171
please post the result of partitioning and formatting.
if you're interested in alternative solution, you can actually format the whole MicroSD card as exfat, and create ext4 partition image on top as regular file. I have done that for my mothers Huawei for Link2SD because it doesn't support adoptable storage.
aIecxs said:
can you please try gdisk binary from here
https://forum.xda-developers.com/t/...-on-qmobile-z8-with-bricked-dead-emmc.3712171
please post the result of partitioning and formatting.
if you're interested in alternative solution, you can actually format the whole MicroSD card as exfat, and create ext4 partition image on top as regular file. I have done that for my mothers Huawei for Link2SD because it doesn't support adoptable storage.
Click to expand...
Click to collapse
I have tried with gdisk but I can try with that specific version and report back. I understand we can create imaged file systems, but one of the main reasons I do this is that I find fat partitions are fickle and can easily be corrupted where the whole partition requires wiped. By having a non fat partition I use that as a better backup option where I find it's easier to recover data in case of corruption or other issues. For such use, being tied to the fat FS would still incur the possibility of data loss so that doesn't work for my purpose.
Thanks and I'll report back,
Ryan
oh I wouldn't rely on f2fs for backups it still has bugs and there are no recovery tools for f2fs
https://forum.xda-developers.com/t/4550931
https://android.stackexchange.com/q/250389
alecxs said:
oh I wouldn't rely on f2fs for backups it still has bugs and there are no recovery tools for f2fs
https://forum.xda-developers.com/t/4550931
https://android.stackexchange.com/q/250389
Click to expand...
Click to collapse
Thanks for the suggestion to use gdisk. I downloaded the version you linked, but I still get the same behavior. I believe it is related to the fact that only the first partition gets a filesystem UUID in blkid. I'm not sure what this means, but it seems clear that the second filesystem isn't being properly created no matter what I do.
that's strange, especially the fact you tried on PC too. on the phone, can you create partitions inside a blank disk image just for double check to rule out kernel issue?
I'll give that a try and report back
alecxs said:
that's strange, especially the fact you tried on PC too. on the phone, can you create partitions inside a blank disk image just for double check to rule out kernel issue?
Click to expand...
Click to collapse
Yeah I'm able to create an image, partition it into a vfat & ext4, then mount both of those partitions.
can you dd the file into mmcblk1 for testing purposes?
alecxs said:
can you dd the file into mmcblk1 for testing purposes?
Click to expand...
Click to collapse
Sorry this isn't clear to me. What am I using to dd into the partition, and do you mean mmcblk1p1/2? As mmcblk1 is the whole disk.
Thanks,
Ryan
yes, I meant the whole disk you created a test file that contains MBR or GPT and two partitions including UUIDs and file systems? If you dd it into the mmcblk1 it should create 1:1 copy of that disk image with two partitions including partition table.
Well I'll be:
Code:
/dev/block/mmcblk1p2 on /data/data/com.termux/files/home/i2 type ext4 (rw,relatime,seclabel) /dev/block/mmcblk1p1 on /data/data/com.termux/files/home/i2 type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
Code:
/dev/block/mmcblk1p2 23M 46K 23M 1% /data/data/com.termux/files/home/i2 /dev/block/mmcblk1p1 4.9M 0 4.9M 0% /data/data/com.termux/files/home/i1
I can possibly use gparted to just resize those! Any thoughts on what was going on, why this method worked? Hrmm looks like resizing fat could be a challenge, but this certainly gets me closer!
there is also parted binary you can use on phone
I have it and I'm playing around with it, thanks for all your help

Categories

Resources