Re: How do I generate grub for legacy?

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

 



On Sun, 2019-05-05 at 00:12 -0700, ToddAndMargo via users wrote:
> On 5/4/19 11:42 AM, Chris Murphy wrote:
> > The grub2-mkconfig script detects EFI and creates a "System setup"
> > menu entry so the user can get into firmware setup (functionally the
> > same thing as an F key at boot time to get into what some people call
> > 'BIOS setup' but that's confusing to say on a UEFI system which
> > doesn't really have BIOS, hence "System setup").
> 
> Hi Chris,
> 
> This stick has to go into and and all machines.
> 
> I have two qemu-kvm machines set up to test.  One with EFI bios
> and one with Legacy bios.  Nether have a "compatibility mode"
> 
> So far, I can boot into EFI perfectly.
> 
> Legacy, I get a Grub> prompt
> 
> How do I trick grub2-mkconfig into thinking I have a legacy
> machine when I am booted into the EFI machine?
> 
This has probably been done to death, but I now
have a BIOS & EFI bootable F30 USB Stick.
Works OK on an old BIOS Only laptop &
on m/c with EFI & compatibility mode.
No Guarantees!
>From my notes

Update F30 2019_05_09
Once an efi bootable F30 USB stick has been created then:
Boot from it in efi mode
dnf [re]install grub2-pc		 only installs 3 files grub2-pc, grub2-pc-modules, ...
grub2-install --target=i386-pc /dev/sda	 install grub on the MBR (triple check the USB stick sda!!!!)
//---------------------------------------
Create a Minamalist grub.cfg file
The UUIDs, kernel & initrd versions must be changed as required
Be prepared to re-create this file when a new kernel is created
//--------------------------------------
Remember these quotes "EOF_GRUB_CFG" inhibit variable substitution.
Remember "expand -t 4 filename" to prevent TABs being present in the heredoc.
"cat -T filename" shows TABs.
Move /boot/grub2/grub.temp to /boot/grub2/grub.cfg when satified with the result!

cat > /boot/grub2/grub.temp <<"EOF_GRUB_CFG"
set pager=1
terminal_output console
set timeout=5
    menuentry 'Fedora 30 (Thirty) ' {
        insmod part_gpt
        insmod ext2
        search --no-floppy --fs-uuid --set=root fe6b44f8-0f5a-41f3-a11a-142461c9fe6c
        linux /boot/vmlinuz-5.0.11-300.fc30.x86_64 root=UUID=fe6b44f8-0f5a-41f3-a11a-142461c9fe6c
        initrd /boot/initramfs-5.0.11-300.fc30.x86_64.img
    }
EOF_GRUB_CFG

_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux