It’s a program certainly, but “just a program” is a bit misleading because it places it on the same footing as Doom or cat or an Arduino project. Linux is a ring 0 program, which processors give unique treatment.
Reminds me of not long after I started using Linux. I thought the kernel was "just a program" like cat and tried to run the kernel from the terminal, only to be disappointed when a new kernel in fact did not start running inside the terminal window.
Well, the kernel is not “just a program” in that it is not like the other programs on your system. If it was, you would “just” run it in your shell. The kernel cannot run this way of course because it is not a user mode program.
That said, if course the kernel is a program in the sense that it is a set of machine instructions that make the hardware do what you want.
And the kernel is designed to talk to hardware and other programs—to be the bridge between the two. It is not something an end-user interacts with directly.
Well, the kernel is not “just a program” in that it is not like the other programs on your system. If it was, you would “just” run it in your shell. The kernel cannot run this way of course because it is not a user mode program.
1 - extensive support from the host kernel above and beyond what is required to execute for regular programs
2 - the guest kernel to be specially compiled to be a UML guest
In other words, even though UML allows a guest Linux kernel to execute as a process on a host Linux kernel, that Linux kernel is not “just a program” like every other user mode application is.
I agree that it’s be useful, and I think you can just install e.g. the LTS kernel next to the regular one.
But even without , the arch way isn't insane either: when something kernel-related breaks, boot with a live system on USB and fix it.
Case in point: I dimensioned the EFI partition too small, so at some point, me using the zen kernel (which comes with a backup kernel image) messed things up and I couldn't boot a half-written kernel.
then I
created and booted a live USB stick,
Mounted my / and /boot partitions manually into /mnt/root/ and /mnt/root/boot
Bind-mounted the live system's /dev and /proc into /mnt/root/{dev,proc}
chrooted into /mnt/root (resulting in an environment using /dev and /proc from the live system and the rest from my system),
Used regular package manager commands to uninstall the zen kernel and install the regular one, and finally
rebooted into the now working system.
It's not crazy, it doesn't take long, you just need to know how the system works. Upside is that nothing ever breaks permanently, everything is fixable (except hardware failure)
But even without , the arch way isn’t insane either: when something kernel-related breaks, boot with a live system on USB and fix it.
That is not a replacement for "arrow-key down during boot to select an older kernel".
I have a server with a RAID card and the kernel at some point introduced a bug with the driver that prevented that server from booting. So I select the older kernel at boot, get the system up and running, mark that kernel as the default until the bug is fixed.
It’s not crazy, it doesn’t take long, you just need to know how the system works.
I know how the system works very well thankyouverymuch. But that's an insane option when having multiple older kernels is so easy to do and common.
Pretty cool seeing everything it takes to have a minimalist Linux to boot, and I finally saw how to get started with strace that I've been postponing for like half a year.
19 Comments
davel@lemmy.ml · 62 pts · 238d
It’s a program certainly, but “just a program” is a bit misleading because it places it on the same footing as Doom or
cator an Arduino project. Linux is a ring 0 program, which processors give unique treatment.arthropod_shift@programming.dev · 5 pts · 236d
Reminds me of not long after I started using Linux. I thought the kernel was "just a program" like
catand tried to run the kernel from the terminal, only to be disappointed when a new kernel in fact did not start running inside the terminal window.db2@lemmy.world · 33 pts · 238d
data1701d@startrek.website · 26 pts · 238d
Zaphod’s just zis guy, you know?
LeFantome@programming.dev · 12 pts · 238d
Well, the kernel is not “just a program” in that it is not like the other programs on your system. If it was, you would “just” run it in your shell. The kernel cannot run this way of course because it is not a user mode program.
That said, if course the kernel is a program in the sense that it is a set of machine instructions that make the hardware do what you want.
And the kernel is designed to talk to hardware and other programs—to be the bridge between the two. It is not something an end-user interacts with directly.
GlowHuddy@lemmy.world · 4 pts · 238d
Actually...
LeFantome@programming.dev · 3 pts · 237d
Point taken but….
UML requires:
1 - extensive support from the host kernel above and beyond what is required to execute for regular programs
2 - the guest kernel to be specially compiled to be a UML guest
In other words, even though UML allows a guest Linux kernel to execute as a process on a host Linux kernel, that Linux kernel is not “just a program” like every other user mode application is.
AnnaFrankfurter@lemmy.ml · 4 pts · 237d
Yeah it's just as simple as the calculator program I copy pasted in highschool computer class.
dubyakay@lemmy.ca · 3 pts · 238d
On my arch install, all I have is vmlinuz-linux under /boot. How come there's no further information appended like in the article?
atzanteol@sh.itjust.works · 9 pts · 238d
Different distros vary a bit here, and it will differ if you're on a system using efi.
Sometimes /boot isn't mounted by default (it's not needed unless you're updating a kernel). You may be seeing a symlink or placeholder there.
If you're using efi there will probably be /boot/EFI or something where your kernel is stored.
flying_sheep@lemmy.ml · 2 pts · 237d
The reason there’s no version in the filename is simply that Arch just doesn't keep old kernels around.
The
vmlinuz-linuxjust gets replaced whenever you update thelinuxpackage and the old one is deleted immediately.atzanteol@sh.itjust.works · 1 pts · 236d
That's... Insanity. Keeping at least one old kernel is amazingly useful if you run into issues with an update.
flying_sheep@lemmy.ml · 2 pts · 236d
I agree that it’s be useful, and I think you can just install e.g. the LTS kernel next to the regular one.
But even without , the arch way isn't insane either: when something kernel-related breaks, boot with a live system on USB and fix it.
Case in point: I dimensioned the EFI partition too small, so at some point, me using the zen kernel (which comes with a backup kernel image) messed things up and I couldn't boot a half-written kernel.
then I
/and/bootpartitions manually into/mnt/root/and/mnt/root/boot/devand/procinto/mnt/root/{dev,proc}/mnt/root(resulting in an environment using/devand/procfrom the live system and the rest from my system),It's not crazy, it doesn't take long, you just need to know how the system works. Upside is that nothing ever breaks permanently, everything is fixable (except hardware failure)
atzanteol@sh.itjust.works · 1 pts · 236d
That is not a replacement for "arrow-key down during boot to select an older kernel".
I have a server with a RAID card and the kernel at some point introduced a bug with the driver that prevented that server from booting. So I select the older kernel at boot, get the system up and running, mark that kernel as the default until the bug is fixed.
I know how the system works very well thankyouverymuch. But that's an insane option when having multiple older kernels is so easy to do and common.
flying_sheep@lemmy.ml · 1 pts · 236d
As said: installing the LTS kernel also works, I think.
And you wouldn't use Arch for servers, you want something stable (as in “rarely changing”) there.
atzanteol@sh.itjust.works · 1 pts · 235d
I wouldn't use arch for anything.
CodenameDarlen@lemmy.world · 3 pts · 238d
trolololol@lemmy.world · 1 pts · 238d
I liked both this and the following article.
Pretty cool seeing everything it takes to have a minimalist Linux to boot, and I finally saw how to get started with strace that I've been postponing for like half a year.