unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Installing custom kernel on Intel NUC using USB and no network(newbie question)
@ 2019-07-13 16:41 Will Schenk
  2019-07-15 17:01 ` swedebugia
  2019-09-17  3:47 ` Maxim Cournoyer
  0 siblings, 2 replies; 3+ messages in thread
From: Will Schenk @ 2019-07-13 16:41 UTC (permalink / raw)
  To: guix-devel

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

I'm playing around with guixsd and am really impressed with the work so
far!  I've been unpacking the installer and configuration trying to
understand how it works.  so if there's a more straightforward way to do
this that would be great also, but I have some questions on how guix itself
works.

I'm trying to install guix on a IntelNUC where I don't have access to a
wired connection.  This requires me to use the iwlwifi-firmware.

I have a docker container on my OSX machine that installs guix on a debian
image, and from there I add another channel to guix that has the standard
linux kernel.  From there I build an installation iso that I copy to USB
key, boot the nuc off of, and am able to install the system over WiFi and
everything is great.

My plan was to then change my /etc/config.scm file to include the packages
that I built in the docker container to provision the system with a
different kernel.  What I can't figure out is how to copy the package over
in a way that guix system reconfigure can see them just using a USB stick.

Question 1:

On the docker container, if I do guix archive --recursive --export linux  >
linux.nar and then move it over to the nuc, I can successfully guix archive
--import the package into the /gnu/store.  How do I then reference that
package?

I tried to guix package -i /gnu/store/asdfasdf-linx but it fails because
there are missing dependencies which it tries to build, and that obviously
fails because there's no network.  This seems like it shouldn't happen
based upon my understanding of the guix archive docs -- it implies that all
the dependancies would be included.

Question 2:

The setup on the usb key works so I was looking at ways to pull the config
off of that.  The installation image has no /etc/config.scm however, so I
don't really know what to base it off it.  Also, it would be great if the
graphical installer actually let you edit the config.scm that it generates,
so that I could tweak that and see if I could alter the kernel definition.

It seems to me that the installation should take the existing packages on
the device and then build the environment and copy it over.  What I'd like
is to figure out how to "get a closure of the packages installed on the
current machine" and then copy that to /mnt or whatever it would take to
get it onto the actual destination disk.  Is that possible, to move the
packages over manually in some way?

Question 3:

It seems crazy to me that I'm downloading everything over and over.  At the
office (where I was playing with this) we have fiber, but right here we
have a terrible network connection so downloading multiple times is
painful.  Is there a way to setup a local mirror of the builds (I'm waiting
for ipfs backing for this obvious.)

Anyway, what I really dont understand is the guix archive behavior and why
that didn't work, and how to reference the packages once they've been
imported into either my profile and especially the config.scm.

Thanks, and I'm very excited to be playing with guix!


-- 
Will Schenk
http://happyfuncorp.com
http://sublimeguile.com

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

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

* Re: Installing custom kernel on Intel NUC using USB and no network(newbie question)
  2019-07-13 16:41 Installing custom kernel on Intel NUC using USB and no network(newbie question) Will Schenk
@ 2019-07-15 17:01 ` swedebugia
  2019-09-17  3:47 ` Maxim Cournoyer
  1 sibling, 0 replies; 3+ messages in thread
From: swedebugia @ 2019-07-15 17:01 UTC (permalink / raw)
  To: Will Schenk, guix-devel

Hi Will

I never played with guix archive so I will just comment on what I advise 
you to do.

On 2019-07-13 18:41, Will Schenk wrote:
> I'm playing around with guixsd and am really impressed with the work so 
> far!  I've been unpacking the installer and configuration trying to 
> understand how it works.  so if there's a more straightforward way to do 
> this that would be great also, but I have some questions on how guix 
> itself works.
> 
> I'm trying to install guix on a IntelNUC where I don't have access to a 
> wired connection.  This requires me to use the iwlwifi-firmware.

I never used guix with wifi. Is there a free iwl driver in linux-libre? 
If not I advise you to buy a free software compatible wifi-stick. See 
h-node.org.

> 
> I have a docker container on my OSX machine that installs guix on a 
> debian image, and from there I add another channel to guix that has the 
> standard linux kernel.  From there I build an installation iso that I 
> copy to USB key, boot the nuc off of, and am able to install the system 
> over WiFi and everything is great.

This sounds overly complicated if all you want to do is try guix system 
on the NUC.

> 
> My plan was to then change my /etc/config.scm file to include the 
> packages that I built in the docker container to provision the system 
> with a different kernel.  What I can't figure out is how to copy the 
> package over in a way that guix system reconfigure can see them just 
> using a USB stick.

Building a custom kernel is not something I would recommend beginners of 
Guix System. I have only seen a few do it and they had many months of 
experience.

...
> 
> Question 3:
> 
> It seems crazy to me that I'm downloading everything over and over.  At 
> the office (where I was playing with this) we have fiber, but right here 
> we have a terrible network connection so downloading multiple times is 
> painful.  Is there a way to setup a local mirror of the builds (I'm 
> waiting for ipfs backing for this obvious.)

It seems you have access to fast wired internet. I advise you to take 
the NUC somewhere and plug it in and wait for it to download everything. 
Guix is somewhat (maybe 25% compared to parabola and 35% compared to 
Debian) more bandwidth hungry than your average distribution from my 
experience.

> Anyway, what I really dont understand is the guix archive behavior and 
> why that didn't work, and how to reference the packages once they've 
> been imported into either my profile and especially the config.scm.

Guix archive is not used a lot to my knowledge. I would avoid it as a 
beginner. Running guix publish to move packages is much more user friendly.

> 
> Thanks, and I'm very excited to be playing with guix!

Cool! Hope you find a solution that works for you.

-- 
Cheers
Swedebugia

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

* Re: Installing custom kernel on Intel NUC using USB and no network(newbie question)
  2019-07-13 16:41 Installing custom kernel on Intel NUC using USB and no network(newbie question) Will Schenk
  2019-07-15 17:01 ` swedebugia
@ 2019-09-17  3:47 ` Maxim Cournoyer
  1 sibling, 0 replies; 3+ messages in thread
From: Maxim Cournoyer @ 2019-09-17  3:47 UTC (permalink / raw)
  To: Will Schenk; +Cc: guix-devel

Hello Will,

I'm late but thought I'd answer what I can.

Will Schenk <wschenk@gmail.com> writes:

> I'm playing around with guixsd and am really impressed with the work so
> far!  I've been unpacking the installer and configuration trying to
> understand how it works.  so if there's a more straightforward way to do
> this that would be great also, but I have some questions on how guix itself
> works.
>
> I'm trying to install guix on a IntelNUC where I don't have access to a
> wired connection.  This requires me to use the iwlwifi-firmware.

As the GNU Guix project only supports free software, the best way would
be to equip your device with some external USB dongle that runs on
entirely free software (I personally use a TPE-N150USB).

> I have a docker container on my OSX machine that installs guix on a debian
> image, and from there I add another channel to guix that has the standard
> linux kernel.  From there I build an installation iso that I copy to USB
> key, boot the nuc off of, and am able to install the system over WiFi and
> everything is great.

With a supported device, these convoluted steps would become unnecessary :-).

> My plan was to then change my /etc/config.scm file to include the packages
> that I built in the docker container to provision the system with a
> different kernel.  What I can't figure out is how to copy the package over
> in a way that guix system reconfigure can see them just using a USB stick.
>
> Question 1:
>
> On the docker container, if I do guix archive --recursive --export linux  >
> linux.nar and then move it over to the nuc, I can successfully guix archive
> --import the package into the /gnu/store.  How do I then reference that
> package?

Guix should reference that same package upon a 'guix system {init,
reconfigure}' *if* the Guix commit used is the same, and the system
configuration is the same.

> I tried to guix package -i /gnu/store/asdfasdf-linx but it fails because
> there are missing dependencies which it tries to build, and that obviously
> fails because there's no network.  This seems like it shouldn't happen
> based upon my understanding of the guix archive docs -- it implies that all
> the dependancies would be included.

Hmm, I didn't know the install command accepted store paths as an
input... It appears undocumented, so I can't tell if it's supposed to
work as you think it should.

What *should* work, is to 'guix archive --export -r $(readlink -f
/var/guix/profiles/system/your-system-generation-link)' > system-closure.nar

Then import this on the target system, making sure the Guix on that
target machine is exactly the same as the one which produced those store
items (e.g, 'guix describe' should mention the same commit ID).

And then reconfiguring the system on the target, using exactly the same
operating system definition as was used on the target system.

> Question 2:
>
> The setup on the usb key works so I was looking at ways to pull the config
> off of that.  The installation image has no /etc/config.scm however, so I
> don't really know what to base it off it.  Also, it would be great if the
> graphical installer actually let you edit the config.scm that it generates,
> so that I could tweak that and see if I could alter the kernel definition.

Those are feature requests that might be worth tracking at bug-guix@gnu.org.

> It seems to me that the installation should take the existing packages on
> the device and then build the environment and copy it over.  What I'd like
> is to figure out how to "get a closure of the packages installed on the
> current machine" and then copy that to /mnt or whatever it would take to
> get it onto the actual destination disk.  Is that possible, to move the
> packages over manually in some way?

I think what I suggest above (copying the closure of a system) is pretty
much what you are asking here :-).

> Question 3:
>
> It seems crazy to me that I'm downloading everything over and over.  At the
> office (where I was playing with this) we have fiber, but right here we
> have a terrible network connection so downloading multiple times is
> painful.  Is there a way to setup a local mirror of the builds (I'm waiting
> for ipfs backing for this obvious.)

Again, you can think of /gnu/store as a cache; as long as nothing
changes (e.g. your Guix version is the same, the channel you pull from
is fixed to some commit, your system configuration is the same), the
package hashes it computes should be the same of the (pre-existing)
entries of the store, and thus should simply reuse those without a need
to download anything.

> Anyway, what I really dont understand is the guix archive behavior and why
> that didn't work, and how to reference the packages once they've been
> imported into either my profile and especially the config.scm.
>
> Thanks, and I'm very excited to be playing with guix!

I hope my above explanations help;

Have fun with Guix :-)

Maxim

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

end of thread, other threads:[~2019-09-17  3:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-13 16:41 Installing custom kernel on Intel NUC using USB and no network(newbie question) Will Schenk
2019-07-15 17:01 ` swedebugia
2019-09-17  3:47 ` Maxim Cournoyer

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