]> hackdaworld.org Git - outofuni/dib.git/commitdiff
stupid! if it does not exist, dd it! master
authorhackbard <hackbard@hackdaworld.org>
Fri, 17 Jul 2015 16:06:08 +0000 (18:06 +0200)
committerhackbard <hackbard@hackdaworld.org>
Fri, 17 Jul 2015 16:06:08 +0000 (18:06 +0200)
build.sh

index 48ea033fed73298e9b9d13525cbe10abfd9ab1f1..b04f89aba89114f788c467a023de98a06a59835d 100755 (executable)
--- a/build.sh
+++ b/build.sh
@@ -50,6 +50,10 @@ function build_all {
                                dd if=/dev/zero of=./rootfs.img \
                                        bs=1M count=$IMGSIZE
                        fi
                                dd if=/dev/zero of=./rootfs.img \
                                        bs=1M count=$IMGSIZE
                        fi
+               else
+                       echo "creating rootfs.img"
+                       dd if=/dev/zero of=./rootfs.img \
+                               bs=1M count=$IMGSIZE
                fi
                # make fs and mount
                umount_if_mounted rootfs.mnt
                fi
                # make fs and mount
                umount_if_mounted rootfs.mnt
@@ -58,6 +62,7 @@ function build_all {
                mkfs.${ROOTFS} $FORCEFS -L rootfs ./rootfs.img
                rm -rf rootfs.mnt
                mkdir rootfs.mnt
                mkfs.${ROOTFS} $FORCEFS -L rootfs ./rootfs.img
                rm -rf rootfs.mnt
                mkdir rootfs.mnt
+               modprobe loop
                mount -o loop ./rootfs.img ./rootfs.mnt
                # debootstrap first part
                debootstrap --verbose --arch $ARCH --variant=minbase \
                mount -o loop ./rootfs.img ./rootfs.mnt
                # debootstrap first part
                debootstrap --verbose --arch $ARCH --variant=minbase \