* Devuan replaced grub and runs before Guix
@ 2021-12-26 23:32 Youni Git
2021-12-29 0:11 ` raingloom
0 siblings, 1 reply; 5+ messages in thread
From: Youni Git @ 2021-12-26 23:32 UTC (permalink / raw)
To: help-guix
Hello, dear developers! Merry Christmas and Happy New year!I would like to ask questions I did not dug in the web, I hope there are short answers.I had Guix OS installed on /dev/sda and i had grub bootloader there configured to run guix and devuan from another sdd, my config:https://gitgud.io/youni/guix-configs/-/blob/master/config-wpa2-wlp5-wf-blacklist--my-desktop-services--isp.conf#L91Everything worked fine, i could boot to Guix or choose Devuan from the grub menu controlled by Guix.But i made Devuan 3 to Devuan 4 upgrades. And Devuan replaced grub and now i have no guix in the menu.I think i can add Guix to devuan grub menu, but I'm not sure I can find /vmlinuz and /initrd files in the Guix partitions.I have 3 questions:1. How to boot Guix manually from grub command line?2. How can I add Guix OS to devuan grub menu, which files i need to use for linux image and initrd, where to find them on Guix?3. Can I easy replace back grub by Guix making guix controls grub again?Thank you.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Devuan replaced grub and runs before Guix
2021-12-26 23:32 Devuan replaced grub and runs before Guix Youni Git
@ 2021-12-29 0:11 ` raingloom
2022-01-09 12:54 ` Youni Git
0 siblings, 1 reply; 5+ messages in thread
From: raingloom @ 2021-12-29 0:11 UTC (permalink / raw)
To: Youni Git; +Cc: help-guix
On Mon, 27 Dec 2021 00:32:18 +0100
Youni Git <git@youni.world> wrote:
> Hello, dear developers! Merry Christmas and Happy New year!I would
> like to ask questions I did not dug in the web, I hope there are
> short answers.I had Guix OS installed on /dev/sda and i had grub
> bootloader there configured to run guix and devuan from another sdd,
> my
> config:https://gitgud.io/youni/guix-configs/-/blob/master/config-wpa2-wlp5-wf-blacklist--my-desktop-services--isp.conf#L91Everything
> worked fine, i could boot to Guix or choose Devuan from the grub menu
> controlled by Guix.But i made Devuan 3 to Devuan 4 upgrades. And
> Devuan replaced grub and now i have no guix in the menu.I think i can
> add Guix to devuan grub menu, but I'm not sure I can find /vmlinuz
> and /initrd files in the Guix partitions.I have 3 questions:1. How to
> boot Guix manually from grub command line?2. How can I add Guix OS to
> devuan grub menu, which files i need to use for linux image and
> initrd, where to find them on Guix?3. Can I easy replace back grub by
> Guix making guix controls grub again?Thank you.
Oh heck, I used to manually kexec Guix, but it was on a different drive
with its own GRUB install.
/run/current-system seems to point to store entries ending in -system.
So to find the store item:
find /gnu/store -maxdepth 1 -name '*-system'
Within the store item:
kernel/bzImage: this is the kernel image to boot.
initrd: this is the initramfs
That should be enough info to build a GRUB menu entry. There are
some other options like modprobe.blacklist but I'm not sure where
they are in the store.
Oh there is also the init binary. Uh. Not sure where that is.
But I think this is a good enough starting point, hopefully you can
figure out the rest.
Alternatively, maybe try chrooting into the Guix partition and running
reconfigure again?
In any case, good luck!
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Devuan replaced grub and runs before Guix
2021-12-29 0:11 ` raingloom
@ 2022-01-09 12:54 ` Youni Git
2022-01-09 16:05 ` Youni Git
0 siblings, 1 reply; 5+ messages in thread
From: Youni Git @ 2022-01-09 12:54 UTC (permalink / raw)
To: raingloom; +Cc: help-guix
I had this Guix grub entry in Guix OS:
https://ibb.co/Btq1pV7
I created this grub menu entry in devuan:
https://ibb.co/WH7hggw
vim /etc/grub.d/40_custom
menuentry "Guix" {
search --set=root --fs-uuid 24c6dcca-d831-4f0a-ad59-efa1035be093
search --file --set /gnu/store/y0dz7jdw78q3kgcjc8xy8zncxyl31k5p-linux-libre-5.13.13/bzImage
linux /gnu/store/y0dz7jdw78q3kgcjc8xy8zncxyl31k5p-linux-libre-5.13.13/bzImage --root=/dev/sda2 --system=var/guixprofiles/system-33-link --load=/var/guix/profiles/system-33-link/boot modprobe.blacklist=pcspkr,snd_pcsp,bluetooth,btusb,ath3k
initrd /gnu/store/ccvhwm8h7h5xijab6gi65bjirz3nyxbv-raw-initrd/initrd.cpio.gz
}
update-grub
But I got Guix OS stops on here:
https://ibb.co/JRZmCFK
I found kernel, initrd and parameters like you advised. But actually hash differs from that guix is using in parameters.
And I don't know why it does not boot stopping on usb-bluetooth mouse detection. I also tried to remove modprobe.blacklist and boot but also Guix stops on mouse detection. I just added 'search --set=root' line is that a reason? May be I need to use --root UUID instead of /dev/sda2 ?
find /gnu/store -maxdepth 1 -name '*-system'
...many entries ...-guix-system
/gnu/store/vxzzh5rz9isqfx5krn3iq5ygzxbafbdi-system
ls /gnu/store/vxzzh5rz9isqfx5krn3iq5ygzxbafbdi-system
activate boot channels.scm configuration.scm etc initrd kernel locale parameters profile provenance
root@antelope ~# ls -l /gnu/store/vxzzh5rz9isqfx5krn3iq5ygzxbafbdi-system/kernel
lrwxrwxrwx 2 root root 51 Jan 1 1970 /gnu/store/vxzzh5rz9isqfx5krn3iq5ygzxbafbdi-system/kernel -> /gnu/store/b64c0c8hw526b5742w75xii0ny0i4009-profile
root@antelope ~# ls -l /gnu/store/b64c0c8hw526b5742w75xii0ny0i4009-profile/bzImage
lrwxrwxrwx 2 root root 73 Jan 1 1970 /gnu/store/b64c0c8hw526b5742w75xii0ny0i4009-profile/bzImage -> /gnu/store/8xfrsfgdbfs1hyr49apzgmg66ggc5khf-linux-module-database/bzImage
root@antelope ~# ls -l /gnu/store/vxzzh5rz9isqfx5krn3iq5ygzxbafbdi-system/initrd
lrwxrwxrwx 2 root root 69 Jan 1 1970 /gnu/store/vxzzh5rz9isqfx5krn3iq5ygzxbafbdi-system/initrd -> /gnu/store/ccvhwm8h7h5xijab6gi65bjirz3nyxbv-raw-initrd/initrd.cpio.gz
root@antelope ~# cat /gnu/store/87vv0rknchgwghm3j2bqqpk2rqv2lxqx-parameters
(boot-parameters (version 0) (label "GNU with Linux-Libre 5.13.13") (root-device "/dev/sda2") (kernel "/gnu/store/y0dz7jdw78q3kgcjc8xy8zncxyl31k5p-linux-libre-5.13.13/bzImage") (kernel-arguments ("modprobe.blacklist=pcspkr,snd_pcsp,bluetooth,btusb,ath3k")) (initrd "/gnu/store/ccvhwm8h7h5xijab6gi65bjirz3nyxbv-raw-initrd/initrd.cpio.gz") (bootloader-name grub-efi) (bootloader-menu-entries ((menu-entry (version 0) (label "Devuan") (device #f) (device-mount-point #f) (linux "(hd1,gpt2)/vmlinuz") (linux-arguments ("root=/dev/sdb2")) (initrd "(hd1,gpt2)/initrd.img")))) (locale "en_US.utf8") (store (device #f) (mount-point "/") (directory-prefix #f) (crypto-devices ())))root@antelope ~#
---- On Wed, 29 Dec 2021 01:11:37 +0100 raingloom <raingloom@riseup.net> wrote ----
On Mon, 27 Dec 2021 00:32:18 +0100
Youni Git <mailto:git@youni.world> wrote:
> Hello, dear developers! Merry Christmas and Happy New year!I would
> like to ask questions I did not dug in the web, I hope there are
> short answers.I had Guix OS installed on /dev/sda and i had grub
> bootloader there configured to run guix and devuan from another sdd,
> my
> config:https://gitgud.io/youni/guix-configs/-/blob/master/config-wpa2-wlp5-wf-blacklist--my-desktop-services--isp.conf#L91Everything
> worked fine, i could boot to Guix or choose Devuan from the grub menu
> controlled by Guix.But i made Devuan 3 to Devuan 4 upgrades. And
> Devuan replaced grub and now i have no guix in the menu.I think i can
> add Guix to devuan grub menu, but I'm not sure I can find /vmlinuz
> and /initrd files in the Guix partitions.I have 3 questions:1. How to
> boot Guix manually from grub command line?2. How can I add Guix OS to
> devuan grub menu, which files i need to use for linux image and
> initrd, where to find them on Guix?3. Can I easy replace back grub by
> Guix making guix controls grub again?Thank you.
Oh heck, I used to manually kexec Guix, but it was on a different drive
with its own GRUB install.
/run/current-system seems to point to store entries ending in -system.
So to find the store item:
find /gnu/store -maxdepth 1 -name '*-system'
Within the store item:
kernel/bzImage: this is the kernel image to boot.
initrd: this is the initramfs
That should be enough info to build a GRUB menu entry. There are
some other options like modprobe.blacklist but I'm not sure where
they are in the store.
Oh there is also the init binary. Uh. Not sure where that is.
But I think this is a good enough starting point, hopefully you can
figure out the rest.
Alternatively, maybe try chrooting into the Guix partition and running
reconfigure again?
In any case, good luck!
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Devuan replaced grub and runs before Guix
2022-01-09 12:54 ` Youni Git
@ 2022-01-09 16:05 ` Youni Git
2022-01-09 20:27 ` Vagrant Cascadian
0 siblings, 1 reply; 5+ messages in thread
From: Youni Git @ 2022-01-09 16:05 UTC (permalink / raw)
To: raingloom; +Cc: help-guix
Some clever developer from debian said me the easiest way.
1. I just enter grub command line while grub generated by Devuan appeared (with button 'c')
2. found grub.cfg on guix disk here:
ls (hd0,gpt2)/boot/grub/grub.cfg
3. And used it to run grub with this menu config file like this:
configfile (hd0,gpt2)/boot/grub/grub.cfg
4. Guix grub menu showed with its backgrund. And I booted to Guix OS
5. Then I just copied Guix menuentry from that grub.cfg file to my Devuan grub:
# vim /etc/grub.d/40_custom:
menuentry "GNU with Linux-Libre 5.13.13 (#33, 2021-09-04 17:57)" {
search --file --set /gnu/store/y0dz7jdw78q3kgcjc8xy8zncxyl31k5p-linux-libre-5.13.13/bzImage
linux /gnu/store/y0dz7jdw78q3kgcjc8xy8zncxyl31k5p-linux-libre-5.13.13/bzImage --root=/dev/sda2 --system=/var/guix/profiles/system-33-link --load=/var/guix/profiles/system-33-link/boot modprobe.blacklist=pcspkr,snd_pcsp,bluetooth,btusb,ath3k
initrd /gnu/store/ccvhwm8h7h5xijab6gi65bjirz3nyxbv-raw-initrd/initrd.cpio.gz
}
# update-grub2
And now I sure boot to Guix from Devuan's grub menu entry. This is the easiest and may be reliable way. Just need to update grub menu entry when generate new system with 'guix system reconfigure config.scm'.
Nice!
---- On Sun, 09 Jan 2022 12:54:15 +0000 Youni Git <git@youni.world> wrote ----
I had this Guix grub entry in Guix OS:
https://ibb.co/Btq1pV7
I created this grub menu entry in devuan:
https://ibb.co/WH7hggw
vim /etc/grub.d/40_custom
menuentry "Guix" {
search --set=root --fs-uuid 24c6dcca-d831-4f0a-ad59-efa1035be093
search --file --set /gnu/store/y0dz7jdw78q3kgcjc8xy8zncxyl31k5p-linux-libre-5.13.13/bzImage
linux /gnu/store/y0dz7jdw78q3kgcjc8xy8zncxyl31k5p-linux-libre-5.13.13/bzImage --root=/dev/sda2 --system=var/guixprofiles/system-33-link --load=/var/guix/profiles/system-33-link/boot modprobe.blacklist=pcspkr,snd_pcsp,bluetooth,btusb,ath3k
initrd /gnu/store/ccvhwm8h7h5xijab6gi65bjirz3nyxbv-raw-initrd/initrd.cpio.gz
}
update-grub
But I got Guix OS stops on here:
https://ibb.co/JRZmCFK
I found kernel, initrd and parameters like you advised. But actually hash differs from that guix is using in parameters.
And I don't know why it does not boot stopping on usb-bluetooth mouse detection. I also tried to remove modprobe.blacklist and boot but also Guix stops on mouse detection. I just added 'search --set=root' line is that a reason? May be I need to use --root UUID instead of /dev/sda2 ?
find /gnu/store -maxdepth 1 -name '*-system'
...many entries ...-guix-system
/gnu/store/vxzzh5rz9isqfx5krn3iq5ygzxbafbdi-system
ls /gnu/store/vxzzh5rz9isqfx5krn3iq5ygzxbafbdi-system
activate boot channels.scm configuration.scm etc initrd kernel locale parameters profile provenance
root@antelope ~# ls -l /gnu/store/vxzzh5rz9isqfx5krn3iq5ygzxbafbdi-system/kernel
lrwxrwxrwx 2 root root 51 Jan 1 1970 /gnu/store/vxzzh5rz9isqfx5krn3iq5ygzxbafbdi-system/kernel -> /gnu/store/b64c0c8hw526b5742w75xii0ny0i4009-profile
root@antelope ~# ls -l /gnu/store/b64c0c8hw526b5742w75xii0ny0i4009-profile/bzImage
lrwxrwxrwx 2 root root 73 Jan 1 1970 /gnu/store/b64c0c8hw526b5742w75xii0ny0i4009-profile/bzImage -> /gnu/store/8xfrsfgdbfs1hyr49apzgmg66ggc5khf-linux-module-database/bzImage
root@antelope ~# ls -l /gnu/store/vxzzh5rz9isqfx5krn3iq5ygzxbafbdi-system/initrd
lrwxrwxrwx 2 root root 69 Jan 1 1970 /gnu/store/vxzzh5rz9isqfx5krn3iq5ygzxbafbdi-system/initrd -> /gnu/store/ccvhwm8h7h5xijab6gi65bjirz3nyxbv-raw-initrd/initrd.cpio.gz
root@antelope ~# cat /gnu/store/87vv0rknchgwghm3j2bqqpk2rqv2lxqx-parameters
(boot-parameters (version 0) (label "GNU with Linux-Libre 5.13.13") (root-device "/dev/sda2") (kernel "/gnu/store/y0dz7jdw78q3kgcjc8xy8zncxyl31k5p-linux-libre-5.13.13/bzImage") (kernel-arguments ("modprobe.blacklist=pcspkr,snd_pcsp,bluetooth,btusb,ath3k")) (initrd "/gnu/store/ccvhwm8h7h5xijab6gi65bjirz3nyxbv-raw-initrd/initrd.cpio.gz") (bootloader-name grub-efi) (bootloader-menu-entries ((menu-entry (version 0) (label "Devuan") (device #f) (device-mount-point #f) (linux "(hd1,gpt2)/vmlinuz") (linux-arguments ("root=/dev/sdb2")) (initrd "(hd1,gpt2)/initrd.img")))) (locale "en_US.utf8") (store (device #f) (mount-point "/") (directory-prefix #f) (crypto-devices ())))root@antelope ~#
---- On Wed, 29 Dec 2021 01:11:37 +0100 raingloom <mailto:raingloom@riseup.net> wrote ----
On Mon, 27 Dec 2021 00:32:18 +0100
Youni Git <mailto:git@youni.world> wrote:
> Hello, dear developers! Merry Christmas and Happy New year!I would
> like to ask questions I did not dug in the web, I hope there are
> short answers.I had Guix OS installed on /dev/sda and i had grub
> bootloader there configured to run guix and devuan from another sdd,
> my
> config:https://gitgud.io/youni/guix-configs/-/blob/master/config-wpa2-wlp5-wf-blacklist--my-desktop-services--isp.conf#L91Everything
> worked fine, i could boot to Guix or choose Devuan from the grub menu
> controlled by Guix.But i made Devuan 3 to Devuan 4 upgrades. And
> Devuan replaced grub and now i have no guix in the menu.I think i can
> add Guix to devuan grub menu, but I'm not sure I can find /vmlinuz
> and /initrd files in the Guix partitions.I have 3 questions:1. How to
> boot Guix manually from grub command line?2. How can I add Guix OS to
> devuan grub menu, which files i need to use for linux image and
> initrd, where to find them on Guix?3. Can I easy replace back grub by
> Guix making guix controls grub again?Thank you.
Oh heck, I used to manually kexec Guix, but it was on a different drive
with its own GRUB install.
/run/current-system seems to point to store entries ending in -system.
So to find the store item:
find /gnu/store -maxdepth 1 -name '*-system'
Within the store item:
kernel/bzImage: this is the kernel image to boot.
initrd: this is the initramfs
That should be enough info to build a GRUB menu entry. There are
some other options like modprobe.blacklist but I'm not sure where
they are in the store.
Oh there is also the init binary. Uh. Not sure where that is.
But I think this is a good enough starting point, hopefully you can
figure out the rest.
Alternatively, maybe try chrooting into the Guix partition and running
reconfigure again?
In any case, good luck!
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Devuan replaced grub and runs before Guix
2022-01-09 16:05 ` Youni Git
@ 2022-01-09 20:27 ` Vagrant Cascadian
0 siblings, 0 replies; 5+ messages in thread
From: Vagrant Cascadian @ 2022-01-09 20:27 UTC (permalink / raw)
To: Youni Git, raingloom; +Cc: help-guix
[-- Attachment #1: Type: text/plain, Size: 1825 bytes --]
On 2022-01-09, Youni Git wrote:
> 1. I just enter grub command line while grub generated by Devuan appeared (with button 'c')
>
> 2. found grub.cfg on guix disk here:
>
> ls (hd0,gpt2)/boot/grub/grub.cfg
>
> 3. And used it to run grub with this menu config file like this:
>
> configfile (hd0,gpt2)/boot/grub/grub.cfg
>
> 4. Guix grub menu showed with its backgrund. And I booted to Guix OS
>
> 5. Then I just copied Guix menuentry from that grub.cfg file to my Devuan grub:
>
> # vim /etc/grub.d/40_custom:
>
>
>
> menuentry "GNU with Linux-Libre 5.13.13 (#33, 2021-09-04 17:57)" {
> search --file --set /gnu/store/y0dz7jdw78q3kgcjc8xy8zncxyl31k5p-linux-libre-5.13.13/bzImage
> linux /gnu/store/y0dz7jdw78q3kgcjc8xy8zncxyl31k5p-linux-libre-5.13.13/bzImage --root=/dev/sda2 --system=/var/guix/profiles/system-33-link --load=/var/guix/profiles/system-33-link/boot modprobe.blacklist=pcspkr,snd_pcsp,bluetooth,btusb,ath3k
> initrd /gnu/store/ccvhwm8h7h5xijab6gi65bjirz3nyxbv-raw-initrd/initrd.cpio.gz
> }
Glad it worked out for you!
You could also create a menu entry something like:
menuentry "load guix grub configuration" {
configfile (hd0,gpt2)/boot/grub/grub.cfg
}
This way, you don't have to update the grub menu every time you update
guix's configuration... or even worse, if you delete the generation that
happened to be hard-coded in your grub.cfg. You can maybe add a similar
entry in guix's grub menu to boot Devuan from guix's grub menu too.
You might want to get fancy and use the "search" command rather than
hard-coding "(hd0,gpt2)" though I'm not sure exactly how to pull that
off, since grub.cfg isn't a unique filename. Maybe using uuid or
partuuid or something like that.
Of course, feel free to experiment, or not!
live well,
vagrant
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-01-09 20:29 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-26 23:32 Devuan replaced grub and runs before Guix Youni Git
2021-12-29 0:11 ` raingloom
2022-01-09 12:54 ` Youni Git
2022-01-09 16:05 ` Youni Git
2022-01-09 20:27 ` Vagrant Cascadian
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).