Browse files

Inform users and abort when we can't unpack the ISO image

When running under fakeroot(1), we would try and loopback mount the ISO image
to unpack it despite knowing that could never work. That was a poor user
experience, and we can absolutely do better than that.

This updates the script to check if we are running under fakeroot and skip the
attempt to use mount in favour of informing the user about what they should do
to successfully build.

This closes issue #54.

Signed-off-by: Daniel Pittman <>
  • Loading branch information...
1 parent c6e1407 commit 9bd0f1c9682eb7a0292c09096e908c170b0fb8f3 @daniel-pittman daniel-pittman committed Jan 15, 2013
Showing with 8 additions and 2 deletions.
  1. +8 −2 iso-build-files/
10 iso-build-files/
@@ -1,4 +1,4 @@
. ./
if ! test -f Core-current.iso; then
@@ -23,11 +23,17 @@ mkdir original-iso-files
# get a copy of the files from the original ISO
if exists 7z; then
7z -o"original-iso-files" x Core-current.iso
+elif test x"${FAKEROOTKEY}" = x""; then
test -d /tmp/cdrom || mkdir -p /tmp/cdrom
mount Core-current.iso /tmp/cdrom -o loop
cp -a /tmp/cdrom/boot original-iso-files/
umount /tmp/cdrom
+ echo "It looks like you are running with fakeroot, but you don't"
+ echo "have the 7z command (p7zip or p7zip-full) available. This"
+ echo "means we can't unpack the ISO image; either install that tool"
+ echo "or run this as real root instead."
+ exit 1
# extract the boot/core.gz file from that directory

0 comments on commit 9bd0f1c

Please sign in to comment.