all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* guix system disk-image: preset user profiles (packages & arbitrary data)
@ 2018-06-23 19:58 Pierre Neidhardt
  2018-06-25 12:59 ` Pierre Neidhardt
  2018-06-26 11:35 ` Ludovic Courtès
  0 siblings, 2 replies; 6+ messages in thread
From: Pierre Neidhardt @ 2018-06-23 19:58 UTC (permalink / raw)
  To: help-guix

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


Hi there,

I'd like to built a live disk-image for a USB stick I carry around with
me.  Booting it would result in the exact configuration I have on my
machine.

I can create a disk image with:

> guix system disk-image ~/.guix-config/config.scm

Then boot the live and set up my user profile as follows:

--8<---------------cut here---------------start------------->8---
## First retrieve my GPG keys.
## Then retrieve my dotfiles:
> git clone https://
## Custom script to install the dotfiles and install the Guix packages.
> ./dotfiles/.local/bin/homeinit
## Log out and in again.
--8<---------------cut here---------------end--------------->8---

Ideally I'd rather spare those few steps on each reboot, so I'd like to
create a disk image containing a user profile that comes with a
selection of packages and some arbitrary data (my dotfiles).

I wonder if it's doable from an operating system declaration.

I'm also wondering now if the USB stick is writable.  That would solve
it then.

Any insight?

--
Pierre Neidhardt

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

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

* Re: guix system disk-image: preset user profiles (packages & arbitrary data)
  2018-06-23 19:58 guix system disk-image: preset user profiles (packages & arbitrary data) Pierre Neidhardt
@ 2018-06-25 12:59 ` Pierre Neidhardt
  2018-06-26 11:35 ` Ludovic Courtès
  1 sibling, 0 replies; 6+ messages in thread
From: Pierre Neidhardt @ 2018-06-25 12:59 UTC (permalink / raw)
  To: help-guix

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

I had time to try out today: the changes made on a Live USB don't persist across reboots.
Which seems strange considering / is mounted read-write ("rw").
Any idea?

-- 
Pierre Neidhardt

Never forget what a man says to you when he is angry.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

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

* Re: guix system disk-image: preset user profiles (packages & arbitrary data)
  2018-06-23 19:58 guix system disk-image: preset user profiles (packages & arbitrary data) Pierre Neidhardt
  2018-06-25 12:59 ` Pierre Neidhardt
@ 2018-06-26 11:35 ` Ludovic Courtès
  2018-06-26 13:01   ` Pierre Neidhardt
  2018-06-28 13:00   ` Pierre Neidhardt
  1 sibling, 2 replies; 6+ messages in thread
From: Ludovic Courtès @ 2018-06-26 11:35 UTC (permalink / raw)
  To: Pierre Neidhardt; +Cc: help-guix

Hello Pierre,

Pierre Neidhardt <ambrevar@gmail.com> skribis:

> I'd like to built a live disk-image for a USB stick I carry around with
> me.  Booting it would result in the exact configuration I have on my
> machine.

FWIW I did that a year or two ago with hacky modifications to the code.
It would be nice to make it accessible through the command-line
interface and API.

> I'm also wondering now if the USB stick is writable.  That would solve
> it then.

As you found out, ‘disk-image’ creates a “volatile” image, where the
root file system is mounted read-only, with a writable overlayfs on top
of it.  The main use case for this is the installation image where you
want to make sure you’re not going to modify what’s on the USB disk.

There are two things we could do:

  • Add an option to make the root file system persistent (easy).

  • Add an option to allow users to specify additional partitions in the
    disk image (which would be writable).  If you look at ‘qemu-image’
    in (gnu system vm), you’ll see there’s already a list of partitions
    there, and this is what needs to be modified.

My preference goes to the second option; it’s a bit more work, but it’s
not too hard.

HTH!

Ludo’.

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

* Re: guix system disk-image: preset user profiles (packages & arbitrary data)
  2018-06-26 11:35 ` Ludovic Courtès
@ 2018-06-26 13:01   ` Pierre Neidhardt
  2018-06-28 13:00   ` Pierre Neidhardt
  1 sibling, 0 replies; 6+ messages in thread
From: Pierre Neidhardt @ 2018-06-26 13:01 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: help-guix

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

Great, thanks for the insights.
I'll work on it when I find time then!

-- 
Pierre Neidhardt

Spectacularism:
	A fascination with extreme situations.
		-- Douglas Coupland, "Generation X: Tales for an Accelerated
		   Culture"

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

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

* Re: guix system disk-image: preset user profiles (packages & arbitrary data)
  2018-06-26 11:35 ` Ludovic Courtès
  2018-06-26 13:01   ` Pierre Neidhardt
@ 2018-06-28 13:00   ` Pierre Neidhardt
  2018-07-02 15:21     ` Ludovic Courtès
  1 sibling, 1 reply; 6+ messages in thread
From: Pierre Neidhardt @ 2018-06-28 13:00 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: help-guix

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


Ludovic Courtès <ludo@gnu.org> writes:

> There are two things we could do:
>
>   • Add an option to make the root file system persistent (easy).
>
>   • Add an option to allow users to specify additional partitions in the
>     disk image (which would be writable).  If you look at ‘qemu-image’
>     in (gnu system vm), you’ll see there’s already a list of partitions
>     there, and this is what needs to be modified.
>
> My preference goes to the second option; it’s a bit more work, but it’s
> not too hard.

With option 2, you mean that we could add new writable partitions, but
_also_ make the root partition writable, right?

It seems to be the most straightforward approach to me.
How else would you attack option 1?

Alternatively, isn't all this exactly the same as installing directly
onto a USB drive, following the regular installation procedure?
Namely


     herd start cow-store /mnt
     guix system init /my/usb/config.scm /mnt 

-- 
Pierre Neidhardt

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

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

* Re: guix system disk-image: preset user profiles (packages & arbitrary data)
  2018-06-28 13:00   ` Pierre Neidhardt
@ 2018-07-02 15:21     ` Ludovic Courtès
  0 siblings, 0 replies; 6+ messages in thread
From: Ludovic Courtès @ 2018-07-02 15:21 UTC (permalink / raw)
  To: Pierre Neidhardt; +Cc: help-guix

Hello,

Pierre Neidhardt <ambrevar@gmail.com> skribis:

> Ludovic Courtès <ludo@gnu.org> writes:
>
>> There are two things we could do:
>>
>>   • Add an option to make the root file system persistent (easy).
>>
>>   • Add an option to allow users to specify additional partitions in the
>>     disk image (which would be writable).  If you look at ‘qemu-image’
>>     in (gnu system vm), you’ll see there’s already a list of partitions
>>     there, and this is what needs to be modified.
>>
>> My preference goes to the second option; it’s a bit more work, but it’s
>> not too hard.
>
> With option 2, you mean that we could add new writable partitions, but
> _also_ make the root partition writable, right?

No, simply add new writable partitions.

> It seems to be the most straightforward approach to me.
> How else would you attack option 1?

Just set #:volatile-root? #f in ‘system-disk-image’ in (gnu system vm).

> Alternatively, isn't all this exactly the same as installing directly
> onto a USB drive, following the regular installation procedure?
> Namely
>
>
>      herd start cow-store /mnt
>      guix system init /my/usb/config.scm /mnt 

It is, but running ‘guix system init’ and all is cumbersome.

Ludo’.

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

end of thread, other threads:[~2018-07-02 15:21 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-23 19:58 guix system disk-image: preset user profiles (packages & arbitrary data) Pierre Neidhardt
2018-06-25 12:59 ` Pierre Neidhardt
2018-06-26 11:35 ` Ludovic Courtès
2018-06-26 13:01   ` Pierre Neidhardt
2018-06-28 13:00   ` Pierre Neidhardt
2018-07-02 15:21     ` Ludovic Courtès

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.