Re: boot/grub

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

 



Thank Jonathan for all these clarifications.

I have just one concern

This is what is in /boot/efi/EFI/fedora/grub.cfg

menuentry 'Fedora 30 (Thirty) (on /dev/sdc3)' --class fedora --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-da1fb213-c138-4711-aba2-76a598506283' {
	insmod part_msdos
	insmod ext2
	set root='hd2,msdos2'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd2,msdos2 --hint-efi=hd2,msdos2 --hint-baremetal=ahci2,msdos2  9089ac44-babc-47c3-9fb5-a51a95931a7d
	else
	  search --no-floppy --fs-uuid --set=root 9089ac44-babc-47c3-9fb5-a51a95931a7d
	fi
	linux /vmlinuz-5.0.16-100.fc28.x86_64 root=UUID=da1fb213-c138-4711-aba2-76a598506283 ro rd.md=0 rd.lvm=0 rd.dm=0 SYSFONT=True KEYTABLE=fr-latin9 rd.luks=0 LANG=en_US.UTF-8
	initrd /initramfs-5.0.16-100.fc28.x86_64.img
}

Why there is still some tace of fc28 messed with fc30?
I could not remove kernel-core fc28 (the only kernel fc28 package)



===========================================================================
 Patrick DUPRÉ                                 | | email: pdupre@xxxxxxx
 Laboratoire interdisciplinaire Carnot de Bourgogne
 9 Avenue Alain Savary, BP 47870, 21078 DIJON Cedex FRANCE
 Tel: +33 (0)380395988
===========================================================================


> Sent: Sunday, May 31, 2020 at 8:54 PM
> From: "Jonathan Billings" <billings@xxxxxxxxxx>
> To: "Community support for Fedora users" <users@xxxxxxxxxxxxxxxxxxxxxxx>
> Subject: Re: boot/grub
>
> On May 31, 2020, at 04:41, Patrick Dupre <pdupre@xxxxxxx> wrote:
> > On a multi-boot PC, how grub is updated?
> > In the past /etc/grub2.cfg was updated.
> 
> Specifically, with the legacy bootloader, it was /boot/grub2/grub.cfg that was updated, and the file in /etc was a symlink.
> 
> > and now?
> 
> If you use the legacy bootloader, it remains the same, but any modern x86_64 hardware will use UEFI. So the grub.cfg is in /boot/efi/EFI/fedora/, along with the .efi executable for grub (and a signed shim EFI executable, for Secure Boot). 
> 
> > It seems that there are 2 tools: bootctl, and efibootmgr
> 
> bootctl is part of systemd-boot, which is a different bootloader than GRUB2.  By default on Fedora x86, GRUB2 is used. 
> 
> The ‘efibootmgr’ tool is used to interact with the computer’s UEFI firmware.  The firmware is what launches on boot, and it is configured with efibootmgr with what EFI executable to launch.  You need a fat32-formatted partition with the EFI label, which has an /EFI directory at its root.  All UEFI-compatible firmwares can read those volumes and look for EFI executables within.  So you can put a CentOS, Ubuntu, or Microsoft executable (or all of them!) and configure boot entries for each.  There is a BootOrder EFI firmware variable that stores the order in which it chooses what to boot, depending on which is available.  There’s the BootCurrent variable, as you mentioned, which shows what was last used to boot, and a BootNext which you can use to (temporarily) boot next boot. 
> 
> > What are the files managed by these tools?
> All EFI variables are stored in the EFI firmware. Linux makes them available as files in /sys/firmware/efi/. **DO NOT MESS WITH THESE FILES OR DELETE THEM**. You can brick your hardware if you do so.  Just use the efibootmgr tool to change things.
> 
> Once grub is launched, it reads the grub.cfg in the EFI directory.  Modern Fedora doesn’t change the grub.cfg anymore, it reads data out of /boot/loader/entries/, where a grub.cfg fragment exists for each kernel.
> 
> Remember when I mentioned that the EFI was a fat32 filesystem?  Turns out that it’s a pretty unreliable filesystem and if the computer makes changes to it and is unceremoniously powered off, it will have a dirty bit set and the OS can’t even mount it when you start back up, causing boot errors and dropping you into the rescue shell. By putting a static grub.cfg into the EFI volume and all the changing entries into /boot/loader/entries, you’re only writing to a volume that is a journaled ext4 or XFS volume, which can be easily recovered. I believe that’s why there was the change. 
> 
> > Which tool is run after an update of the kernel?
> 
> /bin/kernel-install is run with a bunch of parameters.  It handles detection of what bootloader (grub legacy vs grub efi) and adding all the correct entries and may call tools such as grubby. 
> 
> There’s a bit more complexity to this but this is all I can remember off the top of my head and type on a mobile device.  (It’s too nice outside here to get out of my hammock!)
> 
> --
> Jonathan Billings <billings@xxxxxxxxxx>
> _______________________________________________
> users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
> To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
> Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
> List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
> List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx
>
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
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