So I've been playing around a little bit more. I've made a whole mess of little scripts to handle creating the virtual qemu drive and untar the rootfs back into it. I also created a script to generate a new tarball when I want. This has made my horrible mistakes... er I mean my testing go much smoother.
Here is what my general install procedure is like.
makezubuntudisk script:
CODE
#!/bin/bash
echo Creating zubuntu-qemu image with dd...
dd if=/dev/zero of=zubuntu-qemu bs=1MB count=4096
echo Formatting zubuntu-qemu
sudo mke2fs -F -m 0 -b 1024 zubuntu-qemu
createrootfs script:
CODE
#!/bin/bash
echo Creating qemu directory
mkdir qemu
echo Mounting zubuntu-qemu image at ./qemu
sudo mount -t ext2 -o loop zubuntu-qemu qemu
cd qemu
echo Untarring rootfs to ./qemu. Please wait...
sudo tar -zxpf ../sdinstall/android-root.tar.gz
echo Untar completed.
cd ..
sudo umount qemu
You will notice that I have an sdinstall directory. This is where I keep the files to put on the SD card for installs. So naturally the android-root.tar.gz file is located there.
startzaurus script:
CODE
#!/bin/bash
qemu-system-arm \
-M versatilepb -kernel zImage-versatile-2.6.24-rc7.armv5tel \
-append "root=/dev/sda ip=bootp" \
-hda zubuntu-qemu -localtime -startdate now \
-usbdevice tablet \
-net nic -net user,script=/etc/qemu-ifup
I've made a few minor changes to Cortez suggestions. I added the -localtime and the -startdate now settings. This sets the date and time for me immediately and I don't have to worry about remembering the set anything with the date command after I startup.
Once I boot into the qemu session I run the follow commands
CODE
apt-get install less ntpdate enlightenment xinit xdm sylpheed dillo xterm abiword gnumeric thunar menu console-data wireless-config gtkeyboard
Then I run
CODE
dpkg-reconfigure tzdata
and set my timezone appropriately
When I'm working on my PC, the /etc/init.d/keymap file sets the keyboard to use the zaurus keymap. That drives me nuts so I disable that by moving the file out of /etc/init.d. This is temporary and before I create a new rootfs I put it back so the Zaurus has the right keyboard layout.
You can use
CODE
dpkg-reconfigure console-data
to reconfigure your keyboard to your PC's setup.
I then setup a user ID and passwords
CODE
passwd #set the root password
useradd -d /home/suttonca suttonca #create a normal user id
usermod suttonca -G users dialout voice cdrom sudo audio video games suttonca
When I've got things configured they way on want from qemu I run the following script to create a new rootfs.
makerootfs script:
CODE
#!/bin/bash
echo Mounting image to qemu
sudo mount -t ext2 -o loop zubuntu-qemu qemu
cd qemu
echo Creating tarball...
sudo tar -czpf ../zubuntu-custom-rootfs.tar.gz .
cd ..
sudo umount qemu
echo Removing previous tarball
rm sdinstall/android-root.tar.gz
echo Moving new tarball to sdinstall directory
mv zubuntu-custom-rootfs.tar.gz sdinstall/android-root.tar.gz
echo Completed.
Well that's my update for now. I'm going to create a new rootfs with all that in it and try it out!