Delete ext partition contents - G1 Q&A, Help & Troubleshooting

What's the console command for deleting the contents of the ext partition? (\system\sdcard)
Can you reformat the ext partition from the recovery console?
Thanks

If you want to delete the contents of your /sdcard then in recovery console mount /sdcard then rm /sdcard/* should do it for your fat32. To clear your ext3 do in recovery console mke2fs -j /dev/block/mmcblk0p2

Related

Partition Formatting Through Terminal???

can anyone provide me with the terminal commands to formatting ext2 partitions
mke2fs /dev/block/mmcblk0p2
that's assuming you want to format the 2nd partition of your sd card to ext2
this requires e2fsprogs -- check here if your build doesn't have them
if you want to partition your sd card use SDSplit
if you want to reformat your already existent ext2 partition run this in terminal
su
rm -r /system/sd/*
reboot
nephron said:
rm -r /system/sd/*
Click to expand...
Click to collapse
this does not format the partition -- it removes (deletes / unlinks) all files in that directory or file system mounted there.
fairly substantial difference, but your suggestion may, indeed accomplish what the OP set out to do if that's all they wanted

backup ext3 partition

Hey guys,
is there a way to backup the ext3 partition? when flashing Drizzys ROM you must have a clean ext3 to do initial boot. without clean ext3 you get a bootloop. Ive flashed his ROMS several times and i want to flash a new cyans 4.0.1 but im afraid that ill lose my apps.
any ideas on how to keep your info AANNNDDDD flash drizzys ROM??
If you have adb up and running you can adb pull /system/sd/app (some directory on your computer) to make a back up the adb push (same dir from above) /system/sd/app if you don't have adb then i do not know
If you ant to go from Drizzy to Cyan you should be fine. Just wipe and flash Cyan.
For fututre refrence, to back up your ext, go in to the recovery console
Code:
mkdir /sdcard/app/
mkdir /sdcard/app-private/
cp /system/sd/app/* /sdcard/app
cp /system/sd/app-private/* /sdcard/app-private
All that does is make the "app" and "app-private" folders on the fat32 partition of your sdcard and copies the apps to them from the ext3 partition (the mount point of ext3 is /system/sd).
To push them back after flashing a new ROM (again from recovery, don't do this from the terminal when your phone is on):
Code:
mount -o rw /dev/block/mmcblk0p2 /system/sd
cp /sdcard/app/* /system/sd/app/
cp /sdcard/app-private/* /system/sd/app-private
This time was also have to mount the ext3 as re-writeable so we can copy to it.
Hope that helps.
or just do cp /system/sd/* /sdcard
gets you all the folders in /system/sd
This makes it really easy http://forum.xda-developers.com/showthread.php?t=549876

Question about first time Swap setup....

i am interested in creating a SWAP partition on my sd card to increase rom speed, even tho CMs roms are preety fast already. I hav e 8gb CD with about 500mb ext2. now if i use this method to create Swap partition:
Reboot and enter recovery
Enter console
#parted /dev/block/mmcblk0
#print (to verfiy we know what size card we are dealing with, the details should be straight forward)
rm 1
rm 2
mkpartfs primary fat32 0 7200
mkpartfs primary ext2 7200 7700
mkpartfs primary linux-swap 7700 7732
#print (to verify we have the 3 partitions)
i know how to backup music and everything on fat32 to my PC(to later restore) because doing the above will reformat entire card.
my question is do i need to back up my ext2 with all my apps and data on it, and if so how? or will it do everything itself when i reboot my CM rom? i am trying to create this swap partition without really changing everything and without wiping
There are quite a few threads on this, but granted they aren't that easy to find (I'm looking at you, people who name their threads "PLZ HELPPPPP!!")
boot in to recovery and go to the console:
cd sdcard
mkdir app
mkdir app-private
cp /system/sd/app/* /sdcard/app/
cp /system/sd/app-private/* /sdcard/app-private/
All your apk's are now on your Fat partition, copy those two folders to your computer
after you have remade the partitions go back to the recovery console (don't do this in terminal, but you can use adb shell when the phone is in recovery mode). This time we have to mount your new ext partition as rw.
mount -o rw /dev/block/mmcblk0p2 /system/sd
cd /system/sd
mkdir app
mkdir app-private
cp /sdcard/app/* /system/sd/app/
cp /sdcard/app-private/* /system/sd/app-private/
You're done. expect your phone to take a few minutes to boot up as it re-creates the dalvik-cache.

Unable to mount SD card in console / terminal

I am trying to mount my SD card via console in recovery, I get
mount: mounting /dev/block/mmcblk0p2 on /system/sd failed: Invalid argument
Any ideas whats wrong?
In recovery you can try:
mount -a
to just mount everything. Try that out.
Are you trying to copy files to the sdcard or the extX partition? It looks like the ext partition because that's blk0p2...
The sdcard would be ums_enable.

[9001]Mounting external SD Card as ext3

Hey,
I like to mount my external SD Card as ext3 to support large files. The SD Card is formatted with ext3 but now Android shows only an empty folder.
So i tried to remount the SD:
Code:
mount -o rw,remount -t ext3 /dev/block/vold/197:33 /mnt/sdcard/externald_sd
But it doesnt use something... Does anybody has an idea? Some Example or sthing else?
Greetz
FaxXer said:
Hey,
I like to mount my external SD Card as ext3 to support large files. The SD Card is formatted with ext3 but now Android shows only an empty folder.
So i tried to remount the SD:
Code:
mount -o rw,remount -t ext3 /dev/block/vold/197:33 /mnt/sdcard/externald_sd
But it doesnt use something... Does anybody has an idea? Some Example or sthing else?
Greetz
Click to expand...
Click to collapse
u need a kernel that supports ext3. u can ask one of the guys compiling at the moment if they have time to add an ext3 module for u.
May be a stupid question:
would ext4 work instead? I thought the system partition would use this FS.
filesystem is already ext4
wintel_mac said:
May be a stupid question:
would ext4 work instead? I thought the system partition would use this FS.
Click to expand...
Click to collapse
well the system uses ext4 so it should work, but i'm not sure what u're trying to achieve. i use a 16 gb class 10 formatted fat32
Blumdum said:
filesystem is already ext4
Click to expand...
Click to collapse
He's talking about formatting external sd-card
When I get him right, he has a file that exceeds the 4GB FAT32 limit.
So he looks for an alternative to FAT32, which might be some kind of ext*-FS.
wintel your right!
In the Android-Hilfe Forum someone said the system expect first an vfat partition and then the ext. I think thats wrong cause its not working but somehow it has to go.
Hmm should I write these mount command I postet in the init.rc? Or something else. Would be very nice if you post your ideas!
Thanks
init.rc+ ext3 module/object included in kernel
Hmm okay thats good but how do I use them? So I can read and write to my external sd card with an ext3 or ext2 partition.
Thanks
Come on guys where are the great developers?!
Ok I did a test with busybox inbuilt mount, but I tried only with an image.
Not with a real SD card! This worked for me:
On a linux box:
# dd if=/dev/zero of=/tmp/image bs=1M count=1k
# mkfs.ext4 /tmp/image
Copy file to your phone. Then:
On the phone with terminal:
# mkdir /sdcard/mmnt
# busybox mount -o loop /sdcard/image /sdcard/mmnt
To unmount:
# busybox umount -l /sdcard/mmnt
Anybody tried that?
If I understand u right u puting an image file (ext3/4) on the sd and mount that as a virtual disk. Wouldn't the image file be bound to the same restrictoins as other content on a fat32 file system? Like the 4 gig limit!
YOU WILL LOSE ALL DATA ON YOUR SDCARD IF YOUR FDISK
BACKUP WHATEVER IS ON THERE FIRST!!!
YOU'VE BEEN WARNED
using a photon 4g but....
what i did was get an external sdcard reader writer...
(used ubuntu) and let it mount
fdisk device and DELETE ALL PARTITIONS
write
fdisk again
create a linux primary type 83
type mount and grab the /dev/sdcX value (it was /dev/sdc1 for me)
umount that
then
mkfs.ext3 /dev/sdcX ... ( heres the thing though with cyanogen mod 7 kernel 2.6.32.9 SMP PREEMPT)
had to reboot twice for it to be seen in file manager...
its buggy but it does work for the most part
Reviving an old thread, but I just found that I can format a MicroSD under NTFS and it will work with Paragon's NTFS module. At the very least, my phone will mount the drive. I partitioned and formatted it with ext4 on my Linux machine and it didn't recognize it, but I did have it use the GUID partition table. Hoping to be able to load up some videos to take with me.
ext4 sdcard mount works
FaxXer said:
Hey,
I like to mount my external SD Card as ext3 to support large files. The SD Card is formatted with ext3 but now Android shows only an empty folder.
So i tried to remount the SD:
Code:
mount -o rw,remount -t ext3 /dev/block/vold/197:33 /mnt/sdcard/externald_sd
But it doesnt use something... Does anybody has an idea? Some Example or sthing else?
Greetz
Click to expand...
Click to collapse
The problem is with the shell interpreting the special character ":"
To make it work, first create a symlink to the device node:
Code:
ln -s /dev/block/vold/197\:17 /dev/sd2
Then mount it:
Code:
busybox mount /dev/sd2 /mnt/tmp
Code:
sh-4.1# ls -l /dev/sd2
lrwxrwxrwx root root 2013-11-16 14:45 sd2 -> /dev/block/vold/179:17
sh-4.1# mount|grep sd2
/dev/sd2 /mnt/tmp ext4 rw,relatime,user_xattr,acl,barrier=1,data=ordered 0 0
success mounting ext formatted SD Card on Android
An improvement in technique to mount ext formatted SDcard:
1) be root and open terminal
2) insert the card
3) see the block device and partition names from dmesg
4) mount device to location of choice (create the directory if needed)
Below is an example of an SD card with one ext4 partition on it
Code:
bash-4.1# dmesg | tail | grep mmc
<6>[20230.719541] mmc1: new high speed SDHC card at address 0007
<6>[20230.722803] mmcblk1: mmc1:0007 SD32G 29.3 GiB (ro)
<6>[20230.728352] mmcblk1: p1
bash-4.1# busybox mount /dev/block/mmcblk1p1 /data/mnt/sdcard2
tribh said:
An improvement in technique to mount ext formatted SDcard:
1) be root and open terminal
2) insert the card
3) see the block device and partition names from dmesg
4) mount device to location of choice (create the directory if needed)
Below is an example of an SD card with one ext4 partition on it
Code:
bash-4.1# dmesg | tail | grep mmc
<6>[20230.719541] mmc1: new high speed SDHC card at address 0007
<6>[20230.722803] mmcblk1: mmc1:0007 SD32G 29.3 GiB (ro)
<6>[20230.728352] mmcblk1: p1
bash-4.1# busybox mount /dev/block/mmcblk1p1 /data/mnt/sdcard2
Click to expand...
Click to collapse
Would this work just the same way with i9000?
After this, no more access to the extSD by the Windows PC but only with Ubuntu, right?
tetakpatak said:
Would this work just the same way with i9000?
After this, no more access to the extSD by the Windows PC but only with Ubuntu, right?
Click to expand...
Click to collapse
Since it's generic Linux kernel and busybox functionality it should work on any 'droid. The SDcard device name might be different than in the above example - you will see the correct device and partition names after you insert SDcard and run `dmesg | tail` on the tablet or phone.
(of course your device must be rooted and have busybox...)
Typically Windows is engineered not to recognise anything that does not come from Microsoft, so you will not be able to mount the Linux partition via Windows.

Categories

Resources