maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Nokia N900 (https://talk.maemo.org/forumdisplay.php?f=44)
-   -   Repartition the internal drive (https://talk.maemo.org/showthread.php?t=35122)

iDont 2010-10-29 16:30

Re: Repartition the internal drive
 
Quote:

Originally Posted by cedlmw (Post 856741)
Thanks a lot for this! I was just wondering whether this could brick your device..?

Well, since PR1.2, Maemo gets into an infinite reboot loop when it can't mount /home. The method involves moving /home. If you mess up the entries in genfstab.awk and/or rcs_late, or maybe the copy of the home directory, it could be that Maemo can't mount home, resulting in a 'bricked' device.

Though bricked isn't the correct word here, as the phone can be revived by reflashing it. So no: it can't be bricked and yes: if something goes wrong, you'll have to reflash*

I don't know about your linux knowledge, but if you understand the commands involved, it should be safe to execute them.

*While trying out different partition configurations, I've messed up once too, causing Maemo to be unable to mount /home resulting in a reboot loop, but a reflash solved this.

Edit: I've added an extra warning to the wiki entry ;)

Aranel 2010-10-29 18:01

Re: Repartition the internal drive
 
Quote:

Originally Posted by iDont (Post 856726)
I've just submitted a new solution to the wiki which should allow you to do that:
http://wiki.maemo.org/Repartitioning..._compatible.29
You just need to adjust the partition table to make /home bigger and MyDocs smaller.

You will lose the content of MyDocs, but that folder is easy to backup (copy 'n paste). All your settings etc will be kept.
Please note I've applied that method to a cleanly PR1.3 reflashed device, though the method should work on a 'dirty' device as well.

Also possible: full eMMC as ext3 /home (with MyDocs as loopback file) + MicroSD as swap = :cool: :D

Great news! I want to try it! :D But I have 2 questions about it:

a) After bricking your N900, did you try MeeGo Rescue Initrd? Doesn't it work?

b) Can you post the table for 6GB /home and 23 GB MyDocs?

Thanks :)

iDont 2010-10-29 18:33

Re: Repartition the internal drive
 
Quote:

Originally Posted by Aranel (Post 856888)
Great news! I want to try it! :D But I have 2 questions about it:

a) After bricking your N900, did you try MeeGo Rescue Initrd? Doesn't it work?

No I haven't. I had nothing to lose as I started repartitioning on a empty (reflashed) device, so reflashing it again after messing up would be easier than recovering it.

Quote:

Originally Posted by Aranel (Post 856888)
b) Can you post the table for 6GB /home and 23 GB MyDocs?

Code:

unit: sectors
/dev/mmcblk0p1 : start=      64, size= 48242688, Id=c
/dev/mmcblk0p2 : start= 48242752, size= 12582912, Id=83
/dev/mmcblk0p3 : start= 60825664, size=  1572864, Id=82
/dev/mmcblk0p4 : start=        0, size=        0, Id=0

This wil give a ~24GB /dev/mmcblk0p1, a ~6GB /dev/mmcblk0p2 and the default 768MB /dev/mmcblk0p3

ViSo 2010-11-08 20:13

Re: Repartition the internal drive
 
how i can edit genfstab.awk?

i am in this step:
-Open /usr/lib/genfstab.awk and comment out the following pieces of code
Code:

start == 1 && $6 == 83 && !__home {
      printf "%s /home ext3 %s 0 0\n", $1, home_opts           
        printf "/home/opt /opt none bind\n"
        __home++
}

Code:

start == 1 && $6 == "c" && !__fat {
      printf "%s /home/user/MyDocs vfat %s 0 0\n", $1, fat_opts
      __fat++
}


iDont 2010-11-09 15:26

Re: Repartition the internal drive
 
Quote:

Originally Posted by ViSo (Post 867329)
how i can edit genfstab.awk?

i am in this step:
-Open /usr/lib/genfstab.awk and comment out the following pieces of code
Code:

start == 1 && $6 == 83 && !__home {
      printf "%s /home ext3 %s 0 0\n", $1, home_opts           
        printf "/home/opt /opt none bind\n"
        __home++
}

Code:

start == 1 && $6 == "c" && !__fat {
      printf "%s /home/user/MyDocs vfat %s 0 0\n", $1, fat_opts
      __fat++
}


Using an texteditor like vi, nano* or even leafpad. Run those from a root terminal:
Nokia-N900:~$ root
Nokia-N900:~# nano /usr/lib/genfstab.awk

However, I have to ask: do you know what you're doing? As editing a file is pretty basic stuff, while partitioning can be rather risky when not done right.

*watch out using nano-opt from the repos, it spreads lines that don't fit the width of the terminal window out over two different lines (word wrap), causing a malformed file when not fixed.

SavageBrat 2010-11-09 20:30

Re: Repartition the internal drive
 
hi all..I've read through the post and the wiki page,,but still a bit on fused confused, will pantera1989's method work on 1.3 as I'd like to try it but will it stay that way after a reflash..and is this the easiest way to do it...ty

ViSo 2010-11-09 21:38

Re: Repartition the internal drive
 
Thanks iDot, and yes, i know, is risky is Funny! lol

my problem is my english, is basic, but i followed succesfully another tutorials, for example PalmPre games to MyDocs, following tutorials is easy.

mankir 2010-11-09 22:07

Re: Repartition the internal drive
 
Yes, you can boot NITdroid or Ubuntu from internal memory!
I moved the NITdroid folders to /home and multibooted it from /dev/mmcblk0p2. i mostly prefer using easy debian to use ubuntu 10.10 apps and desktop from 5gb /dev/mmcblk0p4, some people are able to boot into it (may be phone is ready to use soon). There is no limitation having a quad or more booting N900 with meego (but it's really slow on my sdhc).

Quote:

Originally Posted by Bobbe (Post 802851)
Guys, first:

AWESOME! Swear to God I was really excited to read this. Hacking and slashing at limitations at its best. Congratulations, really!

And just a question: do you guys envisage a future where it would be possible to repartition the internal memory so as to install other OSs in it? Say, NITDroid? Has anybody tried it? Is it possible as of today? Would multi-boot work on such a partition scheme?

Once again, thank you for all the effort you guys have been putting into this (ruskie, titan, guy with the chinese name I couldn't possibly type on my lowly western keyboard, and all the others. Far out!).


ViSo 2010-11-10 12:09

Re: Repartition the internal drive
 
i followed all steps 2 times, and 2 times my phone continue with 2GB in /home.
when i reboot my phone use MicroSD how a /home, and i format /home and /MyDocs, and i reboot, all correctly, but when i finished i check memory and MyDocs said 27GB and /home *free 1,6GB*

in this step:
Code:

-Open /usr/lib/genfstab.awk and comment out the following pieces of code
Code:

start == 1 && $6 == 83 && !__home {
      printf "%s /home ext3 %s 0 0\n", $1, home_opts           
        printf "/home/opt /opt none bind\n"
        __home++
}

Code:

start == 1 && $6 == "c" && !__fat {
      printf "%s /home/user/MyDocs vfat %s 0 0\n", $1, fat_opts
      __fat++
}

I have to do? i check the file and is exactly how code...

he means by * comment out *? delete?

mankir 2010-11-10 12:21

Re: Repartition the internal drive
 
If you don't know how to comment out (#), you shouldn't reformat either!

ViSo 2010-11-10 13:01

Re: Repartition the internal drive
 
tell me it means, and I will do, i do not understand it, does not mean i do not know.
knowledge does not occupy space.
if not knowing something, should not do it: nobody would never do anything, exist an hability: learning.
___

comment out, is place *#* symbol in those lines?
___

my english is bad, so my confusion.

mankir 2010-11-10 13:13

Re: Repartition the internal drive
 
It's really difficult to understand you, what is your native language?
Sure, we should learn from each other and without trying, it's hardly possible to learn! But you should't use this thread (formating is one of the most dangerous tasks for computers) for asking such questions, which have been answered if you have looked inside the file or searched somewhere else (even this forum). You can try out the MODs-Thread for getting an approach to the N900.

ViSo 2010-11-10 13:32

Re: Repartition the internal drive
 
yes i know, i said before my english is bad, my native is spanish.
i try to place # symbol at those lines, and my N900 dont bricked xD is good xD

EDIT:
aff... continue with 2GB -_- ... why when i try to format MyDocs, it say *Contain filesystem*? i umount it and format, but this step not appear in tutorial.

truste 2010-11-10 22:46

Re: Repartition the internal drive
 
I did the steps to reset the cel no mydocs I get home and now have 29gb

ear0wax 2010-11-10 23:20

Re: Repartition the internal drive
 
Quote:

Originally Posted by ViSo (Post 869120)
my english is bad, so my confusion.

Google Translate Attempt.

Para hacer comentarios. Se coloca un # en la parte delantera de la línea.

ViSo 2010-11-11 15:54

Re: Repartition the internal drive
 
wow truste 29GB to /home lol

ear0wax thanks for your help, but i put it, and dont work for me, same result. :S

iDont 2010-11-13 10:31

Re: Repartition the internal drive
 
Quote:

Originally Posted by ViSo (Post 869165)
EDIT:
aff... continue with 2GB -_- ... why when i try to format MyDocs, it say *Contain filesystem*? i umount it and format, but this step not appear in tutorial.

I don't remember anything similiar, but I've added it to the wiki anyway. As you're speaking of formatting, I assume you've already successfully moved /home and repartitioned using the sfdisk command?

Quote:

Originally Posted by ViSo (Post 870446)
ear0wax thanks for your help, but i put it, and dont work for me, same result. :S

You mean by "same result" you can't format MyDocs even after commenting out the piece of code? If so, you're not following the wiki as there are 5 steps between commenting that out and the actual formatting.


I'm not sure if I'm following you correctly. Could you post what step didn't work out?

ViSo 2010-11-13 11:31

Re: Repartition the internal drive
 
-Mount SD: OK
-Umount MyDocs: OK
-Copy /home to SD: OK
-Comment out genfstab.awk [with "#"]: OK
-Modify rcS-late: OK
-Reboot: OK, constantly apear *error to open calendar*, and more application, no image in desktop.
-Repartition the flash: with your table 6gb /home -> Your Post: OK [but says *unknon command: sectors*]
-Reboot: OK
-Format new /home: OK
-Format new MyDocs: says *contain filesystem* and i umount and format it: OK
-Mount /hoe as mnt: OK
-Copy SD to new /home: OK
-uncomment genfstab.awk: OK
- Delete lines in rcS-late: OK
-Reboot: now run correctly, with image in desktop. but 2GB /home.
---------------------------------------------------
i have PR1.3 is this a problem? i need to reflash to PR1.2?

iDont 2010-11-13 13:49

Re: Repartition the internal drive
 
Quote:

Originally Posted by ViSo (Post 872316)
-Reboot: OK, constantly apear *error to open calendar*, and more application, no image in desktop

Could you post the output of "cat /proc/mounts | grep home" (without quotes)? Run that command in the terminal.

Quote:

Originally Posted by ViSo (Post 872316)
-Repartition the flash: with your table 6gb /home -> Your Post: OK [but says *unknon command: sectors*]

Unknown command.. Did you try to execute the table file? :rolleyes:
As you can read in the wiki, you should execute:
"sfdisk --no-reread /dev/mmcblk0 < table" (without quotes)
to apply the partition table, 'executing' the table file itself won't do anything, hence your eMMC won't get repartitioned causing you /home to stay at 2gb (like you've said in your previous post).

Quote:

Originally Posted by ViSo (Post 872316)
i have PR1.3 is this a problem? i need to reflash to PR1.2?

No, I wrote this solution because I wanted to repartition after flashing PR 1.3 to my phone;)

TheBootroo 2010-11-13 14:24

Re: Repartition the internal drive
 
what i would like :

- keep the rootfs minimaly, as it is today

- all the big folders : /opt and /usr plus the /home/user (with all the config dirs); on the whole eMMC formatted in ext3 or even ext4

- and the pure data (cities, documents, images, videos, music ....) on a standardized folders on a FAT32 SD card (like Documents, Pictures, Videos, Sounds .... on all others OSes, no more .documents, .images.... and no more hassle with MyDocs un/mounting on mass storage...)

-and maybe part the emmc to put meego on it too (then no more speed pb with it), on a third partition in btfrs, able to read my data for the sd card too

thanks in advance for tips


PS : hum and is ti possible to modify the mass storage scripts to allow a desktop linux OS (ubuntu ?) to read the eMMC ?

ViSo 2010-11-13 18:04

Re: Repartition the internal drive
 
-Reboot: OK, constantly apear *error to open calendar*, and more application, no image in desktop
------- Only when i Reboot on MicroSD, normaly Reboot good.

-Repartition the flash: with your table 6gb /home -> Your Post: OK [but says *unknon command: sectors*]
yes, i using sfdisk command.
apear all table, and *unknon command: sectors*

iDont 2010-11-13 19:17

Re: Repartition the internal drive
 
Quote:

Originally Posted by ViSo (Post 872515)
-Reboot: OK, constantly apear *error to open calendar*, and more application, no image in desktop
------- Only when i Reboot on MicroSD, normaly Reboot good.

As there is no difference between /home on the eMMC and /home on the MicroSD (because of the cp -a), this shouldn't happen. If you post the output from the command I've posted earlier I can check it for you, just to be sure everything went alright.

Quote:

Originally Posted by ViSo (Post 872515)
-Repartition the flash: with your table 6gb /home -> Your Post: OK [but says *unknon command: sectors*]
yes, i using sfdisk command.
apear all table, and *unknon command: sectors*

Are you absolutely sure you're running the exact same command (sfdisk --no-reread /dev/mmcblk0 < table) as root in the same directory as where the table file is? Also, what do you mean with "apear all table"?

ViSo 2010-11-14 21:28

Re: Repartition the internal drive
 
OK, now i using PR1.2! i try Repartition and...
when i reboot with /home in MicroSD, apear image on desktop, and no errors with calendar and other default apps, and when i Format MyDocs, apear a line:
############################ [i think, is the process] before dont apear.
but i continue with the stupids 2GB... i hate my phone...

1 detail, when i write the sfdisk code, says:
sfdisk: input error: unexpected character after id field

why?

iDont 2010-11-14 22:43

Re: Repartition the internal drive
 
Quote:

Originally Posted by ViSo (Post 873415)
OK, now i using PR1.2! i try Repartition and...
when i reboot with /home in MicroSD, apear image on desktop, and no errors with calendar and other default apps, and when i Format MyDocs, apear a line:
############################ [i think, is the process] before dont apear.
but i continue with the stupids 2GB... i hate my phone...

1 detail, when i write the sfdisk code, says:
sfdisk: input error: unexpected character after id field

why?

It doesn't make any difference if you use PR 1.2 instead of PR 1.3, as I've said here.
The sfdisk command didn't succeed, so your eMMC isn't repartitioned, hence you still got the 2GB partition. Try removing the comments from the table file, so it will look like this:
Code:

unit: sectors
/dev/mmcblk0p1 : start=      64, size= 48242688, Id=c
/dev/mmcblk0p2 : start= 48242752, size= 12582912, Id=83
/dev/mmcblk0p3 : start= 60825664, size=  1572864, Id=82
/dev/mmcblk0p4 : start=        0, size=        0, Id=0

Now try the sfdisk command again (plus the steps that come after it ofcourse) :)

ViSo 2010-11-15 00:43

Re: Repartition the internal drive
 
but, for me with PR1.3, i have much problems, and with PR1.2 only 1 problem, [finaly same result..] but PR1.2 work better for me, now i dont have problems when i reboot using MicroSD.
i from spain [now 1:40AM] too later for try it, tomorrow i try.

gerdich 2010-11-16 16:49

Re: Repartition the internal drive
 
1) Isn't it possible to boot from microSD and partition freely the internal memory?

2) I would be happy with 2Gb /home/user/MyDocs if there weren't applications like Sygic and OVI-Maps that save their maps in /home/user/MyDocs. Isn't there a solution with symlinks that could reduce the amount of data in MyDocs. Or is there a kind of settings?

Radicalz38 2010-11-16 16:57

Re: Repartition the internal drive
 
0.o can't believe people here still go with the hard way... I get to partition mine even set the swap to 999 by just using a hex editor.
I mean come on? You could just hex edit the values on the EMMC image and reflash it you know? no more sfdisk, gparted, fdisk, mount, unmount etc.

ViSo 2010-11-16 21:25

Re: Repartition the internal drive
 
Can you explain that?

Boemien 2010-11-16 23:44

Re: Repartition the internal drive
 
Quote:

Originally Posted by Radicalz38 (Post 875211)
0.o can't believe people here still go with the hard way... I get to partition mine even set the swap to 999 by just using a hex editor.
I mean come on? You could just hex edit the values on the EMMC image and reflash it you know? no more sfdisk, gparted, fdisk, mount, unmount etc.

Yeah give Us some explanations. For example if I want 4GB for Application and the rest for emmc what do i change in the image file??? I'm very interested by this method!!!

Radicalz38 2010-11-17 00:47

Re: Repartition the internal drive
 
0.o seriously anybody here doesn't know that? Well ok i'll put instruction and screenshots later. Well for the techy guys you could just open the emmc bin file with any hex editor and you should see the values 'in MB' of ext3 and swap partition.

Radicalz38 2010-11-17 01:44

Re: Repartition the internal drive
 
This is already tested from PR1.0 to PR1.3 100% safe if done correctly
Ok here's a screenshot of my modified EMMC image file
http://i51.tinypic.com/14xsb7.png
As you can see in the screenshot value is '5120' it means I've set EMMC/Internal flash to 5GB from 2GB. And the little circle below is the swap partition set to '896mb'
Here's a good partition table
1 gigabyte = 1024 megabytes
2 gigabytes = 2048 megabytes
3 gigabytes = 3072 megabytes
4 gigabytes = 4096 megabytes
5 gigabytes = 5120 megabytes
And so on... just do the maths...

Quote:

Note: do not insert a value when editing it through hex editor just replace the digits.
values should only be 0001 to 9999.
Quote:

Warning: Instruction below is not yet tested thou 60% success rate.
or if you want to exceed just replace the blank value between the = sign and the 4 digit default value of the ext3.
Ex.
'size = 1111'
just make it
size =11111'
Take note of the whitespace/Space from the = sign

Proof/Screenshot
http://i54.tinypic.com/ve0ihj.png

Boemien 2010-11-17 07:39

Re: Repartition the internal drive
 
Yay! And that's all?? Soooo easy! i'll give this a try!! thanks for tuto and screenshots!

edit: when editing the EXT3/emmc value, is the MyDocs space automatically resized? I mean, I don't have to modify another value??

Re-Edit: What Hex Editor are you using?? I'm using Hex editor Neo and i see weird characters. I can't find any value!
(Ooops! Sorry! I wanted to edit the firmware!)

Radicalz38 2010-11-17 08:44

Re: Repartition the internal drive
 
yep mydocs automatically resizes since it just takes up the available space left.
I'm using windows 7 so I used this one.
http://www.chmaas.handshake.de/delph...vi32/xvi32.htm
could you post a screenshot of the hex editor your using with the emmc image opened? I think all editors should work and have the same output.

one1002 2010-11-17 08:47

Re: Repartition the internal drive
 
what if i wanted to create several partitions?like

mmcblk0p1 - 7gb
mmcblk0p2 - 5gb
mmcblk0p3 - 5gb
mmcblk0p4 - 5gb
mmcblk0p5 - 5gb

can i use the hex editor as well?or am i better off with GParted?

Radicalz38 2010-11-17 10:06

Re: Repartition the internal drive
 
Quote:

Originally Posted by one1002 (Post 875866)
what if i wanted to create several partitions?like

mmcblk0p1 - 7gb
mmcblk0p2 - 5gb
mmcblk0p3 - 5gb
mmcblk0p4 - 5gb
mmcblk0p5 - 5gb

can i use the hex editor as well?or am i better off with GParted?

This is just for specifying the storage space for installable applications not for the whole internal flash.. So this is not for making multi partitions. In addition you could repartition mydocs like mine I used partition magic :p
So in short yep use gparted for multi paritioning.

Boemien 2010-11-17 10:19

Re: Repartition the internal drive
 
Here is my screenshot!

http://img690.imageshack.us/img690/7875/hexv.png

As you can see, I gave 4GB for Applications and 896Mb (Like Radicalz38). Now time to flash, i will do it later in the afternoon!

Ps: I'm using Windows XP!! and Hex Editor Neo!

Tigerite 2010-11-17 22:38

Re: Repartition the internal drive
 
You can also go higher with swap by the same method, i.e. either replacing the first space or the leading tab on the next line - so 256;<tab><tab> becomes 1536;<tab> (for example). I did this with mine and also upped the apps partition to 10752, both worked perfectly. The tabs are the 09 (hex) values that you can see in the screenshots posted above, but I'm sure you all knew that already, right? ;-)

Incidentally, this used with Robbie's excellent BackupMenu program means you don't even have to reinstall anything - simply use it to backup rootfs and optfs, copy the generated tar files plus MyDocs onto your PC (via USB is best, but SSH/ftp works too), flash the edited eMMC image then use BackupMenu again to extract the tars into the new, larger spaces and finally copy MyDocs back (again, by USB, SSH, ftp etc). Obviously, you won't be able to copy all of MyDocs if it exceeds what is now available on the FAT partition. I know this works as it's what I did myself :D

Boemien 2010-11-18 14:28

Re: Repartition the internal drive
 
I have successfully flashed the N900. with the Modified emmc image i finally have 25.10GB for MyDocs, 4GB for applications and eventually 896MB of virtual memory! I will install conky later and post a screenshot! I don't notice any problem, for the moment of course!
Thanks to Radicalz38 for this Tip!!!

ViSo 2010-11-19 22:59

Re: Repartition the internal drive
 
i have succesfully flashed my N900 too!! lol this metod is extremely easy! lol
now i have 23GB MyDocs and 6GB on Home!

Radicalz38, Thx!

sulleybang 2010-11-23 11:30

Re: Repartition the internal drive
 
thx alot here my partition table after repartition and get extra space for instal application:
Device Boot Start End Blocks Id System
/dev/mmcblk0p1 2 753793 24121344 c W95 FAT32 (LBA)
/dev/mmcblk0p2 753794 950401 2097152 83 Linux
/dev/mmcblk0p3 950402 977024 786432 82 Linux swap / Solaris
/dev/mmcblk0p4 1 1 24 0 Empty

but when i want to use camera said:not enough memory to open camera
and when want to open file said: internal error:Application photos cloases
and for canversations application doesn't open !!!! cant see my sms
can u help me :) THX


All times are GMT. The time now is 19:05.

vBulletin® Version 3.8.8