all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Adding chainloader stanzas to Grub
@ 2018-04-29  6:23 白い熊@相撲道
  2018-04-29 20:15 ` Joshua Branson
  2018-05-03  6:40 ` Chris Marusich
  0 siblings, 2 replies; 4+ messages in thread
From: 白い熊@相撲道 @ 2018-04-29  6:23 UTC (permalink / raw)
  To: help-guix

Hello:

Is there a way to add full chainloader stanzas to Grub via the sysconfig file through system reconfigure in GuixSD. 

I'd like to have for instance the following entry added: 

menuentry "PureOS on /dev/sda2" {
   set root=(hd0,9)
   chainloader +1
   }

Can I do this? 
--
白い熊@相撲道

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

* Re: Adding chainloader stanzas to Grub
  2018-04-29  6:23 Adding chainloader stanzas to Grub 白い熊@相撲道
@ 2018-04-29 20:15 ` Joshua Branson
  2018-04-30 10:41   ` 白い熊@相撲道
  2018-05-03  6:40 ` Chris Marusich
  1 sibling, 1 reply; 4+ messages in thread
From: Joshua Branson @ 2018-04-29 20:15 UTC (permalink / raw)
  To: help-guix

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

白い熊@相撲道 <help-guix_gnu.org@sumou.com> writes:

> Hello:
>
> Is there a way to add full chainloader stanzas to Grub via the sysconfig file through system reconfigure in GuixSD. 

Why do you need to do a chainloader?  You could just boot into PureOS right?


[-- Attachment #2: gnome-awesome.scm --]
[-- Type: text/plain, Size: 6793 bytes --]

;; This is an operating system configuration template
;; for a "desktop" setup with GNOME and Xfce and awesome.
;; I am using this file as of July 2017

(use-modules (gnu)
             ;; this is not present in the desktop setup example in the info documentation
             ;;(guix)
             (gnu system nss)
             ;; lots of gnu services can be added via use-service-modules
             ;;(gnu services mcron)
             ;;I can include RSR5 modules via (ice-9 someName)
             ;; for pattern matching
             ;; (ice-9 match)
             )

(use-service-modules
 ;;admin
 ;;cups
 ;;databases
 desktop
 ;;dict
 ;;If I include networking I get an error about networking being included twice.
 ;;If I take it out then my dhcp-client service doesn't work anymore.
 ;;networking
 mcron
 ;; web is for nginx service
 ;; but for some reason nginx isn't working...
 web
 )

;;base and idutils are for mcron
(use-package-modules
 base
 certs
 ;;emacs
 ;;idutils
 gnome
 ;;gnuzilla
 fonts
 ;;version-control
 ;;wm
 ;;xorg
 web
 )

(define updatedb-job
  ;; Run 'updatedb' at 11AM every day.  Here we write the
  ;; job's action as a Scheme procedure.
  #~(job '(next-hour '(11))
         (lambda ()
           (execl (string-append #$findutils "/bin/updatedb")
                  "updatedb"
                  "--prunepaths=/tmp /var/tmp /gnu/store"))))

;; (define garbage-collector-job
;;   ;; Collect garbage at 11am every day.
;;   ;; The job's action is a shell command.
;;   #~(job "0 11 * * *"            ;Vixie cron syntax
;;          "guix gc -F 1G"))

;; (define idutils-job
;;   ;; Update the index database as user "charlie" at 12:15PM
;;   ;; and 19:15PM.  This runs from the user's home directory.
;;   #~(job '(next-minute-from (next-hour '(12 19)) '(15))
;;          (string-append #$idutils "/bin/mkid src")
;;          #:user "wes"))

;; here's how you would define a fish shell variable
;;(define %fishshell #~(string-append #$fish "/bin/fish"))

(operating-system
 (host-name "GuixSD")
 (timezone "America/Indianapolis")
 (locale "en_US.UTF-8")
 ;;blacklist this keyboard module.  It might help my mouse to load properly.
 ;;http://debbugs.gnu.org/cgi/bugreport.cgi?bug=20433
 ;;(kernel-arguments '("modprobe.blacklist=usbkdb"))
 ;;Apparently this bug was fixed...So I shouldn't blacklist it.  I'll have to file a bug report.
 (swap-devices '("/dev/sda3"))

 ;; Assuming /dev/sdX is the target hard disk, and "my-root"
 ;; is the label of the target root file system.
 (bootloader (bootloader-configuration
	      (bootloader grub-bootloader)
	      (menu-entries
	       (list (menu-entry
		      ;; specify that I want to boot Parabola as well.
		      (label "Parabola")
		      (linux "(hd0,1)/boot/vmlinuz-linux-libre")
		      (linux-arguments '("root=/dev/sda1 ro"))
		      (initrd "(hd0,1)/boot/initramfs-linux-libre.img"))))
	      (target "/dev/sda")))

 (file-systems (cons* (file-system
                       (device "my-root")
                       (title 'label)
                       (mount-point "/")
                       (type "ext4"))
                      (file-system
                       (mount-point "/home")
                       (device "/dev/sda4")
                       (type "ext4"))
                      %base-file-systems))

 (users (cons* (user-account
                (name "joshua")
                (comment "joshua")
                ;;I need to specify that joshua has the uid of 2000,
                ;; because the joshua an parabola has a uid of 2000
                ;; and guixSD and parabola share /home
                (uid 2000)
                (group "users")
                (supplementary-groups '("wheel" "netdev"
                                        "audio" "video" ))
                (home-directory "/home/joshua"))

               ;;I'm unable to login as joshua, because some weird issue.
               ;;I'll try creating a new user and see if that fixes things.
               (user-account
                (name "wes")
                (comment "wes")
                (uid 2025)
                (group "users")
                ;;(shell %fishshell)
                (supplementary-groups '("wheel" "netdev" "audio" "video"))
                (home-directory "/home/wes"))
               %base-user-accounts))

 (groups (cons*
      	  (user-group
                 (name "users")
                 ;;I need to specify that there is a users group on guixSD.
		 ;; Most of my files in my home directory are owned by the
		 ;; group users. I want that, because then I anyone anyone
		 ;; in the group users, can look at files owned by joshua and
		 ;; wes.
		 (id 2000))

                ;; Parabola wheel group has an id of 10
                ;; let's make guixSD use the same
                (user-group
                 (name "wheel")
                 (system? #t)
                 (id 10))

                %base-groups))
 ;; This is where we specify system-wide packages.
 (packages (cons*
            ;;awesome
            nss-certs         ;for HTTPS access
	    ;; I should not put packages like Emacs for icweasel here.
	    ;; the package groups will keep those.
            ;;fish
	    ;; I seet setxkbmap for swapping caps
            ;;setxkbmap
            gvfs  ;;for user mounts
            %base-packages))

 ;; Add GNOME -- We can choose at the log-in
 ;; screen with F1.  Use the "desktop" services, which
 ;; include the X11 log-in service, networking with Wicd,
 ;; and more.
 (services (cons* (gnome-desktop-service)
                  ;;make the console use the dvorak keyboard layout
                  (console-keymap-service "dvorak")
		  ;; attempting to make a nginx server
		  ;; (service nginx-service-type
		  ;;      (nginx-configuration
		  ;;       (server-blocks
		  ;;        (list (nginx-server-configuration
		  ;;   	    (server-name '("www.profile.com"))
		  ;;   	    (root "/home/wes/web/www.profile.com")
		  ;;   	    (https-port #f)
		  ;;   	    (ssl-certificate #f)
		  ;;   	    (ssl-certificate-key #f))))))

                  ;; add a dictionary service
                  ;;(dicod-service)
                  ;;this might not work
                  ;;(dhcp-client-service)
		  ;; rotate logs
                  ;;(service rottlog-service-type (rottlog-configuration))
                  ;;add a print server, that I'll probably never use
                  ;; to add a printer go to http://localhost:631
                  ;;(service cups-service-type (cups-configuration))
                  ;;(mysql-service)
                  ;; run guix gc everyday at 11am
                  (mcron-service (list updatedb-job))
                  %desktop-services))

 ;; Allow resolution of '.local' host names with mDNS.
 (name-service-switch %mdns-host-lookup-nss))

[-- Attachment #3: Type: text/plain, Size: 734 bytes --]



>
> I'd like to have for instance the following entry added: 
>
> menuentry "PureOS on /dev/sda2" {
>    set root=(hd0,9)
>    chainloader +1
>    }

I'm attaching my config file, but my basic configuration to boot
straight from a different partition is:

 (bootloader (bootloader-configuration
	      (bootloader grub-bootloader)
	      (menu-entries
	       (list (menu-entry
		      ;; specify that I want to boot Parabola as well.
		      (label "Parabola")
		      (linux "(hd0,1)/boot/vmlinuz-linux-libre")
		      (linux-arguments '("root=/dev/sda1 ro"))
		      (initrd "(hd0,1)/boot/initramfs-linux-libre.img"))))
	      (target "/dev/sda")))


>
> Can I do this? 
> --
> 白い熊@相撲道

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

* Re: Adding chainloader stanzas to Grub
  2018-04-29 20:15 ` Joshua Branson
@ 2018-04-30 10:41   ` 白い熊@相撲道
  0 siblings, 0 replies; 4+ messages in thread
From: 白い熊@相撲道 @ 2018-04-30 10:41 UTC (permalink / raw)
  To: help-guix

On April 29, 2018 8:15:23 PM UTC, Joshua Branson <jbranso@fastmail.com> wrote:

>Why do you need to do a chainloader?  You could just boot into PureOS
>right?

There are two reasons I see for using a chainloader: 

To boot directly—like you do, you have to always symlink the latest kernel and initramfs in the PureOS, or other GNU system, boot dir to the generic ones that you mention in the config. 

Also if you need to boot let's say the Windows partition, you can do it via the PureOS GRUB menu, since it will have an OS prober entry for this partition. 

For both you need to use chainloader, not direct boot. So that's what I'd like to do via system reconfigure—currently I have to manually edit the generated grub.cfg file. 
--
白い熊@相撲道

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

* Re: Adding chainloader stanzas to Grub
  2018-04-29  6:23 Adding chainloader stanzas to Grub 白い熊@相撲道
  2018-04-29 20:15 ` Joshua Branson
@ 2018-05-03  6:40 ` Chris Marusich
  1 sibling, 0 replies; 4+ messages in thread
From: Chris Marusich @ 2018-05-03  6:40 UTC (permalink / raw)
  To: 白い熊@相撲道; +Cc: help-guix

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

白い熊@相撲道 <help-guix_gnu.org@sumou.com> writes:

> Hello:
>
> Is there a way to add full chainloader stanzas to Grub via the sysconfig file through system reconfigure in GuixSD. 
>
> I'd like to have for instance the following entry added: 
>
> menuentry "PureOS on /dev/sda2" {
>    set root=(hd0,9)
>    chainloader +1
>    }
>
> Can I do this? 

Currently, I don't think Guix supports a way to specify a chainloader
command in your GuixSD operating system declaration.  That may change in
the future, but today I think that's how it is.

This is because the <menu-entry> record type (see: (guix) Bootloader
Configuration) does not expose any fields for a chainloader command, nor
does it provide a way to supply an opaque configuration file.  I think
the motivation for apparent limitation is that <menu-entry> is intended
to represent an abstract menu entry, suitable for use by various
bootloaders, and (maybe?) not all bootloaders may support chainloading.
GuixSD supports GRUB and U-Boot.  Does U-Boot support chainloading, like
GRUB does?  I'm not sure.

-- 
Chris

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

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

end of thread, other threads:[~2018-05-03  6:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-29  6:23 Adding chainloader stanzas to Grub 白い熊@相撲道
2018-04-29 20:15 ` Joshua Branson
2018-04-30 10:41   ` 白い熊@相撲道
2018-05-03  6:40 ` Chris Marusich

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.