Menu

Main Menu
Talk Get Daily Search

Member's Online

    User Name
    Password

    How to partition SD Card on n900

    Reply
    Mr Bump | # 1 | 2011-04-18, 22:27 | Report

    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

    Edit | Forward | Quote | Quick Reply | Thanks

     
    danramos | # 2 | 2011-04-19, 04:41 | Report

    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.

    Edit | Forward | Quote | Quick Reply | Thanks

    Last edited by danramos; 2011-04-19 at 04:48.

     
    Radicalz38 | # 3 | 2011-04-19, 05:12 | Report

    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

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following User Says Thank You to Radicalz38 For This Useful Post:
    danramos

     
    Mr Bump | # 4 | 2011-04-19, 06:42 | Report

    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.

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following User Says Thank You to Mr Bump For This Useful Post:
    danramos

     
    Mr Bump | # 5 | 2011-04-19, 11:26 | Report

    Also, what extension to a name the file, and what command do i run it as when in root?

    Thanks

    Edit | Forward | Quote | Quick Reply | Thanks

     
    epitaph | # 6 | 2011-04-19, 11:41 | Report

    Originally Posted by danramos View Post
    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 .

    Edit | Forward | Quote | Quick Reply | Thanks

    Last edited by epitaph; 2011-04-19 at 12:18.

     
    danramos | # 7 | 2011-04-19, 19:39 | Report

    Originally Posted by epitaph View Post
    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 .
    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:
    Originally Posted by
    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.

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following 2 Users Say Thank You to danramos For This Useful Post:
    epitaph, scoobydoo

     
vBulletin® Version 3.8.8
Normal Logout