unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* guix system init co-existing with other distros
@ 2016-02-13 18:26 Jan Nieuwenhuizen
  2016-02-18 20:26 ` Andreas Enge
  2016-02-21 22:12 ` Ludovic Courtès
  0 siblings, 2 replies; 6+ messages in thread
From: Jan Nieuwenhuizen @ 2016-02-13 18:26 UTC (permalink / raw)
  To: guix-devel

Hi,

The people at Fosdem inspired me to move to GuixSD.  I have tried
GuixSD with ratpoison, xfce and guile-wm (oh, how I'd love to get
another sawfish-like windowmanager!) but now moved from Ubuntu
to Debian-hosted with guix.  For now.

I am using this snippet in (operatating-system) to multi-boot

  (bootloader
   (grub-configuration
    (device "/dev/sda")
    ;; Here is my hack (grub-configuration appends bzImage to `linux')
    ;; to add a custom entry for debian on /dev/sda3 to the Grub menu
    ;; On Debian, do:
    ;;   sudo mkdir -p /boot/latest
    ;;   sudo ln -s $(ls -t /boot/vmlinuz*|head -1) /boot/latest/bzImage
    ;;   sudo ln -s $(ls -t /boot/initrd*|head -1) /boot/latest/initrd
    (menu-entries
     (list (menu-entry
            (label "debian")
            (linux "(hd0,msdos3)/boot/latest")
            (linux-arguments
             '("root=UUID=73ede06b-19e0-4d09-bc1e-23fe6c76d77a ro"))
            (initrd "(hd0,msdos3)/boot/latest/initrd"))))))

how are you all doing this?  Can we/do we want to give almost-GuixSD
users a better experience?

Greetings,
Jan

-- 
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar®  http://AvatarAcademy.nl  

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

* Re: guix system init co-existing with other distros
  2016-02-13 18:26 guix system init co-existing with other distros Jan Nieuwenhuizen
@ 2016-02-18 20:26 ` Andreas Enge
  2016-02-18 21:40   ` Jan Nieuwenhuizen
  2016-02-21 22:12 ` Ludovic Courtès
  1 sibling, 1 reply; 6+ messages in thread
From: Andreas Enge @ 2016-02-18 20:26 UTC (permalink / raw)
  To: Jan Nieuwenhuizen; +Cc: guix-devel

Hello,

On Sat, Feb 13, 2016 at 07:26:05PM +0100, Jan Nieuwenhuizen wrote:
> I am using this snippet in (operatating-system) to multi-boot

I have my /home in an encrypted lvm, so I cannot share it with a multi-booted
GuixSD. My solution will be to drop Debian and to move to GuixSD over the
weekend, wish me luck!

Andreas

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

* Re: guix system init co-existing with other distros
  2016-02-18 20:26 ` Andreas Enge
@ 2016-02-18 21:40   ` Jan Nieuwenhuizen
  0 siblings, 0 replies; 6+ messages in thread
From: Jan Nieuwenhuizen @ 2016-02-18 21:40 UTC (permalink / raw)
  To: Andreas Enge; +Cc: guix-devel

Andreas Enge writes:

> I have my /home in an encrypted lvm, so I cannot share it with a
> multi-booted GuixSD. My solution will be to drop Debian and to move to
> GuixSD over the weekend, wish me luck!

Great!  Good luck!  I am not quite there yet.  I am looking into the
gtk+-2 svg problem, somehow no svg's are loaded for me.  I noticed when
turning-on the toolbar in Emacs for a demo.

Greetings,

-- 
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar®  http://AvatarAcademy.nl  

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

* Re: guix system init co-existing with other distros
  2016-02-13 18:26 guix system init co-existing with other distros Jan Nieuwenhuizen
  2016-02-18 20:26 ` Andreas Enge
@ 2016-02-21 22:12 ` Ludovic Courtès
  2016-02-21 22:54   ` Jan Nieuwenhuizen
  1 sibling, 1 reply; 6+ messages in thread
From: Ludovic Courtès @ 2016-02-21 22:12 UTC (permalink / raw)
  To: Jan Nieuwenhuizen; +Cc: guix-devel

Jan Nieuwenhuizen <janneke@gnu.org> skribis:

> I am using this snippet in (operatating-system) to multi-boot
>
>   (bootloader
>    (grub-configuration
>     (device "/dev/sda")
>     ;; Here is my hack (grub-configuration appends bzImage to `linux')
>     ;; to add a custom entry for debian on /dev/sda3 to the Grub menu
>     ;; On Debian, do:
>     ;;   sudo mkdir -p /boot/latest
>     ;;   sudo ln -s $(ls -t /boot/vmlinuz*|head -1) /boot/latest/bzImage
>     ;;   sudo ln -s $(ls -t /boot/initrd*|head -1) /boot/latest/initrd
>     (menu-entries
>      (list (menu-entry
>             (label "debian")
>             (linux "(hd0,msdos3)/boot/latest")
>             (linux-arguments
>              '("root=UUID=73ede06b-19e0-4d09-bc1e-23fe6c76d77a ro"))
>             (initrd "(hd0,msdos3)/boot/latest/initrd"))))))

Did you run “guix system init config.scm /”?

That’s how I did my first GuixSD install long ago, so I had a safety net
since the other distro was still around.

However, in practice, each distro will want to fiddle with /etc, so it
is inconvenient at best to switch distros if they share the same root
file system.

> how are you all doing this?  Can we/do we want to give almost-GuixSD
> users a better experience?

Good question!  I’m not sure I fully understand your hack but I’d like
to read more about it.  :-)

Ludo’.

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

* Re: guix system init co-existing with other distros
  2016-02-21 22:12 ` Ludovic Courtès
@ 2016-02-21 22:54   ` Jan Nieuwenhuizen
  2016-02-23 13:40     ` Ludovic Courtès
  0 siblings, 1 reply; 6+ messages in thread
From: Jan Nieuwenhuizen @ 2016-02-21 22:54 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

Ludovic Courtès writes:

> Jan Nieuwenhuizen <janneke@gnu.org> skribis:
>>    (grub-configuration
>>     (device "/dev/sda")
>>      (list (menu-entry
>>             (label "debian")
>>             (linux "(hd0,msdos3)/boot/latest")

> Did you run “guix system init config.scm /”?

Fear not.  Debian lives on /dev/sda3, guix on /sda1.  From Debian
I dit guix system init config.scm /guix

> Good question!  I’m not sure I fully understand your hack but I’d like
> to read more about it.  :-)

So what I need is for Guix's Grub to create an extra menu entry
for Debian, with this text

    menuentry 'Debian GNU/Linux' {
	linux	/boot/vmlinuz-3.16.0-4-amd64 root=/dev/sda3 ro
	initrd	/boot/initrd.img-3.16.0-4-amd64
    }

When you specify extra an extra menu-entry

       (list (menu-entry
             (label "debian")
             (linux "<file-name>")
             (initrd "<file-name>))

then grub.scm:(grub-configuration-file) appends "/" "bzImage" to the
kernel's file-name

    (define linux-image-name
        (if (string-prefix? "mips" system)
            "vmlinuz"
            "bzImage"))

So, I setup some symlinks on the Debian side so that I can provide Guix's
Grub wih a kernel file name that can have "/bzImage" appended.

    23:42:13 janneke@drakenvlieg:~/src/guix
    $ ls -l /debian/boot/latest/
    totaal 0
    lrwxrwxrwx 1 root root 28  6 feb 21:17 bzImage -> /boot/vmlinuz-3.16.0-4-amd64
    lrwxrwxrwx 1 root root 31  6 feb 21:17 initrd -> /boot/initrd.img-3.16.0-4-amd64

Possibly we'd want to add another keyword

         (linux-image "(hd0,msdos3)/boot/vmlinuz-3.16.0-4-amd64")

that gets used literally?

Greetings, Jan

-- 
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar®  http://AvatarAcademy.nl  

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

* Re: guix system init co-existing with other distros
  2016-02-21 22:54   ` Jan Nieuwenhuizen
@ 2016-02-23 13:40     ` Ludovic Courtès
  0 siblings, 0 replies; 6+ messages in thread
From: Ludovic Courtès @ 2016-02-23 13:40 UTC (permalink / raw)
  To: Jan Nieuwenhuizen; +Cc: guix-devel

Jan Nieuwenhuizen <janneke@gnu.org> skribis:

> So what I need is for Guix's Grub to create an extra menu entry
> for Debian, with this text
>
>     menuentry 'Debian GNU/Linux' {
> 	linux	/boot/vmlinuz-3.16.0-4-amd64 root=/dev/sda3 ro
> 	initrd	/boot/initrd.img-3.16.0-4-amd64
>     }
>
> When you specify extra an extra menu-entry
>
>        (list (menu-entry
>              (label "debian")
>              (linux "<file-name>")
>              (initrd "<file-name>))
>
> then grub.scm:(grub-configuration-file) appends "/" "bzImage" to the
> kernel's file-name
>
>     (define linux-image-name
>         (if (string-prefix? "mips" system)
>             "vmlinuz"
>             "bzImage"))
>
> So, I setup some symlinks on the Debian side so that I can provide Guix's
> Grub wih a kernel file name that can have "/bzImage" appended.
>
>     23:42:13 janneke@drakenvlieg:~/src/guix
>     $ ls -l /debian/boot/latest/
>     totaal 0
>     lrwxrwxrwx 1 root root 28  6 feb 21:17 bzImage -> /boot/vmlinuz-3.16.0-4-amd64
>     lrwxrwxrwx 1 root root 31  6 feb 21:17 initrd -> /boot/initrd.img-3.16.0-4-amd64
>
> Possibly we'd want to add another keyword
>
>          (linux-image "(hd0,msdos3)/boot/vmlinuz-3.16.0-4-amd64")
>
> that gets used literally?

Oh, I see.  This is what <http://bugs.gnu.org/20067> is about.
I think the solution would be to not guess file names, indeed.

Until this is fixed, I don’t have any good solution other than hacks
like the one you propose.  :-/

Ludo’.

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

end of thread, other threads:[~2016-02-23 13:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-13 18:26 guix system init co-existing with other distros Jan Nieuwenhuizen
2016-02-18 20:26 ` Andreas Enge
2016-02-18 21:40   ` Jan Nieuwenhuizen
2016-02-21 22:12 ` Ludovic Courtès
2016-02-21 22:54   ` Jan Nieuwenhuizen
2016-02-23 13:40     ` Ludovic Courtès

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