Live data from Hacker News

Busybox-based Linux distro from scratch

re-ws.pl

1–10 of 28 posts

Re: Busybox-based Linux distro from scratch

#3
Not sure of practical applications with super-cheap sizeable flash storage available everywhere, but it's nice to know you can still build a bootable Linux system entirely from scratch using simple instructions with latest kernels.

I might just give it a try for shits and giggles; I remember trying "Linux From Scratch" a decade or so ago and it took hours / days to get to a "bootable" state.

Re: Busybox-based Linux distro from scratch

#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.

Re: Busybox-based Linux distro from scratch

#7
post #3

Not sure of practical applications with super-cheap sizeable flash storage available everywhere, but it's nice to know you can still build a bootable Linux system entirely from scratch using simple instructions with latest kernels. I might just give it a try for shits and giggles; I remember trying "Linux From Scratch" a decade or so ago and it took hours / days to get to a "bootable" state.

Getting a bootable system is quite easy actually. Build a kernel, build a static busybox, install grub. Thats almost it. Maybe build iw and wpa_supplicant, if you want wireless. You can get to a bootable system within an hour or so.

But anything beyond that is a maze of vaguely specified dependencies. LFS was a good starting point, but i havent checked it for a while and I'm not sure it kept up with all the recent(ish) developments in distro building.

Re: Busybox-based Linux distro from scratch

#9
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 to this one, for the Raspberry Pi 3 as a target[1], but also included the toolchain bootstrapping process[2].

[1] https://github.com/AgentD/diy-linux-guide

[2] https://github.com/AgentD/diy-linux-guide/blob/master/crossc...

Re: Busybox-based Linux distro from scratch

#10
post #7
post #3

Not sure of practical applications with super-cheap sizeable flash storage available everywhere, but it's nice to know you can still build a bootable Linux system entirely from scratch using simple instructions with latest kernels. I might just give it a try for shits and giggles; I remember trying "Linux From Scratch" a decade or so ago and it took hours / days to get to a "bootable" state.

Getting a bootable system is quite easy actually. Build a kernel, build a static busybox, install grub. Thats almost it. Maybe build iw and wpa_supplicant, if you want wireless. You can get to a bootable system within an hour or so. But anything beyond that is a maze of vaguely specified dependencies. LFS was a good starting point, but i havent checked it for a while and I'm not sure it kept up with all the recent(is…

LFS is kept up to date. It has systemd and sysvinit variants, and the latest version was published in september. Thank god for this, because it's one of the only source to get a comprehensive list of all the components running on a Linux machine.
Post reply on HN