strace/qemu_multiarch_testing/make-hdc-img.sh
Denys Vlasenko e7a4772196 Slight tweak to qemu_multiarch_testing scripts
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-21 11:32:55 +01:00

18 lines
404 B
Bash
Executable File

#!/bin/sh
export HDCMEGS=128
rm hdc.img 2>/dev/null
umount -d hdc.img.dir 2>/dev/null
rm -rf hdc.img.dir 2>/dev/null
dd if=/dev/zero of=hdc.img bs=1024 seek=$((HDCMEGS*1024-1)) count=1 &&
mke2fs -q -b 1024 -F -i 4096 hdc.img &&
tune2fs -j -c 0 -i 0 hdc.img &&
mkdir hdc.img.dir &&
mount -o loop hdc.img hdc.img.dir &&
cp -a hdc.dir/* hdc.img.dir &&
umount -d hdc.img.dir &&
rm -rf hdc.img.dir &&
true