Release Pandora SD Installer


Thanks for looking Dave1234,


Heres the output of some of them


HF4


mariopandios-openpandora:/media/mmcblk1p1/SD INSTALLER PND TEST/HF4 TAR$ file Angstrom-pandora-xfce-image-glibc-ipk-2010.4-test-20100830-omap3-pandora.rootfs.tar.bz2


Angstrom-pandora-xfce-image-glibc-ipk-2010.4-test-20100830-omap3-pandora.rootfs.tar.bz2: bzip2 compressed data, block size = 900k


[...]

I think that the problem here is that the path name has spaces in it and I've forgotten to put double quotes around the variable. I might have done this in a few other places, I'll check.


EDIT: I've reproduced your directory structure and got the "not a .tar.bz file" error and after I fixed that the "cannot copy kernel" error. Both are caused by the problem mentioned above.


I'll have a new version up later (I've fixed some of the other problems already) but if you want to try it now, try putting the firmware file on the root of the SD card so that there are no spaces in the path.
 
Last edited by a moderator:
It seems the installer doesn't detect 32GB cards correctly.


I have tried version 1 and 1.1 and they both show the message "A 32.5MB SD card has been detected in the left slot"


Choosing Yes after that message, results in nothing happening. It would be great, if you could fix this issue in the next version.
 
It seems the installer doesn't detect 32GB cards correctly.


I have tried version 1 and 1.1 and they both show the message "A 32.5MB SD card has been detected in the left slot"


Choosing Yes after that message, results in nothing happening. It would be great, if you could fix this issue in the next version.

I have a fix for that which will be up soon (probably within the hour). I'm just testing the new version at the moment.
 
Thanks for the great work Dave1234.


I had previously installed the firmware to SD card manually, with no problems. But the current hot-fix 5 firmware, just doesn't seem to work correctly for me.


Hopefully your installer will do the trick.
 
New version (1.2) here!


EDIT: Don't use this version, the latest one is here.


This is a bug fix version, so the instructions are as before. Changes follow:

  • Various bug fixes (Thank you to everyone on the OP board who reported and helped diagnose these and also to Gruso for the mention on PandoraPress):
  • Remove spurious blank option from the "choose a slot" dialogue.
  • Fix card size check to work with larger SD cards (Thanks to held from the forum for reporting and helping to diagnose this).
  • Correct handling of paths with spaces (Thanks to MarioPandio from the forum for reporting and helping to diagnose this).
  • Fix error handling in the "choose firmware file dialogue".



Hopefully those of you who were having problems with the previous version will have better luck with this one. Please let me know how you get on.

sd_install.pnd
 

Attachments

  • sd_install.pnd
    25.6 KB · Views: 264
Last edited by a moderator:
One other thing to add: I've been testing with a 16 GB TDK card today and I've noticed that after installing, the first boot takes a lot longer than the other cards that I've testing with (2 and 4 GB SanDisks and 1 GB Integral).


First boot of the 16 GB card took roughly 20 minutes. I don't know if this is something to do with the size of the card (bigger card, longer boot) or the brand but it's something to watch out for. I had a blank screen for about five minutes and I thought it had hung.


Just something to watch out for.
 
Blimey you do work fast :)


Just reporting back that the path issue was indeed as you found. Double Facepalm due here (though I could've sworn on the first 2 PND's I did try from the root) as I now have a happy HF5 install :)


My first HF4 one completed but wouldn't boot up though, no activity for over 30 minutes on an 8gb card, so I'll re-try that with the new PND release. Probably bad image as it was one I tar.bz2 from a .zip download.


May I ask if the swap partition/file will be auto active or if this edit to etc/fstab is required as detailed here http://www.gp32x.de...file-at-startup ?


Also, with a larger card, is it wise to create a large VFAT partition minus a small swap file, so that the main of the card is available for normal use as FAT32 as some folk had EXT2-3 cards suffer corruption?


Many thanks again Dave1234 as this is brilliant and the prompts etc are very clearly written. Very happy here now and I still have some hair left to get by with B)
 
Last edited by a moderator:
Just been trying this with my pandora though I only tried it on an old 2GB SD card. But it seemed to work fine :) !


Don't know if this the right place to put this as it is more to do with configuration I guess, but I hope it helps someone. Just a few quick tips after the pandora sd installer has finished and is working and you're running the pandoras' OS off the *SD* card.


Apologies for any mistakes here!


1. If you want to add new fonts they go into /home/xxxxx/.fonts on the SD card (xxxxx is the name chosen on first run).


2. If you want pandora PNDs to show up like they would normally do if you booted off flash in the pandora menu (and don't want to put them in the fat32 partition), put the PNDs in /pandora/menu on the SD card.


3. The internet icon on the bar of XFCE at the bottom of the screen can be changed to run (for example) firefox quite easily. Just configure its xfce launcher and change its setting to "pnd_run /media/mmbclk02/pandora/menu/firefox.pnd" (remember to change firefox.pnd to the name of the firefox PND you downloaded/use). It'll now run firefox every time you click on the button!


4. I know this last one might seem stupid and trivial, but it took me a while to figure this one out. Notice how the icons are all large in XFCE's file manager? Can use zoom in/out to change their size! (D'oh's).


The Pandora SD installer works fine for me on my old 2GB card, it should also make compiling programs a lot easier as there's more space on your SD card than on the internal nand. Just gotta find out how to install gcc and all its bits 'n' pieces!


ljones
 
It keeps barfing for me when trying to install with a swap partition.


Pandora hotfix 5, installing to 32GB card in left slot, 20930MB vfat, 512MB swap, latest firmware.


I get an error dialog saying: "Error: could not format swap partition: /dev/mmcblk1p3: No such file or directory" (Isn't mmcblk1* the right slot?)


Installs fine with no swap.


Also is there any hope of adding the ability to choose between booting from NAND/SD to the boot menu?
 
Last edited by a moderator:
May I ask if the swap partition/file will be auto active or if this edit to etc/fstab is required as detailed here http://www.gp32x.de...file-at-startup ?

The installer will create the fstab entry for you.

Also, with a larger card, is it wise to create a large VFAT partition minus a small swap file, so that the main of the card is available for normal use as FAT32 as some folk had EXT2-3 cards suffer corruption?

I've never had a problem with EXT3 (which the installer uses), but it depends on what you want to do. Personally, I'd give about 2-3 GB to the EXT3 partition because I don't think I'd ever use more than that for the OS, including development tools and whatever else I might install via opkg.
 
Last edited by a moderator:
The Pandora SD installer works fine for me on my old 2GB card, it should also make compiling programs a lot easier as there's more space on your SD card than on the internal nand. Just gotta find out how to install gcc and all its bits 'n' pieces!

There are instructions for that here.
 
Last edited by a moderator:
It keeps barfing for me when trying to install with a swap partition.


Pandora hotfix 5, installing to 32GB card in left slot, 20930MB vfat, 512MB swap, latest firmware.


I get an error dialog saying: "Error: could not format swap partition: /dev/mmcblk1p3: No such file or directory" (Isn't mmcblk1* the right slot?)


Installs fine with no swap.

I'll look into it. In the meantime, can you try something for me and post the results?


Can you try the following:

Run the installer on your 32 GB card and let it fail as mentioned above


Eject all SD cards (both slots)


Insert your 32 GB card in the left slot


In a terminal enter "sudo fdisk -l /dev/mmcblk0"


And post the output it produces here?

Also, mmcblk1 can be either slot, it depends in the order the cards are inserted in.

Also is there any hope of adding the ability to choose between booting from NAND/SD to the boot menu?

At the moment, you can do this by renaming the boot script from autoboot.txt to boot.txt. Then when you power on the Pandora it will boot from NAND unless you use the boot menu and select "boot from SD1:1".
 
I'll look into it. In the meantime, can you try something for me and post the results?...


Code:
Muspelheim:~$ sudo fdisk -l /dev/mmcblk0


Disk /dev/mmcblk0: 32.3 GB, 32296140800 bytes

255 heads, 63 sectors/track, 3926 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

Disk identifier: 0x3bb6d1fa


        Device Boot      Start         End      Blocks   Id  System

/dev/mmcblk0p1   *           1        2669    21438711    b  W95 FAT32

/dev/mmcblk0p2            2670        3926    10096852+  83  Linux

At the moment, you can do this by renaming the boot script from autoboot.txt to boot.txt. Then when you power on the Pandora it will boot from NAND unless you use the boot menu and select "boot from SD1:1".
Cheers, that should do.
 
Code:
Muspelheim:~$ sudo fdisk -l /dev/mmcblk0


Disk /dev/mmcblk0: 32.3 GB, 32296140800 bytes

255 heads, 63 sectors/track, 3926 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

Disk identifier: 0x3bb6d1fa


        Device Boot      Start         End      Blocks   Id  System

/dev/mmcblk0p1   *           1        2669    21438711    b  W95 FAT32

/dev/mmcblk0p2            2670        3926    10096852+  83  Linux
So it didn't create a swap partition even though you requested one? Very odd. I'll try to reproduce it.


Is anyone else getting this problem?
 
It keeps barfing for me when trying to install with a swap partition.

OK, I've reproduced this now, Here's what is happening: The installer uses fdisk to partition the card, specifying the sizes in megabytes. Unfortunately, fdisk appears to do create partitions much larger than the size requested. I think this might be because partitions have to start and end on a cylinder boundary and this is necessary rounding up, but I'm not sure about that yet. The end result can be partitions hundreds of MB bigger than the requested size.


As the swap partition is the last one on the card, it gets whatever space is left over. If there is no space left over then it doesn't get created, but as fdisk does not report any error that is trapped by the script, it carries on. It eventually fails when it tries to format the non-existent swap partition.


I need to think about this a bit more before I can produce a fix, but a workaround would be to specify a size for the swap partition much larger than what you actually want.
 
I wondering if I can ask a related question to putting your PND into further useage here, so I apologise for slight OT but you'll hopefully see my reasoning and you seem to be the man in the know over images and SD boot set-ups?


Your PND worked fine for making HF4 and HF5 cards and I was hoping to image the SD card on a windows PC with Acronis True Image which is a linux based program that I use to backup my PC and restore the HDD if anything goes bonkers. I've never had issue with it but also never used it on SD cards.


It copies the HF4/5 cards fine and re-stores them fine as far as its concerned but they don't boot. They still offer the option to boot from SD 1:1 and initially begin the process but then it black screens and does nothing. Perhaps not necessary as the PND process you have made is pretty fast for making a fresh vanilla HF4/5 SD card anyway but the windows acronis process is only about 2 minutes to restore the card, so it is faster.


Anyway as that doesnt work (not your scope) I wanted to capture my current NAND HF4 tweaked set-up to a bootable SD card. So I'm currently doing this (which takes ages):


OR copy your firmware from the NAND to the SD card


The following will ask for your password. All the operations need root permissions so I thought it would be wasteful to sprinkle sudo to everything. We will bind mount the root fs to an alternative location ("/mp"), under which other filesystems mounted under root (like the kernel virtual filesystems /proc and /sys, and your SD card.) wont be visible. This allows us to take a live copy of the NAND contents to the SD filesystem.



Code:
sudo su

mkdir /mp

mount --bind / /mp

cp -va /mp/* /media/<SD card>

umount /mp

rmdir /mp

exit


Seems to be working and if it does, I would then like to copy that from the dumped 2gb SD card to a fresh 32gb one (merging my 2 16gb cards data to it) by using your SD Installer PND to create a 2-3gb EXT3 partition, a 1gb swap and the rest as FAT for PND data etc.


So to cut a long story short (too late..thud)...


Is it possible to make a tar.bz2 file from the dumped NAND contents that will work with your PND as though it is a fresh HF4/5 install?





If so, how do I go about that?



Then I can start looking into setting up a dev environment to attempt to learn about porting apps by following Mcobits' and others guides and hopefully give something back beyond compatibility listings, attempted help tips in the support section and jesting Prometheus or weird rambling posts when I'm drunk :) The efforts of Mcobit, Sebt3, Coldbird, Alerino, Gregor, WizardStan, The PandoraPress crew, OPT of course and many many more, are inspiring and a new hobby/skill seems something Pandora is offering, that would be a wasted opportunity to not embrace.
 
Is it possible to make a tar.bz2 file from the dumped NAND contents that will work with your PND as though it is a fresh HF4/5 install?

In theory, yes.

If so, how do I go about that?

That's the tricky part, I've not tried it.


You would probably start by taking a copy of the NAND contents using the procedure you mention above.


This gives you everything you need apart from the kernel, so create a /boot directory where you coped the files to and copy the kernel into it. This will be in /boot/uImage if you booted from NAND.


If you then create a tar.bz file of the whole lot and feed it to the installer it should work, but as I said, I've not tried it.


I'm working on another bug fix release at the moment, but this is something I'll look into at some point.
 
Last edited by a moderator:
Another new version (1.3):


EDIT: Don't use this version, the latest one is here.


Changes:

  • Change partition order to help with the rounding problem when using a swap partition (Thanks to surt from the forum for reporting and helping to diagnose this).
  • Change method of checking that the SD card has not been changed partway though the process.



Hopefully this is it in terms bug fixes for now.

sd_install.pnd
 

Attachments

  • sd_install.pnd
    49.6 KB · Views: 225
Last edited by a moderator:
Thankyou Dave1234, I had thought that a simple tar.bz2 from just the dumped contents would fail and also figured it would need the kernel so thats the confirmation I was seeking to experiment further.


Sadly the process of NAND to SD worked but despite a correct boot.txt it behaves like the HF4/5 ones that I had restored from images and doesn't boot, despite offering boot from SD1:1. So I shall have to re-solve that first aswell. Thanks again and sorry for OT.
 
Back
Top