1

Before everything I would like to apologize, since english is not my mother tongue, I might do some grammar mistakes, I'm deeply sorry for the inconvinience.
If i'm asking for help, it is because I've searched everywhere but can't make a proper installation of GRUB2 on my virtualbox because of the way I wan't it installed for a project.

WHAT AM I TRYING TO DO:
I'm trying to install grub2 on a HDD but I want it to be OS independant. I also want it to be able to show a menu (then to have a proper grub.cfg) and to be installed from a linux LiveCD. I would prefer to not have to install Linux intirelly to make it work. Here is the trick : It should only be in commands since it has to be automatizable !

SITUATION:
I'm using virtual box with a virtual HDD of ~12~Go. The HDD is empty (untouched). I'm running Linux Mint from the iso(It is the LiveCD since it is not installed on the HDD). The first partition "/dev/sda1" is the one that should recieve the grub.

WHAT I TRIED:
Once on Linux Mint I partitioned the HDD in two partitions of 6 Go each using parted, they're formated in ext4 both. I've labeled the HDD to MBR. Then I mounted "/dev/sda1" on "/mnt" and used : sudo grub-install --root-directory=/mnt /dev/sda wich gave me that answer :

grub-probe: error: failed to get canonical path of `/cow'.
Installing for i386-pc platform.
Installation finished. No error reported.

If i try to boot now, grub start normally in text mode, yet it doesn't show the splash menu
I then, wen't back to the LiveCD to run this commands : sudo grub-mkconfig -o /mnt/boot/grub/grub.cfg which gave me : usr/sbin/grub-probe: error: failed to get canonical path of `/cow'. . Obviously, there is no sign of grub.cfg anywhere afterward.

anyway Thank you for your time, please, if you have any idea of how to do so, tell me T_T.

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.