Very specific initramfs image problem

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

 



Good morning.

I'm trying to achieve a very specific thing and I'm wondering if you can point
me in the right direction.

I have a system that sets up dual-boot workstations and makes grub the
bootloader. Now, I need to provide 2 network boot targets: one that will set
grub default to windows, another one to fedora. For that, I have a script that
updates grubenv; now, I need to package it into initramfs.

Before dracut/systemd what I did is just took mkinitrd result, unpacked, added
my script to it, and modified init to run it and then reboot. With dracut I was
hoping to try to reuse it as much as possible, as to run grub2-editenv I need
/boot mounted - means device detection and that's something I have to use
dracut/udev for.

I have the following ideas so far:
- just stick my code somehow into mount triggers, and when root is mounted
  mount /boot, run, and then reboot -f
- stick my code into pre-pivot (mount /boot and edit env etc), then instead of
  initrd-switch-root.target do reboot.target

I was wondering if there are better and/or cleaner ways for doing that (I'd
probably start implementing a module for the second one in the meantime).

Thanks!
--
This message represents the official view of the voices in my head.
--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux