WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Booting tinycore, next level, skip the bootloader altogether  (Read 1130 times)

Offline alphons

  • Newbie
  • *
  • Posts: 42
    • building vmtux.net as of feb 14, 2023
Booting tinycore, next level, skip the bootloader altogether
« on: February 09, 2023, 08:27:30 AM »
Booting tinycore, next level, skip the bootloader altogether

Yes, you are reading it right, who needs a bootloader after all .....

My solution is to make use only of the bootsector.
That is, there are 512 bytes to fit a program which does load the kernel, loads the initrd and executes the kernel.

There is even some room for a kernel command line.

For users who use vmware, there is also a .vmdk generated to make it easy to add the disk to a VM.

Because of the 500 errors here on the forum, i uploaded my project to github.

https://github.com/alphons/bootsector-linux-loader

This is also a good project to learn about the boot process in detail.

happy booting.
VMTux 1.0 - kernel 6.2.11 - glib 37 - alpha release March 2023 - https://vmtux.net/

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10863
Re: Booting tinycore, next level, skip the bootloader altogether
« Reply #1 on: February 09, 2023, 09:27:55 AM »
The kernel used to have such a boot sector for floppy booting - you could dd the kernel directly to a floppy, and boot. And nowadays it can boot from EFI without a bootloader.
The only barriers that can stop you are the ones you create yourself.

Offline alphons

  • Newbie
  • *
  • Posts: 42
    • building vmtux.net as of feb 14, 2023
Re: Booting tinycore, next level, skip the bootloader altogether
« Reply #2 on: February 09, 2023, 10:34:58 AM »
The kernel used to have such a boot sector for floppy booting - you could dd the kernel directly to a floppy, and boot. And nowadays it can boot from EFI without a bootloader.

 ;D That is clearly not the same.

floppy misery
  • kernel has grown beyond the floppy metrics
  • there was no command line option
  • there was no initrd option
  • you had to have some kind of filesystem

I have used them all;

  • lilo
  • grub
  • syslinux
  • uefi system

Nowadays the uefi garbage takes over the role of bootloader.
Maybe we have to name them bloated-loaders  8)
Thinks got wrong when it took over the simple role of getting things done fast,
building extra functionality, extra colors, extra file size, extra configuration.

From a tinycore perspective, where we like to make things tiny, UEFI is and probably will never be part of this process. Next best is de iso option, which tinycore uses. When it comes to the bootloader of the iso, syslinux is used, the isolinux variant.

I have spent 1 week now trying to compile syslinux on a modern system, lets say gcc 12.
It does not work. I have made patch files to get things compiling again. But in the end,
the isolinux.bin does not work. So we all use the precompiled binaries from kernel.org
which are 10 years old now. Nobody cares.

Future will be virtualisation in my opinion. So tinycore is an execellent linux distro,  running within Solarwinds, Vmware, Virtual Box, Qemu, XEN, Virtual-PC, Hyper-V, Boot camp etc.

Containers (docker) are a pain in the ass, when it comes to configuration. Foot print of simple container applications is more than a tinycore running the same application on a VM. So whats the benefit of it all? Managing containers is the same work as managing vm's.

Okay, back to the bootsector project. I think this is excelent work for using linux in VM environments.
It is the fastest, smallest solution possible, skips the need of an CDROM driver / making an iso file containing a non maintained syslinux.

If i got some spare time, i can have a look at a 'tiny UEFI boot' solution. For the vmware .vmx file i have to change one line:
Code: [Select]
firmware="efi"
Wish me luck.

ps. "So, most common size guideline for EFI System Partition is between 100 MB to 550 MB"  :'( :'( :'(

ps. ps." The EFI boot stub is enabled with the CONFIG_EFI_STUB kernel option."







« Last Edit: February 09, 2023, 10:52:16 AM by alphons »
VMTux 1.0 - kernel 6.2.11 - glib 37 - alpha release March 2023 - https://vmtux.net/

Offline nick65go

  • Hero Member
  • *****
  • Posts: 769
Re: Booting tinycore, next level, skip the bootloader altogether
« Reply #3 on: February 09, 2023, 01:12:00 PM »
@alphons: The MAIN utilization of boot-loader is to allow boot parameters (for kernel and for tc-config). So it allows for Xvexa vs. Xorg, or different windows-managers like flwm vs. jwm etc. You get it...

1. For VIRTUAL environments, yes, it is no need for boot loaders! ex: in Qemu just arguments kernel, initrd, append.

2. For REAL machine environment, it depends:
- BIOS + MBR, it can boot from HDD even with grub 0.9x (is less size than syslinux), Yes, grub 0.9x can be on CDROM and boots from it also (instead of isolinux).
- UEFI + MBR/ESP, it can boot from a small FAT16  /FAT32 partition (less than 32 MB), with a grub 2.x of less than 200 KB.  :)
(search the forum for my posts, if you are interested).

PS: Right, the forced on us future is bloat UEFI and virtualization, both with base buggy/spy CPUs. In my defense I am looking on Xen/Qubes-OS, if fire-jail is not enough.
« Last Edit: February 09, 2023, 01:20:14 PM by nick65go »

Offline patrikg

  • Hero Member
  • *****
  • Posts: 589
Re: Booting tinycore, next level, skip the bootloader altogether
« Reply #4 on: February 09, 2023, 02:00:08 PM »
Lets go back to computers just with terminals just before, with serial RS-232. Just kidding.

But what i see in feature is like that. Just some device with some type of display and keyboard mouse maybe display with touch.

And all computing and data is in the air :) in the cloud.
And all programs converted to some sort of subscription model.
You don't need to own the program/app, and all things we need to bring into our life.


Offline nick65go

  • Hero Member
  • *****
  • Posts: 769
Re: Booting tinycore, next level, skip the bootloader altogether
« Reply #5 on: February 09, 2023, 02:14:11 PM »
And all computing and data is in the air :) in the cloud.
And all programs converted to some sort of subscription model.
You don't need to own the program/app, and all things we need to bring into our life.
No, god forbidden!
subscription model -> financial slave
 data is in the cloud. -> no privacy
don't need to own ... -> to the governments disposal/moods
LOL, Why do we need a computer then? A.I. (doom) will provide for us (or not!). ... extinction
ChatGTP says: Man-work is too expensive: pension, salary, illness, strikes, waste coffee time, etc.
 

Offline patrikg

  • Hero Member
  • *****
  • Posts: 589
Re: Booting tinycore, next level, skip the bootloader altogether
« Reply #6 on: February 10, 2023, 08:57:06 AM »
And all computing and data is in the air :) in the cloud.
And all programs converted to some sort of subscription model.
You don't need to own the program/app, and all things we need to bring into our life.
No, god forbidden!
subscription model -> financial slave
 data is in the cloud. -> no privacy
don't need to own ... -> to the governments disposal/moods
LOL, Why do we need a computer then? A.I. (doom) will provide for us (or not!). ... extinction
ChatGTP says: Man-work is too expensive: pension, salary, illness, strikes, waste coffee time, etc.

I think you get my point, I am like you against the what the features gives us.
But I have to change my thinking of "what" does matter. One way to think about this is:
Maybe this will make us value ourselves more on who we are than what we surround ourselves with, lots of devices and lots of money instead of What knowledge we possess.
Think like the new ChatGPT3 is the new tool for learning. Now this tool is free for us to get a new addiction, let's hope it will be free. You can also even visit this (https://eli5.gg) site for free even without having to make an account. Sorry for leaving the thread topic.
« Last Edit: February 10, 2023, 08:59:32 AM by patrikg »

Offline gadget42

  • Hero Member
  • *****
  • Posts: 515
The fluctuation theorem has long been known for a sudden switch of the Hamiltonian of a classical system Z54 . For a quantum system with a Hamiltonian changing from... https://forum.tinycorelinux.net/index.php/topic,25972.msg166580.html#msg166580

Offline patrikg

  • Hero Member
  • *****
  • Posts: 589
Re: Booting tinycore, next level, skip the bootloader altogether
« Reply #8 on: February 13, 2023, 11:21:50 AM »
Sorry to say: Therein lies the future, selling "our" metadata for the data we leave behind us.