maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   [Depreciated] BackupMenu - Backup & restore OS images(+ other features) (https://talk.maemo.org/showthread.php?t=58633)

tan 2010-08-25 09:40

Re: [Announce] BackupMenu - Backup & restore OS images(+ other features)
 
As of step 6 maybe I should use,

flasher-3.5.exe -r nameOFyourROOTimage -f -R

instead of

flasher-3.5.exe -r nameOFyourROOTimage -f

sacal 2010-08-25 18:08

Re: [Announce] BackupMenu - Backup & restore OS images(+ other features)
 
Quote:

Originally Posted by RobbieThe1st (Post 794716)
Well, I'm not opposed; If someone who knows Multiboot code wants to try to figure it out, I'll do my best to help out.

I have a feeling though that, without changing Multiboot's code, there are two options:
1. run it via console mode or,
2. set up an item that loads the Maemo OS, but somehow launches BackupMenu in the boot process. (with boot options?)

Reading multiboot's code (v0.2.5) there are some options that could provide a way to execute BackupMenu.item script.

Code:

main()
{
        local sel i

        init_hw
        init_fs
        init_pm

        if [ -f ${BOOT_FAST} ]
        then
                FAST_BOOT=YES
                rm -f ${BOOT_FAST}
        fi
       
        if [ -f ${BOOT_ITEM} ]
        then
                load_config 99 ${BOOT_ITEM}
        fi

        if is_fast_boot || ! is_slide_open
        then
                boot_item 99
        fi

        init_screen
        init_backlight
        read_config
       
        while :
        do
                print_menu
               
                sel=$(wait_keypress)
       
                echo -e -n '\r'

                case $sel in

                        # Timeout
                        D)  sel=99 ;;

                        # Enter
                        28)  sel=99 ;;

                        # 0-9
                        16)  sel=1 ;;
                        17)  sel=2 ;;
                        18)  sel=3 ;;
                        19)  sel=4 ;;
                        20)  sel=5 ;;
                        21)  sel=6 ;;
                        22)  sel=7 ;;
                        23)  sel=8 ;;
                        24)  sel=9 ;;
                        25)  sel=0 ;;
                       
                        # S - shell
                        31)  boot_shell ;;


                        # Backscape - reboot
                        14)  safe_reboot ;;

                        # X - poweroff
                        45)  safe_poweroff ;;

                        # B - Fallback if everything else fails
                        48)  boot_script /sbin/preinit_real  ;;
                   
                        # D -  Debugging another script
                        32)  boot_script /sbin/multiboot_debug  ;;


                esac

                if [ -n "$(array NAME $sel)" ]
                then
                        wait_screen $sel
                        boot_item $sel
                fi
        done
}


main

# End

The " # S - shell 31) boot_shell ;; " option should open a shell but unfortunately in my system that just doesn't work. The screen goes black and powers off after some time.

The " # D - Debugging another script 32) boot_script /sbin/multiboot_debug ;; " seams like some testing script for debug proposes but i couldn't find any sbin/multiboot_debug in my system.
So perhaps it could be changed to:

Code:

# D -  Debugging another script
32)  boot_script /sbin/BackupMenu.item  ;;

Now it would only be necessary to move BackupMenu.item script to /sbin.

I haven't tested it yet as i am on holidays and away from my pc to reflash if anything goes wrong.

If there is anyone brave enough to do it them please report back.

Rob1n 2010-08-25 20:07

Re: [Announce] BackupMenu - Backup & restore OS images(+ other features)
 
Quote:

Originally Posted by sacal (Post 798145)
Now it would only be necessary to move BackupMenu.item script to /sbin.

Remember that all this is happening in the initrd, not in the normal N900 filesystem. You'll also need to make sure all the programs used by the BackupMenu script are also available in the initrd.

sacal 2010-08-26 01:01

Re: [Announce] BackupMenu - Backup & restore OS images(+ other features)
 
Quote:

Originally Posted by Rob1n (Post 798281)
Remember that all this is happening in the initrd, not in the normal N900 filesystem. You'll also need to make sure all the programs used by the BackupMenu script are also available in the initrd.

Rob1n

Thanks for your reply.

I really don't know what programs are used by BackupMenu. However, as I read the in the 1st post that:

Quote:

Originally Posted by RobbieThe1st (Post 754837)
Multiboot:
As I have been asked about 4 times in this thread, when I already posted the answer on the second page...
Will Multiboot work with my script?
I just took a look at it - it probably -won't-, at least not by copying it into /etc/multiboot.d/.
You can -probably- get it to work the same by:
1. at the boot prompt, press C for console.
2. type "/path/to/BackupMenu.item"
If that doesn't work, make sure its marked as executable by running:
"chmod +x /path/to/BackupMenu.item"

.

i thought that BackupMenu.item could run from the console option of multiboot. :o

Unfortunately, in my system, the C option of multiboot (0.2.5) doesn't work and i can't test it.

RobbieThe1st 2010-08-26 06:23

Re: [Announce] BackupMenu - Backup & restore OS images(+ other features)
 
Programs used by BackupMenu:
/usr/bin/text2screen
expr
cat
/usr/sbin/evkey
modprobe
ifconfig
dd
cksum
echo
insmod
/lib/modules/current/phonet.ko
/lib/modules/current/g_nokia.ko
mount
mkdir
/sbin/udevd
/sbin/udevadm
hwclock
awk
getty
umount
fsck
sleep
chmod
/usr/sbin/sshd (for SSH server - optional)
date
find
sync
reboot
poweroff

Thats the full list of programs called. I have a feeling that 90% of them are part of the BusyBox executable; copying that and a bunch of symlinks will take care of those.
Anything that has a full path in my app has it here; everything else shouldn't matter so long as it is in the $PATH.


Edit:
Tan, you are correct in your last post. You need to flash your rootFS image -as- a rootFS image, not a fiasco image.

Marlon 2010-08-26 14:17

Re: [Announce] BackupMenu - Backup & restore OS images(+ other features)
 
FYI this worked great for me on 0.32 when I needed to get it back up and running

Glad I read through the 14 pages first instead of just asking :o)

Thanks

Quote:

Originally Posted by RobbieThe1st (Post 797259)
You can try this:
1. flash to PR1.2
2. Boot up, install BackupMenu V.32.
3. Reboot into BackupMenu
4. Restore the OptFS.
5. Connect your USB cable, ready the Maemo flasher utility and reboot your N900
6. Flash PR1.2 again, then flash your RootFS image.


Dany-69 2010-08-27 06:57

Re: [Announce] BackupMenu - Backup & restore OS images(+ other features)
 
Robbie :D

Here my image :)

http://www.maemomeego.net/viewtopic.php?f=59&t=929

Do you think that sharing it here on maemo.org in a new 3d could be a good thing ?

RobbieThe1st 2010-08-28 04:21

Re: [Announce] BackupMenu - Backup & restore OS images(+ other features)
 
Go ahead and post it; it can't hurt. I'd also like to see other people trying it and see if these images can be transfered between N900 most of the time or if they can't.

debernardis 2010-08-28 04:34

Re: [Announce] BackupMenu - Backup & restore OS images(+ other features)
 
Robbie, do you have any new hints at the reason why restoring the rootfs from the device itself never works for some of us?

Dany-69 2010-08-28 07:20

Re: [Announce] BackupMenu - Backup & restore OS images(+ other features)
 
Quote:

Originally Posted by RobbieThe1st (Post 800548)
Go ahead and post it; it can't hurt. I'd also like to see other people trying it and see if these images can be transfered between N900 most of the time or if they can't.

Ok i'll open a 3d here :)

Robbie there is a small problem here... there is a bit of italian .. but the error in writen in english :)

http://www.maemomeego.net/viewtopic....ngle_Post_View

What could be?
Post number 42


All times are GMT. The time now is 13:07.

vBulletin® Version 3.8.8