I'm trying to install GRUB onto a separate partition who's volume shares a Windows installation. After having pulled, configured, and made GRUB, I can't grub-mkconfig
. Doing some research, I found: grub-probe: error: failed to get canonical path of /cow which is exactly my problem. Taking away that I need to chroot, but no matter what I do, I can't get permission for /bin/bash.
sudo chroot /mnt
returns /bin/bash: Permission denied
.
sudo chmod 777 /bin/bash
(and variations:sudo chmod 777 .
,sudo chmod 777 /mnt/bin/*
, etc.)sudo chmod 755 /bin/bash
(and variations similar to above)for dir in proc dev sys etc bin sbin var usr lib lib64 tmp; do sudo mkdir /mnt/chrootdir/$dir && sudo mount --bind /$dir /mnt/chrootdir/$dir
(I followed this guide which will explain where /mnt/chrootdir came from)- /mnt/bin/bash exists
This isn't an installation of Ubuntu 18.04, just "trying" it. My process so far has been:
- Download grub
- Download stuff grub needs (flex, bison, gcc)
./configure
make
sudo mount /grub/partition /mnt
grub-install --boot-directory=/mnt/boot --force
grub-mkconfig -o /mnt/boot/grub/grub.cfg
<-- "Cannot get canonical path for /cow" which led me to the earlier link.
What am I doing wrong? I tried doing my due diligence so I apologize for making another thread related to this (there seems to be a ton of them) but I really am lost.
sudo apt install grub-pc
orsudo apt install grub-efi
depending on your system). – rexypoo Feb 11 '20 at 23:30Once I get GRUB working, I plan to use my Windows + GRUB VM to debug GRUB because I need to extend its functionality. So, while it's not common to configure and make grub, I will need to do that in the long run when I add my functionality to it. I'm currently just trying to be able to step through unmodified GRUB to get the hang of using GDB and this new dev environment.
– Harin Feb 11 '20 at 23:36