ostree host from scratch w/o anaconda

I am trying to add OSTree support in Photon. After creating a compose
server, I am learning to create a host installation. Because photon is not
using Anaconda, I am trying to see  how fedora-atomic creates a host and
building a host image from scratch by looking at the code in
ostreepayload.py at


I mounted a disk partition to my running machine at /mnt/ostreeroot/ and
was able to successfully run following commands.

$ ostree admin --sysroot=/mnt/ostreeroot/ init-fs /mnt/ostreeroot/

$ ostree remote add --repo=/mnt/ostreeroot/ostree/repo
--set=gpg-verify=false fedora-atomic

$ ostree pull --repo=/mnt/ostreeroot/ostree/repo/ fedora-atomic

$ ostree admin --sysroot=/mnt/ostreeroot/ os-init fedora-atomic

$ ostree admin --sysroot=/mnt/ostreeroot/ deploy --os=fedora-atomic

At this point I assumed we need to install boot loader and run following
command which I think is not supposed to be called directly, which is
causing some errors.

$ ostree admin instutil --sysroot=/mnt/ostreeroot/ grub2-generate
generate_config: assertion failed: (grub2_boot_device_id != NULL)
Aborted (core dumped)

And running grub2-15_ostree also returns errors.

$ ./src/boot/grub2-15_ostree
This script must be run as a child of grub2-mkconfig

Now I am clueless and need help.

1) How to install and configure the right bootloader? How can I run
grub2-15_ostree as a child of grub2-mkconfig.

2) I am confused on how to replicate _copyBootloaderData (in
rpmostreepayload.py) manually on my
side. What should be returned by .getTargetPhysicalRoot() and

3) Any suggestion where to look for help on creating Host from scratch
without anaconda, and how bootloader works in ostree world? Is this the
right direction I am going so that at the end I could create photon ostree
host? Am I executing the above commands in right way?


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]