easy question quickest way to format ext4 and linux swap? - G1 Q&A, Help & Troubleshooting

Is it a quick adb command? Thus far I have been removing and remaking the partitions. I'd rather not use gparted or any sort of boot disk.
Thanks

gparted in ubuntu.

jndd333 said:
gparted in ubuntu.
Click to expand...
Click to collapse
Thanks but I'm on Windows 7. Blows any linux distro away

jndd333 said:
gparted in ubuntu.
Click to expand...
Click to collapse
op read fail
http://forum.xda-developers.com/showthread.php?t=534714

B-man007 said:
op read fail
http://forum.xda-developers.com/showthread.php?t=534714
Click to expand...
Click to collapse
That appears to be the same guide I used before, and doesn't seem to say how to format again without deleting the partitions and remaking them. I already have them made, I just want to easily format.

Wii60 said:
That appears to be the same guide I used before, and doesn't seem to say how to format again without deleting the partitions and remaking them. I already have them made, I just want to easily format.
Click to expand...
Click to collapse
format or reformat?
to reformat the ext3 partition
mke2fs -j /dev/block/mmcblk0p2
Click to expand...
Click to collapse
then upgrade to ext4
you dont need to reformat the linux swap partition as nothing remains on there when you shut down
the above code works from terminal, so adding adb shell to the beginning will allow you to do it with adb

B-man007 said:
format or reformat?
to reformat the ext3 partition
then upgrade to ext4
you dont need to reformat the linux swap partition as nothing remains on there when you shut down
the above code works from terminal, so adding adb shell to the beginning will allow you to do it with adb
Click to expand...
Click to collapse
Thanks! I'm not familiar with the linux terminal, this is a big help.

Related

[Solved] Wipe "ext" partition

Hello,
How can I format my "ext" partition? (I don't know what a "ext" partition is - I don't have apps2sd) I tried searching but could not find anything, I am sure it is there somewhere though.
Thanks,
Isaac
isaacwaller said:
Hello,
How can I format my "ext" partition? (I don't know what a "ext" partition is - I don't have apps2sd) I tried searching but could not find anything, I am sure it is there somewhere though.
Thanks,
Isaac
Click to expand...
Click to collapse
an ext2 or ext3 partition is a linux partition where apps2sd files are stored. If you don't have Apps2SD you don't have an ext partition ;-)
If you don't have Apps2SD, and you don't know what an ext partition is (which more than likely means you don't have one) why would you need to wipe it? Anyway, LucidREM's script does this for you.
I am M3 said:
If you don't have Apps2SD, and you don't know what an ext partition is (which more than likely means you don't have one) why would you need to wipe it? Anyway, LucidREM's script does this for you.
Click to expand...
Click to collapse
I'm assuming he had a bootloop and someone blamed it on they ext they assumed he had...
This is the GScript I use to clear the EXT partition, however when you do it within Android and oyu use Apps2SD, it will cause the mobile to reboot. Better off running it in the recovery mode or something.
Code:
rm -r /system/sd/*

Repartition Linux swap

Hi, ive searched around but cannot seem to find a complete answer, but basically is there a way to just repartition my linux swap from 32MB to 96MB.
I dont have a linux cd and so if theres a way to do it through ADB or recovery, that would be great.
Thanks.
D3NNY said:
Hi, ive searched around but cannot seem to find a complete answer, but basically is there a way to just repartition my linux swap from 32MB to 96MB.
I dont have a linux cd and so if theres a way to do it through ADB or recovery, that would be great.
Thanks.
Click to expand...
Click to collapse
i'll give you the short answer then i will edit this post with the long answer
short answer.
you use the resize command in parted on your ext3 and linux-swap partition. if you have used parted from the recovery console a few times before this will be easy but i will post through instructions in a minute
Long answer
go into the recovery console. (recovery screen then last option)
then type (if you want to use adb just type adb shell then do the commands)
Code:
parted /dev/block/mmcblk0
print (you will need the start and end points for your ext3 and linux-swap partitions)
resize 2 [start point] [end - 64mb]
resize 3 [start - 64mb] [end]
print (to verify it worked)
quit
upgrade_fs
reboot
there you go.
I have not tested the resize command on an ext3 partition but i do not think (key word think) it will destroy your data on ext3, but back up just to make sure.
to back up your ext3
with adb (since i assume you have it from the first post)
Code:
adb pull /system/sd [dir on computer]
to restore on empty card
Code:
adb shell mkdir /system/sd
adb push [dir on computer] /system/sd
thanks for the great reply. Will test out now and see what happens!
Can anyone verify if this works?
My only concern is the resizing of ext3. Will it cut out any data since I am shortening the partition?
mr_roboto said:
Can anyone verify if this works?
My only concern is the resizing of ext3. Will it cut out any data since I am shortening the partition?
Click to expand...
Click to collapse
Yes, it works. And yes it *can* corrupt/delete some data from the ext3 depending on how much extra space you have. To be safe, just back-up. The easiest way is doing a BART or switchrom backup (Which backs up you ext) move the backup from the FAT partition to a computer (not necessary but you seem worried about your ext, so just to be safe) resize the partitions and restore your backups.
or just use amon recovery
Thanks for the response guys, I went and started reading about switchrom.
I am planning to do the following steps:
switchrom.sh -s // to store my rom
resize my partitions
switchrom.sh -r
The thread says it stores the nandroid and the app data, I am assuming that means nandroid and ext partition right?
D3NNY said:
Hi, ive searched around but cannot seem to find a complete answer, but basically is there a way to just repartition my linux swap from 32MB to 96MB.
I dont have a linux cd and so if theres a way to do it through ADB or recovery, that would be great.
Thanks.
Click to expand...
Click to collapse
I don't think this is the same, but I am running a hero rom and was wondering what "swappiness" is? I keep reading stuff like "swappiness of 96mb", etc. Is this just referencing the linux swap file size? and with me running a hero rom, what is the best setup for my SD card? I am currently running simply a fat32 partition and an ext3- thanks

How to remove Apps2sd or ext partition

Hey guys first off I'd like to apologize if this thread is already up somewhere but I couldn't find anything in the search
I'm selling my secondary G1 to a non tech savvy user but I'm leaving CM on there, I have an ext partition on the SD card and I was wondering if there was a way I could get rid of the Apps2SD so there wouldn't be a risk of them messing up the phone by switching the card
Thanks
You cann just reformat the whole card to FAT32
or you can delete the ext partition through parted and increase the size of the FAT32 to fill the unused space
How would I reformat the card from adb or recovery console?
AimanF said:
How would I reformat the card from adb or recovery console?
Click to expand...
Click to collapse
you can format with your pc or to format in phone settings either should work for you.
The format option in the phone settings is grayed out, and my sd card reader doesn't seem to be working, is there another way to do it through the phone?
AimanF said:
The format option in the phone settings is grayed out, and my sd card reader doesn't seem to be working, is there another way to do it through the phone?
Click to expand...
Click to collapse
recovery mode
parted dev/block/mmcblk0
print
rm 2
You can use AmonRA's recovery image and format the sdcard with that. You can install it from the terminal in the phone.
su
flash_image recovery/sdcard/recovery-dream-RA-v1.3.2G.img
Yes h/o
adb shell
parted /dev/block/mmcblk0
print
rm 1
rm 2
rm 3
Click to expand...
Click to collapse
This will remove all the data on the SDcard
Go to where it says Disk /dev/block/mmcblk0: XXXXMB
use the number in place of XXXX
mkpartfs primary fat32 0 XXXX
Click to expand...
Click to collapse
type "print" w/o quotes and see if it worked
type quit to exit parted
that should be all
EDIT: all this is while in recovery mode. Ace's method will only remove ext partition but it will not fill the empty space, wasting it
alright cool parted did the trick! Thanks alot everyone!
Tempestrs4 said:
You can use AmonRA's recovery image and format the sdcard with that. You can install it from the terminal in the phone.
su
flash_image recovery/sdcard/recovery-dream-RA-v1.3.2G.img
Click to expand...
Click to collapse
Make sure that there is a space between flash_image recovery and /sdcard
thank you. was a lot of help.
Hey guys, how do I get into the ADB shell?
you just answered your own question.
"adb shell"
After used "rm 1" I typed "print" and shows me same things. I can't format the microSD or delete the partitions, any help?.

How do I know what EXT Partition im on.

Is their a way to check what Ext partition im on?
I haven't flashed a rom in ages and I totally forgot what Ext im on.
Odds are your gonna wipe it anyways, So it really doesnt matter.
MotoMudder77 said:
Odds are your gonna wipe it anyways, So it really doesnt matter.
Click to expand...
Click to collapse
Odds are this doesn't answer my question.
I second this question. I too need to know if I'm on Ext3 or 4. Couldn't remember the last time I partitioned and I totally forgot what it is now.
Aznneedlovetoo said:
Is their a way to check what Ext partition im on?
I haven't flashed a rom in ages and I totally forgot what Ext im on.
Click to expand...
Click to collapse
nmw407 said:
I second this question. I too need to know if I'm on Ext3 or 4. Couldn't remember the last time I partitioned and I totally forgot what it is now.
Click to expand...
Click to collapse
Open command prompt while your phone is connected
Enter
adb shell mount
And somewhere on the bottom you should see ext2, ext3 or ext4. That's your answer.
Most of the times it's accurate.
MotoMudder77 said:
Odds are your gonna wipe it anyways, So it really doesnt matter.
Click to expand...
Click to collapse
Even if you wiped your ext partition, it doesn't change the partition type. If your format it to an ext3 then wipe it... it remains as ext3. And your ext partition type usually does matter because some roms may not support ext4. Most support ext3 with the exception of some of the older roms which support ext2. I recommend ext3 because it has journaling. Just my opinion though.

Remove Bad Sectors on /system

Hi Guys,
I guess I have a lot of bad sectors on my N1.
After installing CM 7 + gapps I have only 19.4 KB free (add to that I have removed most of the built in ringtones from the media folder) in the /system partition.
Does anyone else have problems with bad sectors, and are there any ways to get rid of these. Also now that I have them, how do i minimize them coz I guess a day will come when I may not be able to flash CM
Regards,
Munchy
You can try formatting the system partition (with clockwork or temasek's extreme wipe). If that doesn't work, hook the phone up to a Linux machine and use gparted to repair the partition. You can run Linux from a live CD on windows...
danger-rat said:
You can try formatting the system partition (with clockwork or temasek's extreme wipe). If that doesn't work, hook the phone up to a Linux machine and use gparted to repair the partition. You can run Linux from a live CD on windows...
Click to expand...
Click to collapse
I was waiting for you and the Doc to answer.
Well I already have Ubuntu on dual boot, can you guide me how to use gparted.
Also, I wiped using Amon_Ra, should I give a try using CWM, also please point me to temasek's extreme wipe.
thanks
Amon doesn't wipe the system partition, so you should try clockwork our temaseks extreme wipe.
Here's a link to the later (flash through recovery)...
http://db.tt/fH1vZNM
If that doesn't work, we can give gparted a shot...
danger-rat said:
Amon doesn't wipe the system partition, so you should try clockwork our temaseks extreme wipe.
Here's a link to the later (flash through recovery)...
http://db.tt/fH1vZNM
If that doesn't work, we can give gparted a shot...
Click to expand...
Click to collapse
all right buddy , will try temaseks and PM you in case I need help on gparted
The "extreme wipe" doesn't do a low-level format of the system, just a standard high-level format, it won't force it to recheck sectors marked as "bad". I don't believe that's possible without using external hardware.
knightnz said:
The "extreme wipe" doesn't do a low-level format of the system, just a standard high-level format, it won't force it to recheck sectors marked as "bad". I don't believe that's possible without using external hardware.
Click to expand...
Click to collapse
Any idea how this can be done with Ubuntu? I'm having a hard time mounting the /data partition to Ubuntu. Is this even possible?

Categories

Resources