NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: dual boot installation with UEFI



> >> Hi Jeff,
> >>
> >> Just to save you some of the headache I had, once you finish the installation with the help of the NetBSD experts and overcome your problem, I'd like to share what I use in /etc/grub.d/40_custom in my Debian GRUB configuration to boot NetBSD:
> >>
> >> menuentry 'NetBSD-bootloader' {
> >>  insmod part_gpt
> >>  search --no-floppy --fs-uuid --set b8b1-17ed
> >>  chainloader /efi/boot/bootx64.efi
> >> }
> >>
> >> Regards,
> >> Ramiro
> >>
> > Thank you, Ramiro.
> >
> > Sorry if this should be obvious, but what is the --set argument?  I'm wondering if I can use it as is, or if I need to customize it?
> >
> > Jeff
> >
> I tried setting it to the UUID of my EFI partition, but after running grub-mkconfig, no new entry appeared in my grub menu.
>
> Jeff

Hi Jeff,

That is strange, I do not know the peculiarities of Gentoo, I have
been watching Gentoo online help and  grub-mkconfig should update the
boot menu with  /etc/grub.d/40_custom file contents (it should be
marked as executable). In Debian the command to do that is
update-grub. You must place  the UUID of the EFI partition in search
grub entry.

You also can play at boot at GRUB menu to manually place those
commands interactively and experimenting till you boot NetBSD.

This is the help of GRUB2 search command:

Command: search [--file|--label|--fs-uuid] [--set [var]]
[--no-floppy|--efidisk-only|--cryptodisk-only] name
Search devices by file (-f, --file), filesystem label (-l, --label),
or filesystem UUID (-u, --fs-uuid).

If the (-s, --set) option is used, the first device found is set as
the value of environment variable var. The default variable is ‘root’.

The (-n, --no-floppy) option prevents searching floppy devices, which
can be slow.

The (--efidisk-only) option prevents searching any other devices then
EFI disks. This is typically used when chainloading to local EFI
partition.

The (--cryptodisk-only) option prevents searching any devices other
than encrypted disks. This is typically used when booting from an
encrypted file system to ensure that no code gets executed from an
unencrypted device having the same filesystem UUID or label.

This option implicitly invokes the command cryptocheck, if it is
available (see cryptocheck for additional information).

The ‘search.file’, ‘search.fs_label’, and ‘search.fs_uuid’ commands
are aliases for ‘search --file’, ‘search --label’, and ‘search
--fs-uuid’ respectively.

Also hints as to which device may be the most likely to contain the
item searched for may be given via the (-h, --hint) option with a
device name as an argument. If the argument ends with a comma, then
partitions on the device are also searched. Furthermore, platform
specific hints may be given via the options --hint-ieee1275,
--hint-bios, --hint-baremetal, --hint-efi, and --hint-arc. When
specified, these options take an argument and operate like --hint, but
only on the specified platform

Regards.


Home | Main Index | Thread Index | Old Index