Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- img=tinycore.img
- tmp=tiny
- mnt=mnt
- #check if root user
- if [[ $EUID -ne 0 ]]; then
- echo "You must be a root user"
- echo "Trying to restart script as sudo"
- sudo $0
- exit
- fi
- mkdir $tmp
- mkdir $mnt
- cd $tmp
- wget "http://tinycorelinux.net/5.x/armv7/Allwinner-A10/uCore"
- dd if=uCore of=tiny.gz bs=1 skip=64
- zcat tiny.gz|cpio -i -H newc -d
- rm tiny.gz uCore
- cd ../
- dd bs=512 count=500000 if=/dev/zero of=$img
- mkfs.ext2 $img
- mount -o loop $img $mnt
- cp -pfr $tmp/* $mnt/
- umount $mnt
- rm -fr $tmp $mnt
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement