New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cork create error: failed to create symbolic link #958

Closed
AnalogJ opened this Issue Dec 12, 2018 · 11 comments

Comments

Projects
None yet
3 participants
@AnalogJ
Copy link

AnalogJ commented Dec 12, 2018

Hey,
I'm getting a weird issue when running cork create in a VM.

    default: 2018-12-12T04:09:29Z cork: Detecting SDK version
    default: 2018-12-12T04:09:31Z cork: Found SDK version 1967.0.0 from remote repo
    default: 2018-12-12T04:09:31Z cork: Downloading SDK version 1967.0.0
    default: 2018-12-12T04:10:38Z sdk: Unpacking SDK into /usr/bin/coreos-sdk/chroot
    default: 2018-12-12T04:12:43Z sdk: Unpacked
    default: ln: failed to create symbolic link '/home/root/trunk': No such file or directory
    default: 2018-12-12T04:12:43Z cork: Create failed: exit status 1

I'm using a pretty basic Vagrantfile, and I've tried it on CentOS and Debian with the exact same results

Vagrant.configure("2") do |config|
    config.vm.box = "centos/7"

    config.vm.provider "virtualbox" do |v|
        v.name = "coreos_builder"
        v.memory = 11264
        v.cpus = 4
    end

    config.vm.provision "shell", path: "provisioner.sh"
end

My provisioner.sh script looks like:

#!/usr/bin/env bash

## Prerequisites

yum install -y \
    ca-certificates \
    curl \
    git \
    bzip2

cd /usr/bin && \
    curl -L -o cork https://github.com/coreos/mantle/releases/download/v0.11.1/cork-0.11.1-amd64 && \
    chmod +x cork && \
    which cork && \
    git config --global user.email "jason@thesparktree.com" && \
    git config --global user.name "Jason Kulatunga"

## Using Cork
# https://coreos.com/os/docs/latest/sdk-modifying-coreos.html

mkdir coreos-sdk
cd coreos-sdk
cork create

#/usr/bin/cork enter && \
#    grep NAME /etc/os-release # Verify you are in the SDK chroot

@AnalogJ AnalogJ changed the title Cork failure: failed to create symbolic link cork create error: failed to create symbolic link Dec 12, 2018

@dm0-

This comment has been minimized.

Copy link
Member

dm0- commented Dec 12, 2018

That failure means you're running cork as root. It's intended to be run as a normal user.

@AnalogJ

This comment has been minimized.

Copy link

AnalogJ commented Dec 13, 2018

Hey @dm0-
Looks like that was the issue. I've updated my provisioner.sh script to the following:

#!/usr/bin/env bash

## Prerequisites

# meteor installer doesn't work with the default tar binary
yum install -y \
    ca-certificates \
    curl \
    git \
    bzip2

cd /usr/bin && \
    curl -L -o cork https://github.com/coreos/mantle/releases/download/v0.11.1/cork-0.11.1-amd64 && \
    chmod +x cork && \
    which cork

## Using Cork
# https://coreos.com/os/docs/latest/sdk-modifying-coreos.html=

exec sudo -u vagrant /bin/sh - << 'EOF'
whoami
git config --global user.email "jason@thesparktree.com" && \
git config --global user.name "Jason Kulatunga"

mkdir -p ~/coreos-sdk
cd ~/coreos-sdk
cork create --sdk-version 1911.4.0 --replace

cork enter
grep NAME /etc/os-release

./set_shared_user_password.sh 12345
./setup_board
./build_packages
./build_image

EOF

The cork create command is working correctly, but the build_packages/build_image commands seem to be failing. Should I open a new issue for that, or can we continue the conversation here?

Logs are as follows:


    default: 2018-12-13 06:21:48 (48.1 MB/s) - ‘/build/amd64-usr/var/lib/portage/pkgs/sys-devel/gcc-7.3.0-r3.tbz2.partial’ saved [217541564/217541564]
    default: >>> Emerging binary (1 of 13) sys-apps/gentoo-functions-0.12::portage-stable for /build/amd64-usr/
    default: >>> Emerging binary (2 of 13) dev-libs/gmp-5.1.3-r1::portage-stable for /build/amd64-usr/
    default: >>> Emerging binary (3 of 13) sys-libs/zlib-1.2.11::portage-stable for /build/amd64-usr/
    default: >>> Emerging binary (4 of 13) sys-libs/timezone-data-2018e::coreos for /build/amd64-usr/
    default: >>> Emerging binary (5 of 13) virtual/libiconv-0-r1::portage-stable for /build/amd64-usr/
    default: >>> Emerging binary (6 of 13) sys-kernel/linux-headers-4.13::portage-stable for /build/amd64-usr/
    default: >>> Installing (6 of 13) sys-kernel/linux-headers-4.13::portage-stable to /build/amd64-usr/
    default: >>> Recording sys-kernel/linux-headers in "world" favorites file...
    default: >>> Installing (1 of 13) sys-apps/gentoo-functions-0.12::portage-stable to /build/amd64-usr/
    default: >>> Installing (4 of 13) sys-libs/timezone-data-2018e::coreos to /build/amd64-usr/
    default: >>> Installing (2 of 13) dev-libs/gmp-5.1.3-r1::portage-stable to /build/amd64-usr/
    default: >>> Installing (3 of 13) sys-libs/zlib-1.2.11::portage-stable to /build/amd64-usr/
    default: >>> Installing (5 of 13) virtual/libiconv-0-r1::portage-stable to /build/amd64-usr/
    default: >>> Emerging binary (7 of 13) dev-libs/mpfr-3.1.3_p4::portage-stable for /build/amd64-usr/
    default: >>> Emerging binary (8 of 13) sys-libs/glibc-2.26-r7::coreos for /build/amd64-usr/
    default: >>> Emerging binary (9 of 13) sys-devel/gcc-config-1.8-r1::portage-stable for /build/amd64-usr/
    default: >>> Emerging binary (10 of 13) sys-devel/binutils-config-5-r4::portage-stable for /build/amd64-usr/
    default: >>> Installing (9 of 13) sys-devel/gcc-config-1.8-r1::portage-stable to /build/amd64-usr/
    default: >>> Installing (7 of 13) dev-libs/mpfr-3.1.3_p4::portage-stable to /build/amd64-usr/
    default: >>> Installing (10 of 13) sys-devel/binutils-config-5-r4::portage-stable to /build/amd64-usr/
    default: >>> Installing (8 of 13) sys-libs/glibc-2.26-r7::coreos to /build/amd64-usr/
    default: >>> Recording sys-libs/glibc in "world" favorites file...
    default: >>> Emerging binary (11 of 13) dev-libs/mpc-1.0.1::portage-stable for /build/amd64-usr/
    default: >>> Emerging binary (12 of 13) sys-devel/binutils-2.30-r4::portage-stable for /build/amd64-usr/
    default: >>> Installing (11 of 13) dev-libs/mpc-1.0.1::portage-stable to /build/amd64-usr/
    default: >>> Installing (12 of 13) sys-devel/binutils-2.30-r4::portage-stable to /build/amd64-usr/
    default: >>> Recording sys-devel/binutils in "world" favorites file...
    default: >>> Emerging binary (13 of 13) sys-devel/gcc-7.3.0-r3::portage-stable for /build/amd64-usr/
    default: >>> Installing (13 of 13) sys-devel/gcc-7.3.0-r3::portage-stable to /build/amd64-usr/
    default: >>> Recording sys-devel/gcc in "world" favorites file...
    default: 
    default:  * Messages for package sys-devel/gcc-7.3.0-r3 merged to /build/amd64-usr/:
    default:  * Log file: /build/amd64-usr/var/log/portage/sys-devel:gcc-7.3.0-r3:20181213-062211.log
    default: 
    default:  * If you have issues with packages unable to locate libstdc++.la,
    default:  * then try running 'fix_libtool_files.sh' on the old gcc versions.
    default:  * You might want to review the GCC upgrade guide when moving between
    default:  * major versions (like 4.2 to 4.3):
    default:  * https://wiki.gentoo.org/wiki/Upgrading_GCC
    default: INFO    setup_board: Elapsed time (setup_board): 70m18s
    default: INFO    setup_board: The SYSROOT is: /build/amd64-usr
    default: INFO    update_chroot: Setting up portage...
    default: find: `/mnt/host/source/config/portage/repos': No such file or directory
    default: INFO    update_chroot: Setting up crossdev...
    default: INFO    update_chroot: Updating chroot:
    default: INFO    update_chroot:  chroot version: 1981.0.0+2018-12-13-0512
    default: INFO    update_chroot:  CoreOS version: 1981.0.0+2018-12-13-0622
    default: INFO    update_chroot: Updating basic system packages
    default: >>> Jobs: 0 of 0 complete                           Load avg: 0.84, 2.04, 2.99
    default:  * Switching native-compiler to x86_64-pc-linux-gnu-7.3.0 ...
    default:              [ ok ]
    default: INFO    update_chroot: Updating cross x86_64-cros-linux-gnu toolchain
    default: >>> Jobs: 0 of 0 complete                           Load avg: 0.86, 2.02, 2.98
    default:  * Switching cross-compiler to x86_64-cros-linux-gnu-7.3.0 ...
    default:             [ ok ]
    default: 
    default: >>> No packages selected for removal by rage-clean
    default: INFO    update_chroot: Updating all SDK packages
    default: 
    default: These are the packages that would be merged, in order:
    default: 
    default: Calculating dependencies  
    default: .
    default: ... done!
    default: [ebuild  NS   #] sys-devel/binutils-2.29.1-r1:2.29.1::portage-stable [2.30-r4:2.30::portage-stable] USE="cxx nls -multitarget -static-libs {-test} -vanilla" 28,462 KiB
    default: 
    default: Total: 1 package (1 in new slot), Size of downloads: 28,462 KiB
    default: 
    default: The following mask changes are necessary to proceed:
    default:  (see "package.unmask" in the portage(5) man page for more details)
    default: # required by @selected
    default: # required by @world (argument)
    default: # /mnt/host/source/src/third_party/portage-stable/profiles/package.mask:
    default: # Michał Górny <mgorny@gentoo.org>, Andreas K. Hüttel <dilfridge@gentoo.org>,
    default: # Matthias Maier <tamiko@gentoo.org> (21 May 2017 and later updates)
    default: # These old versions of toolchain packages (binutils, gcc, glibc) are no
    default: # longer officially supported and are not suitable for general use. Using
    default: # these packages can result in build failures (and possible breakage) for
    default: # many packages, and may leave your system vulnerable to known security
    default: # exploits.
    default: # If you still use one of these old toolchain packages, please upgrade (and
    default: # switch the compiler / the binutils) ASAP. If you need them for a specific
    default: # (isolated) use case, feel free to unmask them on your system.
    default: =sys-devel/binutils-2.29.1-r1
    default: 
    default: NOTE: The --autounmask-keep-masks option will prevent emerge
    default:       from creating package.unmask or ** keyword changes.
    default: 
    default: Use --autounmask-write to write changes to config files (honoring
    default: CONFIG_PROTECT). Carefully examine the list of proposed changes,
    default: paying special attention to mask or keyword changes that may expose
    default: experimental or unstable packages.
    default: ERROR   update_chroot: script called: update_chroot '--toolchain_boards=amd64-usr' '--usepkg' '--nousepkgonly' '--getbinpkg' '--jobs=4'
    default: ERROR   update_chroot: Backtrace:  (most recent call is last)
    default: ERROR   update_chroot:   file update_chroot, line 242, called: die_err_trap 'sudo -E ${EMERGE_CMD} "${EMERGE_FLAGS[@]}" coreos-devel/sdk-depends world' '1'
    default: ERROR   update_chroot: 
    default: ERROR   update_chroot: Command failed:
    default: ERROR   update_chroot:   Command 'sudo -E ${EMERGE_CMD} "${EMERGE_FLAGS[@]}" coreos-devel/sdk-depends world' exited with nonzero code: 1
    default: ERROR   setup_board: script called: setup_board '--quiet' '--board=amd64-usr' '--regen_configs' '--usepkg' '--nousepkgonly' '--getbinpkg' '--notoolchainpkgonly' '--jobs=4'
    default: ERROR   setup_board: Backtrace:  (most recent call is last)
    default: ERROR   setup_board:   file setup_board, line 211, called: die_err_trap '"${SRC_ROOT}/scripts"/update_chroot ${UPDATE_ARGS}' '1'
    default: ERROR   setup_board: 
    default: ERROR   setup_board: Command failed:
    default: ERROR   setup_board:   Command '"${SRC_ROOT}/scripts"/update_chroot ${UPDATE_ARGS}' exited with nonzero code: 1
    default: ERROR   setup_board:   (Note bash sometimes misreports "command not found" as exit code 1 instead of 127)
    default: ERROR   build_packages: script called: build_packages (args unknown, no debug available)
    default: ERROR   build_packages: Backtrace:  (most recent call is last)
    default: ERROR   build_packages:   file build_packages, line 124, called: die_err_trap '"${SCRIPTS_DIR}"/setup_board --quiet --board=${FLAGS_board} "${UPDATE_ARGS[@]}"' '1'
    default: ERROR   build_packages: 
    default: ERROR   build_packages: Command failed:
    default: ERROR   build_packages:   Command '"${SCRIPTS_DIR}"/setup_board --quiet --board=${FLAGS_board} "${UPDATE_ARGS[@]}"' exited with nonzero code: 1
    default: ERROR   build_packages:   (Note bash sometimes misreports "command not found" as exit code 1 instead of 127)
    default: INFO    build_image: Checking build root
    default: INFO    build_image: Checking /build/amd64-usr
    default: /usr/share/gcc-data/x86_64-cros-linux-gnu/7.3.0/fix_libtool_files.sh: /bin/sh does not exist
    default: /usr/share/gcc-data/x86_64-cros-linux-gnu/7.3.0/c89: /bin/sh does not exist
    default: /usr/share/gcc-data/x86_64-cros-linux-gnu/7.3.0/c99: /bin/sh does not exist
    default: /usr/bin/c89: /bin/sh does not exist
    default: /usr/bin/sotruss: /bin/bash does not exist
    default: /usr/bin/gcc-config: /bin/bash does not exist
    default: /usr/bin/tzselect: /bin/bash does not exist
    default: /usr/bin/xtrace: /bin/bash does not exist
    default: /usr/bin/ldd: /bin/bash does not exist
    default: /usr/bin/c99: /bin/sh does not exist
    default: /usr/bin/catchsegv: /bin/sh does not exist
    default: /usr/bin/binutils-config: /bin/bash does not exist
    default: /usr/sbin/coreos-tmpfiles: /bin/bash does not exist
    default: /usr/sbin/fix_libtool_files.sh: /bin/sh does not exist
    default: WARNING build_image: test_image_content: Failed #! check
    default: Traceback (most recent call last):
    default:   File "/mnt/host/source/src/scripts/build_library/check_root", line 299, in <module>
    default:     sys.exit(main())
    default:   File "/mnt/host/source/src/scripts/build_library/check_root", line 290, in main
    default:     ok = func() and ok
    default:   File "/mnt/host/source/src/scripts/build_library/check_root", line 261, in check_symlink
    default:     error("broken link: %s", path)
    default:   File "/mnt/host/source/src/scripts/build_library/check_root", line 267, in error
    default:     sys.stderr.write(output.red(fmt % args))
    default: LookupError: unknown encoding: ascii
    default: ERROR   build_image: test_image_content: Failed symlink check
    default: This system is not affected by any of the listed GLSAs
    default: ERROR   build_image: script called: build_image (args unknown, no debug available)
    default: ERROR   build_image: Backtrace:  (most recent call is last)
    default: ERROR   build_image:   file build_image, line 74, called: die_err_trap 'return $returncode' '1'
    default: ERROR   build_image: 
    default: ERROR   build_image: Command failed:
    default: ERROR   build_image:   Command 'return $returncode' exited with nonzero code: 1

@dm0-

This comment has been minimized.

Copy link
Member

dm0- commented Dec 13, 2018

You probably want to use --manifest-branch "refs/tags/${VERSION}" instead of --sdk-version for starting on a specific tag. The manifest ref defines which OS version's packages to use and defaults to master, so your current command is trying to use the stable SDK and replace its packages with master branch versions.

@AnalogJ

This comment has been minimized.

Copy link

AnalogJ commented Dec 14, 2018

@dm0- yep, looks like those were the two issues I was running into.
I've successfully built a kernel using vanilla CoreOS code 🎉

Thanks for the help

@AnalogJ

This comment has been minimized.

Copy link

AnalogJ commented Dec 15, 2018

Sorry to keep bothering you @dm0-

So I'm running into an issue when I try building the kernel with some additional configuration options specified.

I've forked coreos/manifest#build-1911 to: coreos/manifest@build-1911...mediadepot:mediadepot

And I forked coreos/coreos-overlay#build-1911 to: coreos/coreos-overlay@build-1911...mediadepot:mediadepot

Then I attempted to tell cork to use my manifest file by running it as follows

cork create --manifest-url=https://github.com/mediadepot/coreos-manifest.git --manifest-branch=mediadepot

cork enter
grep NAME /etc/os-release

./set_shared_user_password.sh 12345
./setup_board --board 'amd64-usr'
./build_packages --board 'amd64-usr'

setup_board and build_packages were complaining until I added amd64-usr which I found referenced in source, but I'm not sure If thats the correct value.

In any case, setup_board finishes successfully, but build_packages fails with the following error:

...
   ./tools/objtool/objtool orc generate  --no-fp  --retpoline "drivers/xen/swiotlb-xen.o";
  if [ "-pg" = "-pg" ]; then if [ drivers/xen/swiotlb-xen.o != "scripts/mod/empty.o" ]; then ./scripts/recordmcount  "drivers/xen/swiotlb-xen.o"; fi; fi;
   ./tools/objtool/objtool orc generate  --no-fp  --retpoline "drivers/xen/mcelog.o";
  x86_64-cros-linux-gnu-gcc -Wp,-MD,drivers/xen/.evtchn.o.d  -nostdinc -isystem /usr/lib/gcc/x86_64-cros-linux-gnu/7.3.0/include -I../source/arch/x86/include -I./arch/x86/include/generated  -I..>
  if [ "-pg" = "-pg" ]; then if [ drivers/xen/mcelog.o != "scripts/mod/empty.o" ]; then ./scripts/recordmcount  "drivers/xen/mcelog.o"; fi; fi;
  x86_64-cros-linux-gnu-gcc -Wp,-MD,drivers/xen/.gntdev.o.d  -nostdinc -isystem /usr/lib/gcc/x86_64-cros-linux-gnu/7.3.0/include -I../source/arch/x86/include -I./arch/x86/include/generated  -I..>
   ./tools/objtool/objtool orc generate  --no-fp  --retpoline "drivers/xen/efi.o";
  if [ "-pg" = "-pg" ]; then if [ drivers/xen/efi.o != "scripts/mod/empty.o" ]; then ./scripts/recordmcount  "drivers/xen/efi.o"; fi; fi;
  if [ "-pg" = "-pg" ]; then if [ drivers/xen/xen-acpi-processor.o != "scripts/mod/empty.o" ]; then ./scripts/recordmcount  "drivers/xen/xen-acpi-processor.o"; fi; fi;
(cat /dev/null;   cat drivers/irqchip/modules.order;   cat drivers/bus/modules.order;   cat drivers/phy/modules.order;   cat drivers/pinctrl/modules.order;   cat drivers/pwm/modules.order;   cat drivers/pci/modules.order;   cat drivers/pci/dwc/modules.order;   cat drivers/video/modules.order;   cat drivers/idle/modules.order;   cat drivers/char/ipmi/modules.order;   cat drivers/acpi/modules.order;   cat drivers/pnp/modules.order;   cat drivers/amba/modules.order;   cat drivers/clk/modules.order;   cat drivers/dma/modules.order;   cat drivers/soc/modules.order;   cat drivers/virtio/modules.order;   cat drivers/xen/modules.order;   cat drivers/tty/modules.order;   cat drivers/char/modules.order;   cat drivers/iommu/modules.order;   cat drivers/gpu/modules.order;   cat drivers/base/modules.order;   cat drivers/block/modules.order;   cat drivers/misc/modules.order;   cat drivers/mfd/modules.order;   cat drivers/nfc/modules.order;   cat drivers/macintosh/modules.order;   cat drivers/nvme/modules.order;   cat drivers/net/modules.order;   cat drivers/message/modules.order;   cat drivers/firewire/modules.order;   cat drivers/cdrom/modules.order;   cat drivers/auxdisplay/modules.order;   cat drivers/usb/modules.order;   cat drivers/usb/modules.order;   cat drivers/input/serio/modules.order;   cat drivers/input/modules.order;   cat drivers/rtc/modules.order;   cat drivers/i2c/modules.order;   cat drivers/media/modules.order;   cat drivers/ptp/modules.order;   cat drivers/power/modules.order;   cat drivers/thermal/modules.order;   cat drivers/watchdog/modules.order;   cat drivers/md/modules.order;   cat drivers/cpufreq/modules.order;   cat drivers/cpuidle/modules.order;   cat drivers/mmc/modules.order;   cat drivers/firmware/modules.order;   cat drivers/crypto/modules.order;   cat drivers/clocksource/modules.order;   cat drivers/dca/modules.order;   cat drivers/platform/modules.order;   cat drivers/mailbox/modules.order;   cat drivers/virt/modules.order;   cat drivers/perf/modules.order;   cat drivers/ras/modules.order;   cat drivers/hwtracing/intel_th/modules.order;   cat drivers/nvmem/modules.order;   cat drivers/connector/modules.order;   cat drivers/dax/modules.order;   cat drivers/scsi/modules.order;   cat drivers/ata/modules.order;   cat drivers/target/modules.order;   cat drivers/mtd/modules.order;   cat drivers/uio/modules.order;   cat drivers/vfio/modules.order;   cat drivers/block/aoe/modules.order;   cat drivers/pps/modules.order;   cat drivers/hwmon/modules.order;   cat drivers/edac/modules.order;   cat drivers/infiniband/modules.order;   cat drivers/hid/modules.order;   cat drivers/ssb/modules.order;   cat drivers/vhost/modules.order;   cat drivers/hv/modules.order;) > drivers/modules.order
   rm -f drivers/built-in.o; x86_64-cros-linux-gnu-ar rcSTPD drivers/built-in.o drivers/irqchip/built-in.o drivers/bus/built-in.o drivers/phy/built-in.o drivers/pinctrl/built-in.o drivers/pwm/built-in.o drivers/pci/built-in.o drivers/pci/dwc/built-in.o drivers/video/built-in.o drivers/idle/built-in.o drivers/char/ipmi/built-in.o drivers/acpi/built-in.o drivers/pnp/built-in.o drivers/amba/built-in.o drivers/clk/built-in.o drivers/dma/built-in.o drivers/soc/built-in.o drivers/virtio/built-in.o drivers/xen/built-in.o drivers/tty/built-in.o drivers/char/built-in.o drivers/iommu/built-in.o drivers/gpu/built-in.o drivers/base/built-in.o drivers/block/built-in.o drivers/misc/built-in.o drivers/mfd/built-in.o drivers/nfc/built-in.o drivers/macintosh/built-in.o drivers/nvme/built-in.o drivers/net/built-in.o drivers/message/built-in.o drivers/firewire/built-in.o drivers/cdrom/built-in.o drivers/auxdisplay/built-in.o drivers/usb/built-in.o drivers/input/serio/built-in.o drivers/input/built-in.o drivers/rtc/built-in.o drivers/i2c/built-in.o drivers/media/built-in.o drivers/ptp/built-in.o drivers/power/built-in.o drivers/thermal/built-in.o drivers/watchdog/built-in.o drivers/md/built-in.o drivers/cpufreq/built-in.o drivers/cpuidle/built-in.o drivers/mmc/built-in.o drivers/firmware/built-in.o drivers/crypto/built-in.o drivers/clocksource/built-in.o drivers/dca/built-in.o drivers/platform/built-in.o drivers/mailbox/built-in.o drivers/virt/built-in.o drivers/perf/built-in.o drivers/ras/built-in.o drivers/hwtracing/intel_th/built-in.o drivers/nvmem/built-in.o
make[1]: Leaving directory '/build/amd64-usr/var/tmp/portage/sys-kernel/coreos-modules-4.14.84/work/coreos-modules-4.14.84/build'
Makefile:146: recipe for target 'sub-make' failed
make: *** [sub-make] Error 2
make: Leaving directory '/build/amd64-usr/var/tmp/portage/sys-kernel/coreos-modules-4.14.84/work/coreos-modules-4.14.84/source'
 * ERROR: sys-kernel/coreos-modules-4.14.84::coreos failed (compile phase):
 *   emake failed
 *
 * If you need support, post the output of `emerge --info '=sys-kernel/coreos-modules-4.14.84::coreos'`,
 * the complete build log and the output of `emerge -pqv '=sys-kernel/coreos-modules-4.14.84::coreos'`.
 * The complete build log is located at '/build/amd64-usr/var/log/portage/sys-kernel:coreos-modules-4.14.84:20181215-211754.log'.
 * For convenience, a symlink to the build log is located at '/build/amd64-usr/var/tmp/portage/sys-kernel/coreos-modules-4.14.84/temp/build.log'.
 * The ebuild environment file is located at '/build/amd64-usr/var/tmp/portage/sys-kernel/coreos-modules-4.14.84/temp/environment'.
 * Working directory: '/build/amd64-usr/var/tmp/portage/sys-kernel/coreos-modules-4.14.84/work/coreos-modules-4.14.84'

and the contents of emerge --info '=sys-kernel/coreos-modules-4.14.84::coreos' are:

Portage 2.3.40 (python 2.7.14-final-0, !../../mnt/host/source/src/third_party/coreos-overlay/profiles/coreos/amd64/sdk, gcc-7.3.0, glibc-2.25-r11, 3.10.0-957.1.3.el7.x86_64 x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-3.10.0-957.1.3.el7.x86_64-x86_64-Intel-R-_Core-TM-_i9-8950HK_CPU_@_2.90GHz-with-glibc2.4
KiB Mem:    11105508 total,    492328 free
KiB Swap:    2097148 total,   2095100 free
sh bash 4.3_p48-r1
ld GNU ld (Gentoo 2.29.1 p3) 2.29.1
ccache version 3.2.4 [disabled]
app-shells/bash:          4.3_p48-r1::coreos
dev-lang/perl:            5.24.1-r2::portage-stable
dev-lang/python:          2.7.14-r1::portage-stable, 3.6.5::portage-stable
dev-util/ccache:          3.2.4::portage-stable
dev-util/cmake:           3.9.6::portage-stable
dev-util/pkgconfig:       0.28-r1::portage-stable
sys-apps/baselayout:      3.6.3::coreos
sys-apps/sandbox:         2.12::portage-stable
sys-devel/autoconf:       2.13::portage-stable, 2.69-r4::portage-stable
sys-devel/automake:       1.10.3-r3::portage-stable, 1.15.1-r2::portage-stable
sys-devel/binutils:       2.29.1-r1::portage-stable
sys-devel/gcc:            7.3.0::portage-stable
sys-devel/gcc-config:     1.7.3::portage-stable
sys-devel/libtool:        2.4.6::portage-stable
sys-devel/make:           4.1-r1::portage-stable
sys-kernel/linux-headers: 4.4::portage-stable (virtual/os-headers)
sys-libs/glibc:           2.25-r11::coreos
Repositories:

portage-stable
    location: /mnt/host/source/src/third_party/portage-stable
    priority: -1000

x-crossdev
    location: /usr/local/portage/crossdev
    masters: portage-stable coreos
    priority: 0

coreos
    location: /mnt/host/source/src/third_party/coreos-overlay
    masters: portage-stable
    priority: 1

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA -@CHROMEOS"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -mtune=generic"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc/hosts /etc/locale.gen /etc/localtime /etc/make.conf"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe -mtune=generic"
DISTDIR="/mnt/host/source/.cache/distfiles"
EMERGE_DEFAULT_OPTS="--oneshot"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs buildpkg clean-logs compressdebug config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox multilib-strict network-sandbox news parallel-fetch parallel-install preserve-libs protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="     https://storage.core-os.net/mirror/portage-stable/     https://storage.core-os.net/mirror/coreos/     http://distfiles.gentoo.org/ "
INSTALL_MASK="   /usr/lib*/*.la   /etc/init.d /etc/conf.d "
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en"
MAKEOPTS="--jobs=4 --load-average=8"
PKGDIR="/var/lib/portage/pkgs"
PORTAGE_BINHOST="http://builds.developer.core-os.net/sdk/amd64/1911.3.0/pkgs/ http://builds.developer.core-os.net/sdk/amd64/1911.3.0/toolchain/ http://builds.developer.core-os.net/sdk/amd64/1911.4.0/pkgs/ http://builds.developer.core-os.net/sdk/amd64/1911.4.0/toolchain/"
PORTAGE_BUNZIP2_COMMAND="lbunzip2"
PORTAGE_BZIP2_COMMAND="lbzip2"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="acl amd64 bindist bzip2 cli cros_host crypt cxx dri expat gdbm hardened iconv ipv6 libtirpc man modules ncurses nls nptl pcre pie readline seccomp ssl ssp systemd udev unicode xattr zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon plan sheets stage words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64 pc xen" INPUT_DEVICES="libinput keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LLVM_TARGETS="X86" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-0" POSTGRES_TARGETS="postgres9_5 postgres10" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_6" QEMU_SOFTMMU_TARGETS="x86_64 i386" RUBY_TARGETS="ruby23" USERLAND="GNU" VIDEO_CARDS="amdgpu fbdev intel nouveau radeon radeonsi vesa dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

I took a look at the full build log sys-kernel:coreos-modules-4.14.84:20181215-211754.log but it was honestly full of commands, didnt see anything related to an error.

Any ideas?

@dm0-

This comment has been minimized.

Copy link
Member

dm0- commented Dec 16, 2018

I don't see the error in the log lines pasted. Searching for *** will usually find the Make rule that failed.

@AnalogJ

This comment has been minimized.

Copy link

AnalogJ commented Dec 16, 2018

Interesting. I re-ran ./build_packages --board 'amd64-usr' without doing anything else, and it work successfully.

I'm going to try a clean build again and see if the issue happens again.

@AnalogJ

This comment has been minimized.

Copy link

AnalogJ commented Dec 16, 2018

While my VM is still rebuilding the image from scratch, i attempted to run my previously created ISO, and I'm not seeing my custom os-release name when looking on the file system

https://github.com/mediadepot/coreos-manifest/blob/56c751c63f2769cc607d9d59033a7c87c0c34676/os-release#L1

I did notice that theres a default.xml and a master.xml file in the manifest repo, and I had only updated the master.xml file. Is there some additional flags I'm missing to tell cork to use master.xml?

@dm0-

This comment has been minimized.

@AnalogJ

This comment has been minimized.

Copy link

AnalogJ commented Dec 19, 2018

Sorry to keep bugging you @dm0-

So I've got my image successfully building, and I've verified the ISO that I'm booting has my modifications in /etc/lsb-release

However I can't figure out how to tell the coreos-install script to install using the files within the ISO, it seems to want to download the latest stable version from https://stable.release.core-os.net

screen shot 2018-12-18 at 10 18 56 pm

I noticed that there's a -f IMAGE option for coreos-install but I couldn't find a coreos_production_image.bin anywhere inside the booted ISO filesystem.

I guess my question boils down to: is there a way to install a custom ISO offline (forcing the installer to use the data in the booted ISO, rather than downloading a bin file from the coreos website)

If not, is the correct option then to host my own images and use the -b BASEURL flag with my server when running coreos-install?

Once again, appreciate all your help.

@bgilbert

This comment has been minimized.

Copy link
Member

bgilbert commented Dec 19, 2018

is there a way to install a custom ISO offline (forcing the installer to use the data in the booted ISO, rather than downloading a bin file from the coreos website)

The ISO images aren't structured to allow this. coreos-install always installs a downloaded or externally-provided image.

If not, is the correct option then to host my own images and use the -b BASEURL flag with my server when running coreos-install?

Yep.

For future reference, coreos-dev is the right place to get help building a custom Container Linux image. I'll close this issue.

@bgilbert bgilbert closed this Dec 19, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment