Re: grub-install Cannot find a GRUB drive for /dev/sdXY

2021-09-16 Thread Musbur

Hi Andrei,

thanks for your reply. I tried both /dev/sda and /dev/sda2. I ended up 
solving the problem by making a total of three partitions: A small one 
for EFI, another one for /boot, and the encrypted main partition. Small 
snag was that the Debian installer cannot be persuaded to install the 
grub EFI into the EFI partition on the mobile disk but on the one in the 
built-in disk. But that was easily fixed by by mounting the mobile EFI 
partition, correcting /sys/fstab and re-installing grub and kernel.



Am 16.09.2021 06:44 schrieb Andrei POPESCU:

On Mi, 15 sep 21, 05:49:01, Musbur wrote:


Now I'm in my "full" Debian system. Next:
# grub-install /dev/sda2
# apt install [linux kernel]
# update-grub
Error: Cannot find GRUB drive for /dev/sda2


Unless you have a good reason to do otherwise grub is installed in the
MBR of the drive, so you probably want '/dev/sda' instead of
'/dev/sda2'.

Hope this helps,
Andrei




Re: grub-install Cannot find a GRUB drive for /dev/sdXY

2021-09-15 Thread Andrei POPESCU
On Mi, 15 sep 21, 05:49:01, Musbur wrote:
> 
> Now I'm in my "full" Debian system. Next:
> # grub-install /dev/sda2
> # apt install [linux kernel]
> # update-grub
> Error: Cannot find GRUB drive for /dev/sda2

Unless you have a good reason to do otherwise grub is installed in the 
MBR of the drive, so you probably want '/dev/sda' instead of 
'/dev/sda2'.

Hope this helps,
Andrei
-- 
http://wiki.debian.org/FAQsFromDebianUser


signature.asc
Description: PGP signature


grub-install Cannot find a GRUB drive for /dev/sdXY

2021-09-14 Thread Musbur

Hello,

I somehow managed to screw up my /boot partition. Now I'm trying to 
re-install it by booting from a Debian installer stick. After network 
configuration, I do this:


1) Mount the root partition at /
2) # for s in dev sys proc; do mount --bind /$s /mnt/$s; done
3) # mount --bind /etc/resolv.conf /mnt/etc/resolv.conf
4) # chroot /mnt
5) mount /dev/sda2 /boot

Now I'm in my "full" Debian system. Next:
# grub-install /dev/sda2
# apt install [linux kernel]
# update-grub
Error: Cannot find GRUB drive for /dev/sda2

I tried both the grub-pc as well as the grub-efi versions. I don't 
really know what the difference is and how it works, but with EFI I get 
a similar error (something like EFI directory not found)


BTW /dev/sda is an external SSD connected via USB3. I've been using this 
setup for years to boot my employer's company Windows laptop as my 
private Linux machine (not touching the internal SSD at all). It stopped 
working from one day to the next, no idea why.


I've searched the Internet up and down for the error message, but I 
couldn't find anything useful.