maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   General (https://talk.maemo.org/forumdisplay.php?f=7)
-   -   How to partition SD Card on n900 (https://talk.maemo.org/showthread.php?t=72303)

Mr Bump 2011-04-18 22:27

How to partition SD Card on n900
 
I've searched the forums, and cant seem to come up with the way to do this.

I have a 16gb SD card in my n900, that was split into 2 partitions when i tried out nitdroid ages ago. I think its a 2gb partition, and a 14gb partition.

My question is, how do i make it one complete 16gb partition?

Ive tried to do it in windows, but, it didnt work, so, i guess i can do it on the phone again, any help would be greatly appreciated.

Thanks

danramos 2011-04-19 04:41

Re: How to partition SD Card on n900
 
Forewarning.. don't do what he suggested without first backing up your data. I've never used sfdisk but it strongly smells like a command to create an unusable card. (You're a real a**hole, epitaph.)

I suggest, instead, backing up all your contents and reading this:
https://garage.maemo.org/plugins/wik...id=1382&type=g also
http://wiki.maemo.org/Repartitioning_the_flash

He's covering how to restore the internal memory--but it should give you hints on how to figure out partitioning your mmcblk1 (SD card).

You're welcome.

Radicalz38 2011-04-19 05:12

Re: How to partition SD Card on n900
 
I agree with his 1st warning that should have warned first to backup the memory card's data before doing the script above. And about 2nd all that script should do is reformat the whole /dev/mmcblk1(external memory card). since when your partition was split up they were made into mmcblk1p1, mmcblk1p2

Mr Bump 2011-04-19 06:42

Re: How to partition SD Card on n900
 
Yeah, there is nothing on the sd card that i care about, so wiping it is fine.

So that command wont harm any other part of the phone, besides wiping the sdcard right?

Thanks for the help guys.

Mr Bump 2011-04-19 11:26

Re: How to partition SD Card on n900
 
Also, what extension to a name the file, and what command do i run it as when in root?

Thanks

epitaph 2011-04-19 11:41

Re: How to partition SD Card on n900
 
Quote:

Originally Posted by danramos (Post 991540)
Forewarning.. don't do what he suggested without first backing up your data. I've never used sfdisk but it strongly smells like a command to create an unusable card. (You're a real a**hole, epitaph.)

I suggest, instead, backing up all your contents and reading this:
https://garage.maemo.org/plugins/wik...id=1382&type=g also
http://wiki.maemo.org/Repartitioning_the_flash

He's covering how to restore the internal memory--but it should give you hints on how to figure out partitioning your mmcblk1 (SD card).

You're welcome.

Why I'm A*hole? I'm just wondering where my post is gone, because this is what I use on my card and also sfdisk is the right command. BTW. I reported you.


Code:

#!/bin/sh
sfdisk /dev/mmcblk1 << EOF
0,,0b
EOF

Extension doesn't matter in Linux because of multi-user system but it is good practice to add .sh to the script :p.

danramos 2011-04-19 19:39

Re: How to partition SD Card on n900
 
Quote:

Originally Posted by epitaph (Post 991736)
Why I'm A*hole? I'm just wondering where my post is gone, because this is what I use on my card and also sfdisk is the right command. BTW. I reported you.


Code:

#!/bin/sh
sfdisk /dev/mmcblk1 << EOF
0,,0b
EOF

Extension doesn't matter in Linux because of multi-user system but it is good practice to add .sh to the script :p.

Before I even go any further, I'll apologize to epitaph. As I'd mentioned earlier, I wasn't familiar with the sfdisk command in particular and suspected the code was prankish. I've since read up on the sfdisk command and it looks like I jumped down your throat unnecessarily. I should have read up BEFORE responding to your message, so it's really my own fault and I deserve the complaint. I'm the real a**hole in this case for jumping so quickly to an uneducated conclusion even after I pointed out as much.

Although, to that end, it might have been a good idea to explain what the command is trying to do (for his and any Googlers browsing into to forum for answers).

There is a manual page for sfdisk located at http://linux.die.net/man/8/sfdisk and it basically breaks down the command's input parsing as:
Quote:

sfdisk reads lines of the form
<start> <size> <id> <bootable> <c,h,s> <c,h,s>

So, basically... 0,,0b is starting at the first space on the SD card, assuming the whole card, ID will be 0 (which is fine) and marking it as bootable. Boom! He's effectively repartitioned the entire SD card as one partition (which is what it sounds like you wanted to do). (In classic bash command line parlance, the "<< EOF" is an input redirection that takes the next lines (up until the "EOF") and sends that to the command preceding the << symbol.)

I hope that helped add some clarity. :)


All times are GMT. The time now is 04:17.

vBulletin® Version 3.8.8