@@Nunya58294 It's true, but as said before, it's a lot since explains every step and you build a very conventional distro/installation(glibc, dynamic linked, etc.). This is both a strength and a weakness. If you just want to **create** a minimal bootable Linux image with some tools, probably choose buildroot. If you want to learn how to do it, I'd recommend statically compiling busybox and creating an initrd first. Way less effort for a basic DIY bootable system(just compile this one application and create a file system). But if you want a deep understanding(no shortcuts) of how everything comes together in a Linux distro, LFS is the way to go. I've personally never sat through the entire LFS from start to finish, but I've used it as a reference a lot, for example for setting up toolchains, filesystem hierarchy, etc., and I've created lots of single-purpose Linux distros/initds, from bootable games to rescue tools and testing android kernels.
Buildroot is pretty fun, a while ago I used a buildroot-based system as my "game engine"(Linux kernel, Lua "userland" using framebuffer graphics, uinput). You should have included some mention of the various ways you can include files in the final rootfs, for example overlay directories or custom buildroot packages. Also you don't have to manually create a bootable disk image, buildroot has support for creating grub(2)/extlinux/isolinux(including needed configs), or you could directly boot a kernel+initramfs in QEMU(no bootloader).
@@_lun4r_ I've had some issues with syslinux in buildroot as well. I just switched to GRUB, but as far as I can recall, it was just missing a configuration step. Syslinux is a way simpler bootloader that grub, I don't even think it can read files from disk, only static offset lists(that you need to generate somehow).
It's incredible what can be done nowadays with Linux and the way Linux is designed, keeping its simplicity makes it all much more comfortable when you really understand the concepts
@@thestickmahn2446 you have just invented more than you realize. using this method we dont need an os at all anymore. heck. we dont need a computer anymore all we need is a hard drive, a magnet, a sata breakout board, a power supply and a piece of mettle, just connect the power and then bride the pins of the sata to write. and maybe use some led's to read. or just use paper
You are a perfect programmer!! I didn't see anybody do video like this, making a lot of video on C, or debugging Windows Kernel. Please continue your videos!!!
this is one of the first tutorials I've ever seen that gets straight to the point and shows you every single detail you need and nothing that you don't. I wish this guy did tutorials on everything , it would save so much time.
Amazing video as always!! I didn't know before, that you can boot linux without an initrd...... but it makes sense, that you can, if all drivers to mount the rootfs are in the kernel. Learned something new today😃
Another fun, easy to follow tutorial on building a minimal distro and yet another project I will be completing in the near future. Thanks and keep up the great work, Nir!
Oh damnnn I was recently looking to perhaps make my own very lightweight distro for an ARM based SBC. This looks really really simple too! Thank you very much :)
You can add packages during the build by customizing the buildroot settings, I think you can also add a simple package manager with the buildroot settings but I haven't tried that yet.
Hey, hope you are doing well. I was trying to build a buildroot to simply stream a USB camera on HDMI. I have one error that I'm stuck to. /dev/video0 no such file or directory. Either I use vlc to capture, gstreamer , ffmpeg everywhere. I'm making this on my windows using wsl. Can you help me with this? Please 😊
I've been exploring RISC-V Small Board Computers and as part of that I learned the basics of building a Linux distro using WSL with cross compiler tools to target the RISC-V based VisionFive 2. I'd like to see something similar to this video except with cross-compile tools and targeting an actual SBC rather than QEMU. And I'd like to have a bit more explanation about the steps and why you are doing something. As part of my exploration with the VisionFive 2, I learned the basics of finding the appropriate drivers for a WiFi device and doing the cross compile to create a loadable device driver and then using them. I was very excited when the new USB WiFi adapter worked with the new driver.
You mean BusyBox? The difference is that Buildroot is a system to help build full Linux systems and BusyBox is a minimal all in one program that contains a bunch of standard Unix tools in one executable
Once we have the boot.img, I guess the next thing to do is to stuff various application binaries into it. Then we get a full-fledged distribution. Am I right?
i tried this but selected few more applications and utils along with xorg and wayland and few other sutffs, now im getting one single error that says `execstack.c:138:17: error: passing argument 1 of ‘asprintf’ from incompatible pointer type [-Wincompatible-pointer-types] ` i honestly have no clue whats causing this
Always wondered how distro mantainers like debian or canonical manage all their package and build stable versiones. What kind of integration testing they do
Does any one know how to fix the error: sudo mount boot.img mounted/ [sudo] password for user: mount: mounted/: mount failed: Operation not permitted. using Ubuntu WSL as well tried root still didn't work
i am currently compiling buildroot after navigating cluelessly through the menuconfig and enabling support for iw(,d), nano, uefi using grub, ext4 filesystem, htop, git, and other stuff i forgot. I hope i can succeed.
make or grab an installer (calamares, anaconda, etc) to make it copy all the files and configs to a storage device or make a chroot env like arch or gentoo and do it manually
Presumably because WSL means that it's easier to do Linux things on a Windows install than it is to do Windows things on a Linux install. And he's clearly interested in both OSs
Dang, my man makes building an entire operating system look easy between this and his last custom Linux episode.
I had no idea this even existed. I started LinuxFromScratch and just lost interest. But this is 10 minutes start to finish.
Haha, true. Although you learn a lot more by doing LinuxFromScratch, for example how all the compilers, build systems, etc. work.
Yeah man LFS is if you really want to get into how GNU and Linux works
@@Nunya58294 It's true, but as said before, it's a lot since explains every step and you build a very conventional distro/installation(glibc, dynamic linked, etc.). This is both a strength and a weakness. If you just want to **create** a minimal bootable Linux image with some tools, probably choose buildroot. If you want to learn how to do it, I'd recommend statically compiling busybox and creating an initrd first. Way less effort for a basic DIY bootable system(just compile this one application and create a file system). But if you want a deep understanding(no shortcuts) of how everything comes together in a Linux distro, LFS is the way to go.
I've personally never sat through the entire LFS from start to finish, but I've used it as a reference a lot, for example for setting up toolchains, filesystem hierarchy, etc., and I've created lots of single-purpose Linux distros/initds, from bootable games to rescue tools and testing android kernels.
i think this is compiling the entire linux kernel too so 10 minutes + like 2 hours lol
@@854Daryl this seems like a good intermediate step before attemtping LFS haha
It has been 0 days since I recompiled the Linux kernel.
gentoo user spotted
@@AggamRahamim-fs2zm gentoo/LFS/custom distro user* as all of those need to compile kernel
Can you please help me create an LFS aarch version ?
@@mehdiyahiacherif2326 can you not use JHALFS on an arm64 host system with dependencies met and several days worth of compile time
Buildroot is pretty fun, a while ago I used a buildroot-based system as my "game engine"(Linux kernel, Lua "userland" using framebuffer graphics, uinput).
You should have included some mention of the various ways you can include files in the final rootfs, for example overlay directories or custom buildroot packages. Also you don't have to manually create a bootable disk image, buildroot has support for creating grub(2)/extlinux/isolinux(including needed configs), or you could directly boot a kernel+initramfs in QEMU(no bootloader).
I tried to do that but syslinux failed to compile cuz the source code was missing an include
@@_lun4r_ I've had some issues with syslinux in buildroot as well. I just switched to GRUB, but as far as I can recall, it was just missing a configuration step. Syslinux is a way simpler bootloader that grub, I don't even think it can read files from disk, only static offset lists(that you need to generate somehow).
It's incredible what can be done nowadays with Linux and the way Linux is designed, keeping its simplicity makes it all much more comfortable when you really understand the concepts
finally, a way to utilize my computer truely bloatless.
vi is bloat, manually edit the files by using a magnet next to your hdd.
@@thestickmahn2446 you have just invented more than you realize. using this method we dont need an os at all anymore. heck. we dont need a computer anymore all we need is a hard drive, a magnet, a sata breakout board, a power supply and a piece of mettle, just connect the power and then bride the pins of the sata to write. and maybe use some led's to read.
or just use paper
@@thestickmahn2446or zap his SSD
@@thestickmahn2446 all of gnu is bloat, you could just boot the bzimage, and install only the commands you need
@@thestickmahn2446 🤣🤣🤣
You are a perfect programmer!!
I didn't see anybody do video like this, making a lot of video on C, or debugging Windows Kernel.
Please continue your videos!!!
this is one of the first tutorials I've ever seen that gets straight to the point and shows you every single detail you need and nothing that you don't. I wish this guy did tutorials on everything , it would save so much time.
So glad I found this channel. Somehow, youtube algo got it right this time and recommended me something really good.
Amazing video as always!!
I didn't know before, that you can boot linux without an initrd...... but it makes sense, that you can, if all drivers to mount the rootfs are in the kernel. Learned something new today😃
Another fun, easy to follow tutorial on building a minimal distro and yet another project I will be completing in the near future. Thanks and keep up the great work, Nir!
This is actually pretty interesting.
It all began with Linux from Scratch, now we're just 10 minutes to make a simple distro.
Hi future me, you are proud that you subscribed before 50k subscribers to the best tutorial channel.
Love your video, i work as a web dev, but i watch your video for fun.
Love me some buildroot. did the arm kindle stuff a decade? back. Top work
would you do a video about custom compiling Debian?
Planned :)
@@nirlichtman Can't wait :)
Oh damnnn I was recently looking to perhaps make my own very lightweight distro for an ARM based SBC. This looks really really simple too! Thank you very much :)
This is super cool! But how are you going to manage packages? I would love to see this series continued, thank you very much!
You can add packages during the build by customizing the buildroot settings, I think you can also add a simple package manager with the buildroot settings but I haven't tried that yet.
That was even faster and easier than Rob Landley's video on a minimal Linux, nice!
you've inspired me to make a custom iso for my pinephone, good stuff!
Thanks for the dependencies install command, the documentation providing them individually is pretty inconvenient.
I have said it earlier. i will say it again. THIS CHANNEL IS A GOLDMINE.
holy holy i want to absolutly do dispicable things i finally got my own distro thank you thank you thank you
Concise and right on target! Thank you!
Could you run top on the guest machine you made? What was the RAM usage?
One of the best video on internet
Thank you mate much respect i make my own respins and now i want to try new things you helped alot with what i want todo now
Hey, hope you are doing well. I was trying to build a buildroot to simply stream a USB camera on HDMI. I have one error that I'm stuck to. /dev/video0 no such file or directory. Either I use vlc to capture, gstreamer , ffmpeg everywhere. I'm making this on my windows using wsl. Can you help me with this? Please 😊
I've been exploring RISC-V Small Board Computers and as part of that I learned the basics of building a Linux distro using WSL with cross compiler tools to target the RISC-V based VisionFive 2. I'd like to see something similar to this video except with cross-compile tools and targeting an actual SBC rather than QEMU. And I'd like to have a bit more explanation about the steps and why you are doing something.
As part of my exploration with the VisionFive 2, I learned the basics of finding the appropriate drivers for a WiFi device and doing the cross compile to create a loadable device driver and then using them. I was very excited when the new USB WiFi adapter worked with the new driver.
Underrated Channel for sure 👍
cool. no flashy splashes or stalling. subscribing
Love it. Definitely gonna try to substitute busybox with uutils/coreutils. any recommendations?
You my friend are a magician!
It would also be interesting to see minimal distro using yocto build system. Thank you.
What is the difference between buildbox and buildroot?
You mean BusyBox? The difference is that Buildroot is a system to help build full Linux systems and BusyBox is a minimal all in one program that contains a bunch of standard Unix tools in one executable
@@nirlichtman oh yeah my bad! Thanks for the explanation ❤️
Any plans on covering the basics of the yocto project in the future?
Once we have the boot.img, I guess the next thing to do is to stuff various application binaries into it. Then we get a full-fledged distribution. Am I right?
What boggles my mind is how yocto took over when buildroot was out there. Super easy buildroot, yocto SUPER TOUGH to master.
i tried this but selected few more applications and utils along with xorg and wayland and few other sutffs, now im getting one single error that says `execstack.c:138:17: error: passing argument 1 of ‘asprintf’ from incompatible pointer type [-Wincompatible-pointer-types]
` i honestly have no clue whats causing this
Man this is fast and effective
"Fix you PATH" LOL
can you show us how to install a package manager on such a distro like this
Fun fact . The build time is from 9:56pm to 11:06 pm, aka 70 minutes. Only do this if you have time to spare
buildroot very good toolkit, but i have 1 question - how change default prefix in buildroot from / to /opt as it changed in entware?
Always wondered how distro mantainers like debian or canonical manage all their package and build stable versiones. What kind of integration testing they do
very cool video but can u mention how to get GUI like some kind of minimal version of Xorg (microwindows didnt work at all)
Wow this is. .. i don't now. Like❤
Awesome Video. I just want to know about, how i add UI stuffs into this ?
Does this mean I can "make" my own Linux distribution for my old Pentium 2 ??
Naturally!
You should make a guide on how to make a Wayland compositor with c.
So what's next? Yocto?
Bro I was installing buildroot got stuck on error after watching only 2min I fixed it. It was dependency error. Thanks
Can we create or add a package manager? (I need to add an desktop environment)
Nice, how to install security fixed and upgrades on this distro?
after running `make make`, the /output/images dir is empty
You have to run `make`. `make make` won’t do anything and was not demonstrated in this video.
@@samuelhulme8347 yeah, sorry.
I misunderstood.
Why is buildroot suddenly a minor trend 90% of my recommendations are about buildroot
great video as always!
What about just cooking up a gentoo and then just use qemu to squeeze it down and push it?
Any thoughts on T2 Linux 24.5?
Does any one know how to fix the error:
sudo mount boot.img mounted/
[sudo] password for user:
mount: mounted/: mount failed: Operation not permitted.
using Ubuntu WSL as well
tried root still didn't work
This is quite neat though never practical for a desktop. Which is unfortunate given how neat it sounds to fully build your own distro
Make series where you eventualy make a complete desktop usable distro
i get an error where qemu says it cant mount root fs
You got your shell up and running, but can it run DOOM?
What is the difference between bzImage and rootfs?
bzImage is the kernel binary compressed and rootfs is the tar archive of the files of the distro
how can we implement uefi boot using buildroot?
i am currently compiling buildroot after navigating cluelessly through the menuconfig and enabling support for iw(,d), nano, uefi using grub, ext4 filesystem, htop, git, and other stuff i forgot. I hope i can succeed.
How big is the image?
Beats using loopback and lilo!
Super cool video :)
On the dead homies this is some cool shit. Subscribed
Make a minimal mail server, please!
Planned :)
Sending email with c please 😢
Awsome! Thanks!!!!
bro qemu is not working
Next up, how to implement networking into TempleOS.
Amazing!
Thanks!
Fix you path? No you fix escape.
how to install distro ?
make or grab an installer (calamares, anaconda, etc) to make it copy all the files and configs to a storage device
or make a chroot env like arch or gentoo and do it manually
make a package manager and repository now
Yey :D
Another great video for me to watch :D
when i run 'make menuconfig' it gives this 'Makefile:157: support/misc/utils.mk: No such file or directory'
💖💖💖💖
I run my own distro > I run arch btw
Small distro makes biggest step 😂
Noice!
Cool
cool
why are you using windows & edge? kinda cringe
Presumably because WSL means that it's easier to do Linux things on a Windows install than it is to do Windows things on a Linux install. And he's clearly interested in both OSs
please dont use msedge
Amazing!