[alpine/opennebula] begin upgrade to 3.16 - unfinished
This commit is contained in:
parent
43e9822510
commit
9672f5eb7c
1 changed files with 5 additions and 15 deletions
|
@ -9,14 +9,14 @@ set -e
|
|||
set -x
|
||||
|
||||
# XXX: Handle command-line arguments?
|
||||
RELEASE=v3.14
|
||||
RELEASE=v3.16
|
||||
ARCH=x86_64
|
||||
IMAGE_PATH=alpine-$RELEASE-$(date -I).img.qcow2
|
||||
IMAGE_SIZE=10G
|
||||
NBD_DEVICE=/dev/nbd0
|
||||
APK_MIRROR=http://dl-2.alpinelinux.org/alpine/ # Mind the trailing /
|
||||
|
||||
ONE_CONTEXT_APK_URL="https://github.com/OpenNebula/addon-context-linux/releases/download/v5.10.0/one-context-5.10.0-r1.apk"
|
||||
ONE_CONTEXT_APK_URL="https://github.com/OpenNebula/addon-context-linux/releases/download/v6.4.0/one-context-6.4.0-r1.apk"
|
||||
ONE_CONTEXT_APK_PATH=/root/one-context.apk
|
||||
|
||||
cleanup() {
|
||||
|
@ -82,7 +82,7 @@ apk add -U -X $APK_MIRROR$RELEASE/main/ \
|
|||
--arch="$ARCH" \
|
||||
--root=/mnt \
|
||||
--initdb \
|
||||
alpine-base alpine-conf openssh sudo tzdata gnupg haveged bash eudev
|
||||
alpine-base alpine-conf openssh tzdata gnupg haveged bash eudev
|
||||
|
||||
mount --bind /dev /mnt/dev
|
||||
mount --bind /dev/pts /mnt/dev/pts
|
||||
|
@ -154,18 +154,8 @@ UUID=$root_uuid / ext4 rw,relatime,data=ordered 0 1
|
|||
EOF
|
||||
|
||||
# Install kernel and bootloader.
|
||||
run_root apk add linux-virt syslinux
|
||||
|
||||
dd if=/usr/share/syslinux/mbr.bin of="$NBD_DEVICE" bs=1 count=440
|
||||
extlinux -i /mnt/boot
|
||||
|
||||
cat >/mnt/boot/extlinux.conf <<EOF
|
||||
DEFAULT linux
|
||||
LABEL linux
|
||||
LINUX vmlinuz-virt
|
||||
INITRD initramfs-virt
|
||||
APPEND root=UUID=$root_uuid rw modules=sd-mod,usb-storage,ext4 quiet rootfstype=ext4
|
||||
EOF
|
||||
run_root apk add linux-virt grub grub-bios
|
||||
run_root grub-install --target=i386-pc $NBD_DEVICE
|
||||
|
||||
# Install one-context APK and hope things works as expected.
|
||||
curl -L "$ONE_CONTEXT_APK_URL" > "/mnt$ONE_CONTEXT_APK_PATH"
|
||||
|
|
Loading…
Reference in a new issue