Ubuntu MID USB boot

DEVICE=/dev/mmcblk0
IMG=ubuntu-8.10-mid-lpia.img
VOLUME=SDCARD_2GB
 
wget http://releases.ubuntu.com/8.10/${IMG} -P /tmp
 
mkfs.vfat -n ${VOLUME} ${DEVICE}p1
syslinux -f ${DEVICE}p1
 
install-mbr ${DEVICE}
 
mount ${IMG} /mnt/ -o loop
cp -a /mnt/* /media/${VOLUME}
cp -a /mnt/.disk/ /media/SDCARD_2GB
umount /mnt
 
sync
umount /media/${VOLUME}
 
 
 
# netboot
LABEL linux
   MENU LABEL Ubuntu MID 
   KERNEL ubuntu-8.10-mid/casper/vmlinuz
   APPEND initrd=ubuntu-8.10-mid/initrd.img boot=casper netboot=nfs nfsroot=192.168.1.2:/tftpboot/ubuntu-8.10-mid file=/cdrom/preseed/mid.seed persistent quiet splash noprompt --