mirror of
https://github.com/rancher/os.git
synced 2025-07-04 10:36:14 +00:00
fix create-installer to use the installer tarball in the iso
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
This commit is contained in:
parent
e5a7889ce9
commit
edb8022336
@ -1,12 +1,10 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
set -ex
|
||||
|
||||
cd $(dirname $0)/..
|
||||
|
||||
source ./scripts/run-common
|
||||
|
||||
INSTALLER=${BASE}/dist/artifacts/installer.tar
|
||||
|
||||
if [ ! -e ${INITRD} ]; then
|
||||
cp bin/ros ${INITRD_SRC}/usr/bin/ros
|
||||
./scripts/hash-initrd
|
||||
@ -25,26 +23,24 @@ trap "poweroff" EXIT
|
||||
|
||||
sleep 5
|
||||
|
||||
mount -t 9p -o trans=virtio,version=9p2000.L config-2 /mnt
|
||||
|
||||
touch log
|
||||
openvt -s -- tail -f log &
|
||||
cat /mnt/installer.tar | system-docker load
|
||||
ros install -d /dev/vda -f --no-reboot >log 2>&1
|
||||
|
||||
mount -t 9p -o trans=virtio,version=9p2000.L config-2 /mnt
|
||||
|
||||
# use the install tarball in the iso
|
||||
ros install -d /dev/vda -f --no-reboot --append "console=ttyS0 rancher.autologin=ttyS0" >> /mnt/log 2>&1
|
||||
|
||||
touch /mnt/success
|
||||
EOF
|
||||
|
||||
rm -f build/{success,hd.img}
|
||||
qemu-img create -f qcow2 build/hd.img 8G
|
||||
cp ${INSTALLER} build/installer.tar
|
||||
qemu-system-${QEMUARCH} -serial stdio \
|
||||
-enable-kvm \
|
||||
-drive if=virtio,file=build/hd.img \
|
||||
-kernel ${KERNEL} \
|
||||
-initrd ${INITRD} \
|
||||
-boot d -cdrom ./dist/artifacts/rancheros.iso \
|
||||
-m 2048 \
|
||||
-append "${DEFAULT_KERNEL_ARGS}" \
|
||||
-smp 1 \
|
||||
-nographic \
|
||||
-display none \
|
||||
@ -55,3 +51,4 @@ qemu-system-${QEMUARCH} -serial stdio \
|
||||
|
||||
mkdir -p state
|
||||
cp build/hd.img state/hd.img
|
||||
echo "------------------------ RancherOS installed to hd.img."
|
@ -70,6 +70,7 @@ while [ "$#" -gt 0 ]; do
|
||||
CONSOLEDISPLAY=1
|
||||
;;
|
||||
--installed)
|
||||
./scripts/create-installed
|
||||
INSTALLED=1
|
||||
;;
|
||||
*)
|
||||
|
@ -48,4 +48,4 @@ REBUILD=1
|
||||
QEMUARCH=${qemuarch["${ARCH}"]}
|
||||
TTYCONS=${ttycons["${ARCH}"]}
|
||||
|
||||
DEFAULT_KERNEL_ARGS="rancher.debug=true rancher.password=rancher console=${TTYCONS} rancher.autologin=${TTYCONS}"
|
||||
DEFAULT_KERNEL_ARGS="rancher.debug=false rancher.password=rancher console=${TTYCONS} rancher.autologin=${TTYCONS}"
|
||||
|
Loading…
Reference in New Issue
Block a user