unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: "pelzflorian (Florian Pelz)" <pelzflorian@pelzflorian.de>
To: Thomas Danckaert <post@thomasdanckaert.be>
Cc: help-guix@gnu.org
Subject: Re: repair broken boot record
Date: Wed, 6 Oct 2021 11:28:36 +0200	[thread overview]
Message-ID: <20211006092836.bskz7hd36e5ksts7@pelzflorian.localdomain> (raw)
In-Reply-To: <7bd51847fd4893941b9850f345d00f5d@thomasdanckaert.be>

On Wed, Oct 06, 2021 at 10:23:38AM +0200, Thomas Danckaert wrote:
> On 2021-10-05 13:04, pelzflorian (Florian Pelz) wrote:
> > On Tue, Oct 05, 2021 at 11:28:50AM +0200, Thomas Danckaert wrote:
> > > In one of the final
> > > steps, where guix tries to install the bootloader, I get the error:
> > > 
> > > /gnu/store/.../grub/i386-pc/modinfo.sh doesn't exist. Please specify
> > > --target or --directory.
> > 
> > This is strange.  When you reconfigure, Guix should print the
> > grub-install command that was used, which should include both --target
> > and --directory.
> 
> The full message is:
> 
> guix system: error: '/gnu/store/v77n5m....grub-efi-2.06/sbin/grub-install
> --boot-directory //boot --bootloader-id=Guix --efi-directory=/boot/efi'
> exited with status 1; output follows:
> 
>   /gnu/store/.../grub-install: error:
> /gnu/store/.../lib/grub/i386-pc/modinfo.sh doesn't exist.  Please specify
> --target or --directory'
> 
> Note that the grub-install command doens't contain '--target' or
> '--directory'.  (Also: my system is x64, and this seems to be for i386.
> Should there be a --target=x64_86-efi somewhere?)

Sorry, I was wrong about --target being used; looking in the Guix
source at gnu/bootloader/grub.scm
<https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/bootloader/grub.scm>,
--target is only for traditional BIOS boot and not EFI boot.

Your command is correct. I checked and have used exactly the same
command successfully (I checked the install-bootloader.scm file after
reconfigure on an EFI PC), and it should install, but for you it does
not.  It is good to see the full message though.

Note that you can run exactly the same command manually, but the
result would likely be the same.


> > However, perhaps the chroot is at fault: Before chrooting to, let’s
> > say, /mnt with chroot /mnt, you need to have mounted the /dev/sdXy
> > file system with EFI on it (that which is declared in your config.scm)
> > to /mnt/boot/efi.
> 
> I have in my config 'target /boot/efi'.  My EFI partition is /dev/sda1.  If
> I mount it like
> # mount /dev/sda1 /mnt2
> (/mnt2 because I already have my /dev/sda3 partition with guix at /mnt)
> I find the following layout:
> 
> /mnt2/EFI/
>           EFI
>           grub
>           Guix
> 
> what would be the correct bind mount?  I tried
> # mount --bind /mnt2/EFI /boot/efi
> so I now have
> /boot/efi/
>           EFI
>           grub
>           Guix
> 
> Any idea if that is the desired layout?

From outside the chroot, you should

# mount /dev/sda3 /mnt
# mount /dev/sda1 /mnt/boot/efi

Regards,
Florian


  reply	other threads:[~2021-10-06  9:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-30  7:43 repair broken boot record Thomas Danckaert
2021-10-01  6:53 ` pelzflorian (Florian Pelz)
2021-10-05  9:28   ` Thomas Danckaert
2021-10-05 11:04     ` pelzflorian (Florian Pelz)
2021-10-06  8:23       ` Thomas Danckaert
2021-10-06  9:28         ` pelzflorian (Florian Pelz) [this message]
2021-12-13 14:16           ` Thomas Danckaert
2021-12-13 16:12             ` pelzflorian (Florian Pelz)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211006092836.bskz7hd36e5ksts7@pelzflorian.localdomain \
    --to=pelzflorian@pelzflorian.de \
    --cc=help-guix@gnu.org \
    --cc=post@thomasdanckaert.be \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).