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

Customizing LiveISO for BareMetal #377

Closed
imranrazakhan opened this issue Feb 6, 2020 · 5 comments
Closed

Customizing LiveISO for BareMetal #377

imranrazakhan opened this issue Feb 6, 2020 · 5 comments

Comments

@imranrazakhan
Copy link

I customized LiveISO with following steps, Looking for suggestion about this process or any improvement recommendations (we can add in documentation)

  • Embed ignition in LiveISO
sudo podman run --pull=always --privileged --rm \
    -v /dev:/dev -v /run/udev:/run/udev -v .:/data \
    quay.io/coreos/coreos-installer:release \
    iso embed /data/fedora-coreos-31.20200118.3.0-live.x86_64.iso -c /data/config.ign -f
  • Mounted ISO from step1 and copied content in local directory like below
mkdir -p ~/mnt/fcosiso
mount -o loop fedora-coreos-31.20200118.3.0-live.x86_64.iso ~/mnt/fcosiso/
mkdir -p ~/fcos_usb_build/
rsync -av ~/mnt/fcosiso/ ~/fcos_usb_build/
sudo umount ~/mnt/fcosiso
  • Changed isolinux.cfg to add static IP support
vi ~/fcos_usb_build/isolinux/isolinux.cfg
append initrd=/images/initramfs.img mitigations=auto,nosmt systemd.unified_cgroup_hierarchy=0 coreos.liveiso=fedora-coreos-31.20200118.3.0 rd.neednet=1 **ip=192.168.127.11::192.168.127.254:255.255.255.0:::off** ignition.firstboot ignition.platform.id=metal
  • Create customized ISO
cd ~/fcos_usb_build
mkisofs -o fcos.iso -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -V "FCOSISO" -boot-load-size 4 -boot-info-table -R -J -v -T .

I tested resulted ISO and its working.

@bgilbert
Copy link
Contributor

bgilbert commented Feb 7, 2020

If the only reason you're customizing the ISO is to configure networking using kernel arguments, we could support that directly in coreos-installer iso embed. All it'd need to do is add the kargs to /etc/cmdline.d/coreos-installer.conf within the embedded cpio archive.

@imranrazakhan
Copy link
Author

@bgilbert intention is not only to add/override kargs, i am also looking for a way to add custom directory.

As in CentOS if we create custom resources under isolinux directory then these custom resources available at /mnt/install/repo/**custom** during installation.

@bgilbert
Copy link
Contributor

We now have coreos-installer iso customize, which provides several mechanisms for customizing an ISO image. For example, the tool can configure kernel arguments, network settings, and coreos-installer install command-line arguments. It can also inject Ignition configs for the live and/or installed system, if you need to write arbitrary files or systemd units.

@khaaliid
Copy link

@bgilbert , I went through the coreos-installer docs and I am not able to find any way to add an repo contains a custom RPMs. Is that doable in the current release ?

@jlebon
Copy link
Member

jlebon commented Feb 22, 2022

@bgilbert , I went through the coreos-installer docs and I am not able to find any way to add an repo contains a custom RPMs. Is that doable in the current release ?

This is more closely related to #681, which is still in our backlog. Once we have that and working for live systems too, I could imagine an iso/pxe customize sugar which wraps it.

For now, you'll need to do this manually similarly to how it's documented in https://docs.fedoraproject.org/en-US/fedora-coreos/os-extensions/ (but note these steps currently do not work for live systems if that's your target use case).

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

No branches or pull requests

5 participants