Active Topics

 


Reply
Thread Tools
Posts: 65 | Thanked: 113 times | Joined on Mar 2011 @ Austria
#1
HOWTO possibly resize partitions on an EMPTY N900 using rescueOS

possibly resulting in: about 26GB for home and opt (ext3), 2GB for MyDocs (vfat), swap stays the same.



Preface
(before executing these steps)


THIS MIGHT WORK OR NOT - IT WORKED FOR ME, MAYBE NOT FOR YOU! ALWAYS TEST AND THINK YOURSELF!


This is my addition to the general Wiki-Howto ("Repartitioning the flash", http://wiki.maemo.org/Repartitioning_the_flash) and other postings.

I found the rescueOS to be highly useful as well for re-partitioning. Be careful though, as it is directly working at the inner parts of your system. These steps only worked for me - my premise was that I was having a completely empty N900 on my hand. So I was ready and set to completely re-flash my system anyhow.

So, in addition to this post, it is essential to have my previous post ready: to possibly get your N900 back to a working gadget!

[HOWTO] FLASH N900 Fremantle / Use rescueOS to Backup MyDOCS / locate FIRMWARE RX-51 files and flasher


HOWTO possibly resize partitions on an EMTPY N900 using rescueOS
(steps start here)

(1) BootUP into rescueOS (see above, ) and start mass storage
( flasher-3.5 -k 2.6.37 -n rescueOS-1.1.img -l -b"rootdelay root=/dev/ram0" )

Read the first four steps from this posting: HOWTO possibly recover MYDOCS from N900 using rescueOS

At this stage: rescueOS is started at the N900.

This step "2" is to be executed directly at the N900:
(2) In rescueOS (directly on N900) change the partition table with sfdisk

(2-a)

Code:
sfdisk /dev/mmcblk0

/dev/mmcblk0p1:  1 65536 c
/dev/mmcblk0p2:  65537 884864 83
/dev/mmcblk0p3:  884865 24576 82

w for write
(2-b) make filesystems (directly on N900)

Code:
mkfs.vfat -F32 -n MyDocs /dev/mmcblk0p1
mkfs.ext3 -m 0 -l home /dev/mmcblk0p2
mkswap /dev/mmcblk0p3
After the resizing, I had to flash the combined firmware image.

(3) flash combined (see step 4 in this posting)
(flasher-3.5 -F combined -f -R)

(4) Boot-UP N900, open terminal

Code:
mkdir /home/user/MyDocs/DCIM
These steps worked for my personally setup on my N900.


(5)
FINAL NOTE (and to alert to be cautious about this process!)

fdisk now shows "Partition table entries are not in disk order"

Code:
n900:~# fdisk /dev/mmcblk0

The number of cylinders for this disk is set to 977024.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): p

Disk /dev/mmcblk0: 32.0 GB, 32015122432 bytes
4 heads, 16 sectors/track, 977024 cylinders
Units = cylinders of 64 * 512 = 32768 bytes

        Device Boot      Start         End      Blocks  Id System
/dev/mmcblk0p1               2       65537     2097152   c Win95 FAT32 (LBA)
/dev/mmcblk0p2           65538      950401    28315648  83 Linux
/dev/mmcblk0p3          884866      909441      786432  82 Linux swap
/dev/mmcblk0p4               1           1          31+ 83 Linux

Partition table entries are not in disk order

Command (m for help): x

Expert command (m for help): p

Disk /dev/mmcblk0: 4 heads, 16 sectors, 977024 cylinders

Nr AF  Hd Sec  Cyl  Hd Sec  Cyl      Start       Size ID
 1 00   0   1    1   3  16 1023         64    4194304 0c
 2 00   3  16 1023   3  16 1023    4194368   56631296 83
 3 00   3  16 1023   3  16 1023   56631360    1572864 82
 4 00   0   2    0   3  16    0          1         63 83

Expert command (m for help):


------------------------------------------
LINK: Repartitioning_the_flash http://wiki.maemo.org/Repartitioning_the_flash
------------------------------------------

P.S.:

Improvement comments are welcome - this post is intended to be a step-by-step guide having ones own cautious mind active and thinking if one really would like to do this.

As I do not have an empty system any more (getting it back to a normal "beloved" working N900 system again, I am unsure how to find out, how to avoid the partition alignment table problem at the first place - at my N900, though, it does not cause any problems so far).

Last edited by scy; 2014-08-21 at 10:56.
 

The Following 4 Users Say Thank You to scy For This Useful Post:
Posts: 65 | Thanked: 113 times | Joined on Mar 2011 @ Austria
#2
ALTERNATIVE with fdisk
- HOWTO possibly resize partitions on an EMTPY N900 using rescueOS with fdisk


This is an alternative to the above resize steps, using fdisk instead of sfdisk.

The resulting size of the partitions on the internal 32GB card are 6GB for MyDocs and 23,6 GB for home (and opt), 900+MB for swap.

Start with step (1) (see above)!

Code:
fdisk -S 32 -H 64 /dev/mmcblk0
Within fdisk do the following:

delete partitions
d / 4, d /3, d /2,d
verify that you have an empty partition table with "p"

add new partitions
n / p / ENTER / +6000M
n / p / ENTER /+23600M
n / p / ENTER / ENTER

toggle partition type
t / 1 / c
t / 3 / 82

"w" write the parition table to disk

Continue with step "2-b" to make filesystems, then flash combined (see above).
 

The Following User Says Thank You to scy For This Useful Post:
Posts: 2 | Thanked: 3 times | Joined on Dec 2014
#3
BusyBox v1.10.2 (Debian 3:1.10.2.legal-1osso30+0m5) built-in shell (ash)
Enter 'help' for a list of built-in commands.

~ $ df -h
Filesystem Size Used Available Use% Mounted on
rootfs 227.8M 219.2M 4.3M 98% /
ubi0:rootfs 227.8M 219.2M 4.3M 98% /
tmpfs 1.0M 68.0k 956.0k 7% /tmp
tmpfs 256.0k 84.0k 172.0k 33% /var/run
none 10.0M 72.0k 9.9M 1% /dev
tmpfs 64.0M 4.0k 64.0M 0% /dev/shm
/opt/pymaemo/usr/lib/python2.5
227.8M 219.2M 4.3M 98% /usr/lib/python2.5
/opt/pymaemo/usr/share/pyshared
227.8M 219.2M 4.3M 98% /usr/share/pyshared
/opt/pymaemo/usr/lib/pyshared
227.8M 219.2M 4.3M 98% /usr/lib/pyshared
/opt/pymaemo/usr/share/python-support
227.8M 219.2M 4.3M 98% /usr/share/python-support
/opt/pymaemo/usr/lib/python-support
227.8M 219.2M 4.3M 98% /usr/lib/python-support
/dev/mmcblk0p1 27.0G 1015.3M 26.0G 4% /home/user/MyDocs
~ $
please help to resolve the memory problem
 

The Following 2 Users Say Thank You to Saud Patel For This Useful Post:
pichlo's Avatar
Posts: 6,445 | Thanked: 20,981 times | Joined on Sep 2012 @ UK
#4
http://wiki.maemo.org/Free_up_rootfs_space
__________________
Русский военный корабль, иди нахуй!
 
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 02:56.