Active Topics

 



Notices


Reply
Thread Tools
Estel's Avatar
Posts: 5,028 | Thanked: 8,613 times | Joined on Mar 2011
#1321
Actually, some time ago I started to rewrite whole thing to drop the usage of text2screen and make it execute as The Very First Thing in /sbin/preinit (after Mentalist Traceur's recovery console), as shell at first, and other functionalities called from scripts only if user specifically invokes them .That's because I'm sucker at coding - otherwise, I would do it as recoveyr shell + invocable CLI with backupmenu functionality, not a bunch of scripts.Still, even in script form, it would be modular and easier to maintain than current holy wall of code (well, I still bless robbiethe1st for at least extensively commenting things in between the bricks in wall)

Anyway, CLi or scripts, the final effect is same. Although, with my current rate of being over-projected and delayed at other things, expect backupmenu replacement to arrive.circa about when hell freezes, EA starts publishing FOSS games only, and GoT's winter ends.

/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!
 

The Following 6 Users Say Thank You to Estel For This Useful Post:
Posts: 45 | Thanked: 18 times | Joined on Feb 2014 @ FrozenOver
#1322
Its too bad the n900 has such small amount of memory. just think it would be nice if tarball file generated from backing up rootfs and optfs was checked against corruption. whatever happened to robbiethe1st? last I read iirc his n900 usb port broke. been enjoying the crap out of my n900 lately. though modrana and monav are giving me new joy

Ah well do what you can dont wind up like the dutch boy at the dyke.
__________________
Reality is often stranger than fiction
 
pichlo's Avatar
Posts: 6,447 | Thanked: 20,981 times | Joined on Sep 2012 @ UK
#1323
I did some stupid and now BackupMenu does not show on the list in the boot menu. Only "Maemo 5 (Internal Nand)" and "Power off (When not on charger)". I have uninstalled and reinstalled bootmenu, initrd-progs, backupmeny and about 3 other packages (all dependencies of backupmenu), all to no avail. Still no BackupMenu entry on the list.

The problem is, I do not know what I did. I remember deleting some empty folders in /, amongst them /boot, but recreating it does not make a difference. Any ideas?
__________________
Русский военный корабль, иди нахуй!
 
peterleinchen's Avatar
Posts: 4,118 | Thanked: 8,901 times | Joined on Aug 2010 @ Ruhrgebiet, Germany
#1324
Yep, real stupid

For me it sounds you miss the backupmenu.item in /etc/bootmenu.d/ !
But that should have been recreated by reinstalling backupmenu???

What about /bootmenu.sh and /etc/bootmenu.conf?
__________________
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
 
pichlo's Avatar
Posts: 6,447 | Thanked: 20,981 times | Joined on Sep 2012 @ UK
#1325
Originally Posted by peterleinchen View Post
For me it sounds you miss the backupmenu.item in /etc/bootmenu.d/ !
But that should have been recreated by reinstalling backupmenu???
That's the funny thing. The backupmenu item was present in /etc/bootmenu.d, but not shown in the menu at boot time. I uninstalled backupmenu and the file was not deleted. So I deleted it manually and reinstalled beckupmenu a number of times, but the file was not recreated.

What about /bootmenu.sh and /etc/bootmenu.conf?
Yup, both present and looking OK.

Another thing. Bootmenu has a USB mass storage mode. It says at the bottom on the screen to press Ctrl to enter it. So I did and it went to the mass storage mode, as indicated by my PC popping up a file explorer window, but then the phone reboots spontaneously. Is it supposed to do that?

Perhaps I should mention that all this started happening after an unexpected reboot while I was compiling something on the device. Presumably caused by the watchdog, the CPU usage was pretty high. Is there a way to disable that darned watchdog? It's causing nothing but trouble.
__________________
Русский военный корабль, иди нахуй!
 
peterleinchen's Avatar
Posts: 4,118 | Thanked: 8,901 times | Joined on Aug 2010 @ Ruhrgebiet, Germany
#1326
Uh, that sounds like fsck is your friend (maybe).

About watchdogs: R&D mode
__________________
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
 

The Following 2 Users Say Thank You to peterleinchen For This Useful Post:
pichlo's Avatar
Posts: 6,447 | Thanked: 20,981 times | Joined on Sep 2012 @ UK
#1327
About fsck: that was the main reason I wanted to launch BackupMenu after the unexpected reboot, to see what the damage was. Never mind, it looks like a dd and offline fsck time
__________________
Русский военный корабль, иди нахуй!
 

The Following User Says Thank You to pichlo For This Useful Post:
Estel's Avatar
Posts: 5,028 | Thanked: 8,613 times | Joined on Mar 2011
#1328
For backupmenu-less fsck on device (be sure to have kernel-power for framebuffer, and latest cssu-thumg/testing installed, or blocker bug in fsck will kill your filesysytem!), add this:

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
...after line 31:
Code:
mkdir /tmp/dev
... of /sbin/preinit. Then, download .tar from this post's attachement, cd to / (as root), and unpack it.

After reboot, just after u-boot, bash any random button - you will enter the most early Maemo recovery shell in existence (so early, that you don't even have /dev/mmcblk0 assigned, amongst other things ). Keyboard mapping works thanks to file from this attachement (keyboard is mapped exactly as in backupmenu's recovery shell, so shift+space = tab, etc).

Now, you can run:
Code:
/udev-start.sh
... (ignore any errors) - you will get /dev/ things populated.

From now, you can fsck /dev/mmcblk0p2 -f -p or, basically, do whatever you want. Root (ubifs) is mounted, so it is good idea to save logs, for example via fsck /dev/mmcblk0p2 -f -p > /var/log/fsck.log. If you get "unexpected inconsistedncy!" message from fsck, do fsck /dev/mmcblk0p2 -f -y >> /var/log/fsck.log afterwards. Later, from within Maemo, you can inspect that log and see which files got nuked by filesystem errors, and reinstall approriate packages (the ones owning those files), if necessary.

Or you can play a little and re-create Maemo's boot process, line by line, if you feel fancy

Pros as compared to backupmenu - works even in situation, when backupmenu gest broken, or something miles before it fails. In fact, if you can get past u-boot, this recovery shell will work, period (not that it need u-boot to work, BTW). It have less dependencies and works earlier than Pali's recovery shell from extras (-something), too.

All credits to Mentalist Traceur. I just bundled /udev-start.sh, as I'm a lazy bastard like that. BTW, my probably-will-never-get-released backupmenu CLI replacement is based on above setup.

Cheers,
/Estel
Attached Files
File Type: tar recovery-shell-helper.tar (4.0 KB, 79 views)
__________________
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!

Last edited by Estel; 2014-05-16 at 11:00.
 

The Following 6 Users Say Thank You to Estel For This Useful Post:
pichlo's Avatar
Posts: 6,447 | Thanked: 20,981 times | Joined on Sep 2012 @ UK
#1329
Thanks, Estel, that's a wonderful guide.

FWIW, I have figured out what my problem with BackupMenu was in the end. As it turns out, deleting empty /boot had nothing to do with it. This is what the problem was:

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 )
__________________
Русский военный корабль, иди нахуй!
 

The Following 5 Users Say Thank You to pichlo For This Useful Post:
Posts: 2,290 | Thanked: 4,134 times | Joined on Apr 2010 @ UK
#1330
backupmenu 1.2.0-2 requires testing so the latest version can enter Extras.
http://maemo.org/packages/package_in...pmenu/1.2.0-2/
__________________

Wiki Admin
sixwheeledbeast's wiki
Testing Squad Subscriber
- mcallerx - tenminutecore - FlopSwap - Qnotted - zzztop - Bander - Fight2048 -


Before posting or starting a thread please try this.
 

The Following 2 Users Say Thank You to sixwheeledbeast 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 09:15.