[ungleich-tools] update alpine linux script for Task#11912
This commit is contained in:
parent
ece4c00dd0
commit
39d16e6ded
1 changed files with 17 additions and 1 deletions
|
@ -16,7 +16,7 @@ IMAGE_SIZE=10G
|
||||||
NBD_DEVICE=/dev/nbd0
|
NBD_DEVICE=/dev/nbd0
|
||||||
APK_MIRROR=http://dl-2.alpinelinux.org/alpine/ # Mind the trailing /
|
APK_MIRROR=http://dl-2.alpinelinux.org/alpine/ # Mind the trailing /
|
||||||
|
|
||||||
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_URL="https://github.com/OpenNebula/addon-context-linux/releases/download/v6.6.1/one-context-6.6.1-r1.apk"
|
||||||
ONE_CONTEXT_APK_PATH=/root/one-context.apk
|
ONE_CONTEXT_APK_PATH=/root/one-context.apk
|
||||||
|
|
||||||
cleanup() {
|
cleanup() {
|
||||||
|
@ -145,6 +145,9 @@ done
|
||||||
# Set hostname.
|
# Set hostname.
|
||||||
run_root setup-hostname -n alpine
|
run_root setup-hostname -n alpine
|
||||||
|
|
||||||
|
#debug
|
||||||
|
blkid
|
||||||
|
|
||||||
# Generate fstab file.
|
# Generate fstab file.
|
||||||
boot_uuid=$(blkid --match-tag UUID --output value "${NBD_DEVICE}p1")
|
boot_uuid=$(blkid --match-tag UUID --output value "${NBD_DEVICE}p1")
|
||||||
root_uuid=$(blkid --match-tag UUID --output value "${NBD_DEVICE}p2")
|
root_uuid=$(blkid --match-tag UUID --output value "${NBD_DEVICE}p2")
|
||||||
|
@ -153,9 +156,22 @@ UUID=$boot_uuid /boot ext4 rw,relatime,data=ordered 0 2
|
||||||
UUID=$root_uuid / ext4 rw,relatime,data=ordered 0 1
|
UUID=$root_uuid / ext4 rw,relatime,data=ordered 0 1
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
#debug
|
||||||
|
echo $boot_uuid
|
||||||
|
echo $root_uuid
|
||||||
|
cat /mnt/etc/fstab
|
||||||
|
run_root cat /etc/fstab
|
||||||
|
|
||||||
# Install kernel and bootloader.
|
# Install kernel and bootloader.
|
||||||
run_root apk add linux-virt grub grub-bios
|
run_root apk add linux-virt grub grub-bios
|
||||||
|
echo 'GRUB_CMDLINE_LINUX_DEFAULT="quiet rootfstype=ext4"' >> /mnt/etc/default/grub
|
||||||
|
cat /mnt/etc/default/grub
|
||||||
run_root grub-install --target=i386-pc $NBD_DEVICE
|
run_root grub-install --target=i386-pc $NBD_DEVICE
|
||||||
|
run_root grub-mkconfig -o /boot/grub/grub.cfg
|
||||||
|
|
||||||
|
#debug
|
||||||
|
run_root cat /etc/default/grub
|
||||||
|
run_root cat /etc/fstab
|
||||||
|
|
||||||
# Install one-context APK and hope things works as expected.
|
# Install one-context APK and hope things works as expected.
|
||||||
curl -L "$ONE_CONTEXT_APK_URL" > "/mnt$ONE_CONTEXT_APK_PATH"
|
curl -L "$ONE_CONTEXT_APK_URL" > "/mnt$ONE_CONTEXT_APK_PATH"
|
||||||
|
|
Loading…
Reference in a new issue