grub | GRUB enhancements for ZFS on Linux

 by   zfsonlinux Shell Version: Current License: No License

kandi X-RAY | grub Summary

kandi X-RAY | grub Summary

grub is a Shell library. grub has no bugs, it has no vulnerabilities and it has low support. You can download it from GitHub.

The home for this git repository is:. GRUB packages at (the PPA) and are built from this repository using the git-buildpackage tool.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              grub has a low active ecosystem.
              It has 19 star(s) with 18 fork(s). There are 30 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 17 open issues and 8 have been closed. On average issues are closed in 26 days. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of grub is current.

            kandi-Quality Quality

              grub has no bugs reported.

            kandi-Security Security

              grub has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.

            kandi-License License

              grub does not have a standard license declared.
              Check the repository for any license declaration and review the terms closely.
              OutlinedDot
              Without a license, all rights are reserved, and you cannot use the library in your applications.

            kandi-Reuse Reuse

              grub releases are not available. You will need to build from source code and install.
              Installation instructions, examples and code snippets are available.

            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 grub
            Get all kandi verified functions for this library.

            grub Key Features

            No Key Features are available at this moment for grub.

            grub Examples and Code Snippets

            No Code Snippets are available at this moment for grub.

            Community Discussions

            QUESTION

            GRUB memory map gives me weird values
            Asked 2021-May-17 at 12:51

            I am trying to use grub in order to get the memory map, instead of going through the bios route. The problem is that grub seems to be giving me very weird values for some reason. Can anyone help with this?

            Relevant code:

            This is how I parse the mmap

            ...

            ANSWER

            Answered 2021-May-17 at 12:51

            It turns out that the bit masking stuff was the problem. If we drop that, we can still have 32-bit addresses and the memory map works just fine.

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

            QUESTION

            Extract only the Linux Kernel Versions column using AWK
            Asked 2021-May-06 at 06:45

            From the Debian/Ubuntu grub configuration file /boot/grub/grub.cfg, I would like to extract only the Linux Kernel Version columns, using AWK.

            I wrote one but very long command using pipes. Can we make it short?.

            My command:

            ...

            ANSWER

            Answered 2021-May-06 at 06:28

            With your shown attempts, could you please try following. This is not tested since actual samples are not given in post.

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

            QUESTION

            ld - output file is empty
            Asked 2021-May-05 at 19:46

            I am trying to write a kernel in assembly and C++ (I'm still on assembly right now), and I'm loading it with GRUB. So far, everything works fine, except for linking. I'm using ld, and even though the input files are not empty, it produces an empty binary.

            Here is my build script:

            ...

            ANSWER

            Answered 2021-May-05 at 19:46

            As you said: Accidentally using ld.exe from MinGW can cause this to happen (as opposed to the ld.exe from Linux gcc)

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

            QUESTION

            How to connect two docker containers to openvswitch+DPDK
            Asked 2021-May-05 at 04:31

            I'm trying to test the throughput between two docker containers using Iperf3 (any throughput tester app) connected to OVS (openvswitch) and DPDK on ubuntu 18.04 (VMWare workstation). The goal of this is to compare the performance of OVS-DPDK vs Linux kernel in some scenarios.

            I can't find a proper solution, which explains how to connect OVS+DPDK to the docker containers so that the containers can pass TCP/UDP traffic to each other.

            I'd appreciate your help explaining how to connect two docker containers with OVS+DPDK. The configuration that needs to be done in the docker containers, and the ones that need to be done in the host OS.

            BTW I don't have traffic from outside.

            Thanks

            Edit

            • DPDK version is 20.11.0
            • OVS version is 2.15.90
            • Iperf3

            Here are the steps I take:

            1. I install dpdk using apt: sudo apt install openvswitch-switch-dpdk

            2. set the alternative as: sudo update-alternatives --set OvS-vswitchd /usr/lib/openvswitch-switch -dpdk/OvS-vswitchd-dpdk

            3. Allocate the hugepages and update the grub.

            4. mount hugepages

            5. bind NIC to DPDK: sudo dpdk-devbind --bind=vfio-pci ens33. Although I don't need this step because I don't have traffic from outside if I don't bind my NIC the sudo service openvswitch-switch restart fails.

            6. I create a bridge: ovs-vsctl add-br br0 -- set bridge br0 datapath_type=netdev

            7. I create two ports for my containers: ovs-vsctl add-port br0 client -- set Interface client type=dpdk options:dpdk-devargs= and ovs-vsctl add-port br0 server -- set Interface server type=dpdk options:dpdk-devargs=. (server port number: 1, client port number: 2)

            8. Open bidirectional flow between ports:

              1. sudo ovs-ofctl del-flows br0
              2. sudo ovs-ofctl add-flow br0 in_port=1,action=output:2
              3. ovs-ofctl add-flow br0 in_port=2,action=output:1

            After step 8 I don't know how to connect my iperf3 docker containers to use these ports. I appreciate your help in letting me know how to connect containers to the ports and test the network.

            Edit 2

            Based on Vipin's answer these steps won't work considering my requirements.

            ...

            ANSWER

            Answered 2021-May-05 at 04:31

            [EDIT: update to reflect only using OVS-DPDK and iperf3 on container]

            There are multiple ways one can connect 2 dockers to talk directly with each other using to run iperf3.

            1. Virtual Interface like TAP-1|MAC-VETH-1 from Docker-1 is connected to TAP-2| MAC-VETH-2 via Linux Bridge.
            2. Virtual port-1 (TAP|memif) from OVS-DPDK to Docker-1 and virtual port-2 (tap|memif) to Docker-2 via DPDK-OVS

            For scenario 2 one needs to add TAP interface to OVS. because end application iperf3 is using Kernel Stack for TCP|UDP termination. One can use the below settings (modified based on OVS-DPDK version) to achieve the result.

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

            QUESTION

            How can remove this gcc flags from linker flags in cmake?
            Asked 2021-Apr-27 at 07:38

            I made simple kernel for studying purposes. I cange MakeFile to CMakeLists.txt to automatically genreate my kernel form sources. But I encounter this relocation error.

            ...

            ANSWER

            Answered 2021-Apr-27 at 07:38

            Finally I figure out how to remove useless linker argument from cmake. CMAKE uses compiler as an default linker. In my case, gcc is default linker because I build my source code with gcc. The important fact is that cmake also berings CMAKE_CXX_FLAGS with gcc in linking stage. So we have to use custom linker as like this to avoid cmake linking our oject files with default compiler linker.

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

            QUESTION

            x86-64 Kernel crashing on setting up the IDT
            Asked 2021-Apr-23 at 16:11

            I am currently trying to create an x86-64 Kernel from scratch (using GRUB Multiboot2 as a bootloader). I set up my GDT just fine, but when setting up my IDT, there seems to be a problem. I isolated the issue to be my call of lidt by hlting before and after most instructions of my code. Here are my C and ASM files that define my IDT:

            ...

            ANSWER

            Answered 2021-Apr-23 at 15:39

            Your load_idt function is written as a 32-bit function where the first parameter is passed on the stack. In the 64-bit System V ABI the first parameter is passed in register RDI. Use this instead:

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

            QUESTION

            debugging kernel with qemu and gdb, breakpoint not working?
            Asked 2021-Mar-31 at 13:32

            To try debugging kernel using qemu and gdb (how nice it would be) for aarch64, I tried this.

            • build kernel with CONFIG_DEBUG_INFO

            • build qemu with 'configure --target-list=aarch64-softmmu --enable-debug' and 'make' and 'make install'.

            • then I ran,
              qemu-system-aarch64 -machine virt -cpu cortex-a57 -machine type=virt -nographic -smp 1 -m 2048 -kernel arch/arm64/boot/Image -append "earlyprintk console=ttyAMA0 rootwait root=/dev/vda2" -drive if=none,file=/home/ckim/N1SDP/arm-reference-platforms/output/n1sdp/grub-ubuntu.img,id=disk1 -device virtio-blk-device,drive=disk1 -s -S

            • and ran in another shell, 'gdb-multiarch vmlinux -x gdbcmd'. gdbcmd contains

              set architecture aarch64 set serial baud 115200 target remote :1234

            Without -S option, qemu proceeds with linux booting. (it starts with

            ...

            ANSWER

            Answered 2021-Mar-31 at 13:32

            This was solve not long after my posting the question and I forgot to put an answer.

            It was because of the KASLR (kernel address space location randomization). You should disable it in the kernel configuration, or give option in the boot parameter. (without it, the kernel image is located in random location, causing mismach between debug symbol location and actual code location). This KASLR is turned on by default for aarch64.
            In my case I did it with :

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

            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

            Ryzen 7 4800, Ubuntu 20.04.02: Display and/or USB problems
            Asked 2021-Mar-17 at 08:34

            Installed Ubuntu Studio 20.04 on an ASUS PN50 mini-PC with Ryzen 7 4800. Upgraded to 20.04.2, kernel 5.8.0-44-lowlatency. Memory 32 GB 3200 MHz. Installation itself was smooth. The box only runs Radeon graphics. There is no NVIDIA. The desktop is Xfce 4.14.

            I may be mixing apples and oranges, but since I can't tell (I'm not a hw freak) I'll report more than one issue. They may or may not be related, please bear with me.

            Prelude: After installation the system didn't seem to boot. Stuck with Ubuntu splash screen.

            On closer look lightdm wouldn't start. This fact kept the system waiting indefinitely.

            I modified /etc/default/grub, deleted "quiet splash", added "nomodeset". The system now boots to text. After logging in I do a manual "startx" and the box generally seems to behave well. Graphics look good, snappy response. Later I added "amdgpu.exp_hw_support=1" to grub, but I haven't noticed any difference. The gpumanager log ends with "Nothing to do".

            I'm not sure what lightdm does, but it is the default display manager:
            /etc/X11/default-display-manager: /usr/sbin/lightdm

            Here is systemctl status lightdm.service output. I'm not sure what it's telling me.

            ...

            ANSWER

            Answered 2021-Mar-17 at 08:34

            After two days of lightdm crash course, here is the answer, and it has nothing to do with Ryzen.

            One file was missing from the lightdm configuration. This is an installation from scratch, so either it's missing from the Ubuntu Studio distribution, or maybe I unwittingly deleted it myself somehow.

            The file is: /usr/share/lightdm/lightdm.conf.d/60-lightdm-gtk-greeter.conf:

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

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

            Vulnerabilities

            No vulnerabilities reported

            Install grub

            If you are using APT to install Grub, then just do quick builds like this:. This requires a corresponding deb-src line for each deb line in the /etc/apt/sources.list.d file for Grub.
            List the current releases by branch name:.
            Clone this repository: $ git clone git://github.com/zfsonlinux/grub.git $ cd grub
            List the current releases by branch name: $ git branch --list 'master/*'
            Or list previous releases by tag name: $ git tag --list 'master/*' $ git tag --list 'snapshot/*'
            Before building the chosen tag/branch, because of limitations and faults with the current ZoL development package, you need to modify the includes. This is done using the command $ ./fix_includes-libspl.sh
            Checkout the branch name or tag name that you want to build. For example, the latest code for Ubuntu 12.04 Raring is: $ git checkout master/ubuntu/raring/2.00-13ubuntu3+zfs3_raring
            Now compile it: $ git-buildpackage -uc -us
            And clean the working tree afterwards by doing this: $ git clean -df $ git reset --hard

            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/zfsonlinux/grub.git

          • CLI

            gh repo clone zfsonlinux/grub

          • sshUrl

            git@github.com:zfsonlinux/grub.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

            Consider Popular Shell Libraries

            awesome

            by sindresorhus

            ohmyzsh

            by ohmyzsh

            realworld

            by gothinkster

            nvm

            by nvm-sh

            papers-we-love

            by papers-we-love

            Try Top Libraries by zfsonlinux

            zfs-auto-snapshot

            by zfsonlinuxShell

            fstest

            by zfsonlinuxShell

            zfsonlinux.github.com

            by zfsonlinuxHTML

            mountall

            by zfsonlinuxShell

            zfsstress

            by zfsonlinuxShell