slitaz-arm view tools/mkimg.sh @ rev 153
Tiny edits
author | Paul Issott <paul@slitaz.org> |
---|---|
date | Wed Apr 30 18:36:04 2014 +0100 (2014-04-30) |
parents | 263748c62e71 |
children |
line source
1 #!/bin/sh
2 #
3 # Create slitaz-arm.img
4 #
5 . /lib/libtaz.sh
7 [ "$size" ] || size=80
9 distro="distro"
10 . $distro/rootfs/etc/slitaz/flavor.conf || exit 1
11 flavor="$FLAVOR"
12 #img="slitaz-$flavor-$(date +%Y%m%d)"
13 img=slitaz-arm.img
15 cd ${distro}
16 echo "Creating disk image..."
17 dd if=/dev/zero of=${img} bs=1M count=${size}
19 device=$(kpartx -va $img | sed -E 's/.*(loop[0-9])p.*/\1/g' | head -1)
20 device="/dev/mapper/${device}"
21 bootp=${device}p1
22 rootp=${device}p2