Boot from SD card doesn't work


Gandi

Member
Joined
Jan 23, 2009
Messages
169
Location
Germany
I tried to install the OS on a sd card with the "Pandora SD Installer" from the repo.

The installer doesn't show any errors, but when I reboot, only a black screen appears (after showing a pandora logo for a second).

This has happend on two different sd cards. (SanDisk, on 16 GB the other one 32 GB).

I told the Installer to create a BOOT, ROOT and SWAP partiion.

Any ideas what the reason might be and how it can be resolved?

EDIT: It seems like the ext3 file system get's mounted as read only :wacko:

Much like in this thread: http://boards.openpandora.org/index.php?/topic/6497-sd-installerpnd-install-os-on-sd-card-problems/

The sd cards seem to work to nicely otherwise... :unsure:

Will creating all that stuf manually work? (I am unfortunately completely new to Linux :( )
 
Last edited by a moderator:
You should not use ext3 for sdcards because of the journaling stuff.


Try to format with ext2.
 
thanks mcobit! I'll try setting up everything manually with a ext2 partition.

This may take a while, since I'm not yet comfortable with Linux.

Meanwhilw here is a excerpt from the dmesg command after inserting the SD card after rebooting from NAND.

I read that it may tell something about the reasons. Maybe someone with more knowledge can comment on that...?

[   40.731872] mmc0: host does not support reading read-only switch. assuming write-enable.
[   40.736083] mmc0: new high speed SDHC card at address e624
[   40.737365] mmcblk1: mmc0:e624 SU32G 29.7 GiB
[   40.754425]  mmcblk1: p1 p2 p3
[   41.289855] FAT-fs (mmcblk1): bogus number of reserved sectors
[   41.289886] FAT-fs (mmcblk1): Can't find a valid FAT filesystem
[   41.424102] FAT-fs (mmcblk1): bogus number of reserved sectors
[   41.424133] FAT-fs (mmcblk1): Can't find a valid FAT filesystem
[   42.040374] EXT3-fs (mmcblk1p3): error: unrecognized mount option "umask=0" or missing value
[   42.108703] kjournald starting.  Commit interval 5 seconds
[   42.462677] EXT3-fs (mmcblk1p3): using internal journal
[   42.462677] EXT3-fs (mmcblk1p3): mounted filesystem with ordered data mode
 
The SD installer should format the card as part of it's operation, there is another issue-

The SD Installer was last updated before 'Super Zaxxon' versions of the OS.

The location of the kernel changed (and there are now 2 to choose, old and new), but the SD installer still tries to set up a card with the original configuration.

Once you've used the SD installer to create your card, you'll need to make a couple of little changes.

On your PC, UnTAR the firmware image you used and get the two Kernels from there.

Presently these are "uImage-2.6.27.57-omap1" (the old kernel) and "uImage-3" (new kernel).

Alternatively, of course, If you've already got the latest OS on Nand, you could take the kernels from there.

In the 'ROOT' partition of your newly made card (created with SD Installer), create a folder called 'boot' (lower case).

Using a terminal window for these changes, you will need to use 'sudo su' command to get permission to perform some of these actions.

So you now have a 'boot' folder in the 'ROOT' partition of the card SD Installer made.

Copy the two kernels you extracted from the firmware image into that folder.

Finally, you need to change the autoboot.txt and boot.txt files that are in the 'BOOT' partition so they now refer to the kernels correctly. You can delete the ones that are there (and the kernel that is there too, it is redundant).

Just put the two replacement files attached to this post into that location instead.

Once done, you will be able to use the card just like the inbuilt OS, hold the right trigger during boot and you can choose the old kernel, otherwise the new one will be used.
 

Attachments

  • autoboot.txt
    170 bytes · Views: 233
  • boot.txt
    200 bytes · Views: 219
Last edited by a moderator:
FYI, bear in mind using a swap partition carries a certain amount of added wear on the card over time - if you want to use it, you might want to sacrifice a 4gb card instead of a more valued 16 or 32Gb one!
 
Writing the journal (a relatively small area of disk containing essentially a log of what was being done on the FS when power was lost / system crashed) wears out the SD (and slightly slows down disk access). OTOH it makes the filesystem more robust to crashes/hard reboots/etc and makes for faster filesystem check (I dont know if pandora even does this, should do when running from SD but not otherwise) when recovering from crash.

I personally use ext4 without a journal (google helps if you want that) on my ext-partitions on my pandora SDs. But that doesnt work with the old kernel (just FYI).
 
FYI, bear in mind using a swap partition carries a certain amount of added wear on the card over time - if you want to use it, you might want to sacrifice a 4gb card instead of a more valued 16 or 32Gb one!
Thanks for the Info!

I am planning to use this card as my main system and also doing/learning some coding and compiling on it.

Will a system without a swap partition be sufficient for that?

Writing the journal (a relatively small area of disk containing essentially a log of what was being done on the FS when power was lost / system crashed) wears out the SD (and slightly slows down disk access). OTOH it makes the filesystem more robust to crashes/hard reboots/etc and makes for faster filesystem check (I dont know if pandora even does this, should do when running from SD but not otherwise) when recovering from crash.

I personally use ext4 without a journal (google helps if you want that) on my ext-partitions on my pandora SDs. But that doesnt work with the old kernel (just FYI).
I understand that using a non journaling file system might be a better idea for the same reason that Asmo gave about using a swap partition.

Will it be possible to copy the ext3 partition away, rebuild this partition as ext4 without journaling and copy the old content back?

(Keep in mind - I am a total noob to Linux ;) )
 
Last edited by a moderator:
How long will a card last with journalling enabled? I like the idea of corruption-proofing.

Same goes for swap. - If I have a swap partition which gets very little use, will it cause serious wear problems?
 
The SD Installer was last updated before 'Super Zaxxon' versions of the OS.
I actually contacted Dave1234 about that, and he said he no longer has time to do any pandora work and gave me admin rights for SD installer. If anyone could test this version (I'm out of spare SD cards), I could upload it to the repo:http://notaz.gp2x.de/tmp/sd_install.pnd
Man, are you doing everything now! :blink:

Thanks! I will check it immediately! :)
 
Last edited by a moderator:
It's... different now!

Seems it's still booting from NAND if I just choose "restart".

When I hold the right shoulder button and choose "boot from SD" I get a error message now:


reading boot.txt

175 bytes read
## Executing plain script at 82000000, size 175
reading uImage

** unable to read "uImage" from mmc 0:1 **
Wrong image format for bootm command
ERROR: can't get kernel image!
script finished.
EDIT:

I became a little adventurous and took a look at boot.txt and autoboot.txt.

I changed the second line from


fatload mmc 0:1 0x80300000 uImage
to


fatload mmc 0:1 0x80300000 uImage-3
et voilà - a fresh system startet to boot!

Thanks a lot for your work, notaz (and Dave, too)!  :)

This little pnd is really helpful for newbies like me.

Now - if it had a little option to choose the file system for the root partition... ;)
 
Last edited by a moderator:
I dont worry about SD wear (hell I dont even worry about NAND wear .. if the nand would be bigger I'd happily swap on it (there is even a driver in  the kernel tree for that) :p )... my ext4 without journal is mostly as a sacrifice of some reliability for a small gain in speed, I have a CC unit that I compile (and sometimes browse the net with firefox) and I'm burning my SDs with swapping a lot and they dont seem to mind.

On converting ext3 with journal to ext4 without (WARNING: I DIDNT TEST ANY OF THIS. NO WARRANTY):

First ext3->ext4:

https://ext4.wiki.kernel.org/index.php/Ext4_Howto#Converting_an_ext3_filesystem_to_ext4

then remove the journal

http://fenidik.blogspot.fi/2010/03/ext4-disable-journal.html

adapting those two you should end up with something like

tune2fs -O extents,uninit_bg,dir_index /dev/DEV

e2fsck -fDC0 /dev/DEV

tune2fs -O ^has_journal /dev/DEV

e2fsck -f /dev/DEV

You might be able to do the tune2fs operations sequentially or maybe even do them with a single command and then follow with a single fsck but I didnt test any of this.

Eg maybe just this works:

tune2fs -O extents,uninit_bg,dir_index,^has_journal /dev/DEV

e2fsck -fDC0 /dev/DEV

(If you have backed up your SD you shouldnt be able to break/lose more than the filesystem anyways...)
 
I became a little adventurous and took a look at boot.txt and autoboot.txt.

I changed the second line from

fatload mmc 0:1 0x80300000 uImageto
Code:
fatload mmc 0:1 0x80300000 uImage-3
et voilà - a fresh system startet to boot!
Oops, patched that, if someone could confirm it works out-of-the-box now I could update the repo version:http://notaz.gp2x.de/tmp/sd_install.pnd
 
Last edited by a moderator:
I became a little adventurous and took a look at boot.txt and autoboot.txt.

I changed the second line from

fatload mmc 0:1 0x80300000 uImageto
Code:
fatload mmc 0:1 0x80300000 uImage-3
et voilà - a fresh system startet to boot!
And if you hold the right trigger on boot, and select 'boot from SD1' does it start with the old kernel correctly?

i.e boot.txt directs it to 'uImage-2.6.27.57-omap1' not uImage-3.

(You'll see the 'booting with..' on the splashscreen).

Not doubting you Notaz, I just haven't got a free SD to test it with right now ;)
 
Last edited by a moderator:
Back from work and ready to test...

Seems to work out of the box now! :)

Ready to be published IMHO. B)

(I tested it with a spare 2GB card a had lying around from my GPS - turned out to be slower than on my 32GB card :blink: )

Booting the old Kernel by holdig the right shoulder button seems to work, too!

(At least I guess it's the old kernel - it looks different and shows no splash screen - neither when starting nor when shutting down)

Now there only thing on my wishlist would be on option to choose the filesystem of the root partition. :rolleyes:
 
And if you hold the right trigger on boot, and select 'boot from SD1' does it start with the old kernel correctly?

i.e boot.txt directs it to 'uImage-2.6.27.57-omap1' not uImage-3.

(You'll see the 'booting with..' on the splashscreen).
I think it just disables splash screen, don't see such functionality in the version before mine too.
Back from work and ready to test...
Thanks for testing, repo updated.
 
I think it just disables splash screen, don't see such functionality in the version before mine too.
You're right, I was remembering a previous install! Mine (manually fixed as per above) also disables splashscreen when booting older kernel.
Still need the old kernel sometimes to be able to see all my Mame Roms for some reason.

Boring details:

I found that some of my Roms that were fine under previous OS, disappeared from the file selector under Super Zaxxon:

http://boards.openpandora.org/index.php/topic/8424-superzaxxon-beta-5-released/page-11#entry157048

They do show up when I boot with the older kernel though. I gather only a handful of users have anything similar, so as long as I can fall back on the old kernel I'm ok.

It may be totally unrelated, but I notice something that might have a similar root cause - in Fuse (Spectrum emulator) when I use it's file selector to browse my spectrum roms (all categorised in folders that are all in caps, eg 'PLATFORMERS') if I've booted under the old kernel, about half the folder names appear as all lower case (and consequently not in alphabetical order with the all caps ones. If I boot with the new kernel the all the folders are caps as expected.

I wondered if something in the way the file selector 'sees' the folders has made it miss some of my Mame roms under the new kernel?

Way off topic. Just thought I'd mention in case...

;)
 
Last edited by a moderator:
Back
Top