all 3 comments

sorted by: hot top controversial new old
[+] 2 points 10 months ago (1 child)
  • [–] 1 point 10 months ago

    Very nice and educational.

  • source
  • 21 comments in c/linux@lemmy.ml view that post
    [–] 32 points 10 months ago
    [–] 59 points 10 months ago (1 child)

    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.

  • source
  • hideshow 1 child comment
  • [–] 5 points 10 months ago

    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.

  • source
  • parent
  • [–] 25 points 10 months ago

    Zaphod’s just zis guy, you know?

  • source
  • [–] 12 points 10 months ago* (2 children)

    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.

  • source
  • hideshow 2 child comments
  • [–] 4 points 10 months ago (1 child)

    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.

    Actually...

  • source
  • parent
  • hideshow 1 child comment
  • [–] 3 points 10 months ago*

    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.

  • source
  • parent
  • [–] 5 points 10 months ago (11 children)

    On my arch install, all I have is vmlinuz-linux under /boot. How come there's no further information appended like in the article?

  • source
  • hideshow 11 child comments
  • [–] 9 points 10 months ago (8 children)

    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.

  • source
  • parent
  • hideshow 8 child comments
  • [–] 3 points 10 months ago* (7 children)

    The reason there’s no version in the filename is simply that Arch just doesn't keep old kernels around.

    The vmlinuz-linux just gets replaced whenever you update the linux package and the old one is deleted immediately.

  • source
  • parent
  • hideshow 7 child comments
  • [–] 1 point 10 months ago (6 children)

    That's... Insanity. Keeping at least one old kernel is amazingly useful if you run into issues with an update.

  • source
  • parent
  • hideshow 6 child comments
  • [–] 2 points 10 months ago* (last edited 10 months ago) (5 children)

    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

    1. created and booted a live USB stick,
    2. Mounted my / and /boot partitions manually into /mnt/root/ and /mnt/root/boot
    3. Bind-mounted the live system's /dev and /proc into /mnt/root/{dev,proc}
    4. chrooted into /mnt/root (resulting in an environment using /dev and /proc from the live system and the rest from my system),
    5. Used regular package manager commands to uninstall the zen kernel and install the regular one, and finally
    6. 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)

  • source
  • parent
  • hideshow 5 child comments
  • [–] 1 point 10 months ago* (4 children)

    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.

  • source
  • parent
  • hideshow 4 child comments
  • [–] 1 point 10 months ago (3 children)

    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.

  • source
  • parent
  • hideshow 3 child comments
  • [–] 1 point 10 months ago (2 children)

    I wouldn't use arch for anything.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 2 points 10 months ago* (1 child)

    an arch user doesn't know that!!

    so, that further information is the kernel's version number. it helps to keep some older versions. but you didn't set it up to include the version in the filename.

    és egyébként bojler eladó. processzorra cserélném.

  • source
  • parent
  • hideshow 1 child comment
  • [–] 3 points 10 months ago

    Yeah it's just as simple as the calculator program I copy pasted in highschool computer class.

  • source
  • [+] 3 points 10 months ago (1 child)
  • [–] 1 point 10 months ago

    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.

  • source
  • parent
  • 14 comments in c/programming@programming.dev view that post
    [–] 36 points 11 months ago* (last edited 11 months ago) (1 child)

    Thank you, this is a great explanation. I look forward to the rest of this series.

    Edit: I successfully booted a Debian kernel using this tutorial, though I wrote the init program in C++ instead of Go. The process is pretty much the same, but you have to add the -static flag to g++ since the C runtime is not included in the initramfs. This might be obvious to more seasoned programmers but it took me a minute to figure it out.

  • source
  • hideshow 1 child comment
  • [–] 16 points 11 months ago* (5 children)

    It's a very good explanation. I like that it is short and hands on. For me, it is pitched at the right level and the practical style keeps it very grounded.

    what you’d add or change for future posts in the series

    I wouldn't change anything to do with the content! Speaking personally, I'm a fan of full text RSS feeds, so I'd love one on this blog if that's an option :)

  • source
  • hideshow 5 child comments
  • [–] 7 points 11 months ago (3 children)

    I think there is one. All the way at the bottom of the page I see a link for RSS and I was able to add it to my RSS reader. It looks like everything is there unless I am missing something.

  • source
  • parent
  • hideshow 3 child comments
  • [–] 3 points 11 months ago (2 children)

    I'm not sure if your RSS reader is getting the content through some special way. The feed itself only has the first two paragraphs:

    <item>
      <title>The Linux kernel is just a program</title>
      <link>https://serversfor.dev/linux-inside-out/the-linux-kernel-is-just-a-program/</link>
      <guid isPermaLink="true">https://serversfor.dev/linux-inside-out/the-linux-kernel-is-just-a-program/</guid>
      <description>Most books and courses introduce Linux through shell commands, leaving the kernel as a mysterious black box doing magic behind the scenes. In this post, we will run some experiments to demystify it: the Linux kernel is just a binary that you can build and run.</description>
      <pubDate>Mon, 01 Dec 2025 00:00:00 GMT</pubDate>
    </item>
    
  • source
  • parent
  • hideshow 2 child comments
  • [–] 10 points 11 months ago

    This is very cool, thanks for sharing!

    I did a similar exercise a decade ago with HTTP and it was fun and eye-opening.

  • source
  • [–] 8 points 11 months ago

    Nice article. Waiting for the upcoming parts.

    Blinry did something similar not to lomg ago, maybe it's interesting for you, too: https://blinry.org/tiny-linux/

  • source
  • [–] 5 points 11 months ago

    This looks really interesting. I’ll have a look when I get home.

  • source
  • [–] 5 points 11 months ago

    That looks simple when someone (you) say it simply.

    Thank you for that. 😌

  • source
  • [–] 4 points 11 months ago

    This sounds awesome. I'm going to read this tomorrow when I can give it my full attention.

  • source
  • [–] 0 points 11 months ago

    That's so cool! Thanks for sharing it!

  • source
  • 11 comments in c/technology@lemmy.world view that post
    [–] 18 points 9 months ago

    OK, yeah, that's actually really helpful. Anyone who plays around with Linux at all, give this a read. Good stuff.

  • source
  • [–] 7 points 9 months ago (1 child)

    When you read the article the headline starts to make sense. I wouldn't have read it based on the headline. Thankfully you read it nevertheless and praised it. :)

  • source
  • hideshow 1 child comment
  • [–] 6 points 9 months ago (2 children)

    So which is the part where I add Hannah Montana? Jokes aside, very interesting and easy to read.

  • source
  • hideshow 2 child comments
  • [–] 9 points 9 months ago (2 children)

    Says "kernel runs just like any other program" and proceeds to launch a VM to run it, because it would "mess up the system" otherwise. I liked the article, but it feels like it's leaving out the critical piece.

  • source
  • hideshow 2 child comments
  • [–] 5 points 9 months ago (1 child)

    That was my reaction as well. It's a fun headline, but a kernel is not "just a program". To try to assert it's like a normal program forces you to question your definition of a program. If I hold a voltimeter and switch between hot and cold wires, am I a program now?

  • source
  • parent
  • hideshow 1 child comment
  • [–] 4 points 9 months ago

    I really enjoyed both parts of the article. Thanks for sharing!

  • source