Jump to content

beemac

Members
  • Posts

    7
  • Joined

  • Last visited

Posts posted by beemac

  1. 2 hours ago, Leoyzen said:

    @beemacWhy don't you compiling the kernel without custom option but just the standard .config from unraid server to test the building prodecure?

    If it can boot without issues, then it must be something wrong with "CONFIG_NO_HZ_FULL" enabled.

    In short, yes, that worked fine.

    In my post above, I mentioned:

    3 hours ago, beemac said:

    was able to boot with the bzimage file that I built, however it only seems stable with default "make oldconfig" settings.

    As far as I understand, this is the "standard .config" by using "make oldconfig" and not changing anything else. Again, everything seems normal and VM Manager boots up OK when I compile the kernel with make oldconfig.

     

    Do you see any problem with me running the default bzmodules with a custom bzimage?

    For whatever reason I've just had no luck when I try to replace bzmodules. Maybe because I don't have the proper .config, and it's missing options, as you said?

     

    If I can just run the default bzmodules as I have been doing, then that leaves me to solve my ultimate problem that only occurs when I boot with the kernel that has the CONFIG_NO_HZ_FULL=y option set. I've been playing with boot options this morning with this bzimagenohz kernel, trying to enable arguments one at a time. Safe mode and everything, the system hangs and I can never get VM Manager to load. I can run virsh in terminal but any command I type into it just hangs. I have been Googling around but haven't found anything.

    I understand this is not exactly the focus of your thread, so I'm only posting in the hope that someone may come across it and know how to solve my problem. That being said, the below seems to be the problem that I think is preventing my VM Manager from working.

    Mar 12 11:15:05 unRAID root: Starting virtlockd...
    Mar 12 11:15:05 unRAID root: Starting virtlogd...
    Mar 12 11:15:05 unRAID root: Starting libvirtd...
    Mar 12 11:15:05 unRAID kernel: tun: Universal TUN/TAP device driver, 1.6
    Mar 12 11:15:05 unRAID kernel: BUG: unable to handle kernel paging request at 0000000000007428
    Mar 12 11:15:05 unRAID kernel: PGD 0 P4D 0 
    Mar 12 11:15:05 unRAID kernel: Oops: 0000 [#1] SMP NOPTI
    Mar 12 11:15:05 unRAID kernel: CPU: 7 PID: 15545 Comm: libvirtd Tainted: G        W  O      4.19.107-Unraid #1
    Mar 12 11:15:05 unRAID kernel: Hardware name: Gigabyte Technology Co., Ltd. X470 AORUS ULTRA GAMING/X470 AORUS ULTRA GAMING-CF, BIOS F6 01/25/2019
    Mar 12 11:15:05 unRAID kernel: RIP: 0010:tun_chr_open+0x28/0x152 [tun]
    Mar 12 11:15:05 unRAID kernel: Code: 5c c3 41 54 45 31 c0 ba c0 00 60 00 48 c7 c1 00 31 19 a0 55 65 48 8b 04 25 40 5c 01 00 53 48 8b 80 e0 05 00 00 48 89 f3 31 f6 <48> 8b 78 28 e8 1f 4d 39 e1 48 89 c5 b8 f4 ff ff ff 48 85 ed 0f 84
    Mar 12 11:15:05 unRAID kernel: RSP: 0018:ffffc90001fe7c30 EFLAGS: 00010246
    Mar 12 11:15:05 unRAID kernel: RAX: 0000000000007400 RBX: ffff888409ada500 RCX: ffffffffa0193100
    Mar 12 11:15:05 unRAID kernel: RDX: 00000000006000c0 RSI: 0000000000000000 RDI: ffff888408e00318
    Mar 12 11:15:05 unRAID kernel: RBP: 00000000000000c8 R08: 0000000000000000 R09: ffff888408d6c020
    Mar 12 11:15:05 unRAID kernel: R10: ffff88840e031740 R11: fffffffffac608b1 R12: ffff888409ada500
    Mar 12 11:15:05 unRAID kernel: R13: ffff888408e00318 R14: ffffffffa0191400 R15: ffff888409ada500
    Mar 12 11:15:05 unRAID kernel: FS:  0000148d635fa700(0000) GS:ffff88840ebc0000(0000) knlGS:0000000000000000
    Mar 12 11:15:05 unRAID kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    Mar 12 11:15:05 unRAID kernel: CR2: 0000000000007428 CR3: 000000040b228000 CR4: 00000000003406e0
    Mar 12 11:15:05 unRAID kernel: Call Trace:
    Mar 12 11:15:05 unRAID kernel: misc_open+0x11a/0x138
    Mar 12 11:15:05 unRAID kernel: chrdev_open+0x151/0x189
    Mar 12 11:15:05 unRAID kernel: ? cdev_put+0x19/0x19
    Mar 12 11:15:05 unRAID kernel: do_dentry_open+0x223/0x2dd
    Mar 12 11:15:05 unRAID kernel: path_openat+0xaab/0xc8c
    Mar 12 11:15:05 unRAID kernel: ? _copy_to_user+0x22/0x28
    Mar 12 11:15:05 unRAID kernel: do_filp_open+0x57/0xc1
    Mar 12 11:15:05 unRAID kernel: ? __inode_wait_for_writeback+0x71/0xc6
    Mar 12 11:15:05 unRAID kernel: ? __dentry_kill+0x127/0x130
    Mar 12 11:15:05 unRAID kernel: ? __alloc_fd+0x95/0x14e
    Mar 12 11:15:05 unRAID kernel: ? do_sys_open+0x133/0x1cf
    Mar 12 11:15:05 unRAID kernel: do_sys_open+0x133/0x1cf
    Mar 12 11:15:05 unRAID kernel: do_syscall_64+0x92/0x167
    Mar 12 11:15:05 unRAID kernel: entry_SYSCALL_64_after_hwframe+0x44/0xa9
    Mar 12 11:15:05 unRAID kernel: RIP: 0033:0x148d8f1c6cf4
    Mar 12 11:15:05 unRAID kernel: Code: 84 00 00 00 00 00 44 89 54 24 0c e8 e6 f4 ff ff 44 8b 54 24 0c 44 89 e2 48 89 ee 41 89 c0 bf 9c ff ff ff b8 01 01 00 00 0f 05 <48> 3d 00 f0 ff ff 77 32 44 89 c7 89 44 24 0c e8 18 f5 ff ff 8b 44
    Mar 12 11:15:05 unRAID kernel: RSP: 002b:0000148d635f9850 EFLAGS: 00000293 ORIG_RAX: 0000000000000101
    Mar 12 11:15:05 unRAID kernel: RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000148d8f1c6cf4
    Mar 12 11:15:05 unRAID kernel: RDX: 0000000000000002 RSI: 0000148d9031f891 RDI: 00000000ffffff9c
    Mar 12 11:15:05 unRAID kernel: RBP: 0000148d9031f891 R08: 0000000000000000 R09: 0000148d635f9a94
    Mar 12 11:15:05 unRAID kernel: R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000000002
    Mar 12 11:15:05 unRAID kernel: R13: 000000000000000d R14: 0000148d635f9aa0 R15: 0000148d9031f891
    Mar 12 11:15:05 unRAID kernel: Modules linked in: vhost_net tun vhost tap macvlan xt_nat veth ipt_MASQUERADE iptable_filter iptable_nat nf_nat_ipv4 nf_nat ip_tables xfs md_mod sr_mod cdrom edac_mce_amd kvm_amd hid_logitech_hidpp kvm crct10dif_pclmul crc32_pclmul crc32c_intel ghash_clmulni_intel pcbc bnx2x aesni_intel aes_x86_64 crypto_simd cryptd i2c_piix4 i2c_core mxm_wmi k10temp wmi_bmof glue_helper hid_logitech_dj ccp nvme igb(O) mdio ahci pcc_cpufreq nvme_core libahci wmi button acpi_cpufreq
    Mar 12 11:15:05 unRAID kernel: CR2: 0000000000007428
    Mar 12 11:15:05 unRAID kernel: ---[ end trace 84cc620044acb508 ]---
    Mar 12 11:15:05 unRAID kernel: RIP: 0010:tun_chr_open+0x28/0x152 [tun]
    Mar 12 11:15:05 unRAID kernel: Code: 5c c3 41 54 45 31 c0 ba c0 00 60 00 48 c7 c1 00 31 19 a0 55 65 48 8b 04 25 40 5c 01 00 53 48 8b 80 e0 05 00 00 48 89 f3 31 f6 <48> 8b 78 28 e8 1f 4d 39 e1 48 89 c5 b8 f4 ff ff ff 48 85 ed 0f 84
    Mar 12 11:15:05 unRAID kernel: RSP: 0018:ffffc90001fe7c30 EFLAGS: 00010246
    Mar 12 11:15:05 unRAID kernel: RAX: 0000000000007400 RBX: ffff888409ada500 RCX: ffffffffa0193100
    Mar 12 11:15:05 unRAID kernel: RDX: 00000000006000c0 RSI: 0000000000000000 RDI: ffff888408e00318
    Mar 12 11:15:05 unRAID kernel: RBP: 00000000000000c8 R08: 0000000000000000 R09: ffff888408d6c020
    Mar 12 11:15:05 unRAID kernel: R10: ffff88840e031740 R11: fffffffffac608b1 R12: ffff888409ada500
    Mar 12 11:15:05 unRAID kernel: R13: ffff888408e00318 R14: ffffffffa0191400 R15: ffff888409ada500
    Mar 12 11:15:05 unRAID kernel: FS:  0000148d635fa700(0000) GS:ffff88840ebc0000(0000) knlGS:0000000000000000
    Mar 12 11:15:05 unRAID kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    Mar 12 11:15:05 unRAID kernel: CR2: 0000000000007428 CR3: 000000040b228000 CR4: 00000000003406e0

     

  2. 5 hours ago, Leoyzen said:

    @beemacYour procedure should be fine.By the way, the latest unRaid config is not the one from /usr/src. They missed some important things in .config( like ixgbe support).But I don't know what's wrong with your VM Manager.Can you boot with the kernel I posted?

    Where do I find the proper .config file, if it's not the one at /usr/src/linux-4.19.107-Unraid/.config on the unRAID flash drive?

    9 hours ago, beemac said:

    If I only replace the bzimage file, and use the untouched bzmodules, I can get the system to boot and everything seems to start up in a normal boot mode.

    was able to boot with the bzimage file that I built, however it only seems stable with default "make oldconfig" settings.

     

    Using my compiled bzmodules is what causes all kinds of issues for me such as no interfaces. Would that be related to the improper .config file? My bzmodules ends up 8396KB, while the default one is 9316KB. If I'm not changing anything, they should be very close if not exact, shouldn't they?

     

    There's got to be something wrong with how I'm doing the modules building part. I'm going to post my steps in order without all the log input at the end of this post for @J89euand maybe it will be more obvious to someone what I'm not doing right.

     

    The problem with the VM manager not loading is when I use "make menuconfig" after "make oldconfig" and I select the full tickless option (CONFIG_NO_HZ_FULL=y). I'm going to keep trying whatever I can think of to deal with this "libvirt tainted' issue that I have when booting with the tickless kernel. I'll keep using the default bzmodules for now.

     

    2 hours ago, J89eu said:

    Could anyone do some extra steps on the instructions for people that are not absolute idiots on Linux but close to? The steps are a little advanced for and I want to try this for an issue with my VM i've been suffering with since December... As in it not working at all

    I'm going to post how I built the kernel. I'm guessing you have a version of unRAID where you can't just download the precompiled version that @Leoyzenhas already posted? For your VM issue, I would suggest trying to build the VM from scratch, and just keep the vdisk file and the original XML for reference. That, or look into emulating a CPU because I had an issue with my OPNsense not working after the update from 6.6.7 to 6.8.0; Ryzen passthrough no longer works on OPNsense or pfSense.

     

    Full log files of the output from my steps can be seen in my previous post, but below are the steps that you can just copy/paste in order. I used a Linux Mint 19.3 64bit VM for this but a recent Ubuntu distro should work just the same if you have one installed already. I allocated a bunch of cores to the VM so that the compiling time was quicker.

     

    Keep in mind this is for unRAID 6.8.3 with kernel version 4.19.107. I verified this with the command uname -a at the terminal of my unRAID server. Check this before using my steps exactly:

    root@unRAID:~# uname -a
    Linux unRAID 4.19.107-Unraid #1 SMP Wed Mar 11 20:38:14 EDT 2020 x86_64 AMD Ryzen 5 1600 Six-Core Processor AuthenticAMD GNU/Linux

    I did all of this from the PuTTY client over SSH to the Mint VM. Otherwise, opening a terminal directly on the Mint VM through VNC would work. I made some in-line notes starting with ##, and added a few line breaks, usually where input is required. All of this is use at your own risk. Anyway, here's what I have:

    sudo -i
    ## enter your Ubuntu account password then hit ENTER to get root prompt
    
    mkdir /boot/packages/
    cd /boot/packages/
    wget https://s3.amazonaws.com/dnld.lime-technology.com/stable/unRAIDServer-6.8.3-x86_64.zip
    wget https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.19.107.tar.xz
    rsync -avhr [email protected]:/usr/src/ /usr/src/
    ## REPLACE 192.168.2.2 ^ with your unRAID server IP or hostname, you will need to enter your unraid root password
    
    tar -xvf linux-4.19.107.tar.xz -C /usr/src/
    ln -sf /usr/src/linux-4.19.107 /usr/src/linux
    mkdir -p /mnt/dev/
    unzip /boot/packages/unRAIDServer-6.8.3-x86_64.zip -d /mnt/dev/
    apt update
    apt install libelf-dev build-essential ncurses-dev
    ## press Y then ENTER to install these packages that you'll need
    
    cp -vrf /usr/src/linux-4.19.107-Unraid/* /usr/src/linux/
    cp -vf /usr/src/linux-4.19.107-Unraid/.config /usr/src/linux/
    cd /usr/src/linux
    find . -type f -iname '*.patch' -print0|xargs -n1 -0 patch -p 1 -i
    make oldconfig
    ## YOU CAN use "make menuconfig" at this step and select different options using arrows/space bar/enter then select Save and it'll update the .config file
    ## "grep HZ .config"  this is my command I can optionally enter to see in the console that the option I selected was saved to the .config file before building the kernel in the following commands
    
    make -j5 bzImage; make -j5; make -j5 modules
    make modules_install
    mkdir -p /releases/6.8.3-4.19.107/
    cp /usr/src/linux/arch/x86_64/boot/bzImage /releases/6.8.3-4.19.107/bzimage
    mksquashfs /lib/modules/4.19.107-Unraid/ /releases/6.8.3-4.19.107/bzmodules -keep-as-directory -noappend
    
    ## MAKE BACKUPS of /boot/bzimage and /boot/bzmodules on your unRAID server BEFORE the following step. A full backup of your unRAID USB is probably a better idea (I do this quite often)
    scp /releases/6.8.3-4.19.107/bz* [email protected]:/boot/
    ## enter your unraid root password again and hit enter to overwrite the bzimage and bzmodules files. If you just want to copy bzimage and keep the default bzmodules then the command for that is here:
    ## scp /releases/6.8.3-4.19.107/bzimage [email protected]:/boot/bzimage

     

  3. 1 hour ago, Leoyzen said:

    @beemacYou did it wrong. You should use ** /usr/src from unraid ** instead of using the one from ubuntu.Copy the patches from /usr/src from your unraid server and try again.

    I copy the files from unraid server which is 192.168.2.2, here:

    root@MinTester:/boot/packages# rsync -avhr [email protected]:/usr/src/ /usr/src/
    [email protected]'s password: 
    receiving incremental file list
    ./
    linux-4.19.107-Unraid/
    linux-4.19.107-Unraid/.config
    linux-4.19.107-Unraid/COPYING
    linux-4.19.107-Unraid/System.map
    linux-4.19.107-Unraid/acs_override.patch
    linux-4.19.107-Unraid/drivers_ata_libata-core.patch
    linux-4.19.107-Unraid/drivers_hpsa.patch
    linux-4.19.107-Unraid/drivers_mvsas_rr_2782.patch
    linux-4.19.107-Unraid/fs_reiserfs_resize.patch
    linux-4.19.107-Unraid/fs_reiserfs_super.patch
    linux-4.19.107-Unraid/ignore_unhandled_msrs.patch
    linux-4.19.107-Unraid/increase_BLK_MAX_REQUEST_COUNT.patch
    linux-4.19.107-Unraid/mozart_395S.patch
    linux-4.19.107-Unraid/raid6_choose_xor.patch
    linux-4.19.107-Unraid/wireguard-0.0.20200215.patch
    linux-4.19.107-Unraid/drivers/
    linux-4.19.107-Unraid/drivers/md/
    linux-4.19.107-Unraid/drivers/md/Kconfig
    linux-4.19.107-Unraid/drivers/md/Makefile
    linux-4.19.107-Unraid/drivers/md/md.c
    linux-4.19.107-Unraid/drivers/md/md_private.h
    linux-4.19.107-Unraid/drivers/md/unraid.c
    
    sent 408 bytes  received 4.88M bytes  1.39M bytes/sec
    total size is 4.88M  speedup is 1.00
    root@MinTester:/boot/packages# tar -xvf linux-4.19.107.tar.xz -C /usr/src/
    linux-4.19.107/
    linux-4.19.107/.clang-format
    linux-4.19.107/.cocciconfig
    linux-4.19.107/.get_maintainer.ignore
    linux-4.19.107/.gitattributes
    linux-4.19.107/.gitignore
    linux-4.19.107/.mailmap
    linux-4.19.107/COPYING
    linux-4.19.107/CREDITS
    linux-4.19.107/Documentation/
    ...lines removed to reduce file size...
    linux-4.19.107/virt/kvm/vfio.c
    linux-4.19.107/virt/kvm/vfio.h
    linux-4.19.107/virt/lib/
    linux-4.19.107/virt/lib/Kconfig
    linux-4.19.107/virt/lib/Makefile
    linux-4.19.107/virt/lib/irqbypass.c
    root@MinTester:/boot/packages# ln -sf /usr/src/linux-4.19.107 /usr/src/linux
    root@MinTester:/boot/packages# mkdir -p /mnt/dev/
    root@MinTester:/boot/packages# unzip /boot/packages/unRAIDServer-6.8.3-x86_64.zip -d /mnt/dev/
    Archive:  /boot/packages/unRAIDServer-6.8.3-x86_64.zip
       creating: /mnt/dev/EFI-/
       creating: /mnt/dev/EFI-/boot/
      inflating: /mnt/dev/EFI-/boot/bootx64.efi  
      inflating: /mnt/dev/EFI-/boot/ldlinux.e64  
      inflating: /mnt/dev/EFI-/boot/libcom32.c32  
      inflating: /mnt/dev/EFI-/boot/libutil.c32  
      inflating: /mnt/dev/EFI-/boot/mboot.c32  
      inflating: /mnt/dev/EFI-/boot/menu.c32  
      inflating: /mnt/dev/EFI-/boot/syslinux.cfg  
      inflating: /mnt/dev/bzfirmware     
      inflating: /mnt/dev/bzfirmware.sha256  
      inflating: /mnt/dev/bzimage        
      inflating: /mnt/dev/bzimage.sha256  
      inflating: /mnt/dev/bzmodules      
      inflating: /mnt/dev/bzmodules.sha256  
      inflating: /mnt/dev/bzroot         
      inflating: /mnt/dev/bzroot-gui     
      inflating: /mnt/dev/bzroot-gui.sha256  
      inflating: /mnt/dev/bzroot.sha256  
      inflating: /mnt/dev/changes.txt    
       creating: /mnt/dev/config/
      inflating: /mnt/dev/config/ident.cfg  
      inflating: /mnt/dev/config/network.cfg  
     extracting: /mnt/dev/config/go      
       creating: /mnt/dev/config/plugins/
       creating: /mnt/dev/config/plugins/dockerMan/
     extracting: /mnt/dev/config/plugins/dockerMan/template-repos  
     extracting: /mnt/dev/config/docker.cfg  
     extracting: /mnt/dev/config/domain.cfg  
      inflating: /mnt/dev/license.txt    
      inflating: /mnt/dev/make_bootable.bat  
      inflating: /mnt/dev/make_bootable_linux  
      inflating: /mnt/dev/make_bootable_mac  
      inflating: /mnt/dev/memtest        
       creating: /mnt/dev/syslinux/
      inflating: /mnt/dev/syslinux/ldlinux.c32  
      inflating: /mnt/dev/syslinux/libcom32.c32  
      inflating: /mnt/dev/syslinux/libutil.c32  
      inflating: /mnt/dev/syslinux/make_bootable_mac.sh  
      inflating: /mnt/dev/syslinux/mboot.c32  
      inflating: /mnt/dev/syslinux/mbr.bin  
      inflating: /mnt/dev/syslinux/menu.c32  
      inflating: /mnt/dev/syslinux/syslinux  
      inflating: /mnt/dev/syslinux/syslinux.exe  
      inflating: /mnt/dev/syslinux/make_bootable_linux.sh  
      inflating: /mnt/dev/syslinux/syslinux_linux  
      inflating: /mnt/dev/syslinux/syslinux.cfg-  
      inflating: /mnt/dev/syslinux/syslinux.cfg  
    root@MinTester:/boot/packages# cp -vrf /usr/src/linux-4.19.107-Unraid/* /usr/src/linux/
    '/usr/src/linux-4.19.107-Unraid/acs_override.patch' -> '/usr/src/linux/acs_override.patch'
    '/usr/src/linux-4.19.107-Unraid/COPYING' -> '/usr/src/linux/COPYING'
    '/usr/src/linux-4.19.107-Unraid/drivers/md/Kconfig' -> '/usr/src/linux/drivers/md/Kconfig'
    '/usr/src/linux-4.19.107-Unraid/drivers/md/Makefile' -> '/usr/src/linux/drivers/md/Makefile'
    '/usr/src/linux-4.19.107-Unraid/drivers/md/md.c' -> '/usr/src/linux/drivers/md/md.c'
    '/usr/src/linux-4.19.107-Unraid/drivers/md/md_private.h' -> '/usr/src/linux/drivers/md/md_private.h'
    '/usr/src/linux-4.19.107-Unraid/drivers/md/unraid.c' -> '/usr/src/linux/drivers/md/unraid.c'
    '/usr/src/linux-4.19.107-Unraid/drivers_ata_libata-core.patch' -> '/usr/src/linux/drivers_ata_libata-core.patch'
    '/usr/src/linux-4.19.107-Unraid/drivers_hpsa.patch' -> '/usr/src/linux/drivers_hpsa.patch'
    '/usr/src/linux-4.19.107-Unraid/drivers_mvsas_rr_2782.patch' -> '/usr/src/linux/drivers_mvsas_rr_2782.patch'
    '/usr/src/linux-4.19.107-Unraid/fs_reiserfs_resize.patch' -> '/usr/src/linux/fs_reiserfs_resize.patch'
    '/usr/src/linux-4.19.107-Unraid/fs_reiserfs_super.patch' -> '/usr/src/linux/fs_reiserfs_super.patch'
    '/usr/src/linux-4.19.107-Unraid/ignore_unhandled_msrs.patch' -> '/usr/src/linux/ignore_unhandled_msrs.patch'
    '/usr/src/linux-4.19.107-Unraid/increase_BLK_MAX_REQUEST_COUNT.patch' -> '/usr/src/linux/increase_BLK_MAX_REQUEST_COUNT.patch'
    '/usr/src/linux-4.19.107-Unraid/mozart_395S.patch' -> '/usr/src/linux/mozart_395S.patch'
    '/usr/src/linux-4.19.107-Unraid/raid6_choose_xor.patch' -> '/usr/src/linux/raid6_choose_xor.patch'
    '/usr/src/linux-4.19.107-Unraid/System.map' -> '/usr/src/linux/System.map'
    '/usr/src/linux-4.19.107-Unraid/wireguard-0.0.20200215.patch' -> '/usr/src/linux/wireguard-0.0.20200215.patch'
    root@MinTester:/boot/packages# cp -vf /usr/src/linux-4.19.107-Unraid/.config /usr/src/linux/
    '/usr/src/linux-4.19.107-Unraid/.config' -> '/usr/src/linux/.config'
    root@MinTester:/boot/packages# cd /usr/src/linux
    root@MinTester:/usr/src/linux# find . -type f -iname '*.patch' -print0|xargs -n1 -0 patch -p 1 -i
    patching file drivers/scsi/hpsa.c
    patching file drivers/pci/quirks.c
    Hunk #1 succeeded at 3404 (offset 13 lines).
    patching file include/linux/pci_ids.h
    patching file drivers/scsi/mvsas/mv_init.c
    Hunk #1 succeeded at 684 (offset -2 lines).
    patching file fs/reiserfs/super.c
    patching file fs/reiserfs/resize.c
    patching file arch/x86/kvm/x86.c
    Hunk #1 succeeded at 113 with fuzz 1 (offset 4 lines).
    patching file include/linux/blkdev.h
    patching file drivers/pci/quirks.c
    Hunk #1 succeeded at 3782 with fuzz 2 (offset 40 lines).
    Hunk #2 succeeded at 4665 with fuzz 1 (offset 76 lines).
    patching file net/wireguard/allowedips.c
    patching file net/wireguard/compat/dst_cache/dst_cache.c
    patching file net/wireguard/compat/memneq/memneq.c
    patching file net/wireguard/compat/siphash/siphash.c
    patching file net/wireguard/compat/udp_tunnel/udp_tunnel.c
    patching file net/wireguard/cookie.c
    patching file net/wireguard/crypto/zinc/blake2s/blake2s-x86_64-glue.c
    patching file net/wireguard/crypto/zinc/blake2s/blake2s.c
    patching file net/wireguard/crypto/zinc/chacha20/chacha20-arm-glue.c
    patching file net/wireguard/crypto/zinc/chacha20/chacha20-mips-glue.c
    patching file net/wireguard/crypto/zinc/chacha20/chacha20-x86_64-glue.c
    patching file net/wireguard/crypto/zinc/chacha20/chacha20.c
    patching file net/wireguard/crypto/zinc/chacha20poly1305.c
    patching file net/wireguard/crypto/zinc/curve25519/curve25519-arm-glue.c
    patching file net/wireguard/crypto/zinc/curve25519/curve25519-fiat32.c
    patching file net/wireguard/crypto/zinc/curve25519/curve25519-hacl64.c
    patching file net/wireguard/crypto/zinc/curve25519/curve25519-x86_64-glue.c
    patching file net/wireguard/crypto/zinc/curve25519/curve25519-x86_64.c
    patching file net/wireguard/crypto/zinc/curve25519/curve25519.c
    patching file net/wireguard/crypto/zinc/poly1305/poly1305-arm-glue.c
    patching file net/wireguard/crypto/zinc/poly1305/poly1305-donna32.c
    patching file net/wireguard/crypto/zinc/poly1305/poly1305-donna64.c
    patching file net/wireguard/crypto/zinc/poly1305/poly1305-mips-glue.c
    patching file net/wireguard/crypto/zinc/poly1305/poly1305-x86_64-glue.c
    patching file net/wireguard/crypto/zinc/poly1305/poly1305.c
    patching file net/wireguard/crypto/zinc/selftest/blake2s.c
    patching file net/wireguard/crypto/zinc/selftest/chacha20.c
    patching file net/wireguard/crypto/zinc/selftest/chacha20poly1305.c
    patching file net/wireguard/crypto/zinc/selftest/curve25519.c
    patching file net/wireguard/crypto/zinc/selftest/poly1305.c
    patching file net/wireguard/device.c
    patching file net/wireguard/main.c
    patching file net/wireguard/netlink.c
    patching file net/wireguard/noise.c
    patching file net/wireguard/peer.c
    patching file net/wireguard/peerlookup.c
    patching file net/wireguard/queueing.c
    patching file net/wireguard/ratelimiter.c
    patching file net/wireguard/receive.c
    patching file net/wireguard/selftest/allowedips.c
    patching file net/wireguard/selftest/counter.c
    patching file net/wireguard/selftest/ratelimiter.c
    patching file net/wireguard/send.c
    patching file net/wireguard/socket.c
    patching file net/wireguard/timers.c
    patching file net/wireguard/allowedips.h
    patching file net/wireguard/compat/checksum/checksum_partial_compat.h
    patching file net/wireguard/compat/compat-asm.h
    patching file net/wireguard/compat/compat.h
    patching file net/wireguard/compat/dst_cache/include/net/dst_cache.h
    patching file net/wireguard/compat/fpu-x86/include/asm/fpu/api.h
    patching file net/wireguard/compat/intel-family-x86/include/asm/intel-family.h
    patching file net/wireguard/compat/memneq/include.h
    patching file net/wireguard/compat/neon-arm/include/asm/neon.h
    patching file net/wireguard/compat/ptr_ring/include/linux/ptr_ring.h
    patching file net/wireguard/compat/simd-asm/include/asm/simd.h
    patching file net/wireguard/compat/simd/include/linux/simd.h
    patching file net/wireguard/compat/siphash/include/linux/siphash.h
    patching file net/wireguard/compat/udp_tunnel/include/net/udp_tunnel.h
    patching file net/wireguard/compat/udp_tunnel/udp_tunnel_partial_compat.h
    patching file net/wireguard/cookie.h
    patching file net/wireguard/crypto/include/zinc/blake2s.h
    patching file net/wireguard/crypto/include/zinc/chacha20.h
    patching file net/wireguard/crypto/include/zinc/chacha20poly1305.h
    patching file net/wireguard/crypto/include/zinc/curve25519.h
    patching file net/wireguard/crypto/include/zinc/poly1305.h
    patching file net/wireguard/crypto/zinc.h
    patching file net/wireguard/crypto/zinc/selftest/run.h
    patching file net/wireguard/device.h
    patching file net/wireguard/messages.h
    patching file net/wireguard/netlink.h
    patching file net/wireguard/noise.h
    patching file net/wireguard/peer.h
    patching file net/wireguard/peerlookup.h
    patching file net/wireguard/queueing.h
    patching file net/wireguard/ratelimiter.h
    patching file net/wireguard/socket.h
    patching file net/wireguard/timers.h
    patching file net/wireguard/uapi/wireguard.h
    patching file net/wireguard/version.h
    patching file net/wireguard/crypto/zinc/blake2s/blake2s-x86_64.S
    patching file net/wireguard/crypto/zinc/chacha20/chacha20-mips.S
    patching file net/wireguard/crypto/zinc/chacha20/chacha20-unrolled-arm.S
    patching file net/wireguard/crypto/zinc/curve25519/curve25519-arm.S
    patching file net/wireguard/crypto/zinc/poly1305/poly1305-mips.S
    patching file net/wireguard/crypto/zinc/chacha20/chacha20-arm.pl
    patching file net/wireguard/crypto/zinc/chacha20/chacha20-arm64.pl
    patching file net/wireguard/crypto/zinc/chacha20/chacha20-x86_64.pl
    patching file net/wireguard/crypto/zinc/poly1305/poly1305-arm.pl
    patching file net/wireguard/crypto/zinc/poly1305/poly1305-arm64.pl
    patching file net/wireguard/crypto/zinc/poly1305/poly1305-mips64.pl
    patching file net/wireguard/crypto/zinc/poly1305/poly1305-x86_64.pl
    patching file net/wireguard/compat/Makefile.include
    patching file net/wireguard/crypto/Makefile.include
    patching file net/wireguard/Makefile
    patching file net/wireguard/Kconfig
    patching file net/Kconfig
    Hunk #1 succeeded at 88 (offset 3 lines).
    patching file net/Makefile
    Hunk #1 succeeded at 17 (offset 1 line).
    patching file lib/raid6/algos.c
    Hunk #2 succeeded at 229 (offset 4 lines).
    Hunk #3 succeeded at 308 (offset 4 lines).
    patching file drivers/ata/libata-core.c
    Hunk #1 succeeded at 2455 (offset 68 lines).
    Hunk #2 succeeded at 2548 (offset 71 lines).
    Hunk #3 succeeded at 2601 (offset 71 lines).
    Hunk #4 succeeded at 2626 (offset 71 lines).
    Hunk #5 succeeded at 2722 (offset 72 lines).
    root@MinTester:/usr/src/linux# make oldconfig
      HOSTCC  scripts/basic/fixdep
      HOSTCC  scripts/kconfig/conf.o
      YACC    scripts/kconfig/zconf.tab.c
      LEX     scripts/kconfig/zconf.lex.c
      HOSTCC  scripts/kconfig/zconf.tab.o
      HOSTLD  scripts/kconfig/conf
    scripts/kconfig/conf  --oldconfig Kconfig
    #
    # configuration written to .config
    #
    root@MinTester:/usr/src/linux# make -j5 bzImage; make -j5; make -j5 modules
    ***removing due to output being in previous post attachment**
    root@MinTester:/usr/src/linux# mkdir -p /releases/6.8.3-4.19.107/
    root@MinTester:/usr/src/linux# cp /usr/src/linux/arch/x86_64/boot/bzImage /releases/6.8.3-4.19.107/bzimage
    root@MinTester:/usr/src/linux# mksquashfs /lib/modules/4.19.107-Unraid/ /releases/6.8.3-4.19.107/bzmodules -keep-as-di
    irectory -noappend
    Parallel mksquashfs: Using 4 processors
    Creating 4.0 filesystem on /releases/6.8.3-4.19.107/bzmodules, block size 131072.
    
    [====================================================================================================|] 705/705 100%
    
    Exportable Squashfs 4.0 filesystem, gzip compressed, data block size 131072
    compressed data, compressed metadata, compressed fragments, compressed xattrs
    duplicates are removed
    Filesystem size 8394.25 Kbytes (8.20 Mbytes)
    98.78% of uncompressed filesystem size (8498.06 Kbytes)
    Inode table size 8408 bytes (8.21 Kbytes)
    29.23% of uncompressed inode table size (28762 bytes)
    Directory table size 9382 bytes (9.16 Kbytes)
    44.82% of uncompressed directory table size (20933 bytes)
    Number of duplicate files found 4
    Number of inodes 895
    Number of files 695
    Number of fragments 61
    Number of symbolic links  2
    Number of device nodes 0
    Number of fifo nodes 0
    Number of socket nodes 0
    Number of directories 198
    Number of ids (unique uids + gids) 1
    Number of uids 1
    root (0)
    Number of gids 1
    root (0)
    root@MinTester:/usr/src/linux# scp /releases/6.8.3-4.19.107/bz* [email protected]:/boot/
    [email protected]'s password: 
    
    bzimage                                                                              0%    0     0.0KB/s   --:-- ETA
    bzimage                                                                            100% 4589KB   7.4MB/s   00:00    
    
    bzmodules                                                                            0%    0     0.0KB/s   --:-- ETA
    bzmodules                                                                          100% 8396KB  11.7MB/s   00:00    
    root@MinTester:/usr/src/linux# 

    Then they are copied into the /usr/src/ dir and patched in the steps after that. That part seemed to be working to me?

     

    EDITED to include the last part of the script with make output removed (since it's in my original attachments). I suspect the problem I'm having with bzmodules is due to my mksquashfs syntax, but not sure.

  4. I am about to sleep on this one for the night, but I'm sure I'm doing something wrong with this. For sure with the bzmodules file anyway. Does it matter that the Ubuntu kernel is 5.0.0-32? I completely skip your "optional" step 10 and all sub steps, so I'm not sure if that has anything to do with it. I found the headers for the 5.0.0-32 kernel in /usr/src (as folders due to the Ubuntu kernel being that version) and moved them out of the folder before building this time around. I have compiled a few times now, so I've got my commands down to the point where I can copy/paste them in order.

     

    I don't get any network interfaces (and sometimes couldn't even get my USB keyboard to work locally) when booting with the bzmodules file that I compiled. I suspect it's something wrong with my building process, so I attached compiling logs if anyone has the time to take a look at them. If I only replace the bzimage file, and use the untouched bzmodules, I can get the system to boot and everything seems to start up in a normal boot mode.

     

    If I use the bzimagenohz kernel that I compile (with default bzmodules again) I can get the system to boot, but VM Manager doesn't boot.  I tried with no command line arguments at first, then added one vfio device. This doesn't seem to matter though, as the VM Manager doesn't load to pass though this NIC and give me internet (yes my firewall goes through unRAID, so that's what all the network errors are in the logs). Other than network errors, the diagnostics zip (attached) shows some odd errors such as these:

    Mar 11 21:39:32 unRAID kernel: BUG: unable to handle kernel paging request at 0000000b0000000a
    ...
    Mar 11 21:39:36 unRAID kernel: BUG: unable to handle kernel paging request at 0000000000007428
    Mar 11 21:39:36 unRAID kernel: PGD 0 P4D 0 
    Mar 11 21:39:36 unRAID kernel: Oops: 0000 [#2] SMP NOPTI
    Mar 11 21:39:36 unRAID kernel: CPU: 5 PID: 12818 Comm: libvirtd Tainted: G      D    O      4.19.107-Unraid #1
    Mar 11 21:39:36 unRAID kernel: Hardware name: Gigabyte Technology Co., Ltd. X470 AORUS ULTRA GAMING/X470 AORUS ULTRA GAMING-CF, BIOS F6 01/25/2019
    ...

    Other things:

    Do the sha256 files matter? I did re-calculate the hashes and replace them accordingly during one attempt, but it doesn't seem to make a difference to have the .sha256 files matching.

     

    I figured out how to add menu entries to the unRAID boot menu, by editing both /boot/syslinux/syslinux.cfg and /boot/syslinux.cfg- which results in another entry/menu option; this is shown in the screenshot I attached. I believe it was mentioned earlier in the thread.

     

    I'm going to try again fresh tomorrow troubleshooting with the nohz kernel.

    bootmenu.PNG

    unraid-diagnostics-20200311-2158.zip uR4.19.107.compiling.NO_HZ.ssh.txt uR4.19.107.compiling.defaults.ssh.txt

  5. @Leoyzen, is there any chance you could compile a kernel for me with CONFIG_NO_HZ_FULL?

    I am trying to use the nohz_full kernel argument to solve a latency problem I'm having with my NVIDIA card in passthrough to my Win10 VM.

    I noticed that my kernel, Linux unRAID 4.19.107-Unraid, was not compiled with this option, as can be seen here:

    root@unRAID:/usr/src/linux# dmesg | grep -Ei "rcu|hz"
    [    0.000000] Command line: BOOT_IMAGE=/bzimage vfio-pci.ids=14e4:168e,1022:145c,144d:a804,10de:1c03,10de:10f1 pcie_aspm=off kvm_amd npt=1 nested=1 avic=1 rcu_nocb_poll nohz_full=1-11 rcu_nocbs=0-11 isolcpus=1-11 pcie_acs_override=multifunction initrd=/bzroot
    [    0.000000] tsc: Detected 3200.000 MHz processor
    [    0.106486] Kernel command line: BOOT_IMAGE=/bzimage vfio-pci.ids=14e4:168e,1022:145c,144d:a804,10de:1c03,10de:10f1 pcie_aspm=off kvm_amd npt=1 nested=1 avic=1 rcu_nocb_poll nohz_full=1-11 rcu_nocbs=0-11 isolcpus=1-11 pcie_acs_override=multifunction initrd=/bzroot
    [    0.106567] Housekeeping: nohz unsupported. Build with CONFIG_NO_HZ_FULL
    [    0.146514] rcu: Hierarchical RCU implementation.
    [    0.146515] rcu:     RCU restricting CPUs from NR_CPUS=256 to nr_cpu_ids=16.
    [    0.146516] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=16
    [    0.146693] rcu:     Offload RCU callbacks from CPUs: 0-11.
    [    0.146694] rcu:     Poll for callbacks from no-CBs CPUs.
    [    0.392301] rcu: Hierarchical SRCU implementation.
    [   12.841669] tsc: Refined TSC clocksource calibration: 3200.075 MH

    So far I have not had much luck figuring out building a kernel. I've been using the outdated documentation on the unRAID wiki (https://wiki.unraid.net/Building_a_custom_kernel) and suspect I'm not downloading/installing the proper unRAID packages and/or kernel headers. These are the commands I've used so far, after downloading the kernel source into /boot/packages/: 

     

    tar -C /usr/src/ -zxvf /boot/packages/linux-4.19.107.tar.gz
    ln -sf /usr/src/linux-4.19.107 /usr/src/linux

    mkdir /mnt/dev
    unzip /boot/packages/unRAIDServer-6.8.3-x86_64.zip -d /mnt/dev/
    cp -rf /usr/src/linux-4.19.107-Unraid/* /usr/src/linux/
    cp -f /usr/src/linux-4.19.107-Unraid/.config /usr/src/linux/

     

    #Install kernel headers (I can't figure out the correct headers to use here. I found these on a manjaro repo http://repo.manjaro.org.uk/pool/overlay/linux419-headers-4.19.107-1-x86_64.pkg.tar.xz and renamed the extension then installed)
    installpkg /boot/packages/linux419-headers-4.19.107-1-x86_64.pkg.txz

     

    #Run make menuconfig after installing dependent packages (I have chosen/downloaded these package versions based on what I've found on unRAID release notes and Googling)
    installpkg /boot/packages/make-3.82-x86_64-4.txz
    installpkg /boot/packages/glibc-2.30-x86_64-1.txz
    installpkg /boot/packages/binutils-2.33.1-x86_64-1.txz
    installpkg /boot/packages/ncurses-6.2-x86_64-1.txz
    installpkg /boot/packages/gcc-4.8.2-x86_64-1.txz
    installpkg /boot/packages/gcc-g++-4.8.2-x86_64-1.txz

     

    cd /usr/src/linux
    find . -type f -iname '*.patch' -print0|xargs -n1 -0 patch -p 1 -i

     

    Up to this point ^ everything seems to look good, patches succeeded. Then I run the following:

    root@unRAID:/usr/src/linux# make oldconfig
      HOSTCC  scripts/basic/fixdep
    /usr/libexec/gcc/x86_64-slackware-linux/4.8.2/cc1: error while loading shared libraries: libmpc.so.2: cannot open shared object file: No such file or directory
    make[1]: *** [scripts/basic/fixdep] Error 1
    make: *** [scripts_basic] Error 2


    If I do this all again, using  gcc-9.2.0-x86_64-4.txz and gcc-g++-9.2.0-x86_64-4.txz: instead of 4.8.2, i get this output:

    root@unRAID:/usr/src/linux# make oldconfig
      HOSTCC  scripts/basic/fixdep
      HOSTCC  scripts/kconfig/conf.o
    In file included from /usr/include/bits/posix1_lim.h:161,
                     from /usr/include/limits.h:183,
                     from /usr/lib64/gcc/x86_64-slackware-linux/9.2.0/include-fixed/limits.h:194,
                     from /usr/lib64/gcc/x86_64-slackware-linux/9.2.0/include-fixed/syslimits.h:7,
                     from /usr/lib64/gcc/x86_64-slackware-linux/9.2.0/include-fixed/limits.h:34,
                     from scripts/kconfig/conf.c:7:
    /usr/include/bits/local_lim.h:38:10: fatal error: linux/limits.h: No such file or directory
       38 | #include <linux/limits.h>
          |          ^~~~~~~~~~~~~~~~
    compilation terminated.
    make[1]: *** [scripts/kconfig/conf.o] Error 1
    make: *** [oldconfig] Error 2
    root@unRAID:/usr/src/linux#

    If I can figure out what I'm doing wrong here, and manage to run these commands without error, then I'll look into setting the CONFIG_NO_HZ_FULL option.

    I am not that good with this stuff, but I really would like to figure out how to build it. If nobody is willing to guide me, then I am hoping someone will take the time to build me a kernel with the CONFIG_NO_HZ_FULL option. 

     

    I have looked at the script here (https://gist.github.com/gfjardim/c18d782c3e9aa30837ff), which has many more packages. I am not sure if I'm supposed to install all of these packages (or newer versions?) before trying to use the make command, but it does seem like the current error is related to the version of gcc I've been using.

     

    Any help with this from anyone would be very much appreciated.

×
×
  • Create New...