* Cannot boot GuixSD after system reconfigure
@ 2017-09-21 12:21 Roel Janssen
2017-09-21 19:04 ` Roel Janssen
0 siblings, 1 reply; 12+ messages in thread
From: Roel Janssen @ 2017-09-21 12:21 UTC (permalink / raw)
To: help-guix
[-- Attachment #1: config.scm --]
[-- Type: application/octet-stream, Size: 3053 bytes --]
(use-modules (gnu)
(gnu system nss)
(linux-nonfree)
(gnu packages admin)
(gnu packages base)
(gnu packages bootloaders)
(gnu packages firmware)
(gnu packages fonts)
(gnu packages linux)
(gnu packages ncurses)
(srfi srfi-1))
(use-service-modules networking ssh desktop xorg databases)
(use-package-modules certs gnome)
(operating-system
(host-name "antelope")
(hosts-file (plain-file "hosts" (string-append
(local-host-aliases host-name)
%facebook-host-aliases)))
(timezone "Europe/Amsterdam")
(locale "en_US.UTF-8")
(kernel-arguments (list "modprobe.blacklist=pcspkr"
"quiet"
"rhgb"
"thinkpad_acpi.fan_control=1"))
(bootloader (grub-configuration
(grub grub-efi)
(target "/dev/sda")
(timeout 2)))
(file-systems (cons*
(file-system
(device "/dev/sda2")
(mount-point "/boot")
(needed-for-boot? #t)
(type "ext4"))
(file-system
(device "/dev/sda1")
(mount-point "/boot/efi")
(needed-for-boot? #t)
(type "vfat"))
(file-system
(device "/dev/sda3")
(mount-point "/")
(options "ssd")
(type "btrfs"))
(file-system
(device "tmpfs")
(mount-point "/var/guix/temproots")
(type "tmpfs"))
(file-system
(device "tmpfs")
(mount-point "/tmp")
(type "tmpfs"))
%base-file-systems))
(users (cons (user-account
(name "roel")
(password "")
(comment "")
(group "users")
(supplementary-groups
'("wheel" "netdev" "kvm" "dialout" "audio" "video" "input"))
(home-directory "/home/roel"))
%base-user-accounts))
(kernel linux-nonfree)
(firmware (cons* iwlwifi-firmware-non-free ath9k-htc-firmware %base-packages))
;; This is where we specify system-wide packages.
(packages (cons* nss-certs ; for HTTPS access
ncurses ; for the clear command
font-liberation
btrfs-progs
gnome-keyring
%base-packages))
;; Add GNOME. Use the "desktop" services, which include the X11 log-in
;; service, networking with NetworkManager, and more.
(services (cons*
(gnome-desktop-service)
(rngd-service)
%desktop-services))
;; Allow resolution of '.local' host names with mDNS.
(name-service-switch %mdns-host-lookup-nss))
[-- Attachment #2: Type: text/plain, Size: 462 bytes --]
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?).
I attached 'config.scm'.
Now, the hardest part.. How can I recover? It doesn't boot the older
generations either, so I now use a Fedora live USB.
Any pointers are appreciated.
Thanks!
Kind regards,
Roel Janssen
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Cannot boot GuixSD after system reconfigure
2017-09-21 12:21 Cannot boot GuixSD after system reconfigure Roel Janssen
@ 2017-09-21 19:04 ` Roel Janssen
2017-09-21 20:28 ` Ricardo Wurmus
2017-09-21 22:12 ` Ludovic Courtès
0 siblings, 2 replies; 12+ messages in thread
From: Roel Janssen @ 2017-09-21 19:04 UTC (permalink / raw)
To: help-guix
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?).
>
> I attached 'config.scm'.
>
> Now, the hardest part.. How can I recover? It doesn't boot the older
> generations either, so I now use a Fedora live USB.
>
> Any pointers are appreciated.
>
> Thanks!
>
> Kind regards,
> Roel Janssen
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>
Now, what changes do I have to make to my config to make it work
automatically again?
Kind regards,
Roel Janssen
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Cannot boot GuixSD after system reconfigure
2017-09-21 19:04 ` Roel Janssen
@ 2017-09-21 20:28 ` Ricardo Wurmus
2017-09-21 22:12 ` Ludovic Courtès
1 sibling, 0 replies; 12+ messages in thread
From: Ricardo Wurmus @ 2017-09-21 20:28 UTC (permalink / raw)
To: Roel Janssen; +Cc: help-guix
Hi Roel,
> 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>
>
> Now, what changes do I have to make to my config to make it work
> automatically again?
Instead of this:
(file-system
(device "/dev/sda3")
(mount-point "/")
(options "ssd")
(type "btrfs"))
Try this:
(file-system
(mount-point "/")
(options "ssd")
(type "btrfs")
(title 'uuid)
(device (uuid "4dab5feb-d176-45de-b287-9b0a6e4c01cb")))
But do replace the UUID with your actual UUID. I’ve copied this
straight from the manual and haven’t tested this myself as I’m using
mapped devices and don’t have a btrfs partition.
--
Ricardo
GPG: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC
https://elephly.net
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Cannot boot GuixSD after system reconfigure
2017-09-21 19:04 ` Roel Janssen
2017-09-21 20:28 ` Ricardo Wurmus
@ 2017-09-21 22:12 ` Ludovic Courtès
2017-09-22 0:24 ` bug#28445: " Roel Janssen
1 sibling, 1 reply; 12+ 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] 12+ messages in thread
* bug#28445: Cannot boot GuixSD after system reconfigure
2017-09-21 22:12 ` Ludovic Courtès
@ 2017-09-22 0:24 ` Roel Janssen
2017-09-22 14:03 ` Ludovic Courtès
0 siblings, 1 reply; 12+ 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] 12+ messages in thread
* Re: Cannot boot GuixSD after system reconfigure
2017-09-22 0:24 ` bug#28445: " Roel Janssen
@ 2017-09-22 14:03 ` Ludovic Courtès
2017-09-22 14:23 ` bug#28445: " Danny Milosavljevic
0 siblings, 1 reply; 12+ messages in thread
From: Ludovic Courtès @ 2017-09-22 14:03 UTC (permalink / raw)
To: Roel Janssen; +Cc: 28445, Danny Milosavljevic, 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] 12+ messages in thread
* bug#28445: Cannot boot GuixSD after system reconfigure
2017-09-22 14:03 ` Ludovic Courtès
@ 2017-09-22 14:23 ` Danny Milosavljevic
2017-09-22 16:41 ` Ludovic Courtès
0 siblings, 1 reply; 12+ 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] 12+ messages in thread
* Re: Cannot boot GuixSD after system reconfigure
2017-09-22 14:23 ` bug#28445: " Danny Milosavljevic
@ 2017-09-22 16:41 ` Ludovic Courtès
2017-09-22 19:53 ` Roel Janssen
0 siblings, 1 reply; 12+ 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] 12+ messages in thread
* Re: Cannot boot GuixSD after system reconfigure
2017-09-22 16:41 ` Ludovic Courtès
@ 2017-09-22 19:53 ` Roel Janssen
2017-09-25 7:33 ` Ludovic Courtès
0 siblings, 1 reply; 12+ messages in thread
From: Roel Janssen @ 2017-09-22 19:53 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: 28445, Danny Milosavljevic, 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] 12+ messages in thread
* Re: Cannot boot GuixSD after system reconfigure
2017-09-22 19:53 ` Roel Janssen
@ 2017-09-25 7:33 ` Ludovic Courtès
2017-09-26 19:24 ` bug#28445: " Roel Janssen
0 siblings, 1 reply; 12+ messages in thread
From: Ludovic Courtès @ 2017-09-25 7:33 UTC (permalink / raw)
To: Roel Janssen; +Cc: 28445, Danny Milosavljevic, 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] 12+ messages in thread
* bug#28445: Cannot boot GuixSD after system reconfigure
2017-09-25 7:33 ` Ludovic Courtès
@ 2017-09-26 19:24 ` Roel Janssen
2017-09-26 2:27 ` Danny Milosavljevic
0 siblings, 1 reply; 12+ 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] 12+ messages in thread
end of thread, other threads:[~2017-09-26 19:24 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-21 12:21 Cannot boot GuixSD after system reconfigure Roel Janssen
2017-09-21 19:04 ` Roel Janssen
2017-09-21 20:28 ` Ricardo Wurmus
2017-09-21 22:12 ` Ludovic Courtès
2017-09-22 0:24 ` bug#28445: " Roel Janssen
2017-09-22 14:03 ` Ludovic Courtès
2017-09-22 14:23 ` bug#28445: " Danny Milosavljevic
2017-09-22 16:41 ` Ludovic Courtès
2017-09-22 19:53 ` Roel Janssen
2017-09-25 7:33 ` Ludovic Courtès
2017-09-26 19:24 ` bug#28445: " Roel Janssen
2017-09-26 2:27 ` Danny Milosavljevic
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).