GNOME Bugzilla – Bug 740697
grub2: If using --sysroot, run in chroot
Last modified: 2014-11-25 17:25:01 UTC
In Anaconda, we're using "ostree admin --sysroot=/mnt/sysimage instutil set-kargs", and it was working before, but newer versions of lorax strip out /etc/system-release which grub2 wants. That was wrong anyways as we want the /etc/system-release from the target root. (Man, grub2 sucks...give me a declarative config file format I can just write)
Created attachment 291477 [details] [review] grub2: If using --sysroot, run in chroot
Review of attachment 291477 [details] [review]: If I understand the issue correctly, basically grub2 hard-codes reading from "/etc/system-release", so you need to manipulate the file system to trick it into reading a different file. That right? A slightly easier way to check for root might be !g_file_has_parent (self->sysroot->path, NULL) but I leave that up to you. Otherwise patch looks okay to me.
Attachment 291477 [details] pushed as 1218799 - grub2: If using --sysroot, run in chroot