You are not logged in.
Probably a simple question, but I'm still learning about the deeper levels of a linux system.
my /etc/os-release is :
PRETTY_NAME="Devuan GNU/Linux 3 (beowulf)"
NAME="Devuan GNU/Linux"
VERSION_ID="3"
VERSION="3 (beowulf)"
VERSION_CODENAME=beowulf
ID=debian
ID_LIKE=debian
HOME_URL="https://www.devuan.org/"
SUPPORT_URL="https://devuan.org/os/community"
BUG_REPORT_URL="https://bugs.devuan.org/"
I was curious as to what the references to Debian were for, and if i were to change them to Devuan , would i break anything ? I assume a simple update of the file in vi would be all I'd need to do to change it, there isn't another utility I'd need to do it with ?
Offline
Some applications can try to read various lines from here, as a way to determine if they are compatible. Ideally, a piece of software would see the ID_LIKE includes "debian" and so would adopt debian-like behavior for the application (which depends on the app).
This is indeed just a text file, so use your editor of choice. But be aware that there could be lots of things that read this file; I'm sure there are ways to audit that but you can search for that on the Internet if you want to do that. In general, it's best to leave the /etc/os-release alone.
This space intentionally left blank.
Offline
See if you can guess who created the file. [Spoiler Alert!]
Read os-release(5) for the implementation details.
Note that any edits to the file will be over-written whenever the base-files package is updated. EDIT: actually dpkg might ask you what to do with it if it has been edited.
Last edited by Head_on_a_Stick (2021-01-07 21:21:28)
Brianna Ghey — Rest In Power
Offline
See if you can guess who created the file. [Spoiler Alert!]
Read os-release(5) for the implementation details.
Note that any edits to the file will be over-written whenever the base-files package is updated. EDIT: actually dpkg might ask you what to do with it if it has been edited.
Thanks, that's interesting reading.
Sooo, if I was being a purist I'd try to ignore that file as it was driven by the systemd changes to Linux. I can see the reasoning behind having a file like that though irrespective of the boot approach. Is/was there an pre systemd equivalent and where would i find it on Devuan ?
edit, and I should ask, is there a known plan to Devuan-ise those two fields referencing Debian for the future ?
Last edited by ifdv44 (2021-01-08 09:09:14)
Offline
Sooo, if I was being a purist I'd try to ignore that file as it was driven by the systemd changes to Linux.
You are free to ignore it but any applications that rely on it may not be pleased if it's malformed or missing and you may experience some strange behaviour or even dysfunction.
Is/was there an pre systemd equivalent and where would i find it on Devuan ?
/etc/debian_version & /etc/lsb-release spring to mind but I'm in OpenBSD at the moment so I don't know how Devuan handles those files.
Brianna Ghey — Rest In Power
Offline
I did a little test on a temp install, deleted both /etc/os-release and /usr/lib/os-release.
Im not sure what applications would rely on these files but below link says it could break a link in a chroot or initrd environment if the symlink to them is absolute and not relative.
Ive updated initramfs updated-grub and rebooted, im yet to try a chroot but ive not seen any adverse effects thus far.
Offline
If you're using grub-efi-amd64-signed and have ID=devuan in /etc/os-release, you'll boot to a grub prompt instead of a boot menu. That's because grub will expect the signed bootloader to be found under /boot/efi/EFI/debian, but your bootloader will be in /boot/efi/EFI/devuan instead.
Some third-party software that expects to see debian might complain or refuse to install. I don't have an example.
There's also /etc/issue, which is in most linux distros.
Offline
/etc/issue is traditionally the message that appears on the virtual terminals above the login prompt. And /etc/issue.net is traditionally the message for when you log in via ssh. They normally start with contents that might list the OS, but they can be set to whatever you want.
I had no idea /etc/os-release was a systemd thing... drat.
This space intentionally left blank.
Offline
If you're using grub-efi-amd64-signed and have ID=devuan in /etc/os-release, you'll boot to a grub prompt instead of a boot menu. That's because grub will expect the signed bootloader to be found under /boot/efi/EFI/debian, but your bootloader will be in /boot/efi/EFI/devuan instead.
Some third-party software that expects to see debian might complain or refuse to install. I don't have an example.
There's also /etc/issue, which is in most linux distros.
Thanks. I have a whole host of questions and further reading to do about Grub that I'll save for another time, but i appear to have installed Devuan without efi ...I think...it was two years or more since i installed so cant remember and looking around the grub files i cant see any mention or efi or signed things...
Anyway the /etc/issue file is perfect for my purposes. I assume at the next release that becomes ? :
Devuan GNU/Linux 4
Offline
/etc/issue is traditionally the message that appears on the virtual terminals above the login prompt. And /etc/issue.net is traditionally the message for when you log in via ssh. They normally start with contents that might list the OS, but they can be set to whatever you want.
I had no idea /etc/os-release was a systemd thing... drat.
It was with the aim of parsing the entry and comparing to one of the log in banner files called that i was driven to look at this , so might have got there eventually. The document I'm looking at seems to be working on the assumption systemd is being used so having to work out the alternatives and with Devuan's roots in Debian still popping up in the install it's tricky to know if i will break things by changing with out spending a lot of time digging and reading
Offline
i appear to have installed Devuan without efi ...I think...it was two years or more since i installed so cant remember
Check for /sys/firmware/efi, that will only exist if you are booted in UEFI mode. You could also use parted --list and see if you have any EFI system partitions (which will have the "boot,esp" flags) — UEFI booting is not possible without an ESP.
Brianna Ghey — Rest In Power
Offline
nm. If you saw what was here, forget it. It was wrong.
Offline
/etc/issue is traditionally the message that appears on the virtual terminals above the login prompt. And /etc/issue.net is traditionally the message for when you log in via ssh. They normally start with contents that might list the OS, but they can be set to whatever you want.
I had no idea /etc/os-release was a systemd thing... drat.
Slightly off topic, but this has raised another two questions.
By virtual terminals you mean TTY , and a log in via a serial console connection ?
So as I'm using SSH (via putty ) i'd not see the first one ?
Offline
@ifdv44, Yes, the various tty and sty (serial terminal) available on your system.
And I could have sworn I had configured some ssh daemon configs to print /etc/issue.net, but maybe it was just the same contents as my /etc/motd and I used setting "PrintMotd yes". I cannot find it now. Plus, issue.net(5) says that issue.net was for telnetd.
This space intentionally left blank.
Offline