I have a isolinux.cfg and grub.cfg file in which I invoke a vmlinuz kernel. I already append some kernel parameters but I would like to mount my device /dev/sda1 on boot before the vmlinuz parameter invokes my installation.
In my case the kernel parameter: coreos.inst=yes will trigger the installation process to automatically start, but in beforehand the device should get mounted.
grub.cfg
menuentry 'Fedora CoreOS (Fast install)' --class fedora --class gnu-linux --class gnu --class os {
linux /images/vmlinuz mitigations=auto,nosmt systemd.unified_cgroup_hierarchy=0 coreos.liveiso=fedora-coreos-31.20200113.3.1 rd.neednet=1 ip=dhcp ignition.firstboot ignition.platform.id=metal coreos.inst.ignition_url=/mnt/ignition.ign coreos.inst.install_dev=/dev/nvme0n1 coreos.inst.image_url=/mnt/fedora_coreos.raw.xz coreos.inst=yes coreos.inst.insecure
initrd /images/initramfs.img
}
isolinux.cfg
label linux
menu label ^Fedora CoreOS (Fast install)
menu default
kernel /images/vmlinuz
append initrd=/images/initramfs.img mitigations=auto,nosmt systemd.unified_cgroup_hierarchy=0 coreos.liveiso=fedora-coreos-31.20200113.3.1 rd.neednet=1 ip=dhcp ignition.firstboot ignition.platform.id=metal coreos.inst.ignition_url=/mnt/ignition.ign coreos.inst.install_dev=/dev/nvme0n1 coreos.inst.image_url=/mnt/fedora_coreos.raw.xz coreos.inst=yes coreos.inst.insecure
So in the end I would like that /mnt/ is the mounted device: /dev/sda1
This most likely would mean to execute something like this: mount -t auto -v /dev/sdb1 /mnt/
Is this somehow possible to do as an appended option on the initrd or kernel? (Within those configuration files.)
If not, what would be the approach to do something similar without changing initramfs.img or vmlinuz file?
PS: It's not necessary that this approach works for both, legacy and efi boot. One would be enough, of course it would be nice if it's something that works in both cases.
Edit: It might be possible with the kernel parameter: systemd.* for example systemd.run=mount something like this.