Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/lib
diff options
context:
space:
mode:
authoradvaithm <advaith.madhukar@gmail.com>2021-03-12 13:42:52 +0530
committeradvaithm <advaith.madhukar@gmail.com>2021-03-12 13:42:52 +0530
commit0a47dfe5d5bbc795366828fb7e453a8ef9d307cf (patch)
tree541ef90524e1eda81450665d865a530b48df02aa /archinstall/lib
parentf249476ea7c296459d175262f45c1f8273c6e8ea (diff)
add a if statment to prevent a possible error
Diffstat (limited to 'archinstall/lib')
-rw-r--r--archinstall/lib/installer.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/archinstall/lib/installer.py b/archinstall/lib/installer.py
index 176b26f4..463f104a 100644
--- a/archinstall/lib/installer.py
+++ b/archinstall/lib/installer.py
@@ -366,6 +366,8 @@ class Installer():
sys_command('/usr/bin/arch-chroot grub-mkconfig -o /boot/grub/grub.cfg')
else:
root_device = subprocess.check_output(f'basename "$(readlink -f "/sys/class/block/{self.partition.path}/..")',shell=True).decode().strip()
+ if root_device == "block":
+ root_device = f"{self.partition.path}"
o = b''.join(sys_command(f'/usr/bin/arch-chroot {self.mountpoint} grub-install --target=--target=i386-pc /dev/{root_device}'))
sys_command('/usr/bin/arch-chroot grub-mkconfig -o /boot/grub/grub.cfg')
else: