Skip to content

Commit

Permalink
Mount/unmount efivars
Browse files Browse the repository at this point in the history
  • Loading branch information
mtwebster authored and clefebvre committed Feb 15, 2022
1 parent 3a6703d commit 6dc1df3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions usr/lib/live-installer/installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ def start_installation(self):
if(not os.path.exists("/source")):
os.mkdir("/source")

os.system("umount --force /target/sys/firmware/efi/efivars")
os.system("umount --force /target/dev/shm")
os.system("umount --force /target/dev/pts")
os.system("umount --force /target/dev/")
Expand Down Expand Up @@ -100,6 +101,10 @@ def start_installation(self):
os.system("mv /target/etc/resolv.conf /target/etc/resolv.conf.bk")
os.system("cp -f /etc/resolv.conf /target/etc/resolv.conf")

if os.path.exists("/sys/firmware/efi/efivars"):
os.system("mkdir -p /target/sys/firmware/efi/efivars")
os.system("mount --bind /sys/firmware/efi/efivars /target/sys/firmware/efi/efivars/")

kernelversion= subprocess.getoutput("uname -r")
os.system("cp /run/live/medium/live/vmlinuz /target/boot/vmlinuz-%s" % kernelversion)
found_initrd = False
Expand Down Expand Up @@ -628,6 +633,10 @@ def finish_installation(self):

# now unmount it
print(" --> Unmounting partitions")

if os.path.exists("/target/sys/firmware/efi/efivars"):
os.system("umount --force /target/sys/firmware/efi/efivars")

os.system("umount --force /target/dev/shm")
os.system("umount --force /target/dev/pts")
if self.setup.gptonefi:
Expand Down

0 comments on commit 6dc1df3

Please sign in to comment.