grub2 | Ongoing downstream work on grub2 , including Fedora | Theme library

 by   rhboot C Version: grub-2.06 License: GPL-3.0

kandi X-RAY | grub2 Summary

kandi X-RAY | grub2 Summary

grub2 is a C library typically used in User Interface, Theme applications. grub2 has no bugs, it has a Strong Copyleft License and it has low support. However grub2 has 16 vulnerabilities. You can download it from GitHub, GitLab.

This is GRUB 2, the second version of the GRand Unified Bootloader. GRUB 2 is rewritten from scratch to make GNU GRUB cleaner, safer, more robust, more powerful, and more portable. See the file NEWS for a description of recent changes to GRUB 2. See the file INSTALL for instructions on how to build and install the GRUB 2 data and program files. See the file MAINTAINERS for information about the GRUB maintainers, etc. If you found a security vulnerability in the GRUB please check the SECURITY file to get more information how to properly report this kind of bugs to the maintainers. Please visit the official web page of GRUB 2, for more information. The URL is More extensive documentation is available in the Info manual, accessible using 'info grub' after building and installing GRUB 2.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              grub2 has a low active ecosystem.
              It has 158 star(s) with 114 fork(s). There are 20 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              grub2 has no issues reported. There are 5 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of grub2 is grub-2.06

            kandi-Quality Quality

              grub2 has no bugs reported.

            kandi-Security Security

              grub2 has 16 vulnerability issues reported (0 critical, 6 high, 10 medium, 0 low).

            kandi-License License

              grub2 is licensed under the GPL-3.0 License. This license is Strong Copyleft.
              Strong Copyleft licenses enforce sharing, and you can use them when creating open source projects.

            kandi-Reuse Reuse

              grub2 releases are not available. You will need to build from source code and install.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of grub2
            Get all kandi verified functions for this library.

            grub2 Key Features

            No Key Features are available at this moment for grub2.

            grub2 Examples and Code Snippets

            No Code Snippets are available at this moment for grub2.

            Community Discussions

            QUESTION

            How to enable ACPI (for powering off) on LattePanda
            Asked 2021-Mar-27 at 07:42

            I wrote this code to use ACPI for powering off computers from my program launched from 64-bit UEFI.

            (sorry for long code, but I think all parts are necessary)

            ...

            ANSWER

            Answered 2021-Mar-27 at 07:42

            I have no idea if this is actually going to help, but I have noticed a couple of differences from the ACPI power-off implementation in GRUB (which, as reported by the asker, does actually work):

            1. GRUB doesn’t bother with sending anything to the SMI port. There is only one time GRUB performs any port I/O whatsoever, and that’s when writing to the PM1A register. (It doesn’t bother with PM1B either.) All that other code in grub-core/commands/acpihalt.c is just for locating and parsing ACPI tables. And yes, grub_acpi_halt seems to be cold-invoked without any preceding ACPI initialisation call present. It does seem to release EFI resources beforehand, though, as seen in grub-core/lib/efi/halt.c and grub-core/kern/i386/efi/init.c, and ultimately grub-core/kern/efi/init.c (but does not terminate EFI boot services).

            2. GRUB doesn’t preserve ‘unused’ PM1A register bits. The asker’s code first reads off the PM1A register in order to carefully mask out bitfields it doesn’t want to modify. GRUB doesn’t bother, it just puts zeroes there. Translated into names from the asker’s code, it seems to do

            Source https://stackoverflow.com/questions/66641127

            QUESTION

            How to enable gpu passthrough on centos/rhel/ol8 using snapd's lxd/lxc containers?
            Asked 2021-Mar-19 at 13:09

            The guides I have for deploying LXC on CentOS is to install snapd's lxd https://www.cyberciti.biz/faq/set-up-use-lxd-on-centos-rhel-8-x/

            SnapD is a type of service that allows installing debian/ubuntu based packages with the logic being lxd is most up to date on that platform.

            Well. I'm all open to installing an alternative version if it's easier to enable gpu passthrough.

            Ultimately I'm trying to build a container environment where I can run the latest version of python and jupyter that has gpu support.

            I have some guides on how to enable gpu passthrough.

            ...

            ANSWER

            Answered 2021-Mar-12 at 21:50

            QUESTION

            How to attach a disk image to QEMU containing root filesystem for linux kernel?
            Asked 2020-Aug-20 at 19:27

            I am able to launch the linux kernel on QEMU using -kernel and that's pretty straight-forward and simple.

            But now I am attempting something different. I am simulating the combination of UEFI + GRUB + Kernel.

            I have built OVMF and GRUB2 from source and also able to load the kernel image, but having difficulty creating a rootfs disk image and attaching it to qemu so that kernel detects it.

            This is how I prepared the rootfs.img for the kernel :

            ...

            ANSWER

            Answered 2020-Aug-20 at 18:07

            You created the filesystem on the entire volume (file), not on a partition. If you want it on a partition, then you would have to write a partition table in the file and create the filesystem in the partition.
            Edit. Not sure if grub even has a way to boot with no GPT or MBR.

            To use this image partitioned, create a 1MB larger file, write the GPT partition table on the first megabyte, use dd to copy your image to the rest.

            Source https://stackoverflow.com/questions/63509634

            QUESTION

            Fedora: Failed to set new efi boot target
            Asked 2020-Mar-26 at 04:45

            Got following when installing Fedora 31 in my HP laptop.

            Failed to set new efi boot target

            Similar thing used to happened for me when installing Ubuntu based distros in order to fix this I used solution described here, which is install the grub2 mannually. As I observed, this is a hardware specific issue, because at that time same Ubuntu based distro installed fine in my desktop, but not in the my laptop.

            But how to fix this issue in Fedora?

            ...

            ANSWER

            Answered 2020-Mar-26 at 04:45

            Solution was to modify the instructions given in this answer for Fedora, which is to install the grub2 manually after OS installation

            Install Fedora without bootloader

            • Click Full disk summary and boot loader... at the bottom of Installation Destination screen.
            • Select the hard disk that you going install Fedora and click Do not install boot loader button.
            • And continue with installation process as usual.

            Installing grub2 manually

            Source https://stackoverflow.com/questions/60861161

            QUESTION

            Hugepagesize is not increasing to 1G in VM
            Asked 2020-Mar-07 at 07:51

            I am using CentOS VM in ESXi Sever. I want to increase the Hugepagesize to 1G.

            I followed the link: http://dpdk-guide.gitlab.io/dpdk-guide/setup/hugepages.html

            I executed the small script to check if 1 GB supported:

            ...

            ANSWER

            Answered 2017-Jun-12 at 23:36

            CPU flag of 1gb hugepage support and guest OS support/enabling are not enough to get 1 gb hugepages working in virtualized environment.

            The idea of huge pages both on PMD (2MB or 4 MB before PAE and x86_64) and on PUD level (1 GB) is to create mapping from aligned virtual region of huge size into some huge region of physical memory (As I understand, it should be aligned too). With additional virtualization level of hypervisor there are now three (or four) memory levels: virtual memory of app in guest OS, some memory which is considered as physical by guest OS (it is the memory managed by virtualization solution: ESXi, Xen, KVM, ....), and the real physical memory. It's reasonable to assume that hugepage idea should have the same size of huge region in all three levels to be useful (generate less TLB miss, use less Page Table structures to describe a lot of memory - grep "Need bigger than 4KB pages" in the DickSites's "Datacenter Computers: modern challenges in CPU design", Google, Feb2015).

            So, to use huge page of some level inside Guest OS, you should already have same sized huge pages in physical memory (in your Host OS) and in your virtualization solution. You can't effectively use huge page inside Guest when they are not available for you host OS and Virtualization software. (Some like qemu or bochs may emulate them but this will be from slow to very slow.) And when you want both 2 MB and 1 GB huge pages: Your CPU, Host OS, Virtual System and Guest OS all should support them (and host system should have enough aligned continuous physical memory to allocate 1 GB page, you probably can't split this page over several Sockets in NUMA).

            Don't know about ESXi, but there as some links for

            Procedure 8.2. Allocating 1 GB huge pages at boot time

            1. To allocate different sizes of huge pages at boot, use the following command, specifying the number of huge pages. This example allocates 4 1 GB huge pages and 1024 2 MB huge pages: 'default_hugepagesz=1G hugepagesz=1G hugepages=4 hugepagesz=2M hugepages=1024' Change this command line to specify a different number of huge pages to be allocated at boot.

            Note The next two steps must also be completed the first time you allocate 1 GB huge pages at boot time.

            1. Mount the 2 MB and 1 GB huge pages on the host:

              # mkdir /dev/hugepages1G # mount -t hugetlbfs -o pagesize=1G none /dev/hugepages1G # mkdir /dev/hugepages2M # mount -t hugetlbfs -o pagesize=2M none /dev/hugepages2M

            2. Restart libvirtd to enable the use of 1 GB huge pages on guests:

              # service restart libvirtd

            1 GB huge pages are now available for guests.

            By increasing the page size, you reduce the page table and reduce the pressure on the TLB cache. ... vm.nr_hugepages = 256 ... Reboot the system (note: this is about physical reboot of host machine and host OS) ... Set up Libvirt to use Huge Pages KVM_HUGEPAGES=1 ... Setting up a guest to use Huge Pages

            Lack of hypervisor support for large pages: Finally, hypervisor vendors can take a few production cycles before fully adopting large pages. For example, VMware’s ESX server currently has no support for 1GB large pages in the hypervisor, even though guests on x86-64 systems can use them.

            We find that large pages are conflicted with lightweight memory management across a range of hypervisors (e.g., ESX, KVM) across architectures (e.g., ARM, x86-64) and container-based technologies.

            VMware ESX Server 3.5 and VMware ESX Server 3i v3.5 introduce 2MB large page support to the virtualized environment. In earlier versions of ESX Server, guest operating system large pages were emulated using small pages. This meant that, even if the guest operating system was using large pages, it did not get the performance benefit of reducing TLB misses. The enhanced large page support in ESX Server 3.5 and ESX Server 3i v3.5 enables 32‐bit virtual machines in PAE mode and 64‐bit virtual machines to make use of large pages.

            Source https://stackoverflow.com/questions/44379170

            QUESTION

            Ansible Unable to set password for GRUB bootloader in Redhat
            Asked 2020-Jan-15 at 11:46

            As Salam-o-Alikum, I have written an Ansible playbook for setting GRUB bootloader password on RedHat and Ubuntu, there are no error and i can see changes in Grub2.cfg on both locations. It's weird that when i reboot my both machines, Ubuntu machine asks for username and password but Redhat machine don't. I have seen 50+ tutorials procedure is the same and its pretty easy but i don't why its behaving like that. Any help would be greatly appreciated.

            Here is what i've tried.

            Hardening.yml

            ...

            ANSWER

            Answered 2020-Jan-15 at 11:46

            grub-redhat.j2 has some typos.

            Line 11: set supperusers="{{ grub_user }}"

            Change to: set superusers="{{ grub_user }}"

            Line 12: password_pbkdf2 {{ grub_user }} {{ grub_password_v2_passwd }}

            Change to:password_pbkdf2 {{ grub_user }} {{ grub_password_v2_passwd }}

            If you're going to use the same grub password on multiple machines, you might want to consider using ansible-vault encrypt_string to encrypt the raw password, then create an additional task which runs grub2-mkpasswd-pbkdf2 (part of grub2-tools-minimal) with the command module and pass it the vaulted variable. Registering the output of that task (e.g. as grub_password_v2_passwd) would result in every target that you run the playbook against receiving a unique hash even though the underlying password would be the same. The expect module works great for this:

            Source https://stackoverflow.com/questions/59728223

            QUESTION

            grub2 howto increment variable
            Asked 2020-Jan-02 at 19:32

            The grub2 shell aims to be a minimalistic bash like shell.

            But how can I increment a variable in grub2?

            In bash I would do:

            ...

            ANSWER

            Answered 2017-Feb-15 at 09:25

            Grub2 does not have builtin arithmetic support. You need to add Lua support if you want that, see this answer for details.

            Source https://stackoverflow.com/questions/42244685

            QUESTION

            Modify delete a line using ansible
            Asked 2019-Dec-02 at 13:49

            I want to remove only 'fsck.mode=auto' from the following line using ansible.

            foo bar foo.bar=hold fsck.mode=auto foo foo bar foo

            The hosts, root user and other privileges are set up else where in the project.

            I prefer to use lineinfile if possible over replace. I don't want to delete the whole line but rather only remove whats in the regexp with ''.

            ...

            ANSWER

            Answered 2019-Nov-26 at 15:43
            - name: Replacing the square brackets and single quotes on new VM IP address in hosts
              hosts: 127.0.0.1
              connection: local
              become: true
              tasks:
                - name: Replacing the brackets from the end of the new ip with whitespace
                  replace:
                    path: /etc/ansible/hosts
                    regexp: \'\]
                    replace: ''
            

            Source https://stackoverflow.com/questions/59054055

            QUESTION

            GRUB2 and a custom File System
            Asked 2019-May-05 at 02:56

            Writing OS experiment from scratch and curious about Grub2 and my FS

            I haven't tried very much with this just yet, at least not in practice. I've been reading about GRUB2 and how to set it up but am getting slightly lost. I apologize, I don't have any source code at the moment to offer you. I just wanted to know how to set up GRUB2 to use a File System that I have written from scratch myself.

            ...

            ANSWER

            Answered 2019-May-05 at 02:56

            Write a GRUB driver module for your FS, like how it has modules for XFS, ext2/3/4, and so on. https://wiki.osdev.org/Writing_GRUB_Modules

            https://www.gnu.org/software/grub/manual/grub/grub.html#Images explains the different components of GRUB2. The filesystem driver is loaded as part of core.img, which is built from other images.

            Keep in mind that many new filesystems don't get GRUB support right away, and having a separate /boot partition that GRUB can read is not rare. e.g. on a single disk instead of a complicated RAID (although GRUB does have some md support), not encrypted, and with a long-established filesystem that GRUB does have a driver for. And that doesn't need a complicated log replay on dirty shutdowns before even reading.

            Also, the earliest stage of GRUB booting needs to load core.img from a block list that's hard-coded into the small first thing the firmware loads, so filesystems where the blocks of a file's data can move around when the file wasn't modified aren't usually a good fit for /boot at all. You'd never know when you had to re-install GRUB after any change to anything on /boot.

            But if you still want to make your FS bootable in GRUB, check the GRUB source code, there's probably some documentation.

            https://www.gnu.org/software/grub/grub-documentation.html

            https://www.gnu.org/software/grub/grub-development.html

            Source https://stackoverflow.com/questions/55988310

            QUESTION

            You need to be root to execute - ansible
            Asked 2019-Mar-18 at 15:31

            I have a lab setup with ansible controller + node and exploring few areas.

            I am so far setup an user account named ansible in both machines and enabled ssh keybased authentication

            Also setup sudo premissions for the user in both machines

            When I try to run the below playbook , It works on the local machine and fails on the other node.

            --- #Install Telnet - hosts: all name: Install Telnet become: true become_user: ansible become_method: sudo tasks: - yum: name: telnet state: latest

            Output is as follows `[ansible@host1 playbooks]$ ansible-playbook telnetDeployYUM.yml

            PLAY [Install Telnet] ***********************************************************************************************************************************************************************

            TASK [Gathering Facts] ********************************************************************************************************************************************************************** ok: [192.168.64.6] ok: [192.168.64.5]

            TASK [yum] ********************************************************************************************************************************************************************************** ok: [192.168.64.5] fatal: [192.168.64.6]: FAILED! => {"changed": true, "msg": "You need to be root to perform this command.\n", "obsoletes": {"grub2": {"dist": "x86_64", "repo": "@anaconda", "version": "1:2.02-0.64.el7.centos"}, "grub2-tools": {"dist": "x86_64", "repo": "@anaconda", "version": "1:2.02-0.64.el7.centos"}}, "rc": 1, "results": ["Loaded plugins: fastestmirror\n"]} to retry, use: --limit @/home/ansible/playbooks/telnetDeployYUM.retry

            PLAY RECAP ********************************************************************************************************************************************************************************** 192.168.64.5 : ok=2 changed=0 unreachable=0 failed=0 192.168.64.6 : ok=1 changed=0 unreachable=0 failed=1

            [ansible@host1 playbooks]$ `

            I could also manually able to run sudo yum on the failed target as ansible user

            I believe sudo set up in correct

            [ansible@host2 root]$ sudo whoami root

            Can experts share some insights on what I am missing with respect to my failed machine , Thanks.

            ...

            ANSWER

            Answered 2019-Mar-08 at 09:06

            Run with -vvvv to see what ansible is doing.

            Have you setup ansible in sudoers for password less privilege elevation? you are getting a message that it is waiting for "escalation prompt". That means when you are running with become, you are failing to become since it needs the password. Make sure your test user is in /etc/sudoers AND you have it marked for that user to NOT need to enter a password when running sudo commands. The entry should end with :NOPASSWD on the line in that file.

            Source https://stackoverflow.com/questions/55058963

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install grub2

            You can download it from GitHub, GitLab.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/rhboot/grub2.git

          • CLI

            gh repo clone rhboot/grub2

          • sshUrl

            git@github.com:rhboot/grub2.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular Theme Libraries

            bootstrap

            by twbs

            tailwindcss

            by tailwindlabs

            Semantic-UI

            by Semantic-Org

            bulma

            by jgthms

            materialize

            by Dogfalo

            Try Top Libraries by rhboot

            shim

            by rhbootC

            efibootmgr

            by rhbootC

            efivar

            by rhbootC

            pesign

            by rhbootC

            dbxtool

            by rhbootC