this should finally setup grub properly, still need to clean up the code though