maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Nokia N900 (https://talk.maemo.org/forumdisplay.php?f=44)
-   -   Installation of microSD 32 GB card. (https://talk.maemo.org/showthread.php?t=97738)

NotMicro 2016-10-05 14:28

Installation of microSD 32 GB card.
 
I have just bought new microSD 32GB fast card. I want to store data on it (music etc.) and to use it as swap (2 extra partitions probably are needed). I have read that this significantly improves device performance. I know that this issue was explained many times, but I am a rookie. So can anybody write me, step by step, how to configure my microSD card for my needs? I will be very grateful.

michaaa62 2016-10-06 09:04

Re: Installation of microSD 32 GB card.
 
If your device is working fine (magnet et al.), simply open the built in file manager, long click on the icon for the external card and choose to format the card.

pichlo 2016-10-06 11:58

Re: Installation of microSD 32 GB card.
 
He wants to use the card as swap as well. Formatting from File Manager won't do that.
There are many ways to skin this cat. Have you seen the wiki page?
You can of course use parted on the device but a more newbie-friendly option is use GParted to partition your SD card to your liking. If you do not have a Linux machine, no problem. Just download a live CD and boot it on any machine that allows booting from a CD. You may need to enable that in the BIOS first.

NotMicro 2016-10-07 12:40

Re: Installation of microSD 32 GB card.
 
Quote:

Originally Posted by pichlo (Post 1516275)
He wants to use the card as swap as well. Formatting from File Manager won't do that.
There are many ways to skin this cat. Have you seen the wiki page?
You can of course use parted on the device but a more newbie-friendly option is use GParted to partition your SD card to your liking. If you do not have a Linux machine, no problem. Just download a live CD and boot it on any machine that allows booting from a CD. You may need to enable that in the BIOS first.

Thank you for your answer. I have read many pages regarding using swap no microSD, but I am not sure how to do it correctly. So I have asked for instructions step by step to avoid mistakes, that might destruct my filesystem and therefore "brick" my N900. If you could be so kind, please direct me to easy solution.

michaaa62 2016-10-07 18:43

Re: Installation of microSD 32 GB card.
 
Put in the card to remove the pre-installed partition, then add two new partitions. For additional data storage, roughly 30 GB, and for additional swap 768 MB. For best results first read the whole set of commands, try to understand, what is going on, ask any question as necessary.

You need the package rootsh installed on the N900 for the following commands to work fine
Code:

sudo gainroot
fdisk /dev/mmcblk1

Fdisk program is menu-based. Use 'h' for help to get the list of commands inside fdisk. In fdisk do
Code:

d
1
n
p
1
1
29764
n
p
2
29765
30532
w

You created two partitions, the first for additional file storage the second for the second swap partitions. Now apply the file systems
Code:

mkfs.vfat -n sdcard1 /dev/mmcblk1p1
mkswap -L swap_sdcard /dev/mmcblk1p2

After a reboot you might use one of the different methods to utilize the second swap like ereswap, swappolube or else.
Good luck!

NotMicro 2016-10-10 13:37

Re: Installation of microSD 32 GB card.
 
Quote:

Originally Posted by michaaa62 (Post 1516378)
Put in the card to remove the pre-installed partition, then add two new partitions. For additional data storage, roughly 30 GB, and for additional swap 768 MB. For best results first read the whole set of commands, try to understand, what is going on, ask any question as necessary.

You need the package rootsh installed on the N900 for the following commands to work fine
Code:

sudo gainroot
fdisk /dev/mmcblk1

Fdisk program is menu-based. Use 'h' for help to get the list of commands inside fdisk. In fdisk do
Code:

d
1
n
p
1
1
29764
n
p
2
29765
30532
w

You created two partitions, the first for additional file storage the second for the second swap partitions. Now apply the file systems
Code:

mkfs.vfat -n sdcard1 /dev/mmcblk1p1
mkswap -L swap_sdcard /dev/mmcblk1p2

After a reboot you might use one of the different methods to utilize the second swap like ereswap, swappolube or else.
Good luck!


Thank you very much for this detailed answer. I have another questions though:
1. On this page -> http://wiki.maemo.org/Flopswap you can find information, that on microSD card 3 partitions are needed. What do you think of this solution and how to implement it to the phone.
2. When I am trying to use fdisk in x-terminal I got the info: fdisk: not found. Is fdisk the same as sfdisk ?

michaaa62 2016-10-11 06:47

Re: Installation of microSD 32 GB card.
 
Having 2,3 or 4 swap partitions on the sdcard does alter the procedure slightly, but since you asked for a setup with two partitions, i wrote that up!

fdisk is NOT sfdisk, they handle things differently.
fdisk is part of busybox-power package that i have installed manually.

These could be the commands to use built-in sfdisk to change the partition table to contain two swap partitions and one data partition.
To get the rights:
Code:

sudo gainroot
These 5 lines are one command to create the text file 'table.txt'. Better copy and paste it to prevent any typos.
Code:

echo "unit: sectors
> /dev/mmcblk1p1 : start= 64, size= 59383744, Id=c
> /dev/mmcblk1p2 : start= 59383808, size= 1572864, Id=82
> /dev/mmcblk1p3 : start= 60956672, size= 1572864, Id=82
> /dev/mmcblk1p4 : start= 0, size= 0, Id= 0" > table.txt

To dump the content of the file to the partition table with sfdisk
Code:

sfdisk --no-reread /dev/mmcblk1 < table.txt
If no errors are reported, reboot the device to apply file systems to the newly created partitions. The labels (-L blablabla) or names (-n blablabla) of the partitions might only serve as suggestion, change to your liking, please.
Code:

mkfs.vfat -n sdcard1 /dev/mmcblk1p1
mkswap -L swap1_sdcard /dev/mmcblk1p2
mkswap -L swap2_sdcard /dev/mmcblk1p3

Better reboot again to make use of the swap partitions.

NotMicro 2016-10-12 13:24

Re: Installation of microSD 32 GB card.
 
Thank you very much for this complete answer! You are the real master! I will try to implement your suggestions as soon as possible.


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

vBulletin® Version 3.8.8