Re: System installation from a USB stick

2014-07-24 Thread Ludovic Courtès
Adam Pribyl  skribis:

> - I would vote for the basic config.scm to be present on the USB
> somewhere, it is time consuming to rewrite one from help to the
> file. (Could be I may copy it somehow from info page, but I would need
> a help how to do that.)

Done in 1dac856.

Ludo’.



Re: System installation from a USB stick

2014-07-24 Thread David Thompson
Adam Pribyl  writes:

> On Thu, 24 Jul 2014, David Thompson wrote:
>
>> Adam Pribyl  writes:
>>
>>> I can not boot installed system, boot looks for /dev/sda1 which is not
>>> present. It smells to me like the same problem with devtmpfs previously in
>>> live USB... I found in grub the reference to /dev/sda1 (as LiveUSB now
>>> with udev in devtmpfs and kernel 3.15.6 asigns the HDD /dev/sda) but it
>>> looks like the kernel booting from HDD is not seeing it like this.
>>
>> This could be an instance of the problem that bit me last night.  The
>> version of Guix that gets installed (0.6, as you mentioned in your
>> notes), uses an initrd that cannot see SATA hard disks.  So, as a
>> work-around, you must explicitly add the relevant kernel modules in your
>> operating-system definition like so:
>>
>>  (use-modules (gnu) (srfi srfi-26))
>>
>>  (define my-os
>>(operating-system
>>  ...
>>  (initrd (cut base-initrd <> #:extra-modules '("libahci.ko" "ahci.ko")))
>>  ...))
>
> OK, this was it. No it's booting! Thanks.

Awesome!

> Notes continued:
>
> - guix package -i results in a need to "chgrp 3 
> /gnu/store..."

This issue is resolved in guix master, which as we know is different
than what got installed on your system.

> - attempt to install any package I tried results in a build 
> process of many packages including gcc and linux-libre-3.3.8-gnu
> I do not understand why this is happening

This is because you need to authorize hydra.gnu.org for fetching
substitutes, it is not authorized by default.  You need to run:

  guix archive --authorize < 
/gnu/store/p8wran9sj59ryl2fz2vlrhzy55xh7hny-guix-0.6.20b1d19/share/guix/hydra.gnu.org.pub

I think it would be nice if hydra.gnu.org was authorized by default.

Thanks for trying things out!

-- 
David Thompson
Web Developer - Free Software Foundation - http://fsf.org
GPG Key: 0FF1D807
Support the FSF: https://fsf.org/donate



Re: System installation from a USB stick

2014-07-24 Thread Adam Pribyl

On Thu, 24 Jul 2014, David Thompson wrote:


Adam Pribyl  writes:


I can not boot installed system, boot looks for /dev/sda1 which is not
present. It smells to me like the same problem with devtmpfs previously in
live USB... I found in grub the reference to /dev/sda1 (as LiveUSB now
with udev in devtmpfs and kernel 3.15.6 asigns the HDD /dev/sda) but it
looks like the kernel booting from HDD is not seeing it like this.


This could be an instance of the problem that bit me last night.  The
version of Guix that gets installed (0.6, as you mentioned in your
notes), uses an initrd that cannot see SATA hard disks.  So, as a
work-around, you must explicitly add the relevant kernel modules in your
operating-system definition like so:

 (use-modules (gnu) (srfi srfi-26))

 (define my-os
   (operating-system
 ...
 (initrd (cut base-initrd <> #:extra-modules '("libahci.ko" "ahci.ko")))
 ...))


OK, this was it. No it's booting! Thanks.


--
David Thompson


Notes continued:

- guix package -i results in a need to "chgrp 3 
/gnu/store..."


- attempt to install any package I tried results in a build 
process of many packages including gcc and linux-libre-3.3.8-gnu

I do not understand why this is happening

Adam Pribyl



Re: System installation from a USB stick

2014-07-24 Thread David Thompson
Adam Pribyl  writes:

> I can not boot installed system, boot looks for /dev/sda1 which is not 
> present. It smells to me like the same problem with devtmpfs previously in 
> live USB... I found in grub the reference to /dev/sda1 (as LiveUSB now 
> with udev in devtmpfs and kernel 3.15.6 asigns the HDD /dev/sda) but it 
> looks like the kernel booting from HDD is not seeing it like this.

This could be an instance of the problem that bit me last night.  The
version of Guix that gets installed (0.6, as you mentioned in your
notes), uses an initrd that cannot see SATA hard disks.  So, as a
work-around, you must explicitly add the relevant kernel modules in your
operating-system definition like so:

  (use-modules (gnu) (srfi srfi-26))
  
  (define my-os
(operating-system
  ...
  (initrd (cut base-initrd <> #:extra-modules '("libahci.ko" "ahci.ko")))
  ...))

Additionally, as Ludovic has already mentioned, I find that using device
labels is much better than hoping that the /dev nodes on the
installation image are the same as the /dev nodes on the installed
system.

-- 
David Thompson
Web Developer - Free Software Foundation - http://fsf.org
GPG Key: 0FF1D807
Support the FSF: https://fsf.org/donate



Re: System installation from a USB stick

2014-07-24 Thread Ludovic Courtès
Adam Pribyl  skribis:

> On Wed, 23 Jul 2014, Ludovic Courtès wrote:
>
>> I’ve finally fixed this problem: .
>> Not perfect, since it requires users to type an extra command, but that
>> seems acceptable to me.
>>
>> I would very much appreciate new tests and feedback.  Here’s a new image
>> with this fix:
>>
>>  http://www.fdn.fr/~lcourtes/software/guix/gnu-usb-install-20140723.x86_64.xz
>>  
>> http://www.fdn.fr/~lcourtes/software/guix/gnu-usb-install-20140723.x86_64.xz.asc
>>  SHA1: 7d277ed9a0927fd08e211125eca9a8bea98e7c3e
>>
>> (For 32-bit, you can rebuild it with the usual command.)
>
> Installation went fine.
>
> I can not boot installed system, boot looks for /dev/sda1 which is not
> present. It smells to me like the same problem with devtmpfs
> previously in live USB... I found in grub the reference to /dev/sda1
> (as LiveUSB now with udev in devtmpfs and kernel 3.15.6 asigns the HDD
> /dev/sda) but it looks like the kernel booting from HDD is not seeing
> it like this.

The system tries to mount whatever was specified in the ‘file-system’
declaration for "/".  Perhaps you should use a label instead of the
actual device name?  As in:

  (file-system
(mount-point "/")
(device "root")
(title 'label)
...)

The GRUB menu will use that as well.

(If the root file system already has a label, you can try that easily by
just editing the GRUB config from GRUB to use, say, --root=my-label.)

> Notes:
> - Installed system has kernel 3.15.5 and guix 0.6 while the liveUSB
> has kernel 3.15.6 and guix 0.7
>
> - The help file on tty2 needs to be updated to accomodate the info
> about cow-store

Yes, that’s the result of the ‘guix’ package (in the distro) being
older.  I’ll update it.

> - I would vote for the basic config.scm to be present on the USB
> somewhere, it is time consuming to rewrite one from help to the
> file. (Could be I may copy it somehow from info page, but I would need
> a help how to do that.)

Yes, I agree it’d be useful.  I’ll see how this can be achieved.

> - Time synchro or at least hwclock --hctosys would be fine as
> everything is installed 1.1.1970

It’s normal that everything in the store has zeroed timestamps.  That’s
one of the things that support determinism.

> - My boot is somewhat long due to missing firmware for a Radeon
> graphics card and "fatal error during GPU init". This is probably due
> to linux-libre kernel. I am not sure if this could be mitigated
> somehow, generally is not a problem.

Yeah, no idea, but I suspect it’s indeed beyond the scope of Guix.  ;-)

Ludo’.



Re: System installation from a USB stick

2014-07-24 Thread Adam Pribyl

On Wed, 23 Jul 2014, Ludovic Courtès wrote:


I’ve finally fixed this problem: .
Not perfect, since it requires users to type an extra command, but that
seems acceptable to me.

I would very much appreciate new tests and feedback.  Here’s a new image
with this fix:

 http://www.fdn.fr/~lcourtes/software/guix/gnu-usb-install-20140723.x86_64.xz
 
http://www.fdn.fr/~lcourtes/software/guix/gnu-usb-install-20140723.x86_64.xz.asc
 SHA1: 7d277ed9a0927fd08e211125eca9a8bea98e7c3e

(For 32-bit, you can rebuild it with the usual command.)


Installation went fine.

I can not boot installed system, boot looks for /dev/sda1 which is not 
present. It smells to me like the same problem with devtmpfs previously in 
live USB... I found in grub the reference to /dev/sda1 (as LiveUSB now 
with udev in devtmpfs and kernel 3.15.6 asigns the HDD /dev/sda) but it 
looks like the kernel booting from HDD is not seeing it like this.


Notes:
- Installed system has kernel 3.15.5 and guix 0.6 while the liveUSB has 
kernel 3.15.6 and guix 0.7


- The help file on tty2 needs to be updated to accomodate the info about 
cow-store


- I would vote for the basic config.scm to be present on the USB 
somewhere, it is time consuming to rewrite one from help to the file. 
(Could be I may copy it somehow from info page, but I would need a help 
how to do that.)


- Time synchro or at least hwclock --hctosys would be fine as everything 
is installed 1.1.1970


- My boot is somewhat long due to missing firmware for a Radeon graphics 
card and "fatal error during GPU init". This is probably due to 
linux-libre kernel. I am not sure if this could be mitigated somehow, 
generally is not a problem.



Thanks,
Ludo’.


Adam Pribyl

Re: System installation from a USB stick

2014-07-23 Thread Ludovic Courtès
I’ve finally fixed this problem: .
Not perfect, since it requires users to type an extra command, but that
seems acceptable to me.

I would very much appreciate new tests and feedback.  Here’s a new image
with this fix:

  http://www.fdn.fr/~lcourtes/software/guix/gnu-usb-install-20140723.x86_64.xz
  
http://www.fdn.fr/~lcourtes/software/guix/gnu-usb-install-20140723.x86_64.xz.asc
  SHA1: 7d277ed9a0927fd08e211125eca9a8bea98e7c3e

(For 32-bit, you can rebuild it with the usual command.)

Thanks,
Ludo’.


signature.asc
Description: PGP signature


Re: System installation from a USB stick

2014-07-22 Thread Andreas Enge
Hello,

On Fri, Jul 18, 2014 at 09:04:49AM +0200, Ludovic Courtès wrote:
> I’ve uploaded a new USB installation image for x86_64 for testing:

I just tried booting it, successfully, on my Dell Latitude (I think
E6320). As I have no free partition, I did not attempt an installation.
But guix commands work from the live image. Congratulations, Ludovic!

Would it make sense to add the prerequisites for "guix build hello"
to the image?

Andreas




Re: System installation from a USB stick

2014-07-22 Thread Ludovic Courtès
Commit a69576e mounts devtmpfs in a proper way.

Ludo’.



Re: System installation from a USB stick

2014-07-21 Thread Ludovic Courtès
Adam Pribyl  skribis:

> deco stop udev
> mount -t devtmpfs dev /dev
> deco start udev
>
> then /dev is correctly populated.

This patch apparently does the trick similarly:

diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index ae12c8e..31f1b74 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -497,6 +497,7 @@ passed to @command{guix-daemon}."
 (setenv "LINUX_MODULE_DIRECTORY"
 "/run/booted-system/kernel/lib/modules")
 
+(mount "none" "/dev" "devtmpfs")
 (let ((pid (primitive-fork)))
   (case pid
 ((0)

(We can’t use devtmpfs in ‘mount-essential-file-systems’, which is used
before udev starts, though.)

Ludo’.


Re: System installation from a USB stick

2014-07-21 Thread Ludovic Courtès
Adam Pribyl  skribis:

> On Mon, 21 Jul 2014, Ludovic Courtès wrote:
>
>> Adam Pribyl  skribis:
>>
>>> Kernel in dmesg identifies the device like /dev/sdf, doing
>>> mknod /dev/sdf b 8 80; mknod /dev/sdf1 b 8 81; mount /dev/sdf1 /mnt
>>> solves the problem. So definitely the drive is at sdf. It looks to me
>>> like there is some built in limit in udev for number of "scsi" devices
>>> in this case or something.
>>
>> Hmm, I have no idea.  We’re using a relatively old version of udev,
>> maybe that will be solved when upgrading.
>
> OK, I found it. The /dev/* files present there are just some static
> version nodes. udev needs a /dev to be mounted as devtmpfs.

Oh, udev creates things like /dev/disk/*, but it seems I wrongfully
though it would create all the missing nodes.  Per
,
seems we may need to mount /dev as devtmpfs as you wrote.

(And I thought devtmpfs was the deprecated thing, but no, it’s devfs
that’s deprecated.  Oh well.)

Ludo’.



Re: System installation from a USB stick

2014-07-21 Thread Ludovic Courtès
Adam Pribyl  skribis:

> OK, solved. This was a bad idea to mount bind /mnt/gnu to /gnu, using
> a directory with a different name on /mnt/ - finished the
> installation.

I’m surprised that it works at all, because at this point /mnt/gnu/store
is basically empty, so if you bind-mount it to /gnu/store, there’s
nothing left, no?

I’m testing a solution that involves making /gnu/store a unionfs of
itself (conceptually) and /mnt/tmp.

Ludo’.



Re: System installation from a USB stick

2014-07-21 Thread Adam Pribyl

On Mon, 21 Jul 2014, Ludovic Courtès wrote:


Adam Pribyl  skribis:


Kernel in dmesg identifies the device like /dev/sdf, doing
mknod /dev/sdf b 8 80; mknod /dev/sdf1 b 8 81; mount /dev/sdf1 /mnt
solves the problem. So definitely the drive is at sdf. It looks to me
like there is some built in limit in udev for number of "scsi" devices
in this case or something.


Hmm, I have no idea.  We’re using a relatively old version of udev,
maybe that will be solved when upgrading.


OK, I found it. The /dev/* files present there are just some static 
version nodes. udev needs a /dev to be mounted as devtmpfs. This helps


deco stop udev
mount -t devtmpfs dev /dev
deco start udev

then /dev is correctly populated.



Thanks,
Ludo’.



Adam Pribyl

Re: System installation from a USB stick

2014-07-21 Thread Adam Pribyl

On Mon, 21 Jul 2014, Adam Pribyl wrote:


this involved
mount /dev/sdf1 /mnt/
cp -a /gnu /mnt/
mount -o bind /mnt/gnu /gnu
from now on, the target /mnt/gnu is filling up during guix system init.

it ends up with

initializing operating system under "/mnt"
copying '/gnu..glibc-2.19.locales'...
2035 operations
Bus error

Thats it, the installation is not complete, there is just /gnu on target 
drive.


OK, solved. This was a bad idea to mount bind /mnt/gnu to /gnu, using a 
directory with a different name on /mnt/ - finished the installation. Just 
it needs twice the free space on target drive.




Adam Pribyl



Adam Pribyl



Re: System installation from a USB stick

2014-07-21 Thread Adam Pribyl

On Mon, 21 Jul 2014, Ludovic Courtès wrote:


Adam Pribyl  skribis:


Kernel in dmesg identifies the device like /dev/sdf, doing
mknod /dev/sdf b 8 80; mknod /dev/sdf1 b 8 81; mount /dev/sdf1 /mnt
solves the problem. So definitely the drive is at sdf. It looks to me
like there is some built in limit in udev for number of "scsi" devices
in this case or something.


Hmm, I have no idea.  We’re using a relatively old version of udev,
maybe that will be solved when upgrading.


as there is only 1GB of RAM and it seems the install fetches too much
packages into ramdisk. Why is it not using the target file system
already?


Hmm, it’s actually initially populating the local store, on the RAM
disk, right.  I agree that’s a problem we should address.

However, most stuff are already in the store, unless the configuration
being built uses many more packages, or use Xorg and related stuff.  Is
it what’s happening?


The config.scm is as sugessted (just hostname and device modified):


Hmm, OK.  I’m surprised that this requires downloading more than 1GiB of
stuff.


It looks around 700MB comes from the USB image itself, another 700MB is to 
be downloaded. I only have 478MB free ram disk. Together the /gnu has then 
1.4GB roughtly.



I’m looking at a fix, but that’s not as simple as I would have liked.


Maybe using the flash drive itself will serve better?


Nothing special. I tried to bind mount the /gnu to a target drive, the
download went OK (cca 1.4G) but then led to different kind of failure.


I’d be interested in knowing about that one as well.  :-)



this involved
mount /dev/sdf1 /mnt/
cp -a /gnu /mnt/
mount -o bind /mnt/gnu /gnu
from now on, the target /mnt/gnu is filling up during guix system init.

it ends up with

initializing operating system under "/mnt"
copying '/gnu..glibc-2.19.locales'...
2035 operations
Bus error

Thats it, the installation is not complete, there is just /gnu on target 
drive.



Thanks,
Ludo’.


Adam Pribyl


Re: System installation from a USB stick

2014-07-21 Thread Ludovic Courtès
Adam Pribyl  skribis:

> Kernel in dmesg identifies the device like /dev/sdf, doing
> mknod /dev/sdf b 8 80; mknod /dev/sdf1 b 8 81; mount /dev/sdf1 /mnt
> solves the problem. So definitely the drive is at sdf. It looks to me
> like there is some built in limit in udev for number of "scsi" devices
> in this case or something.

Hmm, I have no idea.  We’re using a relatively old version of udev,
maybe that will be solved when upgrading.

>>> as there is only 1GB of RAM and it seems the install fetches too much
>>> packages into ramdisk. Why is it not using the target file system
>>> already?
>>
>> Hmm, it’s actually initially populating the local store, on the RAM
>> disk, right.  I agree that’s a problem we should address.
>>
>> However, most stuff are already in the store, unless the configuration
>> being built uses many more packages, or use Xorg and related stuff.  Is
>> it what’s happening?
>
> The config.scm is as sugessted (just hostname and device modified):

Hmm, OK.  I’m surprised that this requires downloading more than 1GiB of
stuff.

I’m looking at a fix, but that’s not as simple as I would have liked.

> Nothing special. I tried to bind mount the /gnu to a target drive, the
> download went OK (cca 1.4G) but then led to different kind of failure.

I’d be interested in knowing about that one as well.  :-)

Thanks,
Ludo’.



Re: System installation from a USB stick

2014-07-21 Thread Adam Pribyl

On Sun, 20 Jul 2014, Ludovic Courtès wrote:


Adam Pribyl  skribis:


On Sat, 19 Jul 2014, Ludovic Courtès wrote:


Adam Pribyl  skribis:


Sorry, I was completely wrong, the new liveUSB has e2fsprogs,
however I probably do have the problem with ahci module too, and I
confused the old /dev/sda harddrive which is now missing, and
/dev/sda USB. So this is it. My HDD is not visible with the new USB
image.


OK, one more correction - the ahci module is loaded and HDD detected,
but /dev/sdf is not created. There is just sda to sdd..


Once the USB installation is booted, it’s actually udev which takes the
responsibility of loading modules like AHCI (the problem David reported
is in the *installed* system, where the AHCI modules have to be
available in the initrd.)

So there really are this many storage devices in the machine?


Yes and no - there is a USB reader with many interfaces. They are
reorder with this kernel and sda is now sdf. sda is the USB flash
drive with the installation.


Sure, but is there an actual USB storage device plugged in each on of
these interfaces?


This is an internal card reader, devices like /dev/sdb, sdc, sde are 
reserved but empty - like an empty CDROM drive.





Does running ‘udevadm trigger’ helps detect any missing device?


Tried that before - no.


Maybe there’s just nothing to detect, no?

I don’t really understand what the problem is.  What makes you think it
should detect sdf?  What’s the target device node?


Kernel in dmesg identifies the device like /dev/sdf, doing
mknod /dev/sdf b 8 80; mknod /dev/sdf1 b 8 81; mount /dev/sdf1 /mnt
solves the problem. So definitely the drive is at sdf. It looks to me like 
there is some built in limit in udev for number of "scsi" devices in this 
case or something.



After a few mknods, I ended with "guix system init.." at Not enought
space


Before it started copying stuff?


as there is only 1GB of RAM and it seems the install fetches too much
packages into ramdisk. Why is it not using the target file system
already?


Hmm, it’s actually initially populating the local store, on the RAM
disk, right.  I agree that’s a problem we should address.

However, most stuff are already in the store, unless the configuration
being built uses many more packages, or use Xorg and related stuff.  Is
it what’s happening?


The config.scm is as sugessted (just hostname and device modified):
   (use-modules (gnu) (gnu system grub))

   (operating-system
 (host-name "foo")
 (timezone "Europe/Paris")
 (locale "en_US.UTF-8")
 (bootloader (grub-configuration (device "/dev/sdX")))
 (file-systems
   (list (file-system
   (device "/dev/sdX1")
   (mount-point "/")
   (type "ext4")

Nothing special. I tried to bind mount the /gnu to a target drive, the 
download went OK (cca 1.4G) but then led to different kind of failure.



Thanks,
Ludo’.


Adam Pribyl

Re: System installation from a USB stick

2014-07-20 Thread Ludovic Courtès
l...@gnu.org (Ludovic Courtès) skribis:

>> as there is only 1GB of RAM and it seems the install fetches too much
>> packages into ramdisk. Why is it not using the target file system
>> already?
>
> Hmm, it’s actually initially populating the local store, on the RAM
> disk, right.  I agree that’s a problem we should address.

I’ve created a ticket for this: .

Ludo’.



Re: System installation from a USB stick

2014-07-20 Thread Ludovic Courtès
Adam Pribyl  skribis:

> On Sat, 19 Jul 2014, Ludovic Courtès wrote:
>
>> Adam Pribyl  skribis:
>>
 Sorry, I was completely wrong, the new liveUSB has e2fsprogs,
 however I probably do have the problem with ahci module too, and I
 confused the old /dev/sda harddrive which is now missing, and
 /dev/sda USB. So this is it. My HDD is not visible with the new USB
 image.
>>>
>>> OK, one more correction - the ahci module is loaded and HDD detected,
>>> but /dev/sdf is not created. There is just sda to sdd..
>>
>> Once the USB installation is booted, it’s actually udev which takes the
>> responsibility of loading modules like AHCI (the problem David reported
>> is in the *installed* system, where the AHCI modules have to be
>> available in the initrd.)
>>
>> So there really are this many storage devices in the machine?
>
> Yes and no - there is a USB reader with many interfaces. They are
> reorder with this kernel and sda is now sdf. sda is the USB flash
> drive with the installation.

Sure, but is there an actual USB storage device plugged in each on of
these interfaces?

>> Does running ‘udevadm trigger’ helps detect any missing device?
>
> Tried that before - no.

Maybe there’s just nothing to detect, no?

I don’t really understand what the problem is.  What makes you think it
should detect sdf?  What’s the target device node?

> After a few mknods, I ended with "guix system init.." at Not enought
> space

Before it started copying stuff?

> as there is only 1GB of RAM and it seems the install fetches too much
> packages into ramdisk. Why is it not using the target file system
> already?

Hmm, it’s actually initially populating the local store, on the RAM
disk, right.  I agree that’s a problem we should address.

However, most stuff are already in the store, unless the configuration
being built uses many more packages, or use Xorg and related stuff.  Is
it what’s happening?

Thanks,
Ludo’.



Re: System installation from a USB stick

2014-07-19 Thread Adam Pribyl

On Sat, 19 Jul 2014, Ludovic Courtès wrote:


Adam Pribyl  skribis:


Sorry, I was completely wrong, the new liveUSB has e2fsprogs,
however I probably do have the problem with ahci module too, and I
confused the old /dev/sda harddrive which is now missing, and
/dev/sda USB. So this is it. My HDD is not visible with the new USB
image.


OK, one more correction - the ahci module is loaded and HDD detected,
but /dev/sdf is not created. There is just sda to sdd..


Once the USB installation is booted, it’s actually udev which takes the
responsibility of loading modules like AHCI (the problem David reported
is in the *installed* system, where the AHCI modules have to be
available in the initrd.)

So there really are this many storage devices in the machine?


Yes and no - there is a USB reader with many interfaces. They are 
reorder with this kernel and sda is now sdf. sda is the USB flash drive 
with the installation.



Does running ‘udevadm trigger’ helps detect any missing device?


Tried that before - no.


Thanks,
Ludo’.


After a few mknods, I ended with "guix system init.." at Not enought space 
as there is only 1GB of RAM and it seems the install fetches too much 
packages into ramdisk. Why is it not using the target file system already?


Adam Pribyl

Re: System installation from a USB stick

2014-07-19 Thread Ludovic Courtès
Adam Pribyl  skribis:

>> Sorry, I was completely wrong, the new liveUSB has e2fsprogs,
>> however I probably do have the problem with ahci module too, and I
>> confused the old /dev/sda harddrive which is now missing, and
>> /dev/sda USB. So this is it. My HDD is not visible with the new USB
>> image.
>
> OK, one more correction - the ahci module is loaded and HDD detected,
> but /dev/sdf is not created. There is just sda to sdd..

Once the USB installation is booted, it’s actually udev which takes the
responsibility of loading modules like AHCI (the problem David reported
is in the *installed* system, where the AHCI modules have to be
available in the initrd.)

So there really are this many storage devices in the machine?

Does running ‘udevadm trigger’ helps detect any missing device?

Thanks,
Ludo’.



Re: System installation from a USB stick

2014-07-19 Thread Adam Pribyl

On Sat, 19 Jul 2014, Adam Pribyl wrote:


On Sat, 19 Jul 2014, Ludovic Courtès wrote:


Adam Pribyl  skribis:


On Sat, 19 Jul 2014, Ludovic Courtès wrote:


[...]


The installation image’s root is mounted by label.  So if you happen to
have a different partition with the label ‘gnu-disk-image’, then it may
end up mounting the wrong partition.  That’s what’s happening here,
right?


Well, could be, this is a test machine where I installed the previous
USB image. If the name is the same at installes as the USB OS, then it
is very probable.


The partition is manually created by the user.  So unless you did
‘mkfs.ext2 -L gnu-disk-image ...’, there’s no reason it uses the same
name.

But can you actually check whether this is the case, for instance using
the ‘blkid’ command?



Sorry, I was completely wrong, the new liveUSB has e2fsprogs, however I 
probably do have the problem with ahci module too, and I confused the old 
/dev/sda harddrive which is now missing, and /dev/sda USB. So this is it. My 
HDD is not visible with the new USB image.


OK, one more correction - the ahci module is loaded and HDD detected, but 
/dev/sdf is not created. There is just sda to sdd..




Thanks,
Ludo’.



Adam Pribyl


Adam Pribyl

Re: System installation from a USB stick

2014-07-19 Thread Adam Pribyl

On Sat, 19 Jul 2014, Ludovic Courtès wrote:


Adam Pribyl  skribis:


On Sat, 19 Jul 2014, Ludovic Courtès wrote:


[...]


The installation image’s root is mounted by label.  So if you happen to
have a different partition with the label ‘gnu-disk-image’, then it may
end up mounting the wrong partition.  That’s what’s happening here,
right?


Well, could be, this is a test machine where I installed the previous
USB image. If the name is the same at installes as the USB OS, then it
is very probable.


The partition is manually created by the user.  So unless you did
‘mkfs.ext2 -L gnu-disk-image ...’, there’s no reason it uses the same
name.

But can you actually check whether this is the case, for instance using
the ‘blkid’ command?



Sorry, I was completely wrong, the new liveUSB has e2fsprogs, however I 
probably do have the problem with ahci module too, and I confused the old 
/dev/sda harddrive which is now missing, and /dev/sda USB. So this is it. 
My HDD is not visible with the new USB image.



Thanks,
Ludo’.



Adam Pribyl

Re: System installation from a USB stick

2014-07-19 Thread Ludovic Courtès
Adam Pribyl  skribis:

> On Sat, 19 Jul 2014, Ludovic Courtès wrote:

[...]

>> The installation image’s root is mounted by label.  So if you happen to
>> have a different partition with the label ‘gnu-disk-image’, then it may
>> end up mounting the wrong partition.  That’s what’s happening here,
>> right?
>
> Well, could be, this is a test machine where I installed the previous
> USB image. If the name is the same at installes as the USB OS, then it
> is very probable.

The partition is manually created by the user.  So unless you did
‘mkfs.ext2 -L gnu-disk-image ...’, there’s no reason it uses the same
name.

But can you actually check whether this is the case, for instance using
the ‘blkid’ command?

Thanks,
Ludo’.



Re: System installation from a USB stick

2014-07-19 Thread Adam Pribyl

On Sat, 19 Jul 2014, Ludovic Courtès wrote:


Adam Pribyl  skribis:


On Fri, 18 Jul 2014, Ludovic Courtès wrote:


I’ve uploaded a new USB installation image for x86_64 for testing:

 http://www.fdn.fr/~lcourtes/software/guix/gnu-usb-install-20140718.x86_64.xz
 SHA1: ac944214af34d62b585fa089cd333c1e007be7f2
 (105 MiB)

Use alt-f2 to see the relevant doc.

Feedback welcome!


I did not get too far.

Booted fine, but mounted my HDD install root /dev/sda1 as /real-root
and I can not unmount it or
find /real-root...


The installation image’s root is mounted by label.  So if you happen to
have a different partition with the label ‘gnu-disk-image’, then it may
end up mounting the wrong partition.  That’s what’s happening here,
right?


Well, could be, this is a test machine where I installed the previous USB 
image. If the name is the same at installes as the USB OS, then it is very 
probable.



If so, the solution would be to change the label of your own partition
to avoid the name clash.


There seems to be no e2fsprogs or at least e2label... I'll try to change 
it from different live USB.



Ideally we would mount by UUID but I think that was impractical when I
looked at it.


Well yes, neither UUID is ideal solution.


Ludo’.


Adam Pribyl

Re: System installation from a USB stick

2014-07-19 Thread Ludovic Courtès
Adam Pribyl  skribis:

> On Fri, 18 Jul 2014, Ludovic Courtès wrote:
>
>> I’ve uploaded a new USB installation image for x86_64 for testing:
>>
>>  http://www.fdn.fr/~lcourtes/software/guix/gnu-usb-install-20140718.x86_64.xz
>>  SHA1: ac944214af34d62b585fa089cd333c1e007be7f2
>>  (105 MiB)
>>
>> Use alt-f2 to see the relevant doc.
>>
>> Feedback welcome!
>
> I did not get too far.
>
> Booted fine, but mounted my HDD install root /dev/sda1 as /real-root
> and I can not unmount it or
> find /real-root...

The installation image’s root is mounted by label.  So if you happen to
have a different partition with the label ‘gnu-disk-image’, then it may
end up mounting the wrong partition.  That’s what’s happening here,
right?

If so, the solution would be to change the label of your own partition
to avoid the name clash.

Ideally we would mount by UUID but I think that was impractical when I
looked at it.

Ludo’.



Re: System installation from a USB stick

2014-07-18 Thread Adam Pribyl

On Fri, 18 Jul 2014, David Thompson wrote:


Adam Pribyl  writes:


Booted fine, but mounted my HDD install root /dev/sda1 as /real-root and I
can not unmount it or
find /real-root...


Try `mkdir /real-root` first?


Making this directory on USB flash with guix root did not change anything.
IMHO this is some remain after initrd or something...


--
David Thompson


Adam Pribyl



Re: System installation from a USB stick

2014-07-18 Thread Adam Pribyl

On Fri, 18 Jul 2014, Ludovic Courtès wrote:


I’ve uploaded a new USB installation image for x86_64 for testing:

 http://www.fdn.fr/~lcourtes/software/guix/gnu-usb-install-20140718.x86_64.xz
 SHA1: ac944214af34d62b585fa089cd333c1e007be7f2
 (105 MiB)

Use alt-f2 to see the relevant doc.

Feedback welcome!


I did not get too far.

Booted fine, but mounted my HDD install root /dev/sda1 as /real-root and I 
can not unmount it or find /real-root...



Ludo’.


Adam Pribyl

Re: System installation from a USB stick

2014-07-18 Thread David Thompson
Adam Pribyl  writes:

> Booted fine, but mounted my HDD install root /dev/sda1 as /real-root and I 
> can not unmount it or
> find /real-root...

Try `mkdir /real-root` first?

-- 
David Thompson
Web Developer - Free Software Foundation - http://fsf.org
GPG Key: 0FF1D807
Support the FSF: https://fsf.org/donate



Re: System installation from a USB stick

2014-07-18 Thread Adam Pribyl

On Fri, 18 Jul 2014, Ludovic Courtès wrote:


I’ve uploaded a new USB installation image for x86_64 for testing:

 http://www.fdn.fr/~lcourtes/software/guix/gnu-usb-install-20140718.x86_64.xz
 SHA1: ac944214af34d62b585fa089cd333c1e007be7f2
 (105 MiB)

Use alt-f2 to see the relevant doc.

Feedback welcome!


I did not get too far.

Booted fine, but mounted my HDD install root /dev/sda1 as /real-root and I 
can not unmount it or

find /real-root...


Ludo’.


Adam Pribyl

Re: System installation from a USB stick

2014-07-18 Thread Ludovic Courtès
I’ve uploaded a new USB installation image for x86_64 for testing:

  http://www.fdn.fr/~lcourtes/software/guix/gnu-usb-install-20140718.x86_64.xz
  SHA1: ac944214af34d62b585fa089cd333c1e007be7f2
  (105 MiB)

Use alt-f2 to see the relevant doc.

Feedback welcome!

Ludo’.


signature.asc
Description: PGP signature


Re: System installation from a USB stick

2014-07-16 Thread Ludovic Courtès
Hi,

Thanks for the report, it’s really appreciated!

Adam Pribyl  skribis:

> On Mon, 30 Jun 2014, Ludovic Courtès wrote:
>
>> Hello!
>>
>> I’ve uploaded a USB installation image for x86_64 for testing:
>>
>>  http://www.fdn.fr/~lcourtes/software/guix/gnu-usb-install-20140629.x86_64.xz
>>  SHA1: d36e70d25b81b734fa9558a5446fabb96489ec3b
>>  (100 MiB)
>>
>> To install the system, you would:
>>
>>  1. Configure the network, by running ‘dhclient eth0’ for instance.
>> Normally udev automatically loads device drivers (e.g., my laptop
>> uses e1000e for Ethernet), but since it’s a small config kernel, it
>> may miss drivers for your system, in which case you’re screwed.
>
>
> dhclient can't create /var/db/dhclient.leases (not fatal)

Right, this should be fixed with commit 3485716.

>>  2. Partition, format etc. the target drive; the image includes Parted,
>> fdisk, and e2fsprogs.
>
>
> There is no mkfs.extX, how to format a partition and is it needed? (I
> used old one already formated.)

Indeed.  Fixed in b63dbd4.

> This is more a user feedback: After first start it tries to load "Old
> configuration" in a grub menu by default, that ends in a guile console
> ("old" tries to boot from USB right?).

“Old” should be empty until you upgrade to a new configuration with
‘guix system reconfigure’.  Then it fills up with links to previous
operating systems.

> Switching to linux-libre in Grub boots, but then requests for a group
> passwords start to appear with PAM auth error message. User is asked
> for way too many group passwords. I do not understand why. This
> repeats on every boot...

Ah yes, that was fixed with commit da417ff.

> IMHO: The number of error and warning messages like from udev or
> whatever (locales not installed) during boot should go down before
> making this a public release.

Yeah.

I very much welcome help in that regard.  For instance, with the new
kernel config, udev starting complaining that /dev/ram* don’t exist;
this is harmless, but definitely annoying and not confidence-inspiring.

>> The image was built with
>>
>>  guix system disk-image gnu/system/install.scm --image-size=800MiB
>>
>> as of commit 1ddbd9f.
>>
>> Ludo’.
>
> Otherwise thanks for this achievemnt, the installation is really
> strightforward.

Thanks for the kind words.

If you have Guix installed on the distro you’re currently using, it
would be great if you could try rebuilding the image from master (as
shown above), and see what problems show up.

I’ve also improved documentation of all these things, under “GNU
Distribution.”

Thanks again,
Ludo’.




Re: System installation from a USB stick

2014-07-16 Thread Ludovic Courtès
John Darrington  skribis:

> On Mon, Jun 30, 2014 at 12:22:31AM +0200, Ludovic Court??s wrote:
>  
>3. Write an OS configuration file, say, config.scm (the image only has
>   GNU Zile as the editor.)  
>
> To make it accessible to refugees, can we not provide nano as well?

Yes, did that in 55e70e6.

Ludo’.



Re: System installation from a USB stick

2014-07-16 Thread John Darrington
On Mon, Jun 30, 2014 at 12:22:31AM +0200, Ludovic Court??s wrote:
 
   3. Write an OS configuration file, say, config.scm (the image only has
  GNU Zile as the editor.)  

To make it accessible to refugees, can we not provide nano as well?


-- 
PGP Public key ID: 1024D/2DE827B3 
fingerprint = 8797 A26D 0854 2EAB 0285  A290 8A67 719C 2DE8 27B3
See http://sks-keyservers.net or any PGP keyserver for public key.



signature.asc
Description: Digital signature


Re: System installation from a USB stick

2014-07-16 Thread Adam Pribyl

On Mon, 30 Jun 2014, Ludovic Courtès wrote:


Hello!

I’ve uploaded a USB installation image for x86_64 for testing:

 http://www.fdn.fr/~lcourtes/software/guix/gnu-usb-install-20140629.x86_64.xz
 SHA1: d36e70d25b81b734fa9558a5446fabb96489ec3b
 (100 MiB)

To install the system, you would:

 1. Configure the network, by running ‘dhclient eth0’ for instance.
Normally udev automatically loads device drivers (e.g., my laptop
uses e1000e for Ethernet), but since it’s a small config kernel, it
may miss drivers for your system, in which case you’re screwed.



dhclient can't create /var/db/dhclient.leases (not fatal)



 2. Partition, format etc. the target drive; the image includes Parted,
fdisk, and e2fsprogs.



There is no mkfs.extX, how to format a partition and is it needed? (I used 
old one already formated.)




 3. Write an OS configuration file, say, config.scm (the image only has
GNU Zile as the editor.)  A minimal config looks like this:

  (use-modules (gnu) (gnu system grub))

  (operating-system
(host-name "foo")
(timezone "Europe/Paris")
(locale "en_US.UTF-8")
(bootloader (grub-configuration (device "/dev/sdX")))
(file-systems
  (list (file-system
  (device "/dev/sdX1")
  (mount-point "/")
  (type "ext4")



C-x C-c save yes


  4. Mount the target root file system as /mnt, say.

  5. Run ‘guix system init config.scm /mnt’ (add ‘--no-grub’ if you
 don’t want to install GRUB.)

  6. Unmount /mnt, reboot, and cross fingers.

Still, I would very much like feedback about actual attempts to use
that, about the general procedure, or anything else.


This is more a user feedback: After first start it tries to load "Old 
configuration" in a grub menu by default, that ends in a guile console 
("old" tries to boot from USB right?). Switching to linux-libre in Grub 
boots, but then requests for a group passwords start to appear with PAM 
auth error message. User is asked for way too many group passwords. I do 
not understand why. This repeats on every boot...


IMHO: The number of error and warning messages like from udev or 
whatever (locales not installed) during boot should go down before making 
this a public release.




The image was built with

 guix system disk-image gnu/system/install.scm --image-size=800MiB

as of commit 1ddbd9f.

Ludo’.


Otherwise thanks for this achievemnt, the installation is really 
strightforward.


Regards


Adam Pribyl

Re: System installation from a USB stick

2014-07-15 Thread Alex Sassmannshausen
Hello,

I finally got my hands on a 64bit machine and was able to try out the
installation image.

It worked smoothly up until network configuration (different hardware) —
it was pretty exciting whilst it lasted :-)

Now holding out hope for David's i686 installation image report in order
to build on that experience on more available hardware.

Kudos for all your hard work Ludo (and all other contributors). This is
starting to get very real!

Best wishes,

Alex

Ludovic Courtès writes:

> Hello!
>
> I’ve uploaded a USB installation image for x86_64 for testing:
>
>   http://www.fdn.fr/~lcourtes/software/guix/gnu-usb-install-20140629.x86_64.xz
>   SHA1: d36e70d25b81b734fa9558a5446fabb96489ec3b
>   (100 MiB)
>
> It works like this:
>
>   1. Run ‘xz -d gnu-usb-install-20140629.x86_64.xz’.
>
>   2. Copy it as is to a USB stick that of 1GiB or more:
>dd if=gnu-usb-install-20140629.x86_64 of=/dev/sdX
>  where sdX is the device corresponding to the USB stick.
>
> Then you can boot on the USB stick.  There’s a bit of documentation on
> tty2, but it lacks what follows.  ;-)
>
> To install the system, you would:
>
>   1. Configure the network, by running ‘dhclient eth0’ for instance.
>  Normally udev automatically loads device drivers (e.g., my laptop
>  uses e1000e for Ethernet), but since it’s a small config kernel, it
>  may miss drivers for your system, in which case you’re screwed.
>
>   2. Partition, format etc. the target drive; the image includes Parted,
>  fdisk, and e2fsprogs.
>
>   3. Write an OS configuration file, say, config.scm (the image only has
>  GNU Zile as the editor.)  A minimal config looks like this:
>
>(use-modules (gnu) (gnu system grub))
>
>(operating-system
>  (host-name "foo")
>  (timezone "Europe/Paris")
>  (locale "en_US.UTF-8")
>  (bootloader (grub-configuration (device "/dev/sdX")))
>  (file-systems
>(list (file-system
>(device "/dev/sdX1")
>(mount-point "/")
>(type "ext4")
>
>4. Mount the target root file system as /mnt, say.
>
>5. Run ‘guix system init config.scm /mnt’ (add ‘--no-grub’ if you
>   don’t want to install GRUB.)
>
>6. Unmount /mnt, reboot, and cross fingers.
>
> There are various limitations, so be indulgent.  Notably, the kernel has
> few drivers.  The image is insanely big due to
> .  Swap partitions, dm-crypt’d devices aren’t
> supported yet.
>
> Still, I would very much like feedback about actual attempts to use
> that, about the general procedure, or anything else.
>
> The image was built with
>
>   guix system disk-image gnu/system/install.scm --image-size=800MiB
>
> as of commit 1ddbd9f.
>
> Ludo’.




Re: System installation from a USB stick

2014-07-02 Thread David Thompson
Ludovic Courtès  writes:

> I’m sorry I don’t have a better answer at the moment, but could you try
> rebuilding the image with this patch?

It works!  Thanks!

-- 
David Thompson
Web Developer - Free Software Foundation - http://fsf.org
GPG Key: 0FF1D807
Support the FSF: https://fsf.org/donate



Re: System installation from a USB stick

2014-07-02 Thread Ludovic Courtès
David Thompson  skribis:

> Ludovic Courtès  writes:
>
>> David Thompson  skribis:
>>
>>> David Thompson  writes:
>>>
 It boots! :)
>>>
>>> Well, on my desktop computer it boots.  It kernel panics on my Thinkpad
>>> x220.  linux-initrd.scm:122 throws the error "In procedure bv-u16-ref:
>>> Wrong type argument in position 1".
>>
>> Ouch.  I believe this is fixed by d266b79.
>>
>> Could you try rebuilding the USB image as described in my previous
>> message, copy it to a USB stick, and boot from there?  That would be
>> great.
>>
>
> That patch did the trick.  Thanks!

Thanks for the quick feedback!

Ludo’.



Re: System installation from a USB stick

2014-07-02 Thread David Thompson
Ludovic Courtès  writes:

> David Thompson  skribis:
>
>> David Thompson  writes:
>>
>>> It boots! :)
>>
>> Well, on my desktop computer it boots.  It kernel panics on my Thinkpad
>> x220.  linux-initrd.scm:122 throws the error "In procedure bv-u16-ref:
>> Wrong type argument in position 1".
>
> Ouch.  I believe this is fixed by d266b79.
>
> Could you try rebuilding the USB image as described in my previous
> message, copy it to a USB stick, and boot from there?  That would be
> great.
>

That patch did the trick.  Thanks!  It's really cool to boot into Guix
on non-virtualized hardware.  Now, I need a machine to sacrifice to test
the installation process.

-- 
David Thompson
Web Developer - Free Software Foundation - http://fsf.org
GPG Key: 0FF1D807
Support the FSF: https://fsf.org/donate



Re: System installation from a USB stick

2014-07-02 Thread Ludovic Courtès
David Thompson  skribis:

> Ludovic Courtès  writes:

[...]

>> To install the system, you would:
>>
>>   1. Configure the network, by running ‘dhclient eth0’ for instance.
>>  Normally udev automatically loads device drivers (e.g., my laptop
>>  uses e1000e for Ethernet), but since it’s a small config kernel, it
>>  may miss drivers for your system, in which case you’re screwed.
>>
>
> My desktop computer is in the "screwed" category.  I need the r8169
> kernel module for ethernet to work.

I’m sorry I don’t have a better answer at the moment, but could you try
rebuilding the image with this patch?

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 841ec58..01e6ae5 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -180,6 +180,7 @@
 "CONFIG_SATA_SIS=y\n"
 "CONFIG_VIRTIO_NET=m\n"
 "CONFIG_SIS190=y\n"
+"CONFIG_R8169=m\n"
 ;; https://lists.gnu.org/archive/html/guix-devel/2014-04/msg00039.html
 "CONFIG_DEVPTS_MULTIPLE_INSTANCES=y\n"
 "CONFIG_VIRTIO_PCI=m\n"

Thanks,
Ludo’.


Re: System installation from a USB stick

2014-07-02 Thread Ludovic Courtès
David Thompson  skribis:

> David Thompson  writes:
>
>> It boots! :)
>
> Well, on my desktop computer it boots.  It kernel panics on my Thinkpad
> x220.  linux-initrd.scm:122 throws the error "In procedure bv-u16-ref:
> Wrong type argument in position 1".

Ouch.  I believe this is fixed by d266b79.

Could you try rebuilding the USB image as described in my previous
message, copy it to a USB stick, and boot from there?  That would be
great.

Thanks for testing!

Ludo’.



Re: System installation from a USB stick

2014-07-01 Thread David Thompson
David Thompson  writes:

> It boots! :)

Well, on my desktop computer it boots.  It kernel panics on my Thinkpad
x220.  linux-initrd.scm:122 throws the error "In procedure bv-u16-ref:
Wrong type argument in position 1".

:(

-- 
David Thompson
Web Developer - Free Software Foundation - http://fsf.org
GPG Key: 0FF1D807
Support the FSF: https://fsf.org/donate



Re: System installation from a USB stick

2014-07-01 Thread David Thompson
Ludovic Courtès  writes:

> Hello!
>
> I’ve uploaded a USB installation image for x86_64 for testing:
>
>   http://www.fdn.fr/~lcourtes/software/guix/gnu-usb-install-20140629.x86_64.xz
>   SHA1: d36e70d25b81b734fa9558a5446fabb96489ec3b
>   (100 MiB)
>
> It works like this:
>
>   1. Run ‘xz -d gnu-usb-install-20140629.x86_64.xz’.
>
>   2. Copy it as is to a USB stick that of 1GiB or more:
>dd if=gnu-usb-install-20140629.x86_64 of=/dev/sdX
>  where sdX is the device corresponding to the USB stick.
>
> Then you can boot on the USB stick.  There’s a bit of documentation on
> tty2, but it lacks what follows.  ;-)
>

It boots! :)

> To install the system, you would:
>
>   1. Configure the network, by running ‘dhclient eth0’ for instance.
>  Normally udev automatically loads device drivers (e.g., my laptop
>  uses e1000e for Ethernet), but since it’s a small config kernel, it
>  may miss drivers for your system, in which case you’re screwed.
>

My desktop computer is in the "screwed" category.  I need the r8169
kernel module for ethernet to work.

-- 
David Thompson
Web Developer - Free Software Foundation - http://fsf.org
GPG Key: 0FF1D807
Support the FSF: https://fsf.org/donate



Re: System installation from a USB stick

2014-06-29 Thread Ludovic Courtès
Hello!

I’ve uploaded a USB installation image for x86_64 for testing:

  http://www.fdn.fr/~lcourtes/software/guix/gnu-usb-install-20140629.x86_64.xz
  SHA1: d36e70d25b81b734fa9558a5446fabb96489ec3b
  (100 MiB)

It works like this:

  1. Run ‘xz -d gnu-usb-install-20140629.x86_64.xz’.

  2. Copy it as is to a USB stick that of 1GiB or more:
   dd if=gnu-usb-install-20140629.x86_64 of=/dev/sdX
 where sdX is the device corresponding to the USB stick.

Then you can boot on the USB stick.  There’s a bit of documentation on
tty2, but it lacks what follows.  ;-)

To install the system, you would:

  1. Configure the network, by running ‘dhclient eth0’ for instance.
 Normally udev automatically loads device drivers (e.g., my laptop
 uses e1000e for Ethernet), but since it’s a small config kernel, it
 may miss drivers for your system, in which case you’re screwed.

  2. Partition, format etc. the target drive; the image includes Parted,
 fdisk, and e2fsprogs.

  3. Write an OS configuration file, say, config.scm (the image only has
 GNU Zile as the editor.)  A minimal config looks like this:

   (use-modules (gnu) (gnu system grub))

   (operating-system
 (host-name "foo")
 (timezone "Europe/Paris")
 (locale "en_US.UTF-8")
 (bootloader (grub-configuration (device "/dev/sdX")))
 (file-systems
   (list (file-system
   (device "/dev/sdX1")
   (mount-point "/")
   (type "ext4")

   4. Mount the target root file system as /mnt, say.

   5. Run ‘guix system init config.scm /mnt’ (add ‘--no-grub’ if you
  don’t want to install GRUB.)

   6. Unmount /mnt, reboot, and cross fingers.

There are various limitations, so be indulgent.  Notably, the kernel has
few drivers.  The image is insanely big due to
.  Swap partitions, dm-crypt’d devices aren’t
supported yet.

Still, I would very much like feedback about actual attempts to use
that, about the general procedure, or anything else.

The image was built with

  guix system disk-image gnu/system/install.scm --image-size=800MiB

as of commit 1ddbd9f.

Ludo’.


signature.asc
Description: PGP signature


System installation from a USB stick

2014-06-03 Thread Ludovic Courtès
Hello!

There’s been some progress towards having an image for installing the
GNU system from a USB stick.  Here’s a summary of the things recently
introduced toward that goal:

  • ‘guix system disk-image FILE’ generates a raw disk image of the
operating system declared in FILE (info "(guix) Using the
Configuration System").

The image contains a DOS partition table and a single partition,
ext4-formatted.  The idea is that it can be copied as is on a USB
stick that is large enough:

  sudo dd if=$(guix system disk-image FILE) of=/dev/sdXX

  • The (guix system install) module provides a (very basic) operating
system declaration corresponding to the system that would run on the
installation USB stick: it has all the useful packages (Guix, disk
partitioning tools, networking, etc.), tty2 has the Info reader
opened on the right section of the manual (though it needs to be
expanded), etc.

  • ‘guix system init FILE DIR’ populates DIR with the store and
additional files corresponding to the operating system declaration
in FILE (info "(guix) Invoking guix system").

  • The boot/initrd code has been improved.  For instance, it’s able to
mount file systems specified by label instead of by device node,
which is useful for the USB stick.  (And it does that all in Scheme,
without resorting to libblkid. :-))

I plan to upload an image for the brave with a spare machine to
sacrifice for testing purposes.  :-)

Note that it’s also possible to GNUify an existing system by running
‘guix system init FILE /’, which basically installs GRUB with a menu
entry pointing to a kernel, initrd, etc. from /gnu/store.

There’s more work ahead, but it’s becoming pretty exciting.

Ludo’.