Advertisement
0anion0

Install CoreOS

Nov 28th, 2019
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.03 KB | None | 0 0
  1. + getopts V:B:C:d:o:c:i:t:b:k:f:nyvh OPTION
  2. + [[ -z /dev/sda ]]
  3. ++ lsblk -n -d -o TYPE /dev/sda
  4. + [[ disk =~ ^(disk|loop|lvm)$ ]]
  5. + [[ ! -w /dev/sda ]]
  6. + [[ -n '' ]]
  7. + [[ -n /root/ignition.json ]]
  8. + [[ ! -f /root/ignition.json ]]
  9. + [[ -n '' ]]
  10. + _disk_status=
  11. ++ mktemp --tmpdir -d coreos-install.XXXXXXXXXX
  12. + WORKDIR=/tmp/coreos-install.OKcgfnsWbn
  13. + trap 'error_output ; is_modified && wipefs --all --backup "${DEVICE}" ; rm -rf "${WORKDIR}"' EXIT
  14. + '[' -n '' ']'
  15. + install_from_url
  16. + type -P wget
  17. + type -P gpg
  18. + local IMAGE_NAME=coreos_production_image.bin.bz2
  19. + [[ -n '' ]]
  20. + [[ -n 1 ]]
  21. + [[ -z '' ]]
  22. + VERSION_ID=current
  23. + [[ current =~ ^(alpha|beta|stable)$ ]]
  24. + [[ -z '' ]]
  25. + BASE_URL=https://stable.release.core-os.net/amd64-usr
  26. + [[ current == \c\u\r\r\e\n\t ]]
  27. + local VERSIONTXT_URL=https://stable.release.core-os.net/amd64-usr/current/version.txt
  28. ++ wget -qO- https://stable.release.core-os.net/amd64-usr/current/version.txt
  29. ++ sed -n 's/^COREOS_VERSION=//p'
  30. + VERSION_ID=2247.7.0
  31. + [[ -z 2247.7.0 ]]
  32. + echo 'Current version of CoreOS Container Linux stable is 2247.7.0'
  33. Current version of CoreOS Container Linux stable is 2247.7.0
  34. + local IMAGE_URL=https://stable.release.core-os.net/amd64-usr/2247.7.0/coreos_production_image.bin.bz2
  35. + local SIG_NAME=coreos_production_image.bin.bz2.sig
  36. + local SIG_URL=https://stable.release.core-os.net/amd64-usr/2247.7.0/coreos_production_image.bin.bz2.sig
  37. + wget --spider --quiet https://stable.release.core-os.net/amd64-usr/2247.7.0/coreos_production_image.bin.bz2
  38. + wget --spider --quiet https://stable.release.core-os.net/amd64-usr/2247.7.0/coreos_production_image.bin.bz2.sig
  39. + export GNUPGHOME=/tmp/coreos-install.OKcgfnsWbn/gnupg
  40. + GNUPGHOME=/tmp/coreos-install.OKcgfnsWbn/gnupg
  41. + mkdir -p /tmp/coreos-install.OKcgfnsWbn/gnupg
  42. + '[' -n '' ']'
  43. + gpg --batch --quiet --import
  44. + echo 'Downloading the signature for https://stable.release.core-os.net/amd64-usr/2247.7.0/coreos_production_image.bin.bz2...'
  45. Downloading the signature for https://stable.release.core-os.net/amd64-usr/2247.7.0/coreos_production_image.bin.bz2...
  46. + wget --no-verbose -O /tmp/coreos-install.OKcgfnsWbn/coreos_production_image.bin.bz2.sig https://stable.release.core-os.net/amd64-usr/2247.7.0/coreos_production_image.bin.bz2.sig
  47. 2019-11-29 05:13:59 URL:https://stable.release.core-os.net/amd64-usr/2247.7.0/coreos_production_image.bin.bz2.sig [566/566] -> "/tmp/coreos-install.OKcgfnsWbn/coreos_production_image.bin.bz2.sig" [1]
  48. + echo 'Downloading, writing and verifying coreos_production_image.bin.bz2...'
  49. Downloading, writing and verifying coreos_production_image.bin.bz2...
  50. ++ write_to_disk
  51. ++ mkfifo -m 0600 /tmp/coreos-install.OKcgfnsWbn/disk_modified
  52. + wget --no-verbose -O - https://stable.release.core-os.net/amd64-usr/2247.7.0/coreos_production_image.bin.bz2
  53. + tee /dev/fd/62
  54. + gpg --batch --trusted-key 50E0885593D2DCB4 --verify /tmp/coreos-install.OKcgfnsWbn/coreos_production_image.bin.bz2.sig -
  55. ++ bzip2 -cd
  56. ++ trap '(exec 2>/dev/null ; echo done > "${WORKDIR}/disk_modified") &' RETURN
  57. +++ blockdev --getsz /dev/sda
  58. ++ dd conv=nocreat count=1024 if=/dev/zero of=/dev/sda seek=39063649280 status=none
  59. ++ dd bs=1M conv=nocreat of=/dev/sda status=none
  60. 2019-11-29 05:15:05 URL:https://stable.release.core-os.net/amd64-usr/2247.7.0/coreos_production_image.bin.bz2 [481587918/481587918] -> "-" [1]
  61. gpg: Signature made Tue Nov 19 23:15:54 2019 UTC
  62. gpg: using RSA key FD986FB096482F906F55B2EA01C9CAE767B3CA0E
  63. gpg: key 50E0885593D2DCB4 marked as ultimately trusted
  64. gpg: checking the trustdb
  65. gpg: marginals needed: 3 completes needed: 1 trust model: pgp
  66. gpg: depth: 0 valid: 1 signed: 0 trust: 0-, 0q, 0n, 0m, 0f, 1u
  67. gpg: Good signature from "CoreOS Buildbot (Offical Builds) <buildbot@coreos.com>" [ultimate]
  68. + VERSION_SUMMARY+=' stable 2247.7.0'
  69. + wait_for_disk
  70. + '[' -n '' ']'
  71. + read -rt 7200 _disk_status
  72. ++ udevadm settle
  73. ++ local try
  74. ++ for try in 0 1 2 4
  75. ++ sleep 0
  76. ++ blockdev --rereadpt /dev/sda
  77. blockdev: ioctl error on BLKRRPART: Device or resource busy
  78. ++ echo 'Failed to reread partitions on /dev/sda'
  79. Failed to reread partitions on /dev/sda
  80. ++ for try in 0 1 2 4
  81. ++ sleep 1
  82. ++ blockdev --rereadpt /dev/sda
  83. ++ unset try
  84. ++ break
  85. ++ '[' -z '' ']'
  86. ++ udevadm settle
  87. +++ exec
  88. + write_cloudinit
  89. + [[ -n '' ]]
  90. + write_ignition
  91. + [[ -n /root/ignition.json ]]
  92. ++ blkid -t LABEL=OEM -o device /dev/sda /dev/sda1 /dev/sda2 /dev/sda3 /dev/sda4 /dev/sda6 /dev/sda7 /dev/sda9
  93. + local OEM_DEV=/dev/sda6
  94. + mkdir -p /tmp/coreos-install.OKcgfnsWbn/oemfs
  95. + mount /dev/sda6 /tmp/coreos-install.OKcgfnsWbn/oemfs
  96. + trap 'umount "${WORKDIR}/oemfs"' RETURN
  97. + echo 'Installing Ignition config /root/ignition.json...'
  98. Installing Ignition config /root/ignition.json...
  99. + cp /root/ignition.json /tmp/coreos-install.OKcgfnsWbn/oemfs/config.ign
  100. ++ umount /tmp/coreos-install.OKcgfnsWbn/oemfs
  101. + rm -rf /tmp/coreos-install.OKcgfnsWbn
  102. + trap - EXIT
  103. + echo 'Success! CoreOS Container Linux stable 2247.7.0 is installed on /dev/sda'
  104. Success! CoreOS Container Linux stable 2247.7.0 is installed on /dev/sda
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement