Tutorial: format your SD-card (and install Slackware) using only your Pandora


F_Slim

IDDQD
Joined
Aug 25, 2010
Messages
1,430
Age
45
Location
Germany
Tutorial: format your SD-card (and install Slackware) using only your Pandora


Hi,


this is a small tutorial aimed at people like me, who would like to try Slackware but felt too inexperienced to start the complicated looking procedure.


Truth is: it is incredibly easy!


And you can do it with just your Pandora, including formating your SD-card! This is what I cover in this tutorial.


Formating your SD card actually is the only slightly complicated part. You can easlily do that on your Pandora and here I'll walk you through it step by step.


I really hope it will encourage you to try it.


Remember: you can't really break anything. (If you do, I can't be held responsible for it, though!)


EDIT: fixed the part Lomaxx's post below refers to. Thanks again!


EDIT2: fixed "Free space preceding" (see posts below). Thanks to Linux-SWAT!


+----------------------------------------------------------------------+


What you need:

  • 2 SD-cards (your usual one which you use for PNDs and the one you want to install Slackware on)
  • GParted.PND, get it here: http://repo.openpand...gparted-gparted
  • The latest Version of Slackware rootfs. Follow the link given in the wiki:


http://pandorawiki.org/Software_projects/OS/Slackware#Installation

http://pandorawiki.o...re#Installation

http://pandorawiki.org/Software_projects/OS/Slackware#Installation

(go for the release candidate/stable version)

I suggest downloading it with your normal PC, as it might be faster.


Put it somewhere on your normal SD-card (the one you use for your PNDs) and make sure Gparted is installed (you'll find it under System in the menu).


For the tutorial I'll assume your card is labeled

SD-PND

and that you put the file into a folder named

/Slackware

.

  • Time. Most of the time you'll spend waiting though.


To make things as easy as possible, remove all SD cards from your Pandora. Then:


First put your empty SD card into the left slot!


Afterwards put your SD-PND is in the right slot!


(This is not essential, but the order by which you insert the cards saves you thinking in the next step, having the empty card in the left slot saves you from swaping cards later.)


Unmount the empty SD card. To do so, right-click on the icon of the card on the desktop and choose "Unmount". (Note: the card does not have to be empty, any data on the card will be erased in the next step, though!)


Start GParted (it will ask you for your root password).


GParted shows by default the SD card that was inserted first. So if you followed my advice you are good to go.


If not:

use the big pull-down menu in the top-right corner and choose the other card. The naming here depends on the order by which you inserted your cards (see Lomaxx's post below). So in this case you have to switch to



/dev/mmcblk1


If your cards have different sizes, this is of course the best way to make sure you have chosen the correct one.


From the menu click Device -> Create Partition Table...


You'll get a warning that all data will be erased.


READ THE WARNING MESSAGE!


If it says something like "1 partition is currently active" this means you either did not unmount the card, or you have chosen the wrong one.


This makes it kind of foolproof, though, you can't format the SD card from which you are running GParted.


Confirm the warning message.


Done?


Ok, if you had any data on your card - don't worry about it any more. It's gone now :wacko:


The list on the bottom should now show



Code:
unallocated | unallocated

Left click on that entry to select it.

Now we plan our partitions.

Click on Partition -> New

This will be our main partition for the OS. Use the following settings:
  • Free space preceding (MiB): Must be 4 with cards =< 32GB and 16 with cards >= 64GB
  • New size (MiB): leave this one alone
  • Free space following (MiB): we will use this space for our Swap file, so set it to 512 or 256. (See? "New size" is automatically adjusted)
  • Create as: Primary Partition
  • File System: ext2
  • Label: SLACK


Click on Add

A new list appeared at the bottom. This is the "To-Do"-List for GParted. Currently we are just planning the layout. When we are done we have to apply it. We are not done yet though.

There is also a new unallocated part shown now, below the entry we just created. This is the space we reserved for the Swap. Click on it to select it.

Then again click on Partition -> New

Leave all settings as they are except:
  • File System: linux-swap


(you have to scroll down the list a bit)

Click on Add



(as a sidenote: you could of course add a thrid partition, eg. a fat32 partition to exchange files with your Windows PC. All you have to do is increase the "Free space following" in the first step. I guess you'll figure the rest out yourself)



A new item popped up in the "To-Do"-list. In the list above you should now see 2 partitions:



Code:
New Partition #1 ext2 SLACK

New Partition #2 linux-swap

with file sizes according to your settings.

If everything is fine, we can tell GParted to actually make these changes.

Click on Edit -> Apply All Operations

(note that in the Edit menu you can remove the last step we added to the "To-Do"-list or even remove all and start again, in case you made a mistake.)

Accept the warning and wait for GParted to finish.

It will take a few minutes.



Don't get hypnotized by that ... bar that ... gently ... moves ... from left ... to right ... left ... to right ... relaxing, isn't it?

It will hopefully show a "All operations successfully completed" message that rudely awakens you from your trance.

Just Close it. You can now have a look at your newly created partitions and exit GParted.



Congratulations, you managed to format your SD card! Told you it's easy! :)



+----------------------------------------------------------------------+



Now for the easiest (but also longest) part:

Install Slackware on your newly formated SD-card. Just follow the wiki http://pandorawiki.o...re#Installation :

Open a terminal window. Change to the folder on your SD card where you downloaded the rootfs to, e.g.:



Code:
cd /media/SD-PND/Slackware

As written in the wiki just type



Code:
sudo tar jxvfp SL4P-[version]-[build].tar.bz2 -C /media/SLACK/ --numeric-owner

Where you have to adjust [version] and [build] according to the filename of course.


This will take some time (1-2 hours).


So ... read up on the next steps in the wiki: http://pandorawiki.o...kware#First_run ... have a cup of tea ... go for a walk ... write a letter to an old friend ...


It's done?


Horray! You installed Slackware! (Well, almost) ^_^


+----------------------------------------------------------------------+


Make sure the card with Slackware on it (SLACK) is in the left slot.


Reboot your Pandora


It should automatically boot Slackware now.


If it does not: reboot while holding the right trigger button. A menu will show up where you can choose to boot from SD.


From now on just follow the instructions on the screen.


You will have to first set a root password (the administrative password you need when you want to change something on the system) and later create a user and set a password for him.


If your password is not save enough it will complain, but by re-entering you can still use something like "123". This is not save at all, but you may find it more convenient if you plan to "mess around" a lot and don't want to type long passwords again and again. It's your choice.


For the passwords you do not see what you type (or if you typed something). That's normal.


This all may again seem a bit intimidating, but since things may change in future versions of Slackware I'm not going to walk you through it step by step.


Just read, think, and you will be ok. If I could do it, you can do it!


If you don't know what to type in, it is usually save to just press "enter" and go with the default values.


Just don't forget this very important step from the wiki:


You will be prompted to create an user. At some explicit point, push [up] to put this user in adequate groups.


If you just read what it sais on the screen and don't just blindly hit "enter", you are not going to miss it, though!


Great, you just installed Slackware! And you did it all by yourself! (Well, almost) :lol:


I hope this tutorial was usefull to you.
 
Last edited by a moderator:
I didn't read your tutorial in detail since I currently am not planning to install Slackware due a missing, sufficient SDcard, but since this is important I want to point something out.


"/dev/mmcblk1" is NOT always the card in the right slot and "/dev/mmcblk0" is NOT always the card in the left slot.


It depends on which card you insert first. If you are booting your system from an SDcard this is not really an issue since the card with the OS on is always the first one and will not be removed. So in that case "/dev/mmcblk1" is indeed always the right slot.


But when booting from nand, it can vary depending on which card you insert first. Unless something changed with the the release of SuperZaxxon.
 
Damn!


Thanks for noticing, Lomaxx!


I also found out that GParted by default shows /dev/mmcblk0 no matter what ... how do I make this easy to follow in the tutorial now? :huh:


EDIT: I guess when you don't unmount the card before you start GParted it will give you an error ... need to find an unused SD card to test this ...


EDIT2: Yes, when the SD is still mounted, you can't format it ... ok!


EDIT3: Fixed, thanks!
 
Last edited by a moderator:
Nice work, thx ^^.


I'll add a link to it in the wiki.


A correction:


Free space preceding (MiB): 1


Must be 4 with cards =< 32G


And 16 with cards >= 64G
 
Nice work, thx ^^.


I'll add a link to it in the wiki.
Thanks, please do ^_^

A correction:


Free space preceding (MiB): 1


Must be 4 with cards =< 32G


And 16 with cards >= 64G
hm, ok. Thanks for the correction ... but why?


On my 16GB card I used 1MiB. So far it worked, will I run into trouble later?
 
AFAIK the freespace-preceding-topic is related to the eraseblock-sizes of SDcard. It's not a must but, but supposed to increase the io-speed of the card. The whole thing is a topic of it's own and I haven't completely understood it. It's something about alligning filesystem-blocks to these eraseblocks, which the SDcard-controller accesses in a whole anyway. So if they are not aligned a fs-block is located on two eraseblocks and so it takes more time to write. Maybe reading-speed is also affected? Don't blame me if my explanation is wrong, but it's something in that direction.

Must be 4 with cards =< 32G And 16 with cards >= 64G

I don't think that this is in general that way. But maybe most of the time. I think it depends on the brand of the SDcard. There are Howtos that describe how you can find out the eraseblock-sizes of your card. But I wasn't able to see any differences when testing my card. There is also a tool for testing this. Here is a very quick compilation of links to the topic:


http://lxtek.de/pand...stem-benchmark/


http://lxtek.de/pandora/flashbench/ (crashed for me)


http://www.olpcnews....hp?topic=4993.0


https://wiki.linaro....FlashCardSurvey (has a table of sdcards and their erase-block-sizes at the end)
 
Last edited by a moderator:
Back
Top