Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #239991 > unrolled thread

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

Started byMusbur <musbur@posteo.org>
First post2021-09-15 07:50 +0200
Last post2021-09-16 14:40 +0200
Articles 3 — 2 participants

Back to article view | Back to linux.debian.user


Contents

  grub-install Cannot find a GRUB drive for /dev/sdXY Musbur <musbur@posteo.org> - 2021-09-15 07:50 +0200
    Re: grub-install Cannot find a GRUB drive for /dev/sdXY Andrei POPESCU <andreimpopescu@gmail.com> - 2021-09-16 06:50 +0200
      Re: grub-install Cannot find a GRUB drive for /dev/sdXY Musbur <musbur@posteo.org> - 2021-09-16 14:40 +0200

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

FromMusbur <musbur@posteo.org>
Date2021-09-15 07:50 +0200
Subjectgrub-install Cannot find a GRUB drive for /dev/sdXY
Message-ID<CXvXX-5EO-1@gated-at.bofh.it>
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.

[toc] | [next] | [standalone]


#240035

FromAndrei POPESCU <andreimpopescu@gmail.com>
Date2021-09-16 06:50 +0200
Message-ID<CXRvr-238-7@gated-at.bofh.it>
In reply to#239991

[Multipart message — attachments visible in raw view] — view raw

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

[toc] | [prev] | [next] | [standalone]


#240052

FromMusbur <musbur@posteo.org>
Date2021-09-16 14:40 +0200
Message-ID<CXYQh-6Zl-3@gated-at.bofh.it>
In reply to#240035
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

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.user


csiph-web