Results 1 to 5 of 5

Thread: Tumbleweed + netconsole in initramfs possible?

  1. #1

    Default Tumbleweed + netconsole in initramfs possible?

    I've tried the howto on kernel.org, tried adding netconsole.ko to dracut, recreated the initrd file, but I'm getting nowhere. The module is not loaded. I need log messages as early in the boot process as possible. There is no serial port.

  2. #2
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    11,306
    Blog Entries
    2

    Default Re: Tumbleweed + netconsole in initramfs possible?

    On my 15.1, netconsole.ko exists already on a default install and
    From what I read, I've found nothing that suggests that it's not already distributed as part of the mainline kernel.

    Therefor,
    There is no point to re-compiling the module.

    Also,
    after skimming a few articles how to instantiate and configure,
    It looks like practically all articles are copied word for word from each other (further suggesting and supporting its part in the mainline kernel).

    The nuts and bolts look fairly clear to me...
    You can either load it during boot (ie most likely as a grub command and should also be supported in YaST > Bootloader module)
    or
    After the system loads. "After" has a few meanings, it can mean by a console from a logged in User or it can mean not part of but late in the boot process.

    If you're having problems setting up during the regular boot process,
    The alternative is incredibly easy to do...
    1. Logon as a User and execute the command to instantiate your remote console service. You can do whatever is necessary to test your connection to determine exactly what your command should be.
    2. After you've figured out your correct command, then the remaining issue is how to set up "loading" your kernel module, the only requirement is that it has to happen after your networking is working and you have two options... This would probably be my preferred method since it allows User interaction to test interactively..
    a. Configure a systemd Unit file that invokes your command and has a dependency (ie "requires=") pointing to your requirement (likely NetworkManager.service).
    or
    b. Write your command into /etc/sysctl.conf

    If what you are reading isn't helpful,
    I found the ArchWiki as usual is easy to understand...

    https://wiki.archlinux.org/index.php/Netconsole

    And the following should be the documentation included in the kernel

    https://www.kernel.org/doc/Documenta...netconsole.txt

    Both of the above are pretty much the same text and is likely what you've already read,
    If something is still not clear, post again.

    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  3. #3
    Join Date
    Sep 2012
    Posts
    5,141

    Default Re: Tumbleweed + netconsole in initramfs possible?

    Quote Originally Posted by robert_spitzenpfeil View Post
    tried adding netconsole.ko to dracut
    You provided zero information to start troubleshooting. How did you add it to dracut (exact steps)? What is your kernel command line or netconsole module configuration? Is NIC driver available that early to start with?

  4. #4

    Default Re: Tumbleweed + netconsole in initramfs possible?

    @arvidjaar:

    man dracut.conf:

    force_drivers+=" <list of kernel modules> "
    See add_drivers above. But in this case it is ensured that the
    drivers are tried to be loaded early.

    @tsu2:

    Yes, I've been to that kernel.org page.

    The module exists, yes. Modprobe works fine once the system is up, adding it to the kernel boot parameters does nowt. It shows up in proc/cmdline alright though.

    Maybe I need more sleep...

  5. #5
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    11,306
    Blog Entries
    2

    Default Re: Tumbleweed + netconsole in initramfs possible?

    Quote Originally Posted by robert_spitzenpfeil View Post
    @arvidjaar:




    @tsu2:

    Yes, I've been to that kernel.org page.

    The module exists, yes. Modprobe works fine once the system is up, adding it to the kernel boot parameters does nowt. It shows up in proc/cmdline alright though.

    Maybe I need more sleep...
    Then you're 99% of the way there.
    Since you can invoke your command manually, then it should take minutes or about a minute to complete by invoking that command automatically "late" in your boot process instead of trying to invoke "early" -- The diff between early and late is probably seconds and shouldn't make any diff to you.

    As I described,
    Either
    Create a systemd Unit file that invokes your command with "requires=" to ensure you load after your networking is running
    or
    Write your command into /etc/sysctl.conf.

    And, you're done.

    If you want to see another example of using /etc/sysctl.conf, take a look at the bottom of the following link to something I wrote long ago for how someone can re-allocate resources to networking without having to re-compile the kernel. To understand what those settings are, go back a couple pages and start reading. You're doing something similar invoking a kernel module to run an application.

    https://sites.google.com/site/4techs...orithm-changes

    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •