Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
help move rEFInd from autodetection to manual stanzas
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
ese002
Tux's lil' helper
Tux's lil' helper


Joined: 20 Sep 2006
Posts: 115

PostPosted: Tue Mar 22, 2016 6:51 am    Post subject: help move rEFInd from autodetection to manual stanzas Reply with quote

I've been using rEFInd for quite a while in autodetect mode. Frankly, I hate it. No. I hate, hate, HATE it. Too fragile. Too straightjacketed. Always requires hacking around naming convention limitations.

I want something Grub 1.x style, where I get a text menu that shows exactly the kernels and boot options I want available in the order I want and nothing more. I think reFind can do this but I can't quite seem to get there.

In /boot I have refind_linux.conf that I want to ultimately get rid of. In /boot/EFI/BOOT, I have refind.conf with various menu stanzas. These never seem to be visible. I just get the sea of penguins from autodetect.

What do I need to do get the manual stanzas to show?
Is refind.conf in the wrong place?
Is it possible to get both autodetect and manual stanzas working at the same time? This is a working system. I don't want to turn off autodetect until I am sure the manual stanzas work.
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7134
Location: almost Mile High in the USA

PostPosted: Tue Mar 22, 2016 9:09 pm    Post subject: Reply with quote

Use grub2 then if you liked the grub1 menus. I've been using a manually generated grub.cfg just fine on my EFI tablet. In fact the first grub.cfg I had was generated by hand from scratch.
No need for using grub2-mkconfig.
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6228
Location: Room 101

PostPosted: Tue Mar 22, 2016 11:04 pm    Post subject: Re: help move rEFInd from autodetection to manual stanzas Reply with quote

ese002 wrote:
I've been using rEFInd for quite a while in autodetect mode. Frankly, I hate it. No. I hate, hate, HATE it. Too fragile. Too straightjacketed. Always requires hacking around naming convention limitations.

ese002 ... how so? I don't think any of those complaints are valid.

ese002 wrote:
I want something Grub 1.x style, where I get a text menu that shows exactly the kernels and boot options I want available in the order I want and nothing more. I think reFind can do this but I can't quite seem to get there.

You simply need to state that the scan is 'manual' ... something like the following:

refind.conf:
timeout 10
textonly
scanfor manual,external,optical

menuentry "Gentoo (3.18.28)" {
   volume 999999-99999-volume-999999-9999
   loader kernel-3.18.28
   initrd initramfs-3.18.28.img
   options "ro la la la"
}

menuentry "Gentoo (4.1.15)" {
   volume 999999-99999-volume-999999-9999
   loader kernel-4.1.15
   initrd initramfs-4.1.15.img
   options "ro la la la"
}

IMO, that is the least "flexible" method (because you'd then need to have seperate 'menuentry's for parameters ... but each to their own.

ese002 wrote:
What do I need to do get the manual stanzas to show?

I suspect they do show, but they come last in the list due to 'manual' being the last in the (PC) defualt of 'scanfor internal,external,optical,manual'.

ese002 wrote:
Is refind.conf in the wrong place?

It should be in the same location as refind_x64.efi (or bootx64.efi if you're using that naming convention).

ese002 wrote:
Is it possible to get both autodetect and manual stanzas working at the same time? This is a working system. I don't want to turn off autodetect until I am sure the manual stanzas work.

It should suffice to change the order of 'scanfor' (as per the comment in refind.conf-sample).

refind.conf-sample wrote:
# Which types of boot loaders to search, and in what order to display them:

HTH & best ... khay
Back to top
View user's profile Send private message
ese002
Tux's lil' helper
Tux's lil' helper


Joined: 20 Sep 2006
Posts: 115

PostPosted: Sat Mar 26, 2016 4:19 am    Post subject: Re: help move rEFInd from autodetection to manual stanzas Reply with quote

khayyam wrote:
ese002 wrote:
I've been using rEFInd for quite a while in autodetect mode. Frankly, I hate it. No. I hate, hate, HATE it. Too fragile. Too straightjacketed. Always requires hacking around naming convention limitations.

ese002 ... how so? I don't think any of those complaints are valid.


1) autodetect lists the kernels in sorted order, not the users choice of arbitrary order but sorted order. What sort? I don't know. Is it even documented?
2) The top sorted kernel is the one that executes by default. This may not be a kernel that is ready to be used but if it exists, it runs. This is fragile as it means that a kernel can not be installed until you are sure that is ready to be the default kernel. Dangerous.
3) Unless the kernel is from a different series in which case it might never execute or it might always execute despite newer kernels existing.
4) All parameters listed in refind_linux.conf apply to all kernels even if they don't make sense for all kernel and might cause a crash if used.
5) rEFInd autodetect has its own conventions for finding the initrd associated with a kernel. Notably genkernel convention is not accepted. Working around this requires either renaming the kernel and initrd after every install. Hope you got it right (see #2) or worse hacks to refind_linux.conf


ese002 wrote:
I want something Grub 1.x style, where I get a text menu that shows exactly the kernels and boot options I want available in the order I want and nothing more. I think reFind can do this but I can't quite seem to get there.

khayyam wrote:
You simply need to state that the scan is 'manual' ... something like the following:

refind.conf:
timeout 10
textonly
scanfor manual,external,optical

menuentry "Gentoo (3.18.28)" {
   volume 999999-99999-volume-999999-9999
   loader kernel-3.18.28
   initrd initramfs-3.18.28.img
   options "ro la la la"
}

menuentry "Gentoo (4.1.15)" {
   volume 999999-99999-volume-999999-9999
   loader kernel-4.1.15
   initrd initramfs-4.1.15.img
   options "ro la la la"
}


Now we're talking! That does work. Thanks!

khayyam wrote:

IMO, that is the least "flexible" method (because you'd then need to have seperate 'menuentry's for parameters ... but each to their own.


That is not what "flexible" means. Are manuals stanzas more cumbersome? Absolutely! They are also more verbose. But the payoff for the extra effort is they do exactly what I want, whatever they may be at the time. No more. No less. That is what flexible means.
Back to top
View user's profile Send private message
ese002
Tux's lil' helper
Tux's lil' helper


Joined: 20 Sep 2006
Posts: 115

PostPosted: Sat Mar 26, 2016 4:31 am    Post subject: Reply with quote

eccerr0r wrote:
Use grub2 then if you liked the grub1 menus. I've been using a manually generated grub.cfg just fine on my EFI tablet. In fact the first grub.cfg I had was generated by hand from scratch.
No need for using grub2-mkconfig.


I don't use grub2 mainly because every time I get the idea to do so, I read about another reason why grub2 is awful. But also:

1) Grub2 seems to have almost nothing in common with grub1 other than the name. The syntax is greatly different and a lot more complex.
2) rEFInd seems to have what I want buried in it and it is already installed and working. The only snag is that the documentation seems to be written to discourage anyone from actually going there.
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7134
Location: almost Mile High in the USA

PostPosted: Sat Mar 26, 2016 5:08 am    Post subject: Reply with quote

The syntax is indeed different but alas it's still no more difficult.

Code:
set default="1"

insmod efi_gop
insmod efi_uga
insmod video_bochs
insmod video_cirrus
insmod all_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod ext2

set timeout=10

search --no-floppy --set=root -u 'xxxx-xxxx'

menuentry 'Linux Gentoo' --class gnu-linux --class gnu --class os {
        linuxefi /efi/bzImage.efi root=LABEL=uefi32-root ro realinit=/usr/lib/systemd/systemd rootdelay=6
        initrdefi /efi/initramfs-realinit.img
}

menuentry 'Linux Gentoo video DSI-1' --class gnu-linux --class gnu --class os {
        linuxefi /efi/bzImage.efi root=LABEL=uefi32-root ro realinit=/usr/lib/systemd/systemd rootdelay=6 video=DSI-1:800x1280e i915.force_backlight_pmic=1
        initrdefi /efi/initramfs-realinit.img
}


That's it for two options! Not sure if refind has a command line or not if you don't have EFIShell, but I use the grub2 command line quite frequently when debugging.
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6228
Location: Room 101

PostPosted: Sat Mar 26, 2016 7:15 am    Post subject: Re: help move rEFInd from autodetection to manual stanzas Reply with quote

ese002 ... ok, to respond to your criticisms:

ese002 wrote:
1) autodetect lists the kernels in sorted order, not the users choice of arbitrary order but sorted order. What sort? I don't know. Is it even documented?

They are sorted based on modification time, this provides the newest first, oldest last. That would seem to be the most logical for 'autodetection', but that being the case you could 'touch' and have them show in whatever "arbitrary" order you might want.

ese002 wrote:
2) The top sorted kernel is the one that executes by default. This may not be a kernel that is ready to be used but if it exists, it runs. This is fragile as it means that a kernel can not be installed until you are sure that is ready to be the default kernel. Dangerous.

But the first item would be the kernel you've just updated and installed, assuming you're using autodetection why would you not want to have it as the first entry? If there is some issue with that kernel you can F2 and select another, and then either remove the problem kernel or 'touch' the one to replace it as default. Remember, as I pointed out none of this happens if you provide 'manual' as the first item in 'scanfor'.

ese002 wrote:
3) Unless the kernel is from a different series in which case it might never execute or it might always execute despite newer kernels existing.

Not sure I understand the issue you're pointing to.

ese002 wrote:
4) All parameters listed in refind_linux.conf apply to all kernels even if they don't make sense for all kernel and might cause a crash if used.

Kernel parameters are fairly stable, I haven't encountered a situation like you're suggesting, however, refind_linux.conf can be used to supplement CONFIG_CMDLINE, so all generic parameters can be placed in refind_linux.conf, and specific parameters passed via CONFIG_CMDLINE. Also you can use 'manual' and so provide each kernel's parameters separately (and not use refind_linux.conf at all).

ese002 wrote:
5) rEFInd autodetect has its own conventions for finding the initrd associated with a kernel. Notably genkernel convention is not accepted. Working around this requires either renaming the kernel and initrd after every install. Hope you got it right (see #2) or worse hacks to refind_linux.conf

I don't personally use genkernel, but I think this was recently fixed in 0.10.1

refind-bin-0.10.2/NEWS.txt wrote:
- Added "kernel*" as a matching pattern for Linux kernels, since this is what Gentoo uses by default.

ese002 wrote:
khayyam wrote:
ese002 wrote:
I want something Grub 1.x style, where I get a text menu that shows exactly the kernels and boot options I want available in the order I want and nothing more. I think reFind can do this but I can't quite seem to get there.

You simply need to state that the scan is 'manual'

Now we're talking! That does work. Thanks!

Good ... you're weclome.

ese002 wrote:
khayyam wrote:
IMO, that is the least "flexible" method (because you'd then need to have separate 'menuentry's for parameters ... but each to their own.

That is not what "flexible" means. Are manuals stanzas more cumbersome? Absolutely! They are also more verbose. But the payoff for the extra effort is they do exactly what I want, whatever they may be at the time. No more. No less. That is what flexible means.

I do know what flexible means, note I place it in quotes with the proviso "least". I would consider autodetection more flexible simply in terms of the burden placed on my time and effort to get the desired result, that may not be what you want, but as I said each to their own. The fact that you can use 'manual' stanzas is testament to its flexibility, but autodetection exists so that the "extra effort" can be avoided, hence the provided "proviso".

best ... khay
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum