Skip to content

Commit

Permalink
oemid: Use labels to discover root/boot
Browse files Browse the repository at this point in the history
Requires: coreos/fedora-coreos-config#7

Prep for dropping LVM - but in general this adds a level of flexibility,
if someone wants to use some other filesystem or LVM setup they
can just provide those same labels.
  • Loading branch information
cgwalters committed Sep 17, 2018
1 parent 377068b commit e66a768
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions coreos-oemid
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,10 @@ gf() {
}

gf run
gf list-filesystems |tee ${tmpd}/filesystems.txt
vg=/dev/coreos/root
if ! grep -qFe "${vg}" ${tmpd}/filesystems.txt; then
sed -e 's,^,# ,' < ${tmpd}/filesystems.txt
fatal "Missing LVM VG ${vg} in filesystems"
fi
gf mount "${vg}" /
gf mount "/dev/sda1" /boot
root=$(gf findfs-label root)
gf mount "${root}" /
boot=$(gf findfs-label boot)
gf mount "${boot}" /boot
# Not used currently
#stateroot=/ostree/deploy/$(gf ls /ostree/deploy)
#rootdir=${stateroot}/deploy/$(gf ls ${stateroot}/deploy | grep -v \.origin)
Expand Down

0 comments on commit e66a768

Please sign in to comment.