Skip to content
This repository has been archived by the owner on Aug 25, 2021. It is now read-only.

Commit

Permalink
grub: find boot partition and use it directly
Browse files Browse the repository at this point in the history
On UEFI systems the grub $root might be the /boot/efi/
partition and not the /boot/ partition so let's search
for the partition with the `boot` label and then detect
the file directly.

Fixes #51
  • Loading branch information
dustymabe committed Mar 5, 2019
1 parent e3bd9c9 commit 552edb5
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions grub/02_ignition_firstboot
@@ -1,7 +1,13 @@
#!/bin/sh
exec tail -n +3 $0
# We store the file on the /boot/ partition so find the
# boot partition. On UEFI this may different than the grub
# $root so we search for it here.
# https://github.com/coreos/ignition-dracut/issues/51
search --set=bootpart --label boot
# Determine if this is a first boot and set the variable
# to be used later on the kernel command line.
set ignition_firstboot=""
# Determine if this is a first boot.
if [ -f "/ignition.firstboot" ]; then
if [ -f "(${bootpart})/ignition.firstboot" ]; then
set ignition_firstboot="ignition.firstboot"
fi

0 comments on commit 552edb5

Please sign in to comment.