Kernel 4.x wanted, running OMV 1.19

  • They are already properly set up in the versions of btrfs-tools available to Wheezy. The problem arises if you install a later version (for Jessie but recompiled for wheezy), where the rules were dropped as systemd does the equivalent. Of course without systemd (wheezy), it doesn't work.
    What version of btrfs-tools are you using?

  • I'm using custom btrfs from scrips in this thread page 3, along with custom kernel from script in this thread built from source (kernel 4.3.2) and all Works like a charm except mounting btrfs raid

  • If you rebuilt btrfs-tools from a Debian source package (e.g. 4.3.1 from testing/stretch), then you need to do the following as mentioned above:


    add the following lines back in to the override_dh_auto_install section in debian/rules:

    Code
    # Adding udev integration
    install -D -m 0644 debian/local/btrfs.udev debian/btrfs-tools/lib/udev/rules.d/70-btrfs.rules
    install -D -m 0644 debian/local/btrfs-lvm.udev debian/btrfs-tools/lib/udev/rules.d/80-btrfs-lvm.rules


    If you built yourself from the upstream sources, you'll need to do it yourself. Grab the udev files from btrfs-tools 3.17 or something and just manually install them.

  • If you rebuilt btrfs-tools from a Debian source package (e.g. 4.3.1 from testing/stretch), then you need to do the following as mentioned above:



    If you built yourself from the upstream sources, you'll need to do it yourself. Grab the udev files from btrfs-tools 3.17 or something and just manually install them.


    Would it then be possible to change the btrfs-tool script (page 3 in this thread) to add these parts? I am no expert in this, and I know the expertise exist in this forum.


    Background:
    When the new OMV based on Jessie comes out, I understand things will change (sysinit vs systemd?), however we do not know how long that will take. And BTRFS raid 5/6 is in heavy development, and I do have high hopes for performance and error corrections in the 4.4 LTS kernel, which will not be a basis for next OMV edition. So I guess one will need to kompile own kernel for up-to-date BTRFS system

  • I'm not sure what you are asking. What do you mean by btrfs-tools script? I'm looking at page 2 of 2 for this thread (I might have adjusted my posts per page setting), what post are you referring to?


    If/when the next version of OMV is running Debian Jessie with systemd then, as I understand it, the udev rules I mentioned above are not necessary as systemd accounts for that issue, so rebuilding a testing btrfs-tools package for Jessie should not need any adjustment.


  • I'm not sure what you are asking. What do you mean by btrfs-tools script? I'm looking at page 2 of 2 for this thread (I might have adjusted my posts per page setting), what post are you referring to?


    If/when the next version of OMV is running Debian Jessie with systemd then, as I understand it, the udev rules I mentioned above are not necessary as systemd accounts for that issue, so rebuilding a testing btrfs-tools package for Jessie should not need any adjustment.


    I have been using the script from Mr Terminator, quoted in top of this post. Sorry for long quote but I wanted to include all info.

  • after some time, I finally found the time and the guts to revert my inital idiot move of upgrading libc6...so, this is what I went through and how I got things to work (and compile) perfectly now:


    Libc6 downgrade:
    oh boy, what a mess. Finally got the idea why everybody who knows something about distros will tell you that this is a very, very bad idea. But got it back to wheezy-backports state, with the 3.16 kernel booting.


    Update btrfs-tools to 4.3.1:
    Before the kernel upgrade, I decided to recompile btrfs-tools myself. The steps listet in this thread (sh-script) were very very helpful. But I realized that the standard source is missing some important udev patches, which make volumes not mountable during boot or even manual intervention. What worked our perfect for me was:

    • Install prerequisites as per shell script in this thread
    • run:
      Code
      dget -u http://http.debian.net/debian/pool/main/b/btrfs-tools/btrfs-tools_4.3-1.dsc

      this will pull the necessairy stuff from the debian archives, extract it into a new directory in current dir

    • cd into extracted btrfs dir
    • run:
      Code
      dpkg-buildpackage -us -uc

      this will create a working package. DO NOT RUN ./autogen.sh. buildpackage will complain, because this alters the already patched and configured sources.

    • cd ..
    • dpkg -i with the created package

    After that, i got a working btrfs-tools, with proper udev rules and all the goodness, including all pre- and post-install scripts in the package.


    Kernel building:
    Totally different approach now. Since I already got the .config, things were easy. I still went with 4.1 series, since it is lts, and 4.4 is still a bit new. But I will upgrade when it hits 4.4.1 or maybe 4.4.2.

    • Code
      apt-get install git fakeroot build-essential ncurses-dev xz-utils


    • very important to get make-kpkg:
      Code
      apt-get --no-install-recommends install kernel-package
    • Code
      wget https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.1.15.tar.xz
    • Code
      tar xvf linux-4.1.15.tar.xz


    • Code
      cd linux-4.1.15
    • copy .config and run make menuconfig, just to be sure. You can get my config from github (see this thread)
    • run the magic:
      Code
      fakeroot make-kpkg -j5 --initrd --append-to-version=-amd64 --revision=1.0.YOURCUSTOMNAME kernel_image kernel_headers
    • cd ..
    • dpkg -i the header and image

    Building with make-kpkg is so much easier, and from what I've read, preffered over deb-pkg (make-kpkg actually runs deb-pkg and A LOT of other stuff). With these, everything seems to be in place properly. I got rid of a lot of concerning dmesg entries from my previous compiles. I will work on the github repo some time soon to update the instructions and provide the packages there, since I'm back on stock libc6 now, which shouldn't break with all the other packages anymore.


    Sorry for some redundant information for some of you, hope this helps, just wanted to give you guys an update. I'm going to upgrade my hardware in the future (C226 based MB with IPMI, ECC RAM, more drives), hence the need for some additional work here. Stay tuned for the updated packages on the repo...I will remove the source completely and only provide .configs and prebuild packages in the future...but this will have to wait until the next day or the upcoming weekend.

  • Repo is updated with config and build scripts for btrfs-tools and kernel 4.1.15. The readme is out of date, I will update the page some time soon, but the scripts seem to work. Please report any erros / problems in using them, github issues preffered :)
    Edit: Readme updated.


    See:
    https://github.com/Stoney49th/openmediavault-linux-kernel


    Just script files:
    https://github.com/Stoney49th/…ster/build_btrfs_tools.sh
    https://github.com/Stoney49th/…ter/build_linux_4.1.15.sh


    If you build for a different architecture then amd64, you have to change the --append-to-version to whatever holds for your CPU. The compile arch itself is most likely auto-detected based on the current kernel. If you like to change the script and work with a more recent kernel, feel free, but make sure to run menuconfig after downloading and before clean...you obviously know what you're doing if you go this route ;)

  • Hi @stone49th
    I was triying to compile using your scripts and I found in my case that it's necessary to include in build_btrfs_tools.sh to 'apt-get install' the 'devscripts' package because it includes the 'dget' downloader and without it the script crashes.
    Thank you for your scripts. Would be nice to move to latest version of kernel.
    Greeetings.


    EDIT: Now the script runs but it can't compile the package. I append the result from running the script. Maybe you can help a little....

    My business server: OMV 4.1.22 | intel J2900 + 4GB DDR3 | 64GB SSD OS Disk | 2x1TB WD raid data disks
    Home Server: OMV 4.1.22 (4.19bpo
    ) | MSI B150M PRO VDH | i5-6600T 35W | 16GG RAM DDR4 2133 | 60GB SSD OS disk | 120GG SSD Games (Minecraft+Ark)| 1x4TB+2x2TB WD NAS RED HDDs
    ---------------- File server, FTP, Printing server, Plex, Logitech Media Server, VDR, Minecraft Server, Ark Survival Server, jDownloader
    Home automation server: OMV 4.1.22 (kernel 4.19 bpo) | Intel J4205 | 128GB SSD OS | 250GB HDD DATA | USB-RS485 | mbusd MODBUS TCP<->RTU GATEWAY | HMI SCADA myscadaHome

    Edited 5 times, last by hammondb4 ().

  • Hi @stone49th
    I was triying to compile using your scripts and I found in my case that it's necessary to include in build_btrfs_tools.sh to 'apt-get install' the 'devscripts' package because it includes the 'dget' downloader and without it the script crashes.
    Thank you for your scripts. Would be nice to move to latest version of kernel.
    Greeetings.


    Thanks! I added devscripts to the inital apt-get. Did someone try out the kernel build scripts? Did I get the dependencies right there too? I'll try to provide a working config for 4.4 as soon as it reaches 4.4.1 (no longer ml but in its lts state).

  • Just a quick sidenote: Depending on how new your hardware is or how often non-free updates are published and required by the kernel, it *might* be necessairy, to look out for dmesg entries for microcode.
    Example: My MB has a Intel 7260 WiFi onboard. The microcode revision required by the kernel was missing (not that I was using the device, but anyway, I dont like errors in dmesg...). Just run these with the new kernel, to check if something is missing or not in place. Firmware can be downloaded on a per file basis from the kernel homepage directly. Just google for it according to the dmesg entry.


    Code
    dmesg | grep error
    dmesg | grep fail
    dmesg | grep critical
  • Here the 'dmesg | grep error', just one line:
    [ 2.231418] EXT4-fs (sda1): re-mounted. Opts: errors=remount-ro
    Here the 'dmesg | grep fail':


    No results 'critical'.
    Do you think one of these should be solved to compile successfully?




    Just a quick sidenote: Depending on how new your hardware is or how often non-free updates are published and required by the kernel, it *might* be necessairy, to look out for dmesg entries for microcode.
    Example: My MB has a Intel 7260 WiFi onboard. The microcode revision required by the kernel was missing (not that I was using the device, but anyway, I dont like errors in dmesg...). Just run these with the new kernel, to check if something is missing or not in place. Firmware can be downloaded on a per file basis from the kernel homepage directly. Just google for it according to the dmesg entry.


    Code
    dmesg | grep error
    dmesg | grep fail
    dmesg | grep critical

    My business server: OMV 4.1.22 | intel J2900 + 4GB DDR3 | 64GB SSD OS Disk | 2x1TB WD raid data disks
    Home Server: OMV 4.1.22 (4.19bpo
    ) | MSI B150M PRO VDH | i5-6600T 35W | 16GG RAM DDR4 2133 | 60GB SSD OS disk | 120GG SSD Games (Minecraft+Ark)| 1x4TB+2x2TB WD NAS RED HDDs
    ---------------- File server, FTP, Printing server, Plex, Logitech Media Server, VDR, Minecraft Server, Ark Survival Server, jDownloader
    Home automation server: OMV 4.1.22 (kernel 4.19 bpo) | Intel J4205 | 128GB SSD OS | 250GB HDD DATA | USB-RS485 | mbusd MODBUS TCP<->RTU GATEWAY | HMI SCADA myscadaHome

  • oh, I see systemd, are you on OMV3.beta with the dmesg output?


    The ACPI error is actually a feature, not a bug. Strange enough but see: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1349740


    Must be on your skylake rig or the J2900 one because of the hda_intel error...seems like this is normal for a headless machine, since the HDA audio driver can not access the intel integrated gpu driver and hence the error, see (sorry, GERMAN): http://www.phoronix.com/forums…q-nvidia-geforce-gtx-970m
    You could disable the on-baoard audio, if you don't use it to get rid of the message, or simple don't give anything about it. Same goes for the systemd error I guess, because no display is connected, aka. headless?


    The tsc error is more complicated. Try to google for that one yourself for a while, I see different solutions/sources of this. http://askubuntu.com/questions…st-tsc-calibration-failed seems to solve an issue with a patch that came into the kernel some time ago (after 3.16). Or even better, see https://eduard-dopler.de/de/64…bration-failed-loswerden/
    (sorry, german again). He states running:

    Code
    cat /sys/devices/system/clocksource/clocksource0/available_clocksource

    and entering the returned clock source in the grub option also works great. Effectively changes the default clock source the kernel starts to try out...the message was promoted from "FYI" to error due to the patch...


    The dvb-usb might not be of any importance at all, if the device works.


    Edit: I provided an expeimental 4.4 config in the repo...but use this own risk, its experimental and not tested at all. In theory, it should work, but I did not compile the kernel, just made the config based on the 4.1.15 one (with oldconfig).A whole lot of new options there...as always :)
    Edit2: For the btrfs-users out there, it might be a good idea to delay the 4.4 update until btrfs_tools has its new version out as well, right now they released the 4.4rc1 version 13h ago...They had some issues with previous new versions (some even resulted in fs damage). I'm really not willing to go there too fast and risking data and spending hours to fix a broken storage, even with external backups...


  • OK. Sorry for not specifying the machine. It's the second from my signature, the i5. I'm not using audio, and hdmi output only for emergency console operations.
    Will try to check if I can get rid of some errors.
    Thank you.

    My business server: OMV 4.1.22 | intel J2900 + 4GB DDR3 | 64GB SSD OS Disk | 2x1TB WD raid data disks
    Home Server: OMV 4.1.22 (4.19bpo
    ) | MSI B150M PRO VDH | i5-6600T 35W | 16GG RAM DDR4 2133 | 60GB SSD OS disk | 120GG SSD Games (Minecraft+Ark)| 1x4TB+2x2TB WD NAS RED HDDs
    ---------------- File server, FTP, Printing server, Plex, Logitech Media Server, VDR, Minecraft Server, Ark Survival Server, jDownloader
    Home automation server: OMV 4.1.22 (kernel 4.19 bpo) | Intel J4205 | 128GB SSD OS | 250GB HDD DATA | USB-RS485 | mbusd MODBUS TCP<->RTU GATEWAY | HMI SCADA myscadaHome

  • Ok. Sorry, I overlooked your error in the btrfs-tools build. Can you try to start clean, deleting the source folder and the downloaded files and start over again?


    I got the same error than before running the btrfs tools script.
    Also running the command 'dpkg-buildpackage -us -uc' in btrfs-tools_4.3-1 dir shows this:


    ATTACHED: config.log

    Files

    • config.log.txt

      (8.08 kB, downloaded 377 times, last: )

    My business server: OMV 4.1.22 | intel J2900 + 4GB DDR3 | 64GB SSD OS Disk | 2x1TB WD raid data disks
    Home Server: OMV 4.1.22 (4.19bpo
    ) | MSI B150M PRO VDH | i5-6600T 35W | 16GG RAM DDR4 2133 | 60GB SSD OS disk | 120GG SSD Games (Minecraft+Ark)| 1x4TB+2x2TB WD NAS RED HDDs
    ---------------- File server, FTP, Printing server, Plex, Logitech Media Server, VDR, Minecraft Server, Ark Survival Server, jDownloader
    Home automation server: OMV 4.1.22 (kernel 4.19 bpo) | Intel J4205 | 128GB SSD OS | 250GB HDD DATA | USB-RS485 | mbusd MODBUS TCP<->RTU GATEWAY | HMI SCADA myscadaHome

    Edited once, last by hammondb4 ().

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!