Live data from Hacker News

Busybox-based Linux distro from scratch

re-ws.pl

11–20 of 28 posts

Re: Busybox-based Linux distro from scratch

#11
post #4

I would think 16MB is quite big considering how small Linux will let you go. I used to make 17MB images with NetBSD without any effort toward reducing size.

Useful compressed x86_64 kernel (trimmed down config to contain only the modules that are normally loaded on my system - only built-in) is about 11MiB. On one of my less-featured ARM boards zImage can get down to < 6MiB.

We've had 2.6 and 3.x series ARM32 images under 2Mb on our older products. 4.x is around 6Mb indeed, but these are also on hw with more peripherals.

Re: Busybox-based Linux distro from scratch

#15
"Maybe some people know, some does not, that Linux is itself a boot loader of some kind. At least, when using UEFI and this is what I want to use, it can be loaded directly by UEFI firmware. [...] it won’t be as simple as that, for legacy BIOS."

Hmm I remember it being that easy back in the early 2000s. IIRC it was enough to copy the kernel to a floppy disk and have it boot. Well, back then the Kernel and Busybox fit easily on a single 1.5MB disk...

Re: Busybox-based Linux distro from scratch

#16

"Maybe some people know, some does not, that Linux is itself a boot loader of some kind. At least, when using UEFI and this is what I want to use, it can be loaded directly by UEFI firmware. [...] it won’t be as simple as that, for legacy BIOS." Hmm I remember it being that easy back in the early 2000s. IIRC it was enough to copy the kernel to a floppy disk and have it boot. Well, back then the Kernel and Busybox fit…

There still was a tiny bootloader happening on that floppy. I /think/ back then it was still lilo (slackware boot floppies) OR syslinux bootloaders

Re: Busybox-based Linux distro from scratch

#17

"Maybe some people know, some does not, that Linux is itself a boot loader of some kind. At least, when using UEFI and this is what I want to use, it can be loaded directly by UEFI firmware. [...] it won’t be as simple as that, for legacy BIOS." Hmm I remember it being that easy back in the early 2000s. IIRC it was enough to copy the kernel to a floppy disk and have it boot. Well, back then the Kernel and Busybox fit…

Many years ago I ran muLinux (http://www.linfo.org/mulinux) on an old desktop that I was gifted.

It was surprisingly capable for being so tiny and eventually led me to install Slackware (https://en.wikipedia.org/wiki/Slackware) on a better machine that had a CD-ROM drive.

Re: Busybox-based Linux distro from scratch

#19
post #16

"Maybe some people know, some does not, that Linux is itself a boot loader of some kind. At least, when using UEFI and this is what I want to use, it can be loaded directly by UEFI firmware. [...] it won’t be as simple as that, for legacy BIOS." Hmm I remember it being that easy back in the early 2000s. IIRC it was enough to copy the kernel to a floppy disk and have it boot. Well, back then the Kernel and Busybox fit…

There still was a tiny bootloader happening on that floppy. I /think/ back then it was still lilo (slackware boot floppies) OR syslinux bootloaders

I'm relatively sure it worked without lilo (but that's so long ago I might be wrong).

This stackoverflow question suggests support for this was explicitly dropped from the linux kernel: https://superuser.com/questions/415429/how-to-boot-linux-ker...

Re: Busybox-based Linux distro from scratch

#20

Nice to see a version of this process for an UEFI kernel. ~2 years ago I was playing around with a similar LFS like, home made DIY distro myself which runs on an i586 router board and a Raspberry Pi. Sadly this guide skips all the "fun parts" of bootstrapping your own compiler toolchain first, and instead downloads a pre-built one from a third party. Based on my project, I also decided to write a small guide similar…

I agree, you learn a lot doing this! I cut my teeth on portable build systems after cross-compiling a bootstrap toolchain for SH4 CPUs so I could build a Linux distro for my Dreamcast. Way more fun working on an unusual platform and building it from scratch.
Post reply on HN