unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* Installing Guix System on an external hard drive
@ 2019-11-12 22:25 Jan Wielkiewicz
  2019-11-13  6:53 ` Efraim Flashner
  0 siblings, 1 reply; 8+ messages in thread
From: Jan Wielkiewicz @ 2019-11-12 22:25 UTC (permalink / raw)
  To: help-guix

Hi everyone,

I'm trying to install Guix System to an external hard drive from
existing Guix System on my laptop, but I encounter an error after
running "sudo guix system init /mnt/etc/config.scm /mnt
--system=x86_64-linux":

guix system: error:
'/gnu/store/492amr5kh838i3021grmmn0pci80rfan-grub-efi-2.04/sbin/grub-install
--boot-directory /mnt/boot --bootloader-id=Guix --efi-directory
/mnt/boot/efi' exited with status 1; output follows:

  /gnu/store/492amr5kh838i3021grmmn0pci80rfan-grub-efi-2.04/sbin/grub-install:
  error:
  /gnu/store/492amr5kh838i3021grmmn0pci80rfan-grub-efi-2.04/lib/grub/i386-pc/modinfo.sh
  doesn't exist. Use --target or --directory.

My target machine is an UEFI, x86_64 system.
The hard drive is partitioned and mounted in the following way:

sdb                                     
├─sdb1        vfat            511,7M     0% /mnt/boot
├─sdb2        btrfs           143,8G     3% /mnt
├─sdb3        btrfs            this will be /home
└─sdb4        btrfs            this doesn't matter

That's how my bootloader and file-systems configuration looks like:

 (bootloader
  (bootloader-configuration
   (bootloader grub-efi-bootloader)
   (target "/boot/efi")
   (keyboard-layout keyboard-layout)))
 (file-systems
  (cons* (file-system
          (mount-point "/boot")
          (device
	   (uuid "71B0-513F" 'fat))
          (type "vfat"))
         (file-system
          (mount-point "/")
          (device
           (file-system-label "root"))
          (type "btrfs"))
	 (file-system
          (mount-point "/home")
          (device
	   (file-system-label "home"))
          (type "btrfs"))
         %base-file-systems))

I'm sure I'm doing something wrong, but don't know what.


Jan Wielkiewicz

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Installing Guix System on an external hard drive
  2019-11-12 22:25 Installing Guix System on an external hard drive Jan Wielkiewicz
@ 2019-11-13  6:53 ` Efraim Flashner
  2019-11-13 15:28   ` Jan
  2019-11-13 19:15   ` Jan
  0 siblings, 2 replies; 8+ messages in thread
From: Efraim Flashner @ 2019-11-13  6:53 UTC (permalink / raw)
  To: Jan Wielkiewicz; +Cc: help-guix

[-- Attachment #1: Type: text/plain, Size: 2307 bytes --]

On Tue, Nov 12, 2019 at 11:25:32PM +0100, Jan Wielkiewicz wrote:
> Hi everyone,
> 
> I'm trying to install Guix System to an external hard drive from
> existing Guix System on my laptop, but I encounter an error after
> running "sudo guix system init /mnt/etc/config.scm /mnt
> --system=x86_64-linux":
> 
> guix system: error:
> '/gnu/store/492amr5kh838i3021grmmn0pci80rfan-grub-efi-2.04/sbin/grub-install
> --boot-directory /mnt/boot --bootloader-id=Guix --efi-directory
> /mnt/boot/efi' exited with status 1; output follows:
> 
>   /gnu/store/492amr5kh838i3021grmmn0pci80rfan-grub-efi-2.04/sbin/grub-install:
>   error:
>   /gnu/store/492amr5kh838i3021grmmn0pci80rfan-grub-efi-2.04/lib/grub/i386-pc/modinfo.sh
>   doesn't exist. Use --target or --directory.
> 
> My target machine is an UEFI, x86_64 system.
> The hard drive is partitioned and mounted in the following way:
> 
> sdb                                     
> ├─sdb1        vfat            511,7M     0% /mnt/boot
> ├─sdb2        btrfs           143,8G     3% /mnt
> ├─sdb3        btrfs            this will be /home
> └─sdb4        btrfs            this doesn't matter
> 
> That's how my bootloader and file-systems configuration looks like:
> 
>  (bootloader
>   (bootloader-configuration
>    (bootloader grub-efi-bootloader)
>    (target "/boot/efi")
>    (keyboard-layout keyboard-layout)))
>  (file-systems
>   (cons* (file-system
>           (mount-point "/boot")
>           (device
> 	   (uuid "71B0-513F" 'fat))
>           (type "vfat"))
>          (file-system
>           (mount-point "/")
>           (device
>            (file-system-label "root"))
>           (type "btrfs"))
> 	 (file-system
>           (mount-point "/home")
>           (device
> 	   (file-system-label "home"))
>           (type "btrfs"))
>          %base-file-systems))
> 
> I'm sure I'm doing something wrong, but don't know what.
> 

On my machine with EFI I mounted my vfat partition at /boot/efi instead
of /boot. Does your /boot partition contain an efi directory?

-- 
Efraim Flashner   <efraim@flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Installing Guix System on an external hard drive
  2019-11-13  6:53 ` Efraim Flashner
@ 2019-11-13 15:28   ` Jan
  2019-11-13 19:15   ` Jan
  1 sibling, 0 replies; 8+ messages in thread
From: Jan @ 2019-11-13 15:28 UTC (permalink / raw)
  To: Efraim Flashner; +Cc: help-guix

On Wed, 13 Nov 2019 08:53:29 +0200
Efraim Flashner <efraim@flashner.co.il> wrote:

> On my machine with EFI I mounted my vfat partition at /boot/efi
> instead of /boot. Does your /boot partition contain an efi directory?
> 

I created one with mkdir, but it's empty.
But I'm going to try with mounting at /boot/efi instead of boot.


Jan Wielkiewicz

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Installing Guix System on an external hard drive
  2019-11-13  6:53 ` Efraim Flashner
  2019-11-13 15:28   ` Jan
@ 2019-11-13 19:15   ` Jan
  2019-11-13 19:55     ` Efraim Flashner
  2019-11-15 14:49     ` Marius Bakke
  1 sibling, 2 replies; 8+ messages in thread
From: Jan @ 2019-11-13 19:15 UTC (permalink / raw)
  To: Efraim Flashner; +Cc: help-guix

Tried this, but didn't work, also tried mounting the partition at
"/boot/efi" and installing bootloader at "/boot". I'm installing Guix
form a not-UEFI machine, could this cause the problem?


Jan Wielkiewicz

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Installing Guix System on an external hard drive
  2019-11-13 19:15   ` Jan
@ 2019-11-13 19:55     ` Efraim Flashner
  2019-11-15 14:49     ` Marius Bakke
  1 sibling, 0 replies; 8+ messages in thread
From: Efraim Flashner @ 2019-11-13 19:55 UTC (permalink / raw)
  To: Jan; +Cc: help-guix

[-- Attachment #1: Type: text/plain, Size: 655 bytes --]

On Wed, Nov 13, 2019 at 08:15:51PM +0100, Jan wrote:
> Tried this, but didn't work, also tried mounting the partition at
> "/boot/efi" and installing bootloader at "/boot". I'm installing Guix
> form a not-UEFI machine, could this cause the problem?
> 

I don't remember now if for the initialization i changed the target in
the os-config to /mnt/boot/efi or not. Installing from a non-UEFI
machine shouldn't matter I don't think.


-- 
Efraim Flashner   <efraim@flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Installing Guix System on an external hard drive
  2019-11-13 19:15   ` Jan
  2019-11-13 19:55     ` Efraim Flashner
@ 2019-11-15 14:49     ` Marius Bakke
  2019-11-15 16:23       ` Jan
  1 sibling, 1 reply; 8+ messages in thread
From: Marius Bakke @ 2019-11-15 14:49 UTC (permalink / raw)
  To: Jan, Efraim Flashner; +Cc: help-guix

[-- Attachment #1: Type: text/plain, Size: 1013 bytes --]

Jan <tona_kosmicznego_smiecia@interia.pl> writes:

> Tried this, but didn't work, also tried mounting the partition at
> "/boot/efi" and installing bootloader at "/boot". I'm installing Guix
> form a not-UEFI machine, could this cause the problem?

Did you get the same error when you mounted at /boot/efi?

If you want the USB drive to be 'portable', i.e. not tied to a single
system, you can not use 'grub-efi-bootloader'.  The reason is that
grub-efi relies on updating UEFI firmware variables *on the running
system*, to make the newly installed bootloader show up in the UEFI boot
menu.

For the same reason, it is not possible to use it on a non-UEFI system.

It would be good to have a 'grub-standalone-bootloader' procedure that
would write a self-contained UEFI firmware executable to a standard
location, similar to what Guix does for disk images:

https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/build/vm.scm?id=4dcf32b56b824efcdb181c9f4cc7ee6c8a0ba125#n399

Would you like to try implementing it?

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Installing Guix System on an external hard drive
  2019-11-15 14:49     ` Marius Bakke
@ 2019-11-15 16:23       ` Jan
  2019-11-19 23:14         ` Marius Bakke
  0 siblings, 1 reply; 8+ messages in thread
From: Jan @ 2019-11-15 16:23 UTC (permalink / raw)
  To: Marius Bakke; +Cc: help-guix

On Fri, 15 Nov 2019 15:49:23 +0100
Marius Bakke <mbakke@fastmail.com> wrote:

> Did you get the same error when you mounted at /boot/efi?
Yes.

> If you want the USB drive to be 'portable', i.e. not tied to a single
> system, you can not use 'grub-efi-bootloader'.  The reason is that
> grub-efi relies on updating UEFI firmware variables *on the running
> system*, to make the newly installed bootloader show up in the UEFI
> boot menu.
> 
> For the same reason, it is not possible to use it on a non-UEFI
> system.
> 
> It would be good to have a 'grub-standalone-bootloader' procedure that
> would write a self-contained UEFI firmware executable to a standard
> location, similar to what Guix does for disk images:
> 
> https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/build/vm.scm?id=4dcf32b56b824efcdb181c9f4cc7ee6c8a0ba125#n399
> 
> Would you like to try implementing it?

Well, I could try as a Scheme learning exercise, but it would take me
some time, because I'm a fresh Guile coder and the only thing I know
about UEFI is that it has a buggy implementation on my motherboard and
GRUB goes to hell :)
Any hint where could I start?


Jan Wielkiewicz

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Installing Guix System on an external hard drive
  2019-11-15 16:23       ` Jan
@ 2019-11-19 23:14         ` Marius Bakke
  0 siblings, 0 replies; 8+ messages in thread
From: Marius Bakke @ 2019-11-19 23:14 UTC (permalink / raw)
  To: Jan; +Cc: help-guix

[-- Attachment #1: Type: text/plain, Size: 1427 bytes --]

Jan <tona_kosmicznego_smiecia@interia.pl> writes:

> On Fri, 15 Nov 2019 15:49:23 +0100
> Marius Bakke <mbakke@fastmail.com> wrote:
>
>> Did you get the same error when you mounted at /boot/efi?
> Yes.
>
>> If you want the USB drive to be 'portable', i.e. not tied to a single
>> system, you can not use 'grub-efi-bootloader'.  The reason is that
>> grub-efi relies on updating UEFI firmware variables *on the running
>> system*, to make the newly installed bootloader show up in the UEFI
>> boot menu.
>> 
>> For the same reason, it is not possible to use it on a non-UEFI
>> system.
>> 
>> It would be good to have a 'grub-standalone-bootloader' procedure that
>> would write a self-contained UEFI firmware executable to a standard
>> location, similar to what Guix does for disk images:
>> 
>> https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/build/vm.scm?id=4dcf32b56b824efcdb181c9f4cc7ee6c8a0ba125#n399
>> 
>> Would you like to try implementing it?
>
> Well, I could try as a Scheme learning exercise, but it would take me
> some time, because I'm a fresh Guile coder and the only thing I know
> about UEFI is that it has a buggy implementation on my motherboard and
> GRUB goes to hell :)
> Any hint where could I start?

I would start by copying an existing bootloader from
gnu/bootloader/grub.scm and make it run 'grub-mkstandalone' as in the
above URL.

Hope this helps!
Marius

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-11-19 23:14 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-11-12 22:25 Installing Guix System on an external hard drive Jan Wielkiewicz
2019-11-13  6:53 ` Efraim Flashner
2019-11-13 15:28   ` Jan
2019-11-13 19:15   ` Jan
2019-11-13 19:55     ` Efraim Flashner
2019-11-15 14:49     ` Marius Bakke
2019-11-15 16:23       ` Jan
2019-11-19 23:14         ` Marius Bakke

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).