Active Topics

 



Notices


Reply
Thread Tools
hawaii's Avatar
Posts: 1,030 | Thanked: 792 times | Joined on Jun 2009
#1331
So this is a strange problem I am having...

Bootmenu refuses to update and show any .item files during boot. I've checked every symlink, they all point correctly, it completely eludes me.

I've done full re-installs, and proper reconfigures of both packages, many different version, no difference. I can't get bootmenu to iterate and show the .items, only Internal NAND and Power Off are my options.

Any ideas?
 
hawaii's Avatar
Posts: 1,030 | Thanked: 792 times | Joined on Jun 2009
#1332
Bueller? Bueller? Bueller?
 

The Following User Says Thank You to hawaii For This Useful Post:
Estel's Avatar
Posts: 5,028 | Thanked: 8,613 times | Joined on Mar 2011
#1333
Sorry, no freaking idea. The fact that backupmenu stopped working for me months ago (albeit for some different reasons, it just fails during "starting" backupmenu) and that I haven't debugged it as I switched to Mentalist Traceur's "earliest boot" recovery console for doing backups (or anything else outside booting full system) even earlier, doesn't help in debugging, too.

/Estel
__________________
N900's aluminum backcover / body replacement
-
N900's HDMI-Out
-
Camera cover MOD
-
Measure battery's real capacity on-device
-
TrueCrypt 7.1 | ereswap | bnf
-
Hardware's mods research is costly. To support my work, please consider donating. Thank You!
 
hawaii's Avatar
Posts: 1,030 | Thanked: 792 times | Joined on Jun 2009
#1334
Where is the thread on said pre-init recovery console?
 
peterleinchen's Avatar
Posts: 4,118 | Thanked: 8,901 times | Joined on Aug 2010 @ Ruhrgebiet, Germany
#1335
Originally Posted by hawaii View Post
Where is the thread on said pre-init recovery console?
Hmm?

Possibly somewhere around this post?
Probably here!
__________________
SIM-Switcher, automated SIM switching with a Double (Dual) SIM adapter
--
Thank you all for voting me into the Community Council 2014-2016!

Please consider your membership / supporting Maemo e.V. and help to spread this by following/copying this link to your TMO signature:
[MC eV] Maemo Community eV membership application, http://talk.maemo.org/showthread.php?t=94257

editsignature, http://talk.maemo.org/profile.php?do=editsignature
 
Estel's Avatar
Posts: 5,028 | Thanked: 8,613 times | Joined on Mar 2011
#1336
Just in case there were some updates to the script later on, this is how the piece of code looks on my device - put it into /sbin/preinit:

Code:
        # Recovery shell
        printf "Press any key to get a shell.../n"
        for q in 0
        do
         printf "$q"
         if (read -n 1 -t 1)
         then
          printf "\b\b"
          insmod $MODULE_PATH/led-class.ko
          insmod $MODULE_PATH/leds-lp5523.ko
          insmod $MODULE_PATH/omap_wdt.ko
          insmod $MODULE_PATH/twl4030_wdt.ko
          sleep 1
          for p in /sys/bus/platform/devices/*_wdt/misc:*; do
           n=`basename $p | sed "s/.*://"`
           rm -f /dev/$n
           mknod /dev/$n c `cat $p/dev | sed "s/:/ /g"`
          done
          for i in 1 2 3 4 5 6; do
           echo 25 > /sys/class/leds/lp5523\:kb$i/brightness
          done
          watchdog -t 20 /dev/watchdog
          watchdog -t 20 /dev/twl4030_wdt
          loadkmap < /etc/nokia-n900.kmap
          sh
          killall watchdog
          break
         fi
         printf "\b"
        done
...just after mkdir /tmp/dev line. You also need to have:

Code:
mdprobe fbcon
...if you don't have it already, preferably as the Very First Line(tm) in the /sbin/preinit, just after comments.

You might want to tweak two things, then:

1. The for q in 0 line - I've set it that way, cause I want the recovery console to appear only if I "bash" some keyboard key during boot - otherwise, device boots normally, without any considerable delay. Other people may preffer the version, where you get a "press any key to get a shell..." visible on screen longer, for any arbitrary number of seconds - just change the "for q in 0" line to "for q in 0 1 2 3 4" for 5 seconds, and so goes on. Mind you, that every second added there, is a second longer boot, when you *don't* want the console.

2. The line loadkmap < /etc/nokia-n900.kmap suggests, obviously, that there is a nokia-n900.kmap file under /etc. You may, actually, put it anywhere you like, (and tweak the line in script) as long as it is on rootfs partition. Without it, you won't have special characters and symbols. You may get this file from insides of backupmenu package, for example.
---

Now, mind you, that this is as early shell as it gets (apart from u-boot console, but the one isn't "real" shell, so...), so it's most catastrophe-proof one, but at the same time, most raw of them. You don't have things like /dev/mmcblk0p2 and such defined yet, so you can either do it manually if you want to operate on it, or use a "dirty" solution ala backupmenu, running the script attached to this post (content copied directly from what backupmenu does). For convenience, I keep it on /, aka absolute root, and I run it as ./udev-start.sh from recovery console.

Tip: - I wouldn't try continuing normal boot by issuing "exit" from recovery console, after you had "udev-start.sh" issues (same reason, why backupmenu weren't able to continue booting Maemo without reboot). Just reboot via "reboot" after you're done. If you haven't messed up with higher level things via udev-start.sh or manual operations, continuation of boot process after leaving recovery console should be perfectly OK (YMMV).

All thanks and hail to the Mentalist Traceur for this incredibly useful little piece of code.

Cheers,
/Estel

Ps.

Last but not least, it is worth to mention, than using set of .sh scripts or some barebone CLI program, we could replicate all backupmenu "automatic" functions in recovery shell, finally having it in real CLI, instead of text2screen PITA, that was necessary before advent of fbcon.
__________________
N900's aluminum backcover / body replacement
-
N900's HDMI-Out
-
Camera cover MOD
-
Measure battery's real capacity on-device
-
TrueCrypt 7.1 | ereswap | bnf
-
Hardware's mods research is costly. To support my work, please consider donating. Thank You!
 

The Following 3 Users Say Thank You to Estel For This Useful Post:
Posts: 638 | Thanked: 1,692 times | Joined on Aug 2009
#1337
Originally Posted by pichlo View Post
.....FWIW, I have figured out what my problem with BackupMenu was in the end. .....
I have taken to developing on the device. The package builder uses tar and find with options not supported by our busybox version of those utilities. So I installed the GNU versions (tar-gnu and findutils-gnu). And here comes the foolish part. Instead of adding /usr/bin/gnu to $PATH, I manually redirected tar and find from busybox to the GNU equivalents. Redirecting them back did not help, presumably because I was forgetting something. In the end, I uninstalled everything related to backupmenu and *-gnu again, reinstalled bysybox-symlinks-*, reinstalled backupmenu and voilá, I am back in business!

(And BTW, yes, I ran fsck from my repaired BackupMenu. No problems found )
It seems i encountered the same problem.
Bootmenu had only one entry "Internal nand" and nothing more.
The problem was the gnu version of find in /usr/bin/find.
To fix bootmenu i removed /usr/bin/find and recreated with:
ln -s /bin/busybox /usr/bin/find

My fault was to replace find with the gnu version... the fault of someone else is to consider busybox the standard when looking at his functions behavior.
If tomorrow busybox will integrate a more complete set of options for the internal function we can expect any kind of problem.
 

The Following 3 Users Say Thank You to xes For This Useful Post:
Posts: 1,100 | Thanked: 2,797 times | Joined on Apr 2011 @ Netherlands
#1338
Originally Posted by xes View Post
It seems i encountered the same problem.
Bootmenu had only one entry "Internal nand" and nothing more.
The problem was the gnu version of find in /usr/bin/find.
To fix bootmenu i removed /usr/bin/find and recreated with:
ln -s /bin/busybox /usr/bin/find

My fault was to replace find with the gnu version... the fault of someone else is to consider busybox the standard when looking at his functions behavior.
If tomorrow busybox will integrate a more complete set of options for the internal function we can expect any kind of problem.
I do not agree. A developer can only take in account what is default on a device. You can never imagine all possible alterations.

There is always a certain risk in relying on tool text output. I encountered a similar issue with smscon, which used "ps" output. I have procps installed, which replaced ps.

In case of the gnu tools: they don't replace the busybox commands. I created alias for those command (alias find='gfind' etc), so I could use find for gfind on the prompt, while it does not affect something like bootmenu.
 

The Following 6 Users Say Thank You to ade For This Useful Post:
pichlo's Avatar
Posts: 6,447 | Thanked: 20,981 times | Joined on Sep 2012 @ UK
#1339
I may be wrong but I read xes' comment as, "it was a mistake to choose busybox by Maemo creators", not by BackupMenu author. I could not agree more.
__________________
Русский военный корабль, иди нахуй!
 

The Following 4 Users Say Thank You to pichlo For This Useful Post:
Posts: 638 | Thanked: 1,692 times | Joined on Aug 2009
#1340
@pichlo
Yes, busybox was for sure a bad choice for maemo but continue to rely on his cutted and violated gnu replacements is something that creates confusion and problems hard to debug

@ade
yes, you are right, a developer can't consider any possible alteration.
But when i approach the idea to create a script with "find" i have in my mind the gnu find behavior, not the busybox one.
Then, when i discover the difference bumping my nose against it, i try to use a syntax that can be valid for both of them(gnu and busybox) ...And i think this should be important especially for a system tool.

Edit:
This doesn't mean that everything using busybox is crap.. I only think that things could be designed to match a more extended (and foreseeable) set of situations.
..In fact, it seems i'm not the only one that tried to replace the busybox functions' symlinks with the original gnu tools.

Last edited by xes; 2015-01-07 at 20:56.
 

The Following 5 Users Say Thank You to xes For This Useful Post:
Reply

Tags
backup, backupmenu, cssusupplement, max(useful), rescue-console, restore, system


 
Forum Jump


All times are GMT. The time now is 10:48.