Announcement

Collapse
No announcement yet.

Linux To Introduce The Ability To Set The Hostname Before Userspace Starts

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • mdedetrich
    replied
    Originally posted by ClosedSource View Post

    To what?
    Stable trees? unlikely.
    Your distribution's kernel? Pretty much up to them.
    Actually I could see this being backported, mainly because a lot of LTS distro's are used in datacenters and they would find this functionality very useful.

    Leave a comment:


  • sinepgib
    replied
    Originally posted by rene View Post

    yeah, well, and then multiply that with 10.000 and wonder why we have so many random, mostly unused and at times bizarre options and code in the Linux kernel ;-) ¯\_(ツ)_/¯
    So who gets to pick which features are valid to implement? That's more of a social and governance problem than a technical one.
    Linux got where it is (which IMO is a good place) because the only gatekeeping for patches was about quality, and it's otherwise really open to improvements.
    I personally see the setting at build time as less useful than the command line, and I'm surprised they went for that instead for so long. Maybe it could be removed later on?

    Leave a comment:


  • rene
    replied
    Originally posted by dragon321 View Post

    There were other solutions (like setting hostname during kernel compile) but this solution is more convenient. Also it seems that somebody needed that and implemented that for Linux kernel.
    yeah, well, and then multiply that with 10.000 and wonder why we have so many random, mostly unused and at times bizarre options and code in the Linux kernel ;-) ¯\_(ツ)_/¯

    Leave a comment:


  • dragon321
    replied
    Originally posted by rene View Post

    so important that nobody needed that in 30 years, servers I have seen usually used UUID, WWN and usually not mdadm ;-)
    There were other solutions (like setting hostname during kernel compile) but this solution is more convenient. Also it seems that somebody needed that and implemented that for Linux kernel.

    Leave a comment:


  • Retramon
    replied
    Originally posted by moltonel View Post

    No, being bothered by the default hostname before userspace has time to change it is the niche usecase. Userspace sets the hostname very early on, the kernel-set hostname is almost always inconsequential.

    It probably only comes up for embedded with a minimalist boot process, but those also very likely compile their own kernel, and can change the hostname there.

    There are many reasons to comple your own kernel, setting the hostname is probably never the main reason.

    The fact that this pretty simple feature is only being implemented now is a sign of how few people have a use for it.
    At the beginning of reading this article I was mixing it with configuring a custom hostname early when installing a fresh linux distro right there in the installer instead of later after logging, that too would make sense but that's another thing that might already be a thing in some distros (Tho I don't remember seeing this option in Fedora WS / OpenSuse T / Arch Linux )

    Now that I understand, this definitely makes a lot of sense, whatever the usecase or not, it just happens to have not been there so much, I don't understand the resistance or the benefit of pointing out the popularity aspect, if something makes sense from design, technical and sort of philosophical point of view that change is surely more welcome than not, why would such a fundamental parameter not be set up before userspace on purpose, yes it might be a niche, allright, shouldn't it have been the default behavior since the beginning? I think so.

    Leave a comment:


  • oiaohm
    replied
    Originally posted by moltonel View Post
    No, being bothered by the default hostname before userspace has time to change it is the niche usecase. Userspace sets the hostname very early on, the kernel-set hostname is almost always inconsequential.

    It probably only comes up for embedded with a minimalist boot process, but those also very likely compile their own kernel, and can change the hostname there.

    There are many reasons to comple your own kernel, setting the hostname is probably never the main reason.

    The fact that this pretty simple feature is only being implemented now is a sign of how few people have a use for it.
    This is mostly not embedded but this does allow embedded to base hostname of mac or equal and set it from the bootloader. The majority of these users will be those doing hardened virtual machine images. The idea that you can set hostname early on is that most cases you don't have file capabilities set to PID 1 process prevent it. Yes the file capabilities are read before the first part of executable is read.

    Lot of people are not aware that you can start Linux up with capabilities missing from userspace just by setting a file capabilities on PID1. The requirement to inherit capabilities in one form of other from another process does create some interesting ways to lock Linux down.

    Leave a comment:


  • moltonel
    replied
    Originally posted by sinepgib View Post
    calling building your own kernel less niche than having a kernel command line
    No, being bothered by the default hostname before userspace has time to change it is the niche usecase. Userspace sets the hostname very early on, the kernel-set hostname is almost always inconsequential.

    It probably only comes up for embedded with a minimalist boot process, but those also very likely compile their own kernel, and can change the hostname there.

    There are many reasons to comple your own kernel, setting the hostname is probably never the main reason.

    The fact that this pretty simple feature is only being implemented now is a sign of how few people have a use for it.

    Leave a comment:


  • sinepgib
    replied
    Originally posted by AlanTuring69 View Post
    I fail to see how this benefits anyone? Does anyone seriously use RAID, despite its obvious flaws if one of the disks go bad? And I thought Linux was supposed to be UNIX-like. Honestly, engineers really shouldn't be responsible for kernel development anymore since their priorities are clearly wrong. They keep adding new, complicated features to support a /bin/sh-less environment but their only focus should be improving the shell system. Kind of seems like Poetterware to me. How else will my great grandmother continue to author beautiful /bin/sh scripts from her TI-82 when she has to recompile the L*nux kernel every 2 years?
    I've seen so many idiotic opinions here that for a moment I thought you were serious. I mean, I was in the fence until you mentioned your great grandmother and her TI-82

    Originally posted by moltonel View Post

    Absolutely. Setting the hostname in your bootloader config is a very niche requirement. Setting the hostname at kernel compile time or during userspace boot has been good enough for decades. This patch will find its users, but it's not a headline new feature.
    Seriously calling building your own kernel less niche than having a kernel command line sounds out of touch with reality. I mean, you must desperately need it to even consider that an option. And, in that case, the command line is probably a very welcomed improvement.

    Leave a comment:


  • orzel
    replied
    Originally posted by moltonel View Post

    Absolutely. Setting the hostname in your bootloader config is a very niche requirement. Setting the hostname at kernel compile time or during userspace boot has been good enough for decades. This patch will find its users, but it's not a headline new feature.
    100% agree. Nice to have, but not at all "how could we live without it ?" kind of feature..

    Leave a comment:


  • BingoNightly
    replied
    Originally posted by rshpount View Post
    hosrtname?
    I'm going to rename my servers to horstname

    Leave a comment:

Working...
X