Ok, so now we have root access, we have a partitioned mmc/sd card.. we are ready for the cool part.
First things first, either plug in your tablet or make sure you have a full battery, you don't want the power to go out during this part.
From the tablet you need to download this;
(for more information about fanoush's work and info on this flasher, see http://fanoush.wz.cz/maemo/#initfs)
By default the tablet will want to save to your Documents folder in your /home directory (/home/user/MyDocs/.documents/)
Don't save it on your card, not because that will cause problems, but because you can't execute applications by default from your cards. This program is going to replace the initfs section of the device with the dual boot, but first lets look at that extension...tgz
This means that this is a tar file, compressed with gzip compression.. if it read tar.gz it would mean the same thing. In linux file extensions don't mean anything. They are just there to help the user know what to do with the file.
We are going to use the version of tar that comes with the tablet to open this file. This will probably be the last time we use that version, more on this later.
In xterm as root run the following;
tar xvzf initfs_flasher.tgz
The first command (cd) Changes Directory to your documents folder. The "." before a file or directory means its a hidden file and won't show up in a listing with out the -a switch (google for "manpage ls" for more info). The second command opens the archive file the switch (xvzf) means X=extract V=verbose(more info) Z=gzip format F=specified file. Then we are switching into the directory that we just extracted, and finally we are running a local application (./). Unix uses something called your "PATH" (try "echo $PATH" at xterm). The path is where the system looks for executables. Since your documents folder isn't in your path, we tell the system to run the local app directly (./ means "here" ../ means "one level above me" ../../ "two levels above" and so on and so forth)
Read the applications instructions carefully, but you should be safe answering yes to all the questions.
When it says press enter to reboot.. do so. If upon boot for some strange reason your highlighted selection is not "internal flash" hit the menu key, and then the up key to highlight it, then hit the square button. If it is highlighted, you can either wait the 30 seconds for the menu to finish, or hit the menu key, then the square key.
Congratulations! You can now dual-boot, but dual boot to what? Continued Next Time.
Just kidding.. man wouldn't that have sucked!
We are going to copy the whole rootfs over to the card. Remember when I talked about that other version of tar.. well here it is. We are going to use GNUtar.. it has more features.. though it will look and feel pretty much the same.
To install, open Xtem, and run this command
apt-get -d install tar
Apt-get is the front end for dpkg, the debian package managment software, and we are telling it to fetch and install tar...well almost. See that -d? That means download only. In this case that is 147% important! Without that it will delete your whole system and you will have to flash and start over. Don't be worried though, just double check for the -d before you hit enter.
If you made sure the -d was there you can ignore the warnings and go ahead and enter "Y".
Once it has downloaded, we will run the following commands as root in an xterm.
dpkg -x tar*.deb /tar-temp/
Ok, you already know what the cd command does. The mkdir command makes a new directory where you tell it to. This new directory we are making is called tar-temp, and it is being made in the top level directory "/" also called the root. The last command uses the debian package management software to extract the tar program to that directory.
Now we need to mount our partitions to locations that we can copy over the files
Again, as root in an xterm;
insmod /mnt/initfs/lib/modules/2.6.18-omap1/mbcache.ko (this is .21-omapl in OS2008)
mount /dev/mmcblk0p2 /opt
mount -t jffs2 /dev/mtdblock4 /floppy
Now to explain those commands.
Insmod is a command to load a module into the running kernel space. We load the two modules needed to mount an ext2 partition. Then we make an /opt directory, and mount the ext2 second partition internal card to that directory. Then we make a directory called /floppy and mount the running rootfs to it.
Now for the magic.
/tar-temp/bin/tar cf - -C /floppy . | /tar-temp/bin/tar xvf - -C /opt
*editors note.. the above command is one long line. On some screens it gets cut into two lines. I blame blogspot :-)
That command will use our new version of tar to properly copy everything over to
our card's partition. The tall bar in the middle is called a pipe. It is located
on the finger keyboard of the third tab fifth key from the right.
again root with xterm;
chroot /mnt/initfs cal-tool --set-root-device ask:immc2
shutdown -r now
What this does is unmounts our card and rootfs. The chroot sets a little jailed system of our initfs and the rest of it adjusts the boot menu to default to the internal card's boot. Finally we reboot with the shutdown.
When the system comes back up the internal card will be selected. You can either wait the 30 seconds for the boot to start or hit the menu key, then the square key to start it right along.
Ok, a few things to be aware of running off your internal card. Sometimes because of how the card works, your system can get a little off... if you notice items missing from menus or it's just not working right, reboot to the internal flash and run this command as root from the xterm
fsck -fy /dev/mmcblk0p2
The fsck command is a file system checker, the -fy is a force run saying yes to all fixes.
These are the only other caveats I have to booting off the internal card. First, if you hook up to usb, only the external card will be usable on the pc and the internal card will not remount for use once you disconnect without a reboot. If you have to do alot of usb work, boot off the internal flash for that time. Second, sometimes the system may lock up a bit.. just pull the battery out.. boot to internal flash, run the fsck then reboot to the card and all will be well.
*all procedures are attempted at your own risk. I claim no responsibility if you ruin your tablet.