Reply
Thread Tools
dacb's Avatar
Posts: 12 | Thanked: 1 time | Joined on Nov 2006 @ Earth, Sol, Milky Way, Universe
#1
My N770 crashed in the middle of a chess game. The unit basically shut off without warning. When I turned it back on, it rebooted fine, but the application/start menu is empty - other than the topic headings (Utilities, Games, ...). Interestingly, the Extras menu is absent.

Is there some command that can be run to rebuild the menus? I've tried digging through the Hildon docs on maemo.org for some shell command I can run that will ressurect the menus to no avail. Thankfully, I have osso-xterm and I can run it via the load-run plugin.

Thanks for any help...

As a disclaimer, I should say I'm using Fanoush's 52 Mhz MMC patch with my root filesystem on the second partition of the MMC (with ext3 fs).

Last edited by dacb; 2006-12-05 at 22:40. Reason: Spell Fanoush's nick correctly.
 
Posts: 3,401 | Thanked: 1,255 times | Joined on Nov 2005 @ London, UK
#2
Boot using the internal flash and run fsck.ext3 on your ext3 partition?

My guess is your ext3 partition is or was corrupted - it could have been "fixed" when you last booted but this may have resulted in data loss. It looks like the menu is held in /etc/others-menu but I could be wrong - this is the content of my /etc/others-menu directory, sub-directories appear to represent nested menu items and each entry points to a desktop ini file (which may also be missing if you're really unlucky):

Code:
lrwxrwxrwx    1 root     root           56 Sep 29 11:38 /etc/others-menu/0100_osso-music-player.desktop -> /usr/share/applications/hildon/osso-music-player.desktop
lrwxrwxrwx    1 root     root           59 Sep 29 11:38 /etc/others-menu/0300_osso_rss_feed_reader.desktop -> /usr/share/applications/hildon/osso_rss_feed_reader.desktop
lrwxrwxrwx    1 root     root           49 Dec  1 18:41 /etc/others-menu/0301_osso-xterm.desktop -> /usr/share/applications/hildon/osso-xterm.desktop
lrwxrwxrwx    1 root     root           53 Sep 29 11:38 /etc/others-menu/0500_osso_pdfviewer.desktop -> /usr/share/applications/hildon/osso_pdfviewer.desktop
lrwxrwxrwx    1 root     root           55 Sep 29 11:38 /etc/others-menu/0600_osso-addressbook.desktop -> /usr/share/applications/hildon/osso-addressbook.desktop
lrwxrwxrwx    1 root     root           50 Sep 29 11:38 /etc/others-menu/1100_filemanager.desktop -> /usr/share/applications/hildon/filemanager.desktop
lrwxrwxrwx    1 root     root           59 Sep 29 11:38 /etc/others-menu/1200_Control Panel.desktop -> /usr/share/applications/hildon/hildon-control-panel.desktop
lrwxrwxrwx    1 root     root           57 Sep 29 11:38 /etc/others-menu/2300_osso-global-search.desktop -> /usr/share/applications/hildon/osso-global-search.desktop
lrwxrwxrwx    1 root     root           48 Sep 29 11:38 /etc/others-menu/2400_osso_help.desktop -> /usr/share/applications/hildon/osso_help.desktop
lrwxrwxrwx    1 root     root           52 Dec  1 21:45 /etc/others-menu/mediastreamer.desktop -> /usr/share/applications/hildon/mediastreamer.desktop

/etc/others-menu/1400_tana_fi_utilities:
drwxr-xr-x    2 root     root            0 Sep 29 11:38 .
drwxr-xr-x    5 root     root            0 Dec  1 21:45 ..
lrwxrwxrwx    1 root     root           54 Sep 29 11:38 0100_osso_calculator.desktop -> /usr/share/applications/hildon/osso_calculator.desktop
lrwxrwxrwx    1 root     root           54 Sep 29 11:38 0200_osso_worldclock.desktop -> /usr/share/applications/hildon/osso_worldclock.desktop
lrwxrwxrwx    1 root     root           49 Sep 29 11:38 0300_osso_notes.desktop -> /usr/share/applications/hildon/osso_notes.desktop
lrwxrwxrwx    1 root     root           50 Sep 29 11:38 0400_osso_sketch.desktop -> /usr/share/applications/hildon/osso_sketch.desktop

/etc/others-menu/2100_tana_fi_games:
drwxr-xr-x    2 root     root            0 Sep 29 11:38 .
drwxr-xr-x    5 root     root            0 Dec  1 21:45 ..
lrwxrwxrwx    1 root     root           52 Sep 29 11:38 0100_chess_startup.desktop -> /usr/share/applications/hildon/chess_startup.desktop
lrwxrwxrwx    1 root     root           54 Sep 29 11:38 0200_mahjong_startup.desktop -> /usr/share/applications/hildon/mahjong_startup.desktop
lrwxrwxrwx    1 root     root           52 Sep 29 11:38 0300_osso_lmarbles.desktop -> /usr/share/applications/hildon/osso_lmarbles.desktop

/etc/others-menu/extra_applications:
drwxr-xr-x    2 root     root            0 Dec  4 00:09 .
drwxr-xr-x    5 root     root            0 Dec  1 21:45 ..
lrwxrwxrwx    1 root     root           46 Dec  4 00:09 0000_mplayer.desktop -> /usr/share/applications/hildon/mplayer.desktop
lrwxrwxrwx    1 root     root           55 Dec  1 21:41 9999_parkwifidetector.desktop -> /usr/share/applications/hildon/parkwifidetector.desktop
lrwxrwxrwx    1 root     root           45 Dec  1 21:48 minimo.desktop -> /usr/share/applications/hildon/minimo.desktop
If you have the entries
 
dacb's Avatar
Posts: 12 | Thanked: 1 time | Joined on Nov 2006 @ Earth, Sol, Milky Way, Universe
#3
Yeah, your assessment looks about correct. After 'flasher-2.0 --set-root-device flash', the fsck of the ext3 on the second mmc partition produced copious errors and lost+found is full .

Thankfully, I routinely (i.e. weekly) take out the RS-MMC and use a USB card-reader on my desktop linux box to 'dd' off the ext3 file system as a sort of snapshot backup.

This is probably the third time in as many weeks that I have crashed the unit and as a result corrupted my MMC based root filesystem and had to 'dd' it back from my desktop backup.

I'm thinking of loopback mounting the ext3fs on the desktop box and doing a mkjffs2 from that loopback mountand padding it out to the size of the ext3fs partiton (in my case 512 Mb). Then 'dd'ing the resulting jffs2 image back to the nokia rather than ext3fs. I don't see any reason that my kernel wouldn't be able to use a jffs2 root on mmcblk0p2. - My experience with jffs2 and OpenWRT on USB flash drives have shown me that it is much more robust on dirty shutdowns than ext3 and especially ext2.

Anyway, thanks for the tips and the ls dumps...

Disclaimer:
This is life on the bleeding edge - this problem is solely my own fault and not a defect of the device or the operating system.
 
Posts: 3,401 | Thanked: 1,255 times | Joined on Nov 2005 @ London, UK
#4
Is it a stock OS you are running from MMC, or Sardine/Herring? If the latter, why not just boot off of MMC then upgrade the internal jffs2 flash to Sardine/Herring, and continue running your system from internal flash only booting from MMC when you need to upgrade the internal filesystem?

I'd also recommend installing the smaller initfs with bootmenu to make life easier!

I have a build of Sardine on MMC (ext2) but it's not something I use for a "production" system - I just boot it every now and again to monitor progress/check if any bugs are being addressed. If Sardine corrupts itself, oh well I'll just rebuild it again from scratch!
 
dacb's Avatar
Posts: 12 | Thanked: 1 time | Joined on Nov 2006 @ Earth, Sol, Milky Way, Universe
#5
Originally Posted by Milhouse
Is it a stock OS you are running from MMC, or Sardine/Herring? If the latter, why not just boot off of MMC then upgrade the internal jffs2 flash to Sardine/Herring, and continue running your system from internal flash only booting from MMC when you need to upgrade the internal filesystem?
This is stock OS (with the aforementioned kernel patch). I've not yet ventured into trying Sardine/Herring.

I'd also recommend installing the smaller initfs with bootmenu to make life easier!
I have tried bootmenu but during a previous reflash of the internal memory it got blown away. I've been reluctant to reinstall it until I can hack it to display a pretty picture behind the bootmenu text. Instead, I have relied on --set-root-device and being near a machine with linux and a USB host.

I have a build of Sardine on MMC (ext2) but it's not something I use for a "production" system - I just boot it every now and again to monitor progress/check if any bugs are being addressed. If Sardine corrupts itself, oh well I'll just rebuild it again from scratch!
Nice idea, perhaps I will look into Herring this weekend.

In the mean time, I have done something like (my desktop linux box):
Code:
# checkout mtd source (mkfs.jffs2)
cvs -d :pserver:anoncvs@cvs.infradead.org:/home/cvs login
cvs -d :pserver:anoncvs@cvs.infradead.org:/home/cvs co mtd
# build mkfs.jffs2
cd mtd/util
make mkfs.jffs2
cd ../../

# loopback mount my dd backup onto the directory ext3
mkdir ext3
mount -o loop -o ro my_rsmmc_partition_2_backup.ext3.dd ext3

# make a jffs2 image from the dd back loopback mount
# -l little endian or -b big endian
# neither seem to work, :(
# -d ext3 directory that holds the loopback ext3 mount
# -o output file
# -p pad out to the end of the filesystem, no space between
# the -p and the size, in my case, I used:
# -p549000000
mtd/util/mkfs.jffs2 -l -p549000000 -d ext3 -o my_rsmmc_partition_2_backup.jffs2.dd

# dd to the rsmmc in the card reader
# the rsmmc shows up as sda
dd if=my_rsmmc_partition_2_backup.jffs2.dd of=/dev/sda2 bs=512

# cleanup
umount ext3
rmdir ext3
Then put the RSMMC in my N770, 'flasher-2.0 --set-root-device mmc' on the linux host and rebooted the N770.

still testing...

Always booted from internal flash mtdblock4. Bleh. I quit for tonight.

Last edited by dacb; 2006-12-06 at 05:07. Reason: just didn't work
 
Posts: 3,401 | Thanked: 1,255 times | Joined on Nov 2005 @ London, UK
#6
If it's a stock OS, why are you running it from MMC? I understand why you want the 52Mhz kernel, but why not just run the OS from internal flash and avoid the pain of a flakey read/write partition containing your OS? I guess the OS mounted on 52Mhz MMC may be a bit more lively than the internal flash memory, but the downside is as you have already found - increased likelihood of corruption should the device not shutdown cleanly.

Originally Posted by dacb
I have tried bootmenu but during a previous reflash of the internal memory it got blown away. I've been reluctant to reinstall it until I can hack it to display a pretty picture behind the bootmenu text. Instead, I have relied on --set-root-device and being near a machine with linux and a USB host.
OK - now, are you sure your location is Earth?
 
dacb's Avatar
Posts: 12 | Thanked: 1 time | Joined on Nov 2006 @ Earth, Sol, Milky Way, Universe
#7
Perhaps not... But didn't grub win over lilo only after they put in the ability to install a purdy boot picture?
 
Posts: 3,401 | Thanked: 1,255 times | Joined on Nov 2005 @ London, UK
#8
I believe space is at a premium in initfs, in which case image support may be some way down the priority list and you may be using --set-root-device for some time to come!
 
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 15:57.