grub kurulum düzeltildi

This commit is contained in:
Furkan Kalkan 2016-10-11 11:08:34 +03:00 committed by GitHub
parent 8d39877029
commit b4f3e7fef3
1 changed files with 8 additions and 7 deletions

View File

@ -127,27 +127,28 @@ def formatPart(part):
def hedefBagla(hedef): def hedefBagla(hedef):
os.system("mount "+hedef+" /mnt") os.system("mount "+hedef+" /mnt")
d.infobox(text="hedef disk bağlandı.") d.infobox(text="hedef disk bağlandı.")
sistemKopyala() sistemKopyala(hedef)
def sistemKopyala(): def sistemKopyala(hedef):
os.system("clear") os.system("clear")
#print("\033c") #print("\033c")
os.system("acp -g -axnu / /mnt") os.system("acp -g -axnu / /mnt")
#os.system("cp -axvnu / /mnt") #os.system("cp -axvnu / /mnt")
initrdOlustur() initrdOlustur(hedef)
def initrdOlustur(): def initrdOlustur(hedef):
os.system("mount --bind /dev /mnt/dev") os.system("mount --bind /dev /mnt/dev")
os.system("mount --bind /sys /mnt/sys") os.system("mount --bind /sys /mnt/sys")
os.system("mount --bind /proc /mnt/proc") os.system("mount --bind /proc /mnt/proc")
os.system('chroot /mnt dracut --no-hostonly --add-drivers "ahci" -f /boot/initramfs') os.system('chroot /mnt dracut --no-hostonly --add-drivers "ahci" -f /boot/initramfs')
if d.yesno(text="Grub kurmak istiyor musunuz ?") == "ok": if d.yesno(text="Grub kurmak istiyor musunuz ?") == "ok":
grubKur() grubKur(hedef)
else: else:
kurulumBitir() kurulumBitir()
def grubKur(): def grubKur(hedef):
os.system("grub-install --boot-directory=/mnt/boot /dev/sdb") hedef = hedef[:-1]
os.system("grub-install --boot-directory=/mnt/boot " + hedef)
os.system("chroot /mnt grub-mkconfig -o /boot/grub/grub.cfg") os.system("chroot /mnt grub-mkconfig -o /boot/grub/grub.cfg")
kurulumBitir() kurulumBitir()