add a if statment to prevent a possible error
This commit is contained in:
parent
f249476ea7
commit
0a47dfe5d5
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Reference in New Issue