maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Nokia N810 (https://talk.maemo.org/forumdisplay.php?f=28)
-   -   N810 Clone External SD To Internal SD And Boot From It (https://talk.maemo.org/showthread.php?t=30818)

gogol 2009-08-15 22:56

N810 Clone External SD To Internal SD And Boot From It
 
This assumes you have already installed console-tools and have successfully cloned your flash-stored OS to an external card.

Explanation:
Having a 2gb / (root) was what I started out wanting to have. Then, having made extensive mistakes to my external boot, I had to go back to my tiny flash installation and again clone it to the external card. This put me back in the dark ages as far as backups went. So, I naturally wanted to have a backup of my 2gb external card instead of the limited one on flash. This way I can work from the Internal card, have a free SD slot for other memory cards, and if something goes wrong: boot to flash, insert memory card with 2gb backup, clone to internal, and get on with my life.

For some reason penguinbait has yet to include the ability to flash your external card to your internal 2gb card in pbeasy. I'm not sure why. This script, however, has you covered. I'm also going to discuss what you need to do to add an item to your bootmenu to boot from your new INTERNAL SD install.

1. Install this script. (Check here for updates or here for download/install instructions. There is a package you need installed: e2fsprogs)

2. use cfdisk (from e2fsprogs) to partition your internal card:
# cfdisk /dev/mmcblk0
partition 1: Primary Type: Fat 32 Size: 200
partition 2: Primary Type: Linux Size: 1680
partition 3: Logical Type: Linux Swap Size:132

3. make a linux filesystem on /dev/mmcblk0p2:
# mke2fs /dev/mmcblk0p2

4. Choose your own adventure: If the last step did not work, you experienced the same madness I did with cfdisk. See this post.

5. You are now ready to run the script. Get it installed and run it, choosing OPTION 4:
# mv clone.txt clone.sh
# chmod a+x clone.sh
.# ./clone.sh

6. Make a boot menu item for your internal card:
Create a file /etc/bootmenu.d/internalcard.item containing this:

ITEM_NAME="Maemo INTERNAL 2GB"
ITEM_ID="maemo666"
ITEM_DEVICE="${INT_CARD}p2"
ITEM_MODULES="mbcache jbd ext2"
ITEM_FSTYPE="ext2"
ITEM_FSOPTIONS="noatime,rw"

(NOTE: Remember, if you had the same error with cfdisk I did, the partition needs to be set to p3 on line 3)

7. Refresh the boot menu:
as root, type
refresh_bootmenu.d
answer:
yes
no
yes
yes
press enter to reboot.

8. You should get your usual boot menu with an item called Maemo INTERNAL 2GB. Select that to boot from your internal card copied over from external SD.

Now you can copy your external SD OS to internal SD whenever you want! Extra Credit: Edit the script so it does this without prompting and stick it in Personal Menu on your flash install.

Woot!

lazart 2010-09-17 18:29

Re: N810 Clone External SD To Internal SD And Boot From It
 
Hello and thank you, this is great!
I've used initfs_flasher for updating the bootmenu. Didn't had the command refresh_bootmenu.d
I've first "expanded" the memory by using the int. SD for /usr but it was buggy, some icons where lost and i had to mount it manually after every boot. Now it's just like i wanted it :)

Greets,
lazart


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

vBulletin® Version 3.8.8