On 1/17/19 2:52 PM, Grant Edwards wrote:
Apparently they're going to try to pry grub-0.97 from my cold dead
fingers...

Is there any documentation on how to do a basic minimal grub:2
install?

I really don't want any of the auto-magical, devs know better than I
do what I want, os-probing, hide all the details from the stupid user,
config file generator stuff installed.  I just want the bare minimum
required to boot using a hand-edited grub.conf file.

There doesn't seem to be a USE flag...


As someone else mentioned you can mask grub-mkconfig. I didn't bother, it isn't run automatically.

After looking through docs I was scratching my head and it took me a while of searching to find a usable grub.cfg file, as permutations I tried never seemed to work right.

I can share my basic grub.cfg for both EFI and non-EFI to get you started.

Non-EFI grub.cfg:
--------------------
timeout=10
default=0

menuentry 'Gentoo 4.14.83' {
        root=hd0,2
linux /boot/kernel-4.14.83-gentoo root=PARTUUID=97657954-04 quiet rootfstype=ext4
}


menuentry 'Gentoo 4.14.78' {
        root=hd0,2
linux /boot/kernel-4.14.78-gentoo root=PARTUUID=97657954-04 quiet rootfstype=ext4
}

menuentry 'Gentoo 4.9.95' {
        root=hd0,2
linux /boot/kernel-4.9.95-gentoo root=PARTUUID=97657954-04 quiet rootfstype=ext4
}

menuentry 'Gentoo 4.9.76-r1' {
        root=hd0,2
linux /boot/kernel-4.9.76-gentoo-r1 root=PARTUUID=97657954-04 quiet rootfstype=ext4
}

menuentry "Windows 7" {
        set root=(hd0,1)
        chainloader +1
        boot
}
----------

It boots a few kernels as well as dual boots Windows 7.

For my EFI based NUCs it was a little different:

EFI grub.cfg:
-------------
timeout=0
default=0

# Declare where the Grub modules are located
set prefix=(hd0,gpt2)/grub

# Load EFI video drivers. This device is EFI so keep the
# video mode while booting the linux kernel.
insmod efi_gop
insmod font
if loadfont ${prefix}/fonts/unicode.pf2
then
        insmod gfxterm
        set gfxmode=auto
        set gfxpayload=keep
        terminal_output gfxterm
fi

# Declare boot entries below this line
menuentry 'Gentoo 4.14.83' {
        root=hd0,gpt2
linux /boot/kernel-4.14.83-gentoo quiet root=/dev/sda4 intel_idle.max_cstate=1
}

menuentry 'Gentoo 4.14.78' {
        root=hd0,gpt2
linux /boot/kernel-4.14.78-gentoo quiet root=/dev/sda4 intel_idle.max_cstate=1
}

menuentry 'Gentoo 4.9.95' {
        root=hd0,gpt2
linux /boot/kernel-4.9.95-gentoo quiet root=/dev/sda4 intel_idle.max_cstate=1
}

menuentry 'Gentoo 4.9.76-r1' {
        root=hd0,gpt2
linux /boot/kernel-4.9.76-gentoo-r1 quiet root=/dev/sda4 intel_idle.max_cstate=1
}
-------------------

This one I had trouble with as the video display wasn't initializing properly at first. It does work the same as Mint now.

Both examples are the entirety of the grub.cfg and manually set with no grub-mkconfig.

Dan

Reply via email to