help-grub
[Top][All Lists]
Advanced

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

Re: Working grub.cfg for UEFI boot FreeBSD using GRUB on x86


From: HSR Hackspace
Subject: Re: Working grub.cfg for UEFI boot FreeBSD using GRUB on x86
Date: Mon, 10 Apr 2017 17:23:12 +0530

Hi folks;

Small update from my side on this issue. I realize that I am using
little older version of grub2-efi  and grub-pcbsd. I  upgraded to to
latest ports of BSD. On booting now instead of directly going into
blurry graphics I'm getting  "'no suitable video mode found, booting
in blind mode'". After pressing any key goes into blurry unreadble
fast moving graphics on top side of screen.

For Linux I was able to fix same error adding gfxmode setting in
grub.config but same configs  is not working with FreeBSD. Anyone have
any idea how to fix this for FreeBSD?

Working config for Linux:

menuentry "Linux" {
insmod part_msdos
insmod efi_gop
insmod gfxterm
insmod font
insmod videotest
insmod videoinfo
set gfxmode=auto
set kernvt="vt"
    set root=(hd0,7)
    echo "loading kernel"
    echo "###############################################################"
    linux /boot/bzImage-4.1.21-WR8.0.0.10_standard root=/dev/sda7
    echo "#####################LOADED KERNEL#############################"
}

Non working config for Freebsd:

menuentry "FreeBSD" {
    insmod part_gpt
    insmod bsd
    insmod geli
    insmod ufs2
    set kFreeBSD.kern.vty=vt
    set root=(hd0,3)
    kfreebsd /boot/kernel/kernel
    kfreebsd_loadenv /boot/device.hints
    set kFreeBSD.vfs.root.mountfrom=ufs:/dev/da0p3
}

menuentry "FreeBSD" {
    insmod ufs2
    insmod bsd
    insmod gfxterm
    insmod font
    insmod videotest
    insmod videoinfo
    set gfxmode=auto
    set kernvt="vt"
    set kFreeBSD.kern.vty=vt
    set root=(hd0,3)
    kfreebsd /boot/kernel/kernel
    kfreebsd_loadenv /boot/device.hints
    set kFreeBSD.vfs.root.mountfrom=ufs:/dev/da0p3
}


On Mon, Apr 3, 2017 at 9:44 PM, Andrei Borzenkov <address@hidden> wrote:
> 03.04.2017 15:07, HSR Hackspace пишет:
>> Hi folks;
>>
>> I have a x86 machine with UEFI (secure boot disabled) running Freebsd
>> 10.1.  I am trying to make it dual boot with Linux as second operating
>> system. For that I'm trying to install freebsd port of grub ( from
>> FreeBSD). Installation seems going fine with only problem being
>> missing grub.cfg. I tried creating  post installation but I got empty
>> file.
>>
>> -> grub-mkconfig -o /boot/grub/grub.cfg
>> Generating grub configuration file ...
>> /usr/local/etc/grub.d/00_header: cut: not found
>>
>
> You mean cut is missing from FreeBSD (presumably, default) install?
> Well, in this case you need to file bug report in their bugzilla, grub
> package should require whatever package provides this utility (sorry, I
> am not familiar with how FreeBSD software is delivered so I may use
> wrong terms). cut is used in several places, and I'm not sure there is
> easy re-implementation using pure POSIX shell. And if cut is missing,
> then we really cannot expect and other tool to be present.
>
>> Above command generated file grub.cfg.new
>> #
>> # DO NOT EDIT THIS FILE
>> #
>> # It is automatically generated by grub-mkconfig using templates
>> # from /usr/local/etc/grub.d and settings from /usr/local/etc/default/grub
>> #
>>
>> ### BEGIN /usr/local/etc/grub.d/00_header ###
>>
>> For  work around I  manually created grb.cfg with below entry :
>>
>> menuentry "FreeBSD" {
>>     insmod ufs2
>> insmod bsd
>> insmod gzio
>> insmod efi_gop
>>     insmod gfxterm
>>     insmod font
>>     insmod videotest
>>     insmod videoinfo
>>     set gfxmode=auto
>>     set kernvt="vt"
>>     set root=(hd0,3)
>>     kfreebsd /boot/loader.efi
>> }
>>
>> This end with error: invalid a.out header.
>>
>
> According to https://wiki.freebsd.org/UEFI, the right binary would be
> boot1.efi which locates and starts loader.efi. I would start with trying
> this one.
>
> kfreebsd loader loads FreeBSD kernel. I do not know if it will work
> under UEFI (in case of Linux you still can use normal loader and it works).
>
>> I think this may be due to file format mismatch between kfreebsd (
>> a.out) and loader (efi). So I replaced loader.efi with simple loader
>> file . But this time I got a blank screen (with white blurr on top of
>> screen) . Not sure this is video issue or something else. Finally I
>> replaced last line with chainloader /boot/loader.efi. This time result
>> are more encouraging but booting got stuck with 'signature did not
>> matched not booting'. Since we have disabled secure booting I am not
>> expecting signature matching.
>>
>
> Please show exact message verbatim.
>
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]