unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Help with a basic GuixSD installation
@ 2015-06-29 18:18 Evan Rowley
  2015-06-30  1:55 ` Daniel Pimentel
  2015-06-30 13:08 ` Ludovic Courtès
  0 siblings, 2 replies; 13+ messages in thread
From: Evan Rowley @ 2015-06-29 18:18 UTC (permalink / raw)
  To: Guix-devel

Hello,

I have not been successful attempting to install GuixSD. I am not well
versed in partitioning, GRUB, and Guix itself. Could someone help me
with the basics necessary to complete this installation? Also, does
anyone have advice on what to do when GuixSD is booting, has issues,
and then drops into a scheme@(guile-user)> prompt? I'm at a loss.

I've used this command to produce a partition table file:
---
parted -ms /dev/disk/by-id/ata-WDC_WD20EURS-63SPKY0_WD-WMC300539593 print
---

Here is the layout, given by the output of the parted command shown above:

----
BYT;
/dev/sdg:2000GB:scsi:512:4096:gpt:ATA WDC WD20EURS-63S:;
1:1049kB:11.5MB:10.5MB:::bios_grub;
2:11.5MB:53.7GB:53.7GB:linux-swap(v1)::;
3:53.7GB:2000GB:1947GB:ext4::;
----

First this shows a 10 MB BIOS GRUB partition, which unless I'm
mistaken, is the preferred way to setup GRUB on a GPT disk on a system
that's Legacy-BIOS-Only / non-(U)EFI. Second there is a 50 GB swap
partition. It's labelled "swap". Yes, I know that seems like a lot,
but this machine I'm installing on is a server capable of housing lots
of RAM. I don't imagine it would be practical sifting through 50GB of
core dump to fix a bug, but the entire disk is 1.8 TB, so why not?
Third / finally is the ext4 root partition. It's labelled "root" and
takes up the rest of the 1.8 TB disk.

This machine itself houses 8 disks. I felt like using /dev/disk/by-id/
made more sense. Here is my config.scm that I ran guix system init
with:

----
(use-modules (gnu))
(use-service-modules networking ssh)
(use-package-modules admin)

(operating-system
  (host-name "experiment0")
  (timezone "America/New_York")
  (locale "en_US.UTF-8")Also

  ;; Assuming /dev/sdX is the target hard disk, and "root" is
  ;; the label of the target root file system.
  (bootloader (grub-configuration (device
"/dev/disk/by-id/ata-WDC_WD20EURS-63SPKY0_WD-WMC300539593")))
  (file-systems (cons (file-system
                        (device
"/dev/disk/by-id/ata-WDC_WD20EURS-63SPKY0_WD-WMC300539593-part3")
                        (title "root")
                        (mount-point "/")
                        (type "ext4"))
                      %base-file-systems))
  (swap-devices
'("/dev/disk/by-id/ata-WDC_WD20EURS-63SPKY0_WD-WMC300539593-part2"))

  (users (list (user-account
                (name "ejr")
                (comment "Evan Johannes Rowley")
                (group "users")

                (supplementary-groups '("wheel"))
                (home-directory "/home/ejr"))))

  (packages (cons tcpdump %base-packages))

  (services (cons* (dhcp-client-service)
                   (lsh-service #:port-number 22)
                   %base-services)))
---

Also in case it's relevant here, this is the /boot/grub/grub.cfg file:
---
function load_video {
  insmod vbe
  insmod vga
  insmod video_bochs
  insmod video_cirrus
}

# Set 'root' to the partition that contains /gnu/store.
search --file --set
/gnu/store/9qa0c1ax5zl20cn91bq5ng3l7s514dfb-grub-2.00/share/grub/unicode.pf2

if loadfont /gnu/store/9qa0c1ax5zl20cn91bq5ng3l7s514dfb-grub-2.00/share/grub/unicode.pf2;
then
  set gfxmode=640x480
  load_video
  insmod gfxterm
  terminal_output gfxterm
fi

insmod png
if background_image
/gnu/store/hiwhqz749xgdgvg5cfg4i17mczp1n48l-grub-image.resized.png;
then
  set color_normal=light-gray/black
  set color_highlight=yellow/black
else
  set menu_color_normal=cyan/blue
  set menu_color_highlight=white/blue
fi

set default=0
set timeout=5
menuentry "GNU with Linux-Libre 4.0.2 (alpha)" {
  # Set 'root' to the partition that contains the kernel.
  search --file --set
/gnu/store/j9xlnmb2xvw22pb1fyjw3am6lhljn4pc-linux-libre-4.0.2/bzImage


  linux /gnu/store/j9xlnmb2xvw22pb1fyjw3am6lhljn4pc-linux-libre-4.0.2/bzImage
--root=/dev/disk/by-id/ata-WDC_WD20EURS-63SPKY0_WD-WMC300539593-part3
--system=/gnu/store/xp866fxdv1lyz9yip88v4rk6anqsp3lr-system
--load=/gnu/store/xp866fxdv1lyz9yip88v4rk6anqsp3lr-system/boot
  initrd /gnu/store/xp866fxdv1lyz9yip88v4rk6anqsp3lr-system/initrd
}

submenu "GNU system, old configurations..." {
menuentry "GNU with Linux-Libre 4.0.2 (alpha) (#1, 2015-05-14 01:11)" {
  # Set 'root' to the partition that contains the kernel.
  search --file --set
/gnu/store/j9xlnmb2xvw22pb1fyjw3am6lhljn4pc-linux-libre-4.0.2/bzImage


  linux /gnu/store/j9xlnmb2xvw22pb1fyjw3am6lhljn4pc-linux-libre-4.0.2/bzImage
--root=gnu-disk-image --system=/var/guix/profiles/system-1-link
--load=/var/guix/profiles/system-1-link/boot
  initrd /var/guix/profiles/system-1-link/initrd
}
}
---

Any suggestions would be appreciated.

I'm the same user who started the "Show example for GuixSD config.scm"
thread in guix-bug@gnu.org - I read in the System Installation guide
in the GuixSD manual that the guix-devel@gnu.org list was preferred.




-- 
 - EJR

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

* Re: Help with a basic GuixSD installation
  2015-06-29 18:18 Help with a basic GuixSD installation Evan Rowley
@ 2015-06-30  1:55 ` Daniel Pimentel
  2015-06-30 13:08 ` Ludovic Courtès
  1 sibling, 0 replies; 13+ messages in thread
From: Daniel Pimentel @ 2015-06-30  1:55 UTC (permalink / raw)
  To: Evan Rowley; +Cc: Guix-devel, guix-devel-bounces+d4n1=opmbx.org

On 2015-06-29 15:18, Evan Rowley wrote:
> Hello,
> 
> I have not been successful attempting to install GuixSD. I am not well
> versed in partitioning, GRUB, and Guix itself. Could someone help me
> with the basics necessary to complete this installation? Also, does
> anyone have advice on what to do when GuixSD is booting, has issues,
> and then drops into a scheme@(guile-user)> prompt? I'm at a loss.
> 
> I've used this command to produce a partition table file:
> ---
> parted -ms /dev/disk/by-id/ata-WDC_WD20EURS-63SPKY0_WD-WMC300539593 
> print
> ---
> 
> Here is the layout, given by the output of the parted command shown 
> above:
> 
> ----
> BYT;
> /dev/sdg:2000GB:scsi:512:4096:gpt:ATA WDC WD20EURS-63S:;
> 1:1049kB:11.5MB:10.5MB:::bios_grub;
> 2:11.5MB:53.7GB:53.7GB:linux-swap(v1)::;
> 3:53.7GB:2000GB:1947GB:ext4::;
> ----
> 
> First this shows a 10 MB BIOS GRUB partition, which unless I'm
> mistaken, is the preferred way to setup GRUB on a GPT disk on a system
> that's Legacy-BIOS-Only / non-(U)EFI. Second there is a 50 GB swap
> partition. It's labelled "swap". Yes, I know that seems like a lot,
> but this machine I'm installing on is a server capable of housing lots
> of RAM. I don't imagine it would be practical sifting through 50GB of
> core dump to fix a bug, but the entire disk is 1.8 TB, so why not?
> Third / finally is the ext4 root partition. It's labelled "root" and
> takes up the rest of the 1.8 TB disk.
> 
> This machine itself houses 8 disks. I felt like using /dev/disk/by-id/
> made more sense. Here is my config.scm that I ran guix system init
> with:
> 
> ----
> (use-modules (gnu))
> (use-service-modules networking ssh)
> (use-package-modules admin)
> 
> (operating-system
>   (host-name "experiment0")
>   (timezone "America/New_York")
>   (locale "en_US.UTF-8")Also
> 
>   ;; Assuming /dev/sdX is the target hard disk, and "root" is
>   ;; the label of the target root file system.
>   (bootloader (grub-configuration (device
> "/dev/disk/by-id/ata-WDC_WD20EURS-63SPKY0_WD-WMC300539593")))
>   (file-systems (cons (file-system
>                         (device
> "/dev/disk/by-id/ata-WDC_WD20EURS-63SPKY0_WD-WMC300539593-part3")
>                         (title "root")
>                         (mount-point "/")
>                         (type "ext4"))
>                       %base-file-systems))
>   (swap-devices
> '("/dev/disk/by-id/ata-WDC_WD20EURS-63SPKY0_WD-WMC300539593-part2"))
> 
>   (users (list (user-account
>                 (name "ejr")
>                 (comment "Evan Johannes Rowley")
>                 (group "users")
> 
>                 (supplementary-groups '("wheel"))
>                 (home-directory "/home/ejr"))))
> 
>   (packages (cons tcpdump %base-packages))
> 
>   (services (cons* (dhcp-client-service)
>                    (lsh-service #:port-number 22)
>                    %base-services)))
> ---
> 
> Also in case it's relevant here, this is the /boot/grub/grub.cfg file:
> ---
> function load_video {
>   insmod vbe
>   insmod vga
>   insmod video_bochs
>   insmod video_cirrus
> }
> 
> # Set 'root' to the partition that contains /gnu/store.
> search --file --set
> /gnu/store/9qa0c1ax5zl20cn91bq5ng3l7s514dfb-grub-2.00/share/grub/unicode.pf2
> 
> if loadfont
> /gnu/store/9qa0c1ax5zl20cn91bq5ng3l7s514dfb-grub-2.00/share/grub/unicode.pf2;
> then
>   set gfxmode=640x480
>   load_video
>   insmod gfxterm
>   terminal_output gfxterm
> fi
> 
> insmod png
> if background_image
> /gnu/store/hiwhqz749xgdgvg5cfg4i17mczp1n48l-grub-image.resized.png;
> then
>   set color_normal=light-gray/black
>   set color_highlight=yellow/black
> else
>   set menu_color_normal=cyan/blue
>   set menu_color_highlight=white/blue
> fi
> 
> set default=0
> set timeout=5
> menuentry "GNU with Linux-Libre 4.0.2 (alpha)" {
>   # Set 'root' to the partition that contains the kernel.
>   search --file --set
> /gnu/store/j9xlnmb2xvw22pb1fyjw3am6lhljn4pc-linux-libre-4.0.2/bzImage
> 
> 
>   linux 
> /gnu/store/j9xlnmb2xvw22pb1fyjw3am6lhljn4pc-linux-libre-4.0.2/bzImage
> --root=/dev/disk/by-id/ata-WDC_WD20EURS-63SPKY0_WD-WMC300539593-part3
> --system=/gnu/store/xp866fxdv1lyz9yip88v4rk6anqsp3lr-system
> --load=/gnu/store/xp866fxdv1lyz9yip88v4rk6anqsp3lr-system/boot
>   initrd /gnu/store/xp866fxdv1lyz9yip88v4rk6anqsp3lr-system/initrd
> }
> 
> submenu "GNU system, old configurations..." {
> menuentry "GNU with Linux-Libre 4.0.2 (alpha) (#1, 2015-05-14 01:11)" {
>   # Set 'root' to the partition that contains the kernel.
>   search --file --set
> /gnu/store/j9xlnmb2xvw22pb1fyjw3am6lhljn4pc-linux-libre-4.0.2/bzImage
> 
> 
>   linux 
> /gnu/store/j9xlnmb2xvw22pb1fyjw3am6lhljn4pc-linux-libre-4.0.2/bzImage
> --root=gnu-disk-image --system=/var/guix/profiles/system-1-link
> --load=/var/guix/profiles/system-1-link/boot
>   initrd /var/guix/profiles/system-1-link/initrd
> }
> }
> ---
> 
> Any suggestions would be appreciated.
> 
> I'm the same user who started the "Show example for GuixSD config.scm"
> thread in guix-bug@gnu.org - I read in the System Installation guide
> in the GuixSD manual that the guix-devel@gnu.org list was preferred.
In my blog I taking about it. See https://d4n1.org/guixs-config-scm/

Thanks :)
-- 
Daniel Pimentel (d4n1 3:)

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

* Re: Help with a basic GuixSD installation
  2015-06-29 18:18 Help with a basic GuixSD installation Evan Rowley
  2015-06-30  1:55 ` Daniel Pimentel
@ 2015-06-30 13:08 ` Ludovic Courtès
  2015-06-30 17:06   ` Claes Wallin (韋嘉誠)
  1 sibling, 1 reply; 13+ messages in thread
From: Ludovic Courtès @ 2015-06-30 13:08 UTC (permalink / raw)
  To: Evan Rowley; +Cc: Guix-devel

Evan Rowley <rowley.evan@gmail.com> skribis:

>   (file-systems (cons (file-system
>                         (device
> "/dev/disk/by-id/ata-WDC_WD20EURS-63SPKY0_WD-WMC300539593-part3")
>                         (title "root")
>                         (mount-point "/")
>                         (type "ext4"))
>                       %base-file-systems))

You should be using something like:

  (file-system
    (title 'label)
    (device "ata-WDC_WD20EURS-63SPKY0_WD-WMC300539593-part3")
    (mount-point "/")
    (type "ext4"))

It literally means: Mount the block device whose label (in the ext[234]
sense) is “ata-WDC_WD20EURS-63SPKY0_WD-WMC300539593-part3”.

The root file system is mounted from the initrd, when udev is not
running; thus /dev/disk/by-id is not available yet, and it’s important
to use this 'label mechanism instead.

Thanks,
Ludo’.

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

* Re: Help with a basic GuixSD installation
  2015-06-30 13:08 ` Ludovic Courtès
@ 2015-06-30 17:06   ` Claes Wallin (韋嘉誠)
  2015-07-01  2:04     ` Evan Rowley
                       ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Claes Wallin (韋嘉誠) @ 2015-06-30 17:06 UTC (permalink / raw)
  Cc: guix-devel

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

On 30-Jun-2015 3:08 pm, "Ludovic Courtès" <ludo@gnu.org> wrote:
> Evan Rowley <rowley.evan@gmail.com> skribis:
>
> >   (file-systems (cons (file-system
> >                         (device
> > "/dev/disk/by-id/ata-WDC_WD20EURS-63SPKY0_WD-WMC300539593-part3")
> >                         (title "root")
> >                         (mount-point "/")
> >                         (type "ext4"))
> >                       %base-file-systems))
>
> You should be using something like:
>
>   (file-system
>     (title 'label)
>     (device "ata-WDC_WD20EURS-63SPKY0_WD-WMC300539593-part3")
>     (mount-point "/")
>     (type "ext4"))
>
> It literally means: Mount the block device whose label (in the ext[234]
> sense) is “ata-WDC_WD20EURS-63SPKY0_WD-WMC300539593-part3”.
>
> The root file system is mounted from the initrd, when udev is not
> running; thus /dev/disk/by-id is not available yet, and it’s important
> to use this 'label mechanism instead.

So *that's* what the mysterious (title 'label) means!

-- 
   /c

[-- Attachment #2: Type: text/html, Size: 1552 bytes --]

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

* Re: Help with a basic GuixSD installation
  2015-06-30 17:06   ` Claes Wallin (韋嘉誠)
@ 2015-07-01  2:04     ` Evan Rowley
  2015-07-01 14:38       ` Daniel Pimentel
  2015-07-01  9:23     ` Ludovic Courtès
  2015-07-02 14:21     ` Daniel Pimentel
  2 siblings, 1 reply; 13+ messages in thread
From: Evan Rowley @ 2015-07-01  2:04 UTC (permalink / raw)
  Cc: guix-devel

Thanks Daniel and Ludovic for the helpful information. I will try to
install again over the coming days and report my progress.

On Tue, Jun 30, 2015 at 1:06 PM, Claes Wallin (韋嘉誠)
<clacke+gmail@lysator.liu.se> wrote:
> On 30-Jun-2015 3:08 pm, "Ludovic Courtès" <ludo@gnu.org> wrote:
>> Evan Rowley <rowley.evan@gmail.com> skribis:
>>
>> >   (file-systems (cons (file-system
>> >                         (device
>> > "/dev/disk/by-id/ata-WDC_WD20EURS-63SPKY0_WD-WMC300539593-part3")
>> >                         (title "root")
>> >                         (mount-point "/")
>> >                         (type "ext4"))
>> >                       %base-file-systems))
>>
>> You should be using something like:
>>
>>   (file-system
>>     (title 'label)
>>     (device "ata-WDC_WD20EURS-63SPKY0_WD-WMC300539593-part3")
>>     (mount-point "/")
>>     (type "ext4"))
>>
>> It literally means: Mount the block device whose label (in the ext[234]
>> sense) is “ata-WDC_WD20EURS-63SPKY0_WD-WMC300539593-part3”.
>>
>> The root file system is mounted from the initrd, when udev is not
>> running; thus /dev/disk/by-id is not available yet, and it’s important
>> to use this 'label mechanism instead.
>
> So *that's* what the mysterious (title 'label) means!
>
> --
>    /c



-- 
 - EJR

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

* Re: Help with a basic GuixSD installation
  2015-06-30 17:06   ` Claes Wallin (韋嘉誠)
  2015-07-01  2:04     ` Evan Rowley
@ 2015-07-01  9:23     ` Ludovic Courtès
  2015-07-01 12:46       ` Claes Wallin (韋嘉誠)
  2015-07-05  8:16       ` Mark H Weaver
  2015-07-02 14:21     ` Daniel Pimentel
  2 siblings, 2 replies; 13+ messages in thread
From: Ludovic Courtès @ 2015-07-01  9:23 UTC (permalink / raw)
  To: Claes Wallin (韋嘉誠); +Cc: guix-devel

"Claes Wallin (韋嘉誠)" <clacke+gmail@lysator.liu.se> skribis:

> So *that's* what the mysterious (title 'label) means!

It’s not that mysterious:

  https://www.gnu.org/software/guix/manual/html_node/File-Systems.html

:-)

Ludo’.

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

* Re: Help with a basic GuixSD installation
  2015-07-01  9:23     ` Ludovic Courtès
@ 2015-07-01 12:46       ` Claes Wallin (韋嘉誠)
  2015-07-05  8:16       ` Mark H Weaver
  1 sibling, 0 replies; 13+ messages in thread
From: Claes Wallin (韋嘉誠) @ 2015-07-01 12:46 UTC (permalink / raw)
  Cc: guix-devel

On Wed, Jul 1, 2015 at 11:23 AM, Ludovic Courtès <ludo@gnu.org> wrote:
> "Claes Wallin (韋嘉誠)" <clacke+gmail@lysator.liu.se> skribis:
>
>> So *that's* what the mysterious (title 'label) means!
>
> It’s not that mysterious:
>
>   https://www.gnu.org/software/guix/manual/html_node/File-Systems.html
>
> :-)

Ow, the burn. :-)

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

* Re: Help with a basic GuixSD installation
  2015-07-01  2:04     ` Evan Rowley
@ 2015-07-01 14:38       ` Daniel Pimentel
  0 siblings, 0 replies; 13+ messages in thread
From: Daniel Pimentel @ 2015-07-01 14:38 UTC (permalink / raw)
  To: Evan Rowley; +Cc: guix-devel, guix-devel-bounces+d4n1=opmbx.org

On 2015-06-30 23:04, Evan Rowley wrote:
> Thanks Daniel and Ludovic for the helpful information. I will try to
> install again over the coming days and report my progress.
> 
> On Tue, Jun 30, 2015 at 1:06 PM, Claes Wallin (韋嘉誠)
> <clacke+gmail@lysator.liu.se> wrote:
>> On 30-Jun-2015 3:08 pm, "Ludovic Courtès" <ludo@gnu.org> wrote:
>>> Evan Rowley <rowley.evan@gmail.com> skribis:
>>> 
>>> >   (file-systems (cons (file-system
>>> >                         (device
>>> > "/dev/disk/by-id/ata-WDC_WD20EURS-63SPKY0_WD-WMC300539593-part3")
>>> >                         (title "root")
>>> >                         (mount-point "/")
>>> >                         (type "ext4"))
>>> >                       %base-file-systems))
>>> 
>>> You should be using something like:
>>> 
>>>   (file-system
>>>     (title 'label)
>>>     (device "ata-WDC_WD20EURS-63SPKY0_WD-WMC300539593-part3")
>>>     (mount-point "/")
>>>     (type "ext4"))
>>> 
>>> It literally means: Mount the block device whose label (in the 
>>> ext[234]
>>> sense) is “ata-WDC_WD20EURS-63SPKY0_WD-WMC300539593-part3”.
>>> 
>>> The root file system is mounted from the initrd, when udev is not
>>> running; thus /dev/disk/by-id is not available yet, and it’s 
>>> important
>>> to use this 'label mechanism instead.
>> 
>> So *that's* what the mysterious (title 'label) means!
>> 
>> --
>>    /c
Allright and welcome to Guix world :)

Good luck.
-- 
Daniel Pimentel (d4n1 3:)

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

* Re: Help with a basic GuixSD installation
  2015-06-30 17:06   ` Claes Wallin (韋嘉誠)
  2015-07-01  2:04     ` Evan Rowley
  2015-07-01  9:23     ` Ludovic Courtès
@ 2015-07-02 14:21     ` Daniel Pimentel
  2 siblings, 0 replies; 13+ messages in thread
From: Daniel Pimentel @ 2015-07-02 14:21 UTC (permalink / raw)
  To: Claes Wallin (韋嘉誠)
  Cc: guix-devel, guix-devel-bounces+d4n1=opmbx.org

On 2015-06-30 14:06, Claes Wallin wrote:
> On 30-Jun-2015 3:08 pm, "Ludovic Courtès" <ludo@gnu.org> wrote:
>  > Evan Rowley <rowley.evan@gmail.com> skribis:
>  >
>  > >   (file-systems (cons (file-system
>  > >                         (device
>  > > "/dev/disk/by-id/ata-WDC_WD20EURS-63SPKY0_WD-WMC300539593-part3")
>  > >                         (title "root")
>  > >                         (mount-point "/")
>  > >                         (type "ext4"))
>  > >                       %base-file-systems))
>  >
>  > You should be using something like:
>  >
>  >   (file-system
>  >     (title 'label)
>  >     (device "ata-WDC_WD20EURS-63SPKY0_WD-WMC300539593-part3")
>  >     (mount-point "/")
>  >     (type "ext4"))
>  >
>  > It literally means: Mount the block device whose label (in the
> ext[234]
>  > sense) is “ata-WDC_WD20EURS-63SPKY0_WD-WMC300539593-part3”.
>  >
>  > The root file system is mounted from the initrd, when udev is not
>  > running; thus /dev/disk/by-id is not available yet, and it’s
> important
>  > to use this 'label mechanism instead.
> 
> So *that's* what the mysterious (title 'label) means!
> 
> --
>     /c
The "(title 'label) are label set when format partition, example:
mkfs.ext4 -L root /dev/sda1
and
mount -L root /mnt

The GuixSD get label partition through config.scm file.
-- 
Daniel Pimentel (d4n1 3:)

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

* Re: Help with a basic GuixSD installation
  2015-07-01  9:23     ` Ludovic Courtès
  2015-07-01 12:46       ` Claes Wallin (韋嘉誠)
@ 2015-07-05  8:16       ` Mark H Weaver
  2015-07-05 14:34         ` Claes Wallin (韋嘉誠)
  2015-07-05 22:33         ` Ludovic Courtès
  1 sibling, 2 replies; 13+ messages in thread
From: Mark H Weaver @ 2015-07-05  8:16 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel, Claes Wallin (韋嘉誠)

ludo@gnu.org (Ludovic Courtès) writes:

> "Claes Wallin (韋嘉誠)" <clacke+gmail@lysator.liu.se> skribis:
>
>> So *that's* what the mysterious (title 'label) means!
>
> It’s not that mysterious:

IMO, 'title' is a very confusing name for that field, because its value
is not the title of anything, but rather determines how the value of the
'device' field will be interpreted.

Unfortunately, I'm having trouble thinking of a concise name for that
field that is also descriptive.  'mode' or 'lookup-mode' are the best
ideas I have so far.

However, to go a bit further: it would be great if all 'device' fields
in the OS config used a consistent syntax for specifying devices by
label or uuid.  I prefer to reference my swap partition by label, so I
use "/dev/disk/by-label/…" in 'swap-partitions', but the lack of
symmetry with 'file-system' grates on me.

Here's an idea: the values of device fields could be either strings or
lists of the form:

  (uuid "6f8ab…")
  (label "foo")

Thoughts?

     Mark

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

* Re: Help with a basic GuixSD installation
  2015-07-05  8:16       ` Mark H Weaver
@ 2015-07-05 14:34         ` Claes Wallin (韋嘉誠)
  2015-07-05 22:33         ` Ludovic Courtès
  1 sibling, 0 replies; 13+ messages in thread
From: Claes Wallin (韋嘉誠) @ 2015-07-05 14:34 UTC (permalink / raw)
  To: Mark H Weaver; +Cc: guix-devel

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

On Jul 5, 2015 10:16 AM, "Mark H Weaver" <mhw@netris.org> wrote:
> ludo@gnu.org (Ludovic Courtès) writes:
> > "Claes Wallin (韋嘉誠)" <clacke+gmail@lysator.liu.se> skribis:
> >
> >> So *that's* what the mysterious (title 'label) means!
> >
> > It’s not that mysterious:
>
> IMO, 'title' is a very confusing name for that field, because its value
> is not the title of anything, but rather determines how the value of the
> 'device' field will be interpreted.

That was my point. Thank you for spelling it out clearly.

> Unfortunately, I'm having trouble thinking of a concise name for that
> field that is also descriptive.  'mode' or 'lookup-mode' are the best
> ideas I have so far.

[ . . . ]

> Here's an idea: the values of device fields could be either strings or
> lists of the form:
>
>   (uuid "6f8ab…")
>   (label "foo")
>
> Thoughts?

You read my mind. A "union" type record with a label is not optimal, much
better to have separate records with semantically clear names.

[-- Attachment #2: Type: text/html, Size: 1497 bytes --]

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

* Re: Help with a basic GuixSD installation
  2015-07-05  8:16       ` Mark H Weaver
  2015-07-05 14:34         ` Claes Wallin (韋嘉誠)
@ 2015-07-05 22:33         ` Ludovic Courtès
  2015-07-06  1:59           ` Evan Rowley
  1 sibling, 1 reply; 13+ messages in thread
From: Ludovic Courtès @ 2015-07-05 22:33 UTC (permalink / raw)
  To: Mark H Weaver; +Cc: guix-devel, Claes Wallin (韋嘉誠)

Mark H Weaver <mhw@netris.org> skribis:

> ludo@gnu.org (Ludovic Courtès) writes:
>
>> "Claes Wallin (韋嘉誠)" <clacke+gmail@lysator.liu.se> skribis:
>>
>>> So *that's* what the mysterious (title 'label) means!
>>
>> It’s not that mysterious:
>
> IMO, 'title' is a very confusing name for that field, because its value
> is not the title of anything, but rather determines how the value of the
> 'device' field will be interpreted.

Yeah, it’s not satisfying, but I didn’t have any better idea.

> However, to go a bit further: it would be great if all 'device' fields
> in the OS config used a consistent syntax for specifying devices by
> label or uuid.  I prefer to reference my swap partition by label, so I
> use "/dev/disk/by-label/…" in 'swap-partitions', but the lack of
> symmetry with 'file-system' grates on me.

Right, that’s a problem.

> Here's an idea: the values of device fields could be either strings or
> lists of the form:
>
>   (uuid "6f8ab…")
>   (label "foo")
>
> Thoughts?

What about a <device> data type?

  (device
    (kind 'uuid)
    (value "6f8ab…"))

Ludo’.

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

* Re: Help with a basic GuixSD installation
  2015-07-05 22:33         ` Ludovic Courtès
@ 2015-07-06  1:59           ` Evan Rowley
  0 siblings, 0 replies; 13+ messages in thread
From: Evan Rowley @ 2015-07-06  1:59 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel, Claes Wallin (韋嘉誠)

I like Ludovic's idea is going in the right direction.

On Sun, Jul 5, 2015 at 6:33 PM, Ludovic Courtès <ludo@gnu.org> wrote:
> Mark H Weaver <mhw@netris.org> skribis:
>
>> ludo@gnu.org (Ludovic Courtès) writes:
>>
>>> "Claes Wallin (韋嘉誠)" <clacke+gmail@lysator.liu.se> skribis:
>>>
>>>> So *that's* what the mysterious (title 'label) means!
>>>
>>> It’s not that mysterious:
>>
>> IMO, 'title' is a very confusing name for that field, because its value
>> is not the title of anything, but rather determines how the value of the
>> 'device' field will be interpreted.
>
> Yeah, it’s not satisfying, but I didn’t have any better idea.
>
>> However, to go a bit further: it would be great if all 'device' fields
>> in the OS config used a consistent syntax for specifying devices by
>> label or uuid.  I prefer to reference my swap partition by label, so I
>> use "/dev/disk/by-label/…" in 'swap-partitions', but the lack of
>> symmetry with 'file-system' grates on me.
>
> Right, that’s a problem.
>
>> Here's an idea: the values of device fields could be either strings or
>> lists of the form:
>>
>>   (uuid "6f8ab…")
>>   (label "foo")
>>
>> Thoughts?
>
> What about a <device> data type?
>
>   (device
>     (kind 'uuid)
>     (value "6f8ab…"))
>
> Ludo’.
>



-- 
 - EJR

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

end of thread, other threads:[~2015-07-06  1:59 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-29 18:18 Help with a basic GuixSD installation Evan Rowley
2015-06-30  1:55 ` Daniel Pimentel
2015-06-30 13:08 ` Ludovic Courtès
2015-06-30 17:06   ` Claes Wallin (韋嘉誠)
2015-07-01  2:04     ` Evan Rowley
2015-07-01 14:38       ` Daniel Pimentel
2015-07-01  9:23     ` Ludovic Courtès
2015-07-01 12:46       ` Claes Wallin (韋嘉誠)
2015-07-05  8:16       ` Mark H Weaver
2015-07-05 14:34         ` Claes Wallin (韋嘉誠)
2015-07-05 22:33         ` Ludovic Courtès
2015-07-06  1:59           ` Evan Rowley
2015-07-02 14:21     ` Daniel Pimentel

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