Open xanalogica opened 4 years ago
k3os-14025 [~]$ K3OS_DEBUG=true k3os install
Running k3OS configuration Choose operation
- Install to disk
- Configure server or agent Select Number [1]: 1 Installation target. Device will be formatted
- fd0
- sda Select Number []: 2 Config system with cloud-init file? [y/N]: y cloud-init file location (file path or http URL): /var/lib/rancher/config.yaml
Configuration
config_url: /var/lib/rancher/config.yaml device: /dev/sda
Your disk will be formatted and k3OS will be installed with the above configuration. Continue? [y/N]: y
- '[' 0 -gt 0 ']'
- '[' -e /etc/environment ']'
- source /etc/environment ++ K3S_KUBECONFIG_MODE=0644 ++ INSTALL_K3S_SKIP_DOWNLOAD=true
- '[' -e /etc/os-release ']'
- source /etc/os-release ++ NAME=k3OS ++ VERSION='k3OS v0.11.1-dirty' ++ ID=k3os ++ ID_LIKE=alpine ++ PRETTY_NAME='k3OS v0.11.1-dirty' ++ VERSION_ID=v0.11.1-dirty ++ HOME_URL=https://k3os.io/ ++ SUPPORT_URL=https://k3os.io/ ++ BUG_REPORT_URL=https://github.com/rancher/k3os/issues ++ ISO_URL=https://github.com/rancher/k3os/releases/download/v0.11.1-dirty/k3os-amd64.iso
- '[' -z '' ']'
- K3OS_INSTALL_ISO_URL=https://github.com/rancher/k3os/releases/download/v0.11.1-dirty/k3os-amd64.iso
- '[' -z /dev/sda ']'
- validate_progs
- for i in $PROGS ++ which dd
- '[' '!' -x /usr/bin/dd ']'
- for i in $PROGS ++ which curl
- '[' '!' -x /usr/bin/curl ']'
- for i in $PROGS ++ which mkfs.ext4
- '[' '!' -x /usr/sbin/mkfs.ext4 ']'
- for i in $PROGS ++ which mkfs.vfat
- '[' '!' -x /usr/sbin/mkfs.vfat ']'
- for i in $PROGS ++ which fatlabel
- '[' '!' -x /usr/sbin/fatlabel ']'
- for i in $PROGS ++ which parted
- '[' '!' -x /usr/sbin/parted ']'
- for i in $PROGS ++ which partprobe
- '[' '!' -x /usr/sbin/partprobe ']'
- for i in $PROGS ++ which grub-install
- '[' '!' -x /usr/sbin/grub-install ']'
- '[' -n '' ']'
- validate_device
- DEVICE=/dev/sda
- '[' '!' -b /dev/sda ']'
- trap cleanup exit
- get_iso ++ blkid -L K3OS
- ISO_DEVICE=/dev/sr0
- '[' -z /dev/sr0 ']'
- '[' -z /dev/sr0 ']'
- '[' -z /dev/sr0 ']'
- setup_style
- '[' '' = true ']'
- '[' -e /sys/firmware/efi ']'
- PARTTABLE=msdos
- BOOTFLAG=boot
- do_format
- '[' '' = true ']'
- dd if=/dev/zero of=/dev/sda bs=1M count=1 1+0 records in 1+0 records out 1048576 bytes (1.0 MB, 1.0 MiB) copied, 0.0331593 s, 31.6 MB/s
- parted -s /dev/sda mklabel msdos
- '[' msdos = gpt ']'
- BOOT_NUM=
- STATE_NUM=1
- parted -s /dev/sda mkpart primary ext4 0% 700MB
- parted -s /dev/sda set 1 boot on
- partprobe /dev/sda
- sleep 2
- PREFIX=/dev/sda
- '[' '!' -e /dev/sda1 ']'
- '[' '!' -e /dev/sda1 ']'
- '[' -n '' ']'
- STATE=/dev/sda1
- mkfs.ext4 -F -L K3OS_STATE /dev/sda1 mke2fs 1.45.5 (07-Jan-2020) /dev/sda1 contains a ext4 file system labelled 'K3OS_STATE' last mounted on /run/k3os/target on Tue Oct 27 09:57:18 2020 Discarding device blocks: done
Creating filesystem with 170752 4k blocks and 42720 inodes Filesystem UUID: d619c452-0dea-4b10-bada-50f86e5239a9 Superblock backups stored on blocks: 32768, 98304, 163840Allocating group tables: done
Writing inode tables: done
Creating journal (4096 blocks): done Writing superblocks and filesystem accounting information: done
- '[' -n '' ']'
- do_mount
- TARGET=/run/k3os/target
- mkdir -p /run/k3os/target
- mount /dev/sda1 /run/k3os/target
- mkdir -p /run/k3os/target/boot
- '[' -n '' ']'
- mkdir -p /run/k3os/iso
- mount -o ro /dev/sr0 /run/k3os/iso
- do_copy
- tar xvf - -C /run/k3os/target
- tar cf - -C /run/k3os/iso k3os k3os/ k3os/data/ k3os/data/var/ k3os/data/var/lib/ k3os/data/var/lib/rancher/ k3os/data/var/lib/rancher/k3s/ k3os/data/var/lib/rancher/k3s/agent/ k3os/data/var/lib/rancher/k3s/agent/images/ k3os/data/var/lib/rancher/k3s/agent/images/k3s-airgap-images-v1.18.9.tar k3os/system/ k3os/system/config.yaml k3os/system/k3os/ k3os/system/k3os/current k3os/system/k3os/v0.11.1-dirty/ k3os/system/k3os/v0.11.1-dirty/k3os-install.sh k3os/system/k3os/v0.11.1-dirty/k3os k3os/system/k3s/ k3os/system/k3s/current k3os/system/k3s/v1.18.9+k3s1/ k3os/system/k3s/v1.18.9+k3s1/k3s-install.sh k3os/system/k3s/v1.18.9+k3s1/k3s k3os/system/kernel/ k3os/system/kernel/5.4.0-48-generic/ k3os/system/kernel/5.4.0-48-generic/initrd k3os/system/kernel/5.4.0-48-generic/kernel.squashfs tar: k3os/system/kernel/5.4.0-48-generic/kernel.squashfs: Wrote only 5632 of 10240 bytes k3os/system/kernel/current tar: Exiting with failure status due to previous errors
- cleanup
- EXIT=2
- cleanup2
- return 2 ERRO[0033] exit status 2
k3os-14025 [~]$
Did you find any solution to this? I'm having the same issue with a remastered ISO containing air-gapped-images tar-file.
Version (k3OS / kernel)
$ k3os --version k3os version v0.11.1-dirty $ uname --kernel-release --kernel-version 5.4.0-48-generic #52 SMP Sat Sep 26 08:27:15 UTC 2020
Architecture
$ uname --machine x86_64
Describe the bug
I have been struggling with patching the k3os ISO to add airgap images. The current snag is that although I add images to the ISO, the k3os boot sequence first creates a 700MB root partition, copies the ISO into it, and then later resizes the root partition to 100% of the boot disk.
During the time the root partition is 700MB it's too small to receive the airgap images. I've tried to patch the install.sh script, have done so but the change is not used so I think there is another stashed copy of the original install.sh someplace.
To Reproduce
Expected behavior
I expected the root partition to be 900MB initially, to receive the untarred files and later to be resized to the full disk.
Actual behavior
Untar process fails due to out of space.
Additional context
Where is "k3os install" getting its script command "parted mkpart ... 700MB"?