Skip to content
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

WIP: remove anaconda #311

Closed
wants to merge 6 commits into from
Closed

WIP: remove anaconda #311

wants to merge 6 commits into from

Conversation

@ajeddeloh
Copy link
Contributor

ajeddeloh commented Feb 4, 2019

Very rough atm

@dustymabe

This comment has been minimized.

Copy link
Member

dustymabe commented Feb 4, 2019

I asked andrew if he could post this. very much a WIP so hold off on deep review

@dustymabe

This comment has been minimized.

Copy link
Member

dustymabe commented Feb 5, 2019

two items identified by andrew as holding up this work:

1 - ostreedev/ostree#1774 - so we don't have to hardcode a grub config (for now). I've asked robert to take a look.
2 - making sure firstboot processes don't run - it seems anaconda does the right thing here, but since we aren't using anaconda we need to make sure we disable whatever mechanism is causing it to start in the ostree itself. We should be able to add something to our postprocess in the manifest.yaml.

@rfairley

This comment has been minimized.

Copy link
Member

rfairley commented Feb 15, 2019

Built a few ostree RPMs that can be used for dev purposes for now:
f28: https://koji.fedoraproject.org/koji/taskinfo?taskID=32835828
f29: https://koji.fedoraproject.org/koji/taskinfo?taskID=32835841
f30: https://koji.fedoraproject.org/koji/taskinfo?taskID=32835878

These RPMs are built from the tree at https://github.com/rfairley/ostree/commits/rfairley-bls-config-dev-rpm.

I have tested the f29 RPM on Fedora Atomic Host 29. Executing the commands in this comment should now work to avoid the hardcoded grub config part.

The RPMs ostree and ostree-libs should be installed - the other RPMs being optional. On F29AH I did this:

curl --remote-name-all https://kojipkgs.fedoraproject.org//work/tasks/5842/32835842/ostree-2019.1.16.g98b27889-5.fc29.x86_64.rpm https://kojipkgs.fedoraproject.org//work/tasks/5842/32835842/ostree-libs-2019.1.16.g98b27889-5.fc29.x86_64.rpm
rpm-ostree override replace ostree-*

Running the same ostree commands as used in this PR, but with the following appended to rootfs/ostree/repo/config, should avoid running into the assertion in ostreedev/ostree#1774 (comment).

# in rootfs/ostree/repo/config:
[sysroot]
bootloader=none
@ajeddeloh ajeddeloh force-pushed the ajeddeloh:bottlecap branch from 2bb8556 to 85a9557 Feb 18, 2019
@ajeddeloh

This comment has been minimized.

Copy link
Contributor Author

ajeddeloh commented Feb 18, 2019

@dustymabe updated to be in sync with latest-ish master. Got a lot of hacks still in there. metal-{bios/uefi} are not implemented yet. doesn't use the new ostree bits yet. but you can build an image and play with anaconda (will need to edit the grub config to not mask the unit via kernel command line).

@ajeddeloh ajeddeloh force-pushed the ajeddeloh:bottlecap branch from 85a9557 to 1103d6d Feb 18, 2019
@dustymabe

This comment has been minimized.

Copy link
Member

dustymabe commented Feb 19, 2019

thanks @ajeddeloh !

iso_location="${workdir}/installer/$(basename "${INSTALLER}")"
checksum_location="${workdir}/installer/$(basename "${INSTALLER_CHECKSUM}")"
rm -f "$(pwd)/diskimage.raw"
truncate -s 8G "$(pwd)/diskimage.raw"

This comment has been minimized.

Copy link
@cgwalters

cgwalters Feb 19, 2019

Member

Let's get the size from image.yaml.

This comment has been minimized.

Copy link
@ajeddeloh

ajeddeloh Feb 23, 2019

Author Contributor

Do we parse image.yaml into anything readable by bash anywhere?

# HACK ALERT - wait for partition rescans
sleep 2
# FIXME ostree needs symlinks
mkfs.ext2 "$(getpart ${disk} 1)" -L boot

This comment has been minimized.

Copy link
@cgwalters

cgwalters Feb 19, 2019

Member

ext 2 ?

# FIXME ostree needs symlinks
mkfs.ext2 "$(getpart ${disk} 1)" -L boot
mkfs.fat "$(getpart ${disk} 2)" -n EFI-SYSTEM
mkfs.xfs "$(getpart ${disk} 4)" -L root

This comment has been minimized.

Copy link
@cgwalters

cgwalters Feb 19, 2019

Member

Currently we also force on -m reflink=1 but eh...I guess we can just take that default from mkfs in the near future.

ostree admin init-fs rootfs
ostree pull-local "$ostree" --repo rootfs/ostree/repo
ostree admin os-init fedora-coreos --sysroot rootfs
ostree admin deploy "$ref" --sysroot rootfs --os fedora-coreos

This comment has been minimized.

Copy link
@cgwalters

cgwalters Feb 19, 2019

Member

The fedora-coreos values are ${name} in cmd-build.sh.

checksum=$(cat rootfs/boot/ostree/*/{vm*,init*} | sha256sum | cut -d ' ' -f 1)
vmlinuz=$(basename rootfs/boot/ostree/*/vm*)
initrd=$(basename rootfs/boot/ostree/*/init*)
echo "Checksum is: $checksum initrd is $initrd vmlinuz is $vmlinuz"

This comment has been minimized.

Copy link
@cgwalters

cgwalters Feb 19, 2019

Member

This data is more canonically stored in the BLS fragment.

insmod xfs
set root='hd0,gpt1'
set hash="HASHHASH"
linux16 /ostree/fedora-coreos-${hash}/VMLINUZ no_timer_check console=tty0 console=ttyS0,115200n8 net.ifnames=0 biosdevname=0 ip=dhcp rd.neednet=1 rw $ignition_firstboot root=LABEL=root ostree=/ostree/boot.1/fedora-coreos/${hash}/0 coreos.oem.id=qemu systemd.mask=systemd-firstboot.service

This comment has been minimized.

Copy link
@cgwalters

cgwalters Feb 19, 2019

Member

Yeah, definitely better to use the data from the BLS here right?

This comment has been minimized.

Copy link
@ajeddeloh

ajeddeloh Feb 19, 2019

Author Contributor

Still working on getting that working, but yeah that's the idea at least for the time being

@cgwalters

This comment has been minimized.

Copy link
Member

cgwalters commented Mar 1, 2019

Since #380 landed as promised I'm happy to do the rebase of this PR myself - do you have any outstanding changes?

@nhorman

This comment has been minimized.

Copy link

nhorman commented Mar 20, 2019

@cgwalters if you can rebase, I can pull this in

@nullr0ute

This comment has been minimized.

Copy link

nullr0ute commented Apr 18, 2019

Fedora IoT still uses anaconda support in in rpm-ostree and related because of the status of certain required HW support. I'm not sure how this relates to assembler but please be aware of other consumers and ensure coordination.

@ajeddeloh

This comment has been minimized.

Copy link
Contributor Author

ajeddeloh commented Apr 18, 2019

@nullr0ute this is just for COSA, which is only used for building FCOS/RHCOS. Anaconda support will remain in rpm-ostree.

@cgwalters

This comment has been minimized.

Copy link
Member

cgwalters commented Apr 22, 2019

@nullr0ute this is just for COSA, which is only used for building FCOS/RHCOS.

Right, though personally I'd like to at least have COSA used to build Silverblue and other things.

Anaconda support will remain in rpm-ostree.

Technically it's the inverse, Anaconda supports rpm-ostree via rpmostreepayload.py; I don't personally see us adding many new features but I will certainly personally help maintain the code and fix bugs if any important ones come up.

@bgilbert bgilbert added this to In Progress in Fedora CoreOS preview via automation May 17, 2019
@ajeddeloh

This comment has been minimized.

Copy link
Contributor Author

ajeddeloh commented Jun 14, 2019

Closing in favor of a much less stale #556

@ajeddeloh ajeddeloh closed this Jun 14, 2019
@bgilbert bgilbert removed this from In Progress in Fedora CoreOS preview Jun 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

6 participants
You can’t perform that action at this time.