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
|
#!/bin/bash
|
||||||
set -e
|
set -ex
|
||||||
|
|
||||||
cd $(dirname $0)/..
|
cd $(dirname $0)/..
|
||||||
|
|
||||||
source ./scripts/run-common
|
source ./scripts/run-common
|
||||||
|
|
||||||
INSTALLER=${BASE}/dist/artifacts/installer.tar
|
|
||||||
|
|
||||||
if [ ! -e ${INITRD} ]; then
|
if [ ! -e ${INITRD} ]; then
|
||||||
cp bin/ros ${INITRD_SRC}/usr/bin/ros
|
cp bin/ros ${INITRD_SRC}/usr/bin/ros
|
||||||
./scripts/hash-initrd
|
./scripts/hash-initrd
|
||||||
@ -25,26 +23,24 @@ trap "poweroff" EXIT
|
|||||||
|
|
||||||
sleep 5
|
sleep 5
|
||||||
|
|
||||||
mount -t 9p -o trans=virtio,version=9p2000.L config-2 /mnt
|
|
||||||
|
|
||||||
touch log
|
touch log
|
||||||
openvt -s -- tail -f 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
|
touch /mnt/success
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
rm -f build/{success,hd.img}
|
rm -f build/{success,hd.img}
|
||||||
qemu-img create -f qcow2 build/hd.img 8G
|
qemu-img create -f qcow2 build/hd.img 8G
|
||||||
cp ${INSTALLER} build/installer.tar
|
|
||||||
qemu-system-${QEMUARCH} -serial stdio \
|
qemu-system-${QEMUARCH} -serial stdio \
|
||||||
-enable-kvm \
|
-enable-kvm \
|
||||||
-drive if=virtio,file=build/hd.img \
|
-drive if=virtio,file=build/hd.img \
|
||||||
-kernel ${KERNEL} \
|
-boot d -cdrom ./dist/artifacts/rancheros.iso \
|
||||||
-initrd ${INITRD} \
|
|
||||||
-m 2048 \
|
-m 2048 \
|
||||||
-append "${DEFAULT_KERNEL_ARGS}" \
|
|
||||||
-smp 1 \
|
-smp 1 \
|
||||||
-nographic \
|
-nographic \
|
||||||
-display none \
|
-display none \
|
||||||
@ -55,3 +51,4 @@ qemu-system-${QEMUARCH} -serial stdio \
|
|||||||
|
|
||||||
mkdir -p state
|
mkdir -p state
|
||||||
cp build/hd.img state/hd.img
|
cp build/hd.img state/hd.img
|
||||||
|
echo "------------------------ RancherOS installed to hd.img."
|
@ -70,6 +70,7 @@ while [ "$#" -gt 0 ]; do
|
|||||||
CONSOLEDISPLAY=1
|
CONSOLEDISPLAY=1
|
||||||
;;
|
;;
|
||||||
--installed)
|
--installed)
|
||||||
|
./scripts/create-installed
|
||||||
INSTALLED=1
|
INSTALLED=1
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
@ -48,4 +48,4 @@ REBUILD=1
|
|||||||
QEMUARCH=${qemuarch["${ARCH}"]}
|
QEMUARCH=${qemuarch["${ARCH}"]}
|
||||||
TTYCONS=${ttycons["${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