mirror of
https://github.com/rancher/os.git
synced 2025-06-28 15:56:58 +00:00
Create custom ISO for machine that has auto-format on by default
This commit is contained in:
parent
24c2d15ba8
commit
f21e7e1a90
@ -5,6 +5,7 @@ cd $(dirname $0)/..
|
|||||||
|
|
||||||
source scripts/build-common
|
source scripts/build-common
|
||||||
|
|
||||||
|
|
||||||
cp bin/rancheros ${BUILD}/initrd/init
|
cp bin/rancheros ${BUILD}/initrd/init
|
||||||
cp scripts/dockerimages/scripts/os-dockerfile ${BUILD}/initrd/Dockerfile
|
cp scripts/dockerimages/scripts/os-dockerfile ${BUILD}/initrd/Dockerfile
|
||||||
|
|
||||||
@ -24,6 +25,7 @@ cp ${DIST}/artifacts/vmlinuz ${CD}/boot
|
|||||||
cp ${DIST}/artifacts/initrd ${CD}/boot
|
cp ${DIST}/artifacts/initrd ${CD}/boot
|
||||||
cp /usr/lib/syslinux/isolinux.bin ${CD}/boot/isolinux
|
cp /usr/lib/syslinux/isolinux.bin ${CD}/boot/isolinux
|
||||||
cp /usr/lib/syslinux/linux.c32 ${CD}/boot/isolinux/ldlinux.c32
|
cp /usr/lib/syslinux/linux.c32 ${CD}/boot/isolinux/ldlinux.c32
|
||||||
|
|
||||||
cat > ${CD}/boot/isolinux/isolinux.cfg << EOF
|
cat > ${CD}/boot/isolinux/isolinux.cfg << EOF
|
||||||
default rancheros
|
default rancheros
|
||||||
label rancheros
|
label rancheros
|
||||||
@ -32,21 +34,42 @@ label rancheros
|
|||||||
append quiet rancher.password=rancher
|
append quiet rancher.password=rancher
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
# Copied from boot2docker, thanks.
|
|
||||||
cd ${CD}
|
cd ${CD}
|
||||||
xorriso \
|
# Copied from boot2docker, thanks.
|
||||||
-publisher "Rancher Labs, Inc." \
|
xorriso \
|
||||||
-as mkisofs \
|
-publisher "Rancher Labs, Inc." \
|
||||||
-l -J -R -V "RancherOS" \
|
-as mkisofs \
|
||||||
-no-emul-boot -boot-load-size 4 -boot-info-table \
|
-l -J -R -V "RancherOS" \
|
||||||
-b boot/isolinux/isolinux.bin -c boot/isolinux/boot.cat \
|
-no-emul-boot -boot-load-size 4 -boot-info-table \
|
||||||
-isohybrid-mbr /usr/lib/syslinux/isohdpfx.bin \
|
-b boot/isolinux/isolinux.bin -c boot/isolinux/boot.cat \
|
||||||
-o ${DIST}/artifacts/rancheros.iso $(pwd)
|
-isohybrid-mbr /usr/lib/syslinux/isohdpfx.bin \
|
||||||
|
-o ${DIST}/artifacts/rancheros.iso $(pwd)
|
||||||
|
|
||||||
|
cat > ${CD}/boot/isolinux/isolinux.cfg << EOF
|
||||||
|
default rancheros
|
||||||
|
label rancheros
|
||||||
|
kernel /boot/vmlinuz
|
||||||
|
initrd /boot/initrd
|
||||||
|
append quiet rancher.password=rancher rancher.state.autoformat=[/dev/sda,/dev/vda]
|
||||||
|
EOF
|
||||||
|
|
||||||
|
cd ${CD}
|
||||||
|
xorriso \
|
||||||
|
-publisher "Rancher Labs, Inc." \
|
||||||
|
-as mkisofs \
|
||||||
|
-l -J -R -V "RancherOS" \
|
||||||
|
-no-emul-boot -boot-load-size 4 -boot-info-table \
|
||||||
|
-b boot/isolinux/isolinux.bin -c boot/isolinux/boot.cat \
|
||||||
|
-isohybrid-mbr /usr/lib/syslinux/isohdpfx.bin \
|
||||||
|
-o ${DIST}/artifacts/machine-rancheros.iso $(pwd)
|
||||||
|
|
||||||
|
|
||||||
if [ -e ${DIST}/artficats/iso-checksums.txt ]; then
|
if [ -e ${DIST}/artficats/iso-checksums.txt ]; then
|
||||||
rm ${DIST}/artficats/iso-checksums.txt
|
rm ${DIST}/artficats/iso-checksums.txt
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for algorithm in 'sha256' 'md5'; do
|
for algorithm in 'sha256' 'md5'; do
|
||||||
echo "${algorithm}: $(${algorithm}sum ${DIST}/artifacts/rancheros.iso)" >> ${DIST}/artifacts/iso-checksums.txt
|
for i in ${DIST}/artifacts/*iso; do
|
||||||
|
echo "${algorithm}: $(${algorithm}sum ${i})" >> ${DIST}/artifacts/iso-checksums.txt
|
||||||
|
done
|
||||||
done
|
done
|
||||||
|
Loading…
Reference in New Issue
Block a user