]>
code.delx.au - refind/blob - mkcdimage
3 # Script to create a bootable CD image file containing rEFInd.
6 # ./mkcdimage {version}
8 # where {version} is the rEFInd version number.
10 # This script relies on the mcopy utility.
12 # The script creates an image file from the binary package
13 # stored in ../snapshots/{version}/refind-bin-{version}.zip
14 # The resulting CD image file is stored in
15 # ../snapshots/{version}/refind-cd-{version}.iso
20 # Unzip the binary archive file....
21 cd ..
/snapshots
/$Version
25 unzip ..
/refind-bin-
$Version.
zip
27 # Create hard links to the files so that they'll be suitable for an
29 mkdir
-p refind-bin-
$Version/EFI
/boot
30 cd refind-bin-
$Version/EFI
/boot
31 ln ..
/..
/refind
/refind_ia32.efi .
/bootia32.efi
32 ln ..
/..
/refind
/refind_x64.efi .
/bootx64.efi
33 ln ..
/..
/refind
/refind.conf-sample .
/refind.conf
36 ln ..
/..
/..
/refind
/icons
/* .
/
39 # Get the size of the binaries to go in the El Torito image in kB
40 ToritoSize
=`du -s EFI | cut -f 1`
41 let ToritoSize
=($ToritoSize)/28
42 let ToritoSize
=($ToritoSize)*32
44 # Prepare a FAT filesystem image and populate it with the
46 dd if=/dev
/zero of
=refind-bin-
$Version.img bs
=1024 count
=$ToritoSize
47 mkdosfs
-n "rEFInd.ET" refind-bin-
$Version.img
48 mcopy
-irefind-bin-$Version.img
-s EFI
::/
50 # Make the ISO-9660 image file....
51 mkisofs
-A "Bootable rEFInd" -V "rEFInd $Version" -volset "rEFInd $Version" \
52 -J -r -v -x .
/lost
+found
-o ..
/..
/refind-cd-
$Version.iso \
53 -b refind-bin-
$Version.img
-c boot.
cat -no-emul-boot -boot-load-size 4 \
54 -eltorito-alt-boot -efi-boot refind-bin-
$Version.img \