View Single Post
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: