about summary refs log tree commit diff
path: root/nixos/lib/make-iso9660-image.sh
diff options
context:
space:
mode:
authorLuca Bruno <lucabru@src.gnome.org>2014-11-08 13:09:08 +0100
committerLuca Bruno <lucabru@src.gnome.org>2014-11-08 14:33:27 +0100
commit7885c2ed12a353aa92da2087b2ba1e6adac7c069 (patch)
tree52e11d4dad0e2b19002fcf84f42db18d44799a9a /nixos/lib/make-iso9660-image.sh
parente3611709d6ab459be0ed16fe0fdeb7e4c4acc05d (diff)
Revert "nixos: iso-image: use syslinux bootloader for USB booting support"
This reverts commit 455db168b30d53c903c96be80ef843b79e0744ae.
Diffstat (limited to 'nixos/lib/make-iso9660-image.sh')
-rw-r--r--nixos/lib/make-iso9660-image.sh48
1 files changed, 8 insertions, 40 deletions
diff --git a/nixos/lib/make-iso9660-image.sh b/nixos/lib/make-iso9660-image.sh
index c8522513aa239..675b5bb35148e 100644
--- a/nixos/lib/make-iso9660-image.sh
+++ b/nixos/lib/make-iso9660-image.sh
@@ -31,20 +31,11 @@ if test -n "$bootable"; then
         fi
     done
 
-    isoBootFlags="-eltorito-boot ${bootImage}
-                  -eltorito-catalog .boot.cat
-                  -no-emul-boot -boot-load-size 4 -boot-info-table"
-fi
-
-if test -n "$usbBootable"; then
-    usbBootFlags="-isohybrid-mbr ${isohybridMbrImage}"
+    bootFlags="-b $bootImage -c .boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table"
 fi
 
 if test -n "$efiBootable"; then
-    efiBootFlags="-eltorito-alt-boot
-                  -e $efiBootImage
-                  -no-emul-boot
-                  -isohybrid-gpt-basdat"
+    bootFlags="$bootFlags -eltorito-alt-boot -e $efiBootImage -no-emul-boot"
 fi
 
 touch pathlist
@@ -83,41 +74,18 @@ for ((n = 0; n < ${#objects[*]}; n++)); do
     fi
 done
 
-# Escape filenames that contain '='.
-# TODO: Handle this properly. This fails for filenames
-#       that contain multiple '=' symbols.
+# !!! what does this do?
 cat pathlist | sed -e 's/=\(.*\)=\(.*\)=/\\=\1=\2\\=/' | tee pathlist.safer
 
 
 mkdir -p $out/iso
-
-xorriso="xorriso
- -as mkisofs
- -iso-level 3
- -volid ${volumeID}
- -appid nixos
- -publisher nixos
- -graft-points
- -full-iso9660-filenames
- ${isoBootFlags}
- ${usbBootFlags}
- ${efiBootFlags}
- -r
- -path-list pathlist.safer
- --sort-weight 0 /
- --sort-weight 1 /isolinux" # Make sure isolinux is near the beginning of the ISO
-
-$xorriso -output $out/iso/$isoName
-
-if test -n "$usbBootable"; then
-    echo "Making image hybrid..."
-    isohybrid --uefi $out/iso/$isoName
+genCommand="genisoimage -iso-level 4 -r -J $bootFlags -hide-rr-moved -graft-points -path-list pathlist.safer ${volumeID:+-V $volumeID}"
+if test -z "$compressImage"; then
+    $genCommand -o $out/iso/$isoName
+else
+    $genCommand | bzip2 > $out/iso/$isoName.bz2
 fi
 
-if test -n "$compressImage"; then
-    echo "Compressing image..."
-    bzip2 $out/iso/$isoName
-fi
 
 mkdir -p $out/nix-support
 echo $system > $out/nix-support/system