Linux 6.0 Allows Setting The Hostname Via New "hostname=" Parameter

The intent with this patch is for setting the hostname before the user-space starts with the behavior up to now relying upon user-space setting the hostname. However, the issue that was raised is that in the case of mdadm for managing RAID arrays it relies upon the hostname for determining if a disk is local or foreign to the system. But if bringing up the RAID array prior to the init system having set the hostname, unexpected results could occur.
So for mdadm and other niche use-cases that may be wanting to know the system hostname prior to user-space having set it, passing the value via the hostname= parameter can now be achieved with Linux 6.0+.
While the patch was ready ahead of the v5.19 merge window, it was only sent in now for Linux 6.0 by way of Andrew Morton's "non-MM" updates. That patch along with various other changes can be found via this pull. One other big in that pull request worth calling out is implementing readahead support for SquashFS.
10 Comments