unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#28445: Cannot boot GuixSD after system reconfigure
       [not found] ` <87bmm3kh47.fsf@gnu.org>
@ 2017-09-21 22:12   ` Ludovic Courtès
       [not found]   ` <87fubf4s77.fsf@gnu.org>
  1 sibling, 0 replies; 9+ messages in thread
From: Ludovic Courtès @ 2017-09-21 22:12 UTC (permalink / raw)
  To: Roel Janssen; +Cc: 28445, help-guix

Hi Roel,

Roel Janssen <roel@gnu.org> skribis:

> Roel Janssen writes:
>
>> Dear Guix,
>>
>> I 'guix pull'ed commit 228a398 and ran:
>>   guix system reconfigure /etc/config.scm
>>
>> It looks like GRUB cannot find my root partition (/dev/sda3).  So, I
>> suspect that something has changed regarding specifying the partitions (UUIDs?).

[...]

> So, I was able to fix GRUB by manually modifying /boot/grub/grub.cfg:
>
> -search --label --set /dev/sda3
> +search --no-floppy --fs-uuid --set <blkid uuid output>

I believe this is fixed with db4e8fd5d4a07d3be8ce68fb96722ef7077c0eee.

Could you please let me know if everything’s OK?

Thanks,
Ludo’.

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

* bug#28445: Cannot boot GuixSD after system reconfigure
       [not found]   ` <87fubf4s77.fsf@gnu.org>
@ 2017-09-22  0:24     ` Roel Janssen
  2017-09-22 14:03       ` Ludovic Courtès
       [not found]       ` <87a81msud8.fsf@gnu.org>
  0 siblings, 2 replies; 9+ messages in thread
From: Roel Janssen @ 2017-09-22  0:24 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 28445, help-guix


Ludovic Courtès writes:

> Hi Roel,
>
> Roel Janssen <roel@gnu.org> skribis:
>
>> Roel Janssen writes:
>>
>>> Dear Guix,
>>>
>>> I 'guix pull'ed commit 228a398 and ran:
>>>   guix system reconfigure /etc/config.scm
>>>
>>> It looks like GRUB cannot find my root partition (/dev/sda3).  So, I
>>> suspect that something has changed regarding specifying the partitions (UUIDs?).
>
> [...]
>
>> So, I was able to fix GRUB by manually modifying /boot/grub/grub.cfg:
>>
>> -search --label --set /dev/sda3
>> +search --no-floppy --fs-uuid --set <blkid uuid output>
>
> I believe this is fixed with db4e8fd5d4a07d3be8ce68fb96722ef7077c0eee.
>
> Could you please let me know if everything’s OK?

I changed the following pieces of my config:

  (bootloader (bootloader-configuration
               (bootloader grub-efi-bootloader)
               (target "/boot/efi")))

  (file-systems (cons*
                 (file-system
                  (title 'uuid)
                  (device (uuid "<uuid>"))
                  (mount-point "/boot")
                  (needed-for-boot? #t)
                  (type "ext4"))
		 (file-system
                  (title 'device)
                  (device "/dev/sda1")
                  (mount-point "/boot/efi")
                  (needed-for-boot? #t)
                  (type "vfat"))
                 (file-system
                  (mount-point "/")
                  (options "ssd")
                  (title 'uuid)
                  (device (uuid "<uuid>"))
                  (options "ssd")
                  (type "btrfs"))
                 (file-system
                  (title 'device)
                  (device "tmpfs")
                  (mount-point "/var/guix/temproots")
                  (type "tmpfs"))
                 (file-system
                  (title 'device)
                  (device "tmpfs")
                  (mount-point "/tmp")
                  (type "tmpfs"))
                 %base-file-systems))

And with these changes, I can boot GuixSD again.

The vfat partitions have a shorter UUID, which are not accepted by
Guix.  Is this on purpose?  As you can see in the snippet above, I use
'device for the vfat partition and 'uuid for the other disk-based
partitions.  It would be nice to use UUIDs for every partition.

Thanks for your time.

Kind regards,
Roel Janssen

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

* bug#28445: Cannot boot GuixSD after system reconfigure
  2017-09-22  0:24     ` Roel Janssen
@ 2017-09-22 14:03       ` Ludovic Courtès
       [not found]       ` <87a81msud8.fsf@gnu.org>
  1 sibling, 0 replies; 9+ messages in thread
From: Ludovic Courtès @ 2017-09-22 14:03 UTC (permalink / raw)
  To: Roel Janssen; +Cc: 28445, help-guix

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

Roel Janssen <roel@gnu.org> skribis:

> Ludovic Courtès writes:

[...]

>>> So, I was able to fix GRUB by manually modifying /boot/grub/grub.cfg:
>>>
>>> -search --label --set /dev/sda3
>>> +search --no-floppy --fs-uuid --set <blkid uuid output>
>>
>> I believe this is fixed with db4e8fd5d4a07d3be8ce68fb96722ef7077c0eee.
>>
>> Could you please let me know if everything’s OK?
>
> I changed the following pieces of my config:
>
>   (bootloader (bootloader-configuration
>                (bootloader grub-efi-bootloader)
>                (target "/boot/efi")))
>
>   (file-systems (cons*
>                  (file-system
>                   (title 'uuid)
>                   (device (uuid "<uuid>"))
>                   (mount-point "/boot")
>                   (needed-for-boot? #t)
>                   (type "ext4"))
> 		 (file-system
>                   (title 'device)
>                   (device "/dev/sda1")
>                   (mount-point "/boot/efi")
>                   (needed-for-boot? #t)
>                   (type "vfat"))
>                  (file-system
>                   (mount-point "/")
>                   (options "ssd")
>                   (title 'uuid)
>                   (device (uuid "<uuid>"))
>                   (options "ssd")
>                   (type "btrfs"))
>                  (file-system
>                   (title 'device)
>                   (device "tmpfs")
>                   (mount-point "/var/guix/temproots")
>                   (type "tmpfs"))
>                  (file-system
>                   (title 'device)
>                   (device "tmpfs")
>                   (mount-point "/tmp")
>                   (type "tmpfs"))
>                  %base-file-systems))
>
> And with these changes, I can boot GuixSD again.

You mean the fix was insufficient?

> The vfat partitions have a shorter UUID, which are not accepted by
> Guix.  Is this on purpose?  As you can see in the snippet above, I use
> 'device for the vfat partition and 'uuid for the other disk-based
> partitions.  It would be nice to use UUIDs for every partition.

The attached patch almost gets us there: it would allow you to write

  (uuid "aaaa-bbbb" 'fat32)

in your config.

However, there’s one thing I’d like to double-check with Danny, which is
the word order.  With this patch, I have:

  (fat32-uuid->string (string->fat32-uuid "aabb-ccdd"))
  $7 = "CCDD-AABB"

Danny: are you sure the most-significant 16-bit word comes last?

Ludo’.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 1408 bytes --]

diff --git a/gnu/system/uuid.scm b/gnu/system/uuid.scm
index 1dd6a1133..dea2083c4 100644
--- a/gnu/system/uuid.scm
+++ b/gnu/system/uuid.scm
@@ -41,6 +41,7 @@
             string->ext3-uuid
             string->ext4-uuid
             string->btrfs-uuid
+            string->fat32-uuid
             iso9660-uuid->string
 
             ;; XXX: For lack of a better place.
@@ -175,6 +176,22 @@ ISO9660 UUID representation."
         (low (bytevector-uint-ref uuid 2 %fat32-endianness 2)))
     (format #f "~:@(~x-~x~)" low high)))
 
+(define %fat32-uuid-rx
+  (make-regexp "^([[:xdigit:]]{4})-([[:xdigit:]]{4})$"))
+
+(define (string->fat32-uuid str)
+  "Parse STR, which is in FAT32 format, and return a bytevector or #f."
+  (match (regexp-exec %fat32-uuid-rx str)
+    (#f
+     #f)
+    (rx-match
+     (uint-list->bytevector (list (string->number
+                                   (match:substring rx-match 1) 16)
+                                  (string->number
+                                   (match:substring rx-match 2) 16))
+                            %fat32-endianness
+                            2))))
+
 \f
 ;;;
 ;;; Generic interface.
@@ -198,6 +215,7 @@ ISO9660 UUID representation."
 (define %uuid-parsers
   (vhashq
    ('dce 'ext2 'ext3 'ext4 'btrfs 'luks => string->dce-uuid)
+   ('fat32 'fat => string->fat32-uuid)
    ('iso9660 => string->iso9660-uuid)))
 
 (define %uuid-printers

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

* bug#28445: Cannot boot GuixSD after system reconfigure
       [not found]       ` <87a81msud8.fsf@gnu.org>
@ 2017-09-22 14:23         ` Danny Milosavljevic
  2017-09-22 16:41           ` Ludovic Courtès
       [not found]           ` <87lgl6ptws.fsf@gnu.org>
  0 siblings, 2 replies; 9+ messages in thread
From: Danny Milosavljevic @ 2017-09-22 14:23 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 28445, help-guix

On Fri, 22 Sep 2017 16:03:47 +0200
ludo@gnu.org (Ludovic Courtès) wrote:

> However, there’s one thing I’d like to double-check with Danny, which is
> the word order.  With this patch, I have:
> 
>   (fat32-uuid->string (string->fat32-uuid "aabb-ccdd"))
>   $7 = "CCDD-AABB"
> 
> Danny: are you sure the most-significant 16-bit word comes last?

See https://github.com/karelzak/util-linux/blob/master/libblkid/src/superblocks/vfat.c#L48

blkid_probe_sprintf_uuid(pr, vol_serno, 4, "%02X%02X-%02X%02X",
vol_serno[3], vol_serno[2], vol_serno[1], vol_serno[0]);

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

* bug#28445: Cannot boot GuixSD after system reconfigure
  2017-09-22 14:23         ` Danny Milosavljevic
@ 2017-09-22 16:41           ` Ludovic Courtès
       [not found]           ` <87lgl6ptws.fsf@gnu.org>
  1 sibling, 0 replies; 9+ messages in thread
From: Ludovic Courtès @ 2017-09-22 16:41 UTC (permalink / raw)
  To: Danny Milosavljevic; +Cc: 28445, help-guix

Danny Milosavljevic <dannym@scratchpost.org> skribis:

> On Fri, 22 Sep 2017 16:03:47 +0200
> ludo@gnu.org (Ludovic Courtès) wrote:
>
>> However, there’s one thing I’d like to double-check with Danny, which is
>> the word order.  With this patch, I have:
>> 
>>   (fat32-uuid->string (string->fat32-uuid "aabb-ccdd"))
>>   $7 = "CCDD-AABB"
>> 
>> Danny: are you sure the most-significant 16-bit word comes last?
>
> See https://github.com/karelzak/util-linux/blob/master/libblkid/src/superblocks/vfat.c#L48
>
> blkid_probe_sprintf_uuid(pr, vol_serno, 4, "%02X%02X-%02X%02X",
> vol_serno[3], vol_serno[2], vol_serno[1], vol_serno[0]);

I see, thanks!

Roel, with commit 8a7d81a5e23c4d59fbabf2550db32d4ba5572e4b, you should
be able to write:

  (uuid "abcd-1234" 'fat32)

in your config, and it should work.

Let me know if it doesn’t.  :-)

Ludo’.

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

* bug#28445: Cannot boot GuixSD after system reconfigure
       [not found]           ` <87lgl6ptws.fsf@gnu.org>
@ 2017-09-22 19:53             ` Roel Janssen
       [not found]             ` <87tvzuqzmk.fsf@gnu.org>
  1 sibling, 0 replies; 9+ messages in thread
From: Roel Janssen @ 2017-09-22 19:53 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 28445, help-guix


Ludovic Courtès writes:

> Danny Milosavljevic <dannym@scratchpost.org> skribis:
>
>> On Fri, 22 Sep 2017 16:03:47 +0200
>> ludo@gnu.org (Ludovic Courtès) wrote:
>>
>>> However, there’s one thing I’d like to double-check with Danny, which is
>>> the word order.  With this patch, I have:
>>> 
>>>   (fat32-uuid->string (string->fat32-uuid "aabb-ccdd"))
>>>   $7 = "CCDD-AABB"
>>> 
>>> Danny: are you sure the most-significant 16-bit word comes last?
>>
>> See https://github.com/karelzak/util-linux/blob/master/libblkid/src/superblocks/vfat.c#L48
>>
>> blkid_probe_sprintf_uuid(pr, vol_serno, 4, "%02X%02X-%02X%02X",
>> vol_serno[3], vol_serno[2], vol_serno[1], vol_serno[0]);
>
> I see, thanks!
>
> Roel, with commit 8a7d81a5e23c4d59fbabf2550db32d4ba5572e4b, you should
> be able to write:
>
>   (uuid "abcd-1234" 'fat32)
>
> in your config, and it should work.
>
> Let me know if it doesn’t.  :-)
>
> Ludo’.

I could generate a new system, but upon booting it, I was dropped to a
Guile REPL.

So it doesn't seem to work.  How can I troubleshoot from there?

I used the following configuration for the EFI partition:

  (file-system
    (title 'uuid)
    (device (uuid "72E5-26A0" 'fat32))
    (mount-point "/boot/efi")
    (needed-for-boot? #t)
    (type "vfat"))

Thanks for your work!

Kind regards,
Roel Janssen

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

* bug#28445: Cannot boot GuixSD after system reconfigure
       [not found]             ` <87tvzuqzmk.fsf@gnu.org>
@ 2017-09-25  7:33               ` Ludovic Courtès
       [not found]               ` <87fubbmdvm.fsf@gnu.org>
  1 sibling, 0 replies; 9+ messages in thread
From: Ludovic Courtès @ 2017-09-25  7:33 UTC (permalink / raw)
  To: Roel Janssen; +Cc: 28445, help-guix

Hi Roel,

Roel Janssen <roel@gnu.org> skribis:

> I could generate a new system, but upon booting it, I was dropped to a
> Guile REPL.

Could you check what the error was?  (You can type “,error” at the REPL
if the message disappeared.)

> So it doesn't seem to work.  How can I troubleshoot from there?
>
> I used the following configuration for the EFI partition:
>
>   (file-system
>     (title 'uuid)
>     (device (uuid "72E5-26A0" 'fat32))
>     (mount-point "/boot/efi")
>     (needed-for-boot? #t)
>     (type "vfat"))

I don’t see yet what could possibly go wrong.  Note that
‘needed-for-boot?’ can be #f (it’s definitely not needed for boot), but
both should work.

Thanks,
Ludo’.

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

* bug#28445: Cannot boot GuixSD after system reconfigure
  2017-09-26 19:24                 ` Roel Janssen
@ 2017-09-26  2:27                   ` Danny Milosavljevic
  0 siblings, 0 replies; 9+ messages in thread
From: Danny Milosavljevic @ 2017-09-26  2:27 UTC (permalink / raw)
  To: Roel Janssen; +Cc: 28445, help-guix

What does it reply to

,bt

?

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

* bug#28445: Cannot boot GuixSD after system reconfigure
       [not found]               ` <87fubbmdvm.fsf@gnu.org>
@ 2017-09-26 19:24                 ` Roel Janssen
  2017-09-26  2:27                   ` Danny Milosavljevic
  0 siblings, 1 reply; 9+ messages in thread
From: Roel Janssen @ 2017-09-26 19:24 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 28445, help-guix

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


Ludovic Courtès writes:

> Hi Roel,
>
> Roel Janssen <roel@gnu.org> skribis:
>
>> I could generate a new system, but upon booting it, I was dropped to a
>> Guile REPL.
>
> Could you check what the error was?  (You can type “,error” at the REPL
> if the message disappeared.)
>
>> So it doesn't seem to work.  How can I troubleshoot from there?
>>
>> I used the following configuration for the EFI partition:
>>
>>   (file-system
>>     (title 'uuid)
>>     (device (uuid "72E5-26A0" 'fat32))
>>     (mount-point "/boot/efi")
>>     (needed-for-boot? #t)
>>     (type "vfat"))
>
> I don’t see yet what could possibly go wrong.  Note that
> ‘needed-for-boot?’ can be #f (it’s definitely not needed for boot), but
> both should work.
>
> Thanks,
> Ludo’.

I attached a photograph of the boot.  Unfortunately, it doesn't seem
very informative to me.

My partition layout is like to:

Device       Start       End   Sectors   Size Type
/dev/sda1     2048   1026047   1024000   500M EFI System
/dev/sda2  1026048   2050047   1024000   500M Linux filesystem
/dev/sda3  2050048 976773134 974723087 464.8G Linux filesystem

/dev/sda2 -> /boot
/dev/sda2 -> /boot/efi
/dev/sda3 -> /

Thanks for your efforts!

Kind regards,
Roel Janssen


[-- Attachment #2: guixsd-boot-problem.jpg --]
[-- Type: image/jpeg, Size: 1097362 bytes --]

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

end of thread, other threads:[~2017-09-26  2:28 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <rbuo9q4cken.fsf@gnu.org>
     [not found] ` <87bmm3kh47.fsf@gnu.org>
2017-09-21 22:12   ` bug#28445: Cannot boot GuixSD after system reconfigure Ludovic Courtès
     [not found]   ` <87fubf4s77.fsf@gnu.org>
2017-09-22  0:24     ` Roel Janssen
2017-09-22 14:03       ` Ludovic Courtès
     [not found]       ` <87a81msud8.fsf@gnu.org>
2017-09-22 14:23         ` Danny Milosavljevic
2017-09-22 16:41           ` Ludovic Courtès
     [not found]           ` <87lgl6ptws.fsf@gnu.org>
2017-09-22 19:53             ` Roel Janssen
     [not found]             ` <87tvzuqzmk.fsf@gnu.org>
2017-09-25  7:33               ` Ludovic Courtès
     [not found]               ` <87fubbmdvm.fsf@gnu.org>
2017-09-26 19:24                 ` Roel Janssen
2017-09-26  2:27                   ` Danny Milosavljevic

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

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