Re: Help with a basic GuixSD installation

2015-07-05 Thread Mark H Weaver
l...@gnu.org (Ludovic Courtès) writes:

 Claes Wallin (韋嘉誠) clacke+gm...@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



Re: Help with a basic GuixSD installation

2015-07-05 Thread 韋嘉誠
On Jul 5, 2015 10:16 AM, Mark H Weaver m...@netris.org wrote:
 l...@gnu.org (Ludovic Courtès) writes:
  Claes Wallin (韋嘉誠) clacke+gm...@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.


Re: Help with a basic GuixSD installation

2015-07-05 Thread Ludovic Courtès
Mark H Weaver m...@netris.org skribis:

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

 Claes Wallin (韋嘉誠) clacke+gm...@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’.



Re: Help with a basic GuixSD installation

2015-07-05 Thread Evan Rowley
I like Ludovic's idea is going in the right direction.

On Sun, Jul 5, 2015 at 6:33 PM, Ludovic Courtès l...@gnu.org wrote:
 Mark H Weaver m...@netris.org skribis:

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

 Claes Wallin (韋嘉誠) clacke+gm...@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



Re: Help with a basic GuixSD installation

2015-07-02 Thread Daniel Pimentel

On 2015-06-30 14:06, Claes Wallin wrote:

On 30-Jun-2015 3:08 pm, Ludovic Courtès l...@gnu.org wrote:
  Evan Rowley rowley.e...@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:)



Re: Help with a basic GuixSD installation

2015-07-01 Thread 韋嘉誠
On Wed, Jul 1, 2015 at 11:23 AM, Ludovic Courtès l...@gnu.org wrote:
 Claes Wallin (韋嘉誠) clacke+gm...@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. :-)



Re: Help with a basic GuixSD installation

2015-07-01 Thread Ludovic Courtès
Claes Wallin (韋嘉誠) clacke+gm...@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’.



Re: Help with a basic GuixSD installation

2015-06-30 Thread Evan Rowley
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+gm...@lysator.liu.se wrote:
 On 30-Jun-2015 3:08 pm, Ludovic Courtès l...@gnu.org wrote:
 Evan Rowley rowley.e...@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



Re: Help with a basic GuixSD installation

2015-06-30 Thread Ludovic Courtès
Evan Rowley rowley.e...@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’.



Re: Help with a basic GuixSD installation

2015-06-30 Thread 韋嘉誠
On 30-Jun-2015 3:08 pm, Ludovic Courtès l...@gnu.org wrote:
 Evan Rowley rowley.e...@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


Re: Help with a basic GuixSD installation

2015-06-29 Thread Daniel Pimentel

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