Other GNU/Linux on the Universal tips
This is useful for instance when you cannot use the Universal temporarily and want to update, or install software, etc. I've used it when my Universal was in service, to update the software.
All of the steps below, refer to actions you will take on a Debian GNU/Linux PC, not on the Universal.
| # aptitude install qemu |
| $ wget -c http://sumou.com/uni/vmlinuz-2.6.24-1-versatile $ wget -c http://sumou.com/uni/initrd.img-2.6.24-1-versatile $ wget -c http://sumou.com/uni/debian_lenny_armel_small.qcow.gz |
| $ gunzip debian_lenny_armel_small.qcow.gz |
| $ qemu-img create uni.img 6GB |
| $ echo 'qemu-system-arm -M versatilepb -hdb uni.img -kernel vmlinuz-2.6.24-1-versatile -initrd initrd.img-2.6.24-1-versatile -hda debian_lenny_armel_small.qcow -append "root=/dev/sda1" -m 256 -localtime' > armel.sh |
$ chmod 755 armel.sh
| $ ./armel.sh |
| # aptitude update # aptitude install dbus |
| # cfdisk /dev/sdb |
| # mkfs.ext2 /dev/sdb1 |
| # halt |
| # fdisk -ul uni.img |
You must set cylinders.
You can do this from the extra functions menu.To figure out the offset, necessary to specify in the mount command to mount the img file multiply the start sector, in the above case 62, with the number of bytes in a sector, in the above case 512. Therefore in this example, the loop offset would be 31744.
| # mount -o loop,offset=31744 uni.img /mnt |
| # cp -P /mnt/etc/resolv.conf /mnt/etc/resolv.conf.uni |
| # umount /mnt |
| $ ./armel.sh |
| # echo "mount /dev/sdb1 /mnt" > /usr/local/bin/uni # echo "mv /mnt/etc/resolv.conf /mnt/etc/resolv.conf.uni" >> /usr/local/bin/uni # echo "cp /etc/resolv.conf /mnt/etc/" >> /usr/local/bin/uni # echo "mount -o bind /dev /mnt/dev" >> /usr/local/bin/uni # echo "mount -o bind /dev/pts /mnt/dev/pts" >> /usr/local/bin/uni # echo "mount -o bind /proc /mnt/proc" >> /usr/local/bin/uni # echo "mount -o bind /dev/shm /mnt/dev/shm" >> /usr/local/bin/uni # echo "mount -t tmpfs none /mnt/tmp" >> /usr/local/bin/uni # echo "mount -t tmpfs none /mnt/var/run" >> /usr/local/bin/uni # echo "mount -t tmpfs none /mnt/var/lock" >> /usr/local/bin/uni # echo "mount -t tmpfs none /mnt/var/tmp" >> /usr/local/bin/uni # echo "chroot /mnt/" >> /usr/local/bin/uni # echo "rm /mnt/etc/resolv.conf" >> /usr/local/bin/uni # echo "mv /mnt/etc/resolv.conf.uni /mnt/etc/resolv.conf" >> /usr/local/bin/uni # echo "umount /mnt/var/tmp" >> /usr/local/bin/uni # echo "umount /mnt/var/lock" >> /usr/local/bin/uni # echo "umount /mnt/var/run" >> /usr/local/bin/uni # echo "umount /mnt/tmp" >> /usr/local/bin/uni # echo "umount /mnt/dev/shm" >> /usr/local/bin/uni # echo "umount /mnt/proc" >> /usr/local/bin/uni # echo "umount /mnt/dev/pts" >> /usr/local/bin/uni # echo "umount /mnt/dev" >> /usr/local/bin/uni # echo "umount /mnt" >> /usr/local/bin/uni |
| # chmod 755 /usr/local/bin/uni |
| # uni |
| # exit |
| # halt |