|
@@ -41,8 +41,20 @@ else
|
41
|
41
|
echo Could not find a suitable bootstream!
|
42
|
42
|
fi
|
43
|
43
|
|
44
|
|
-echo Writing root filesystem
|
45
|
|
-sudo dd if=output/images/rootfs.ext2 of="$1"2 bs=512
|
|
44
|
+if [ -e output/images/rootfs.tar ] ; then
|
|
45
|
+ echo Creating root filesystem
|
|
46
|
+ sudo mkfs.ext4 "$1"2 -L rootfs
|
|
47
|
+
|
|
48
|
+ echo Mounting root filesystem
|
|
49
|
+ sudo mkdir -p /media/rootfs
|
|
50
|
+ sudo mount "$1"2 /media/rootfs
|
|
51
|
+
|
|
52
|
+ echo Copying root filesystem
|
|
53
|
+ sudo tar xfp output/images/rootfs.tar -C /media/rootfs
|
|
54
|
+else
|
|
55
|
+ echo Writing root filesystem
|
|
56
|
+ sudo dd if=output/images/rootfs.ext2 of="$1"2 bs=512
|
|
57
|
+fi
|
46
|
58
|
|
47
|
59
|
echo Synchronising changes to disk
|
48
|
60
|
sudo sync
|