Build a minimal Linux with only Busybox in 1 hour

  Рет қаралды 32,937

Write your own Operating System

Write your own Operating System

Күн бұрын

Пікірлер: 98
@niklasweber9869
@niklasweber9869 2 жыл бұрын
I've been looking for this kind of tutorial for a long time. It is a key element for me in building my own embedded Linux. Turns out to be much simpler than expected. Thank you for the great video! Also your other videos are really insightful and help me to pull the strings together! I can't find any other videos like yours. Keep up the good work!
@cokeforever
@cokeforever 2 жыл бұрын
you can, but there will be poor-english-speaker-hindu-native-presenter ;) and you can see that the hindu guy is making errors early on )) So yes, cheers on good video! I would only like you to tell us the final size of your busybox system? does it fit in 32MB?
@jailop7013
@jailop7013 11 ай бұрын
Thanks so much. Fascinating. I followed your video step by step and got my mini-system running. You've openned for me a new door of knowlegde.
@BryanChance
@BryanChance Жыл бұрын
This is really educational. I love your explanations. Thank you for sharing your work.
@subhankarkarmakar2650
@subhankarkarmakar2650 2 жыл бұрын
I think you can do a : make -j$(nproc) and not hard-code 8 as some of us may have less than 8 processing units to work with, that $(nproc) will automatically substitute the max value or just use a variable to store the resulting value of $(nproc) and then substitute it.
@writeyourownoperatingsystem
@writeyourownoperatingsystem 2 жыл бұрын
yes, that's better. :-)
@lorensims4846
@lorensims4846 11 ай бұрын
Awesome! Just a little toy box to play with. I've been looking for a minimal Linux build to work with. I even bought the smallest external hard drive I could find to mount it from. I first looked at Linux From Scratch, but they've gone all Systemd now and I really don't care for that. I've been looking into busybox for a long time and it's really improved over the years. It doesn't have EVERYTHING I want, but certainly most of it. Thank you so much for this!
@lopezd-rd7wm
@lopezd-rd7wm Жыл бұрын
Excellent video Viktor. I've never seen someone been able to explain this so well.
@EduardoAvelar
@EduardoAvelar 2 жыл бұрын
Amazing content!! Thanks for sharing your knowledge with us. By the way, you could do a series on how to build a very minimalistic distribution for Beagle Bone Black, Raspberry pi, or any SBC based on Allwinner or Media Teck for example. It would also be amazing. Thanks!
@seadog-te1vj
@seadog-te1vj 2 жыл бұрын
very cool. only no mention of how to set up a network card for the VM. 😀thanks for sharing.
@mousinahanger7621
@mousinahanger7621 6 ай бұрын
For all the future visitors, the 'job control is, tty error' is actually distrubing. To fix it: run openvt -s -l -w /bin/sh or you can also run it with bash when bash is installed instead of direct /bin/sh. This allows you to run bash directly instead of busy box and it works! (Provided openvt is available from busy box so don't remove busybox)
@alaamo77
@alaamo77 Жыл бұрын
Its really amazing. I was looking for a such training since long time. it's really detailed video and for first time i successfully build a small Linux box. thanks a lot for this great work.
@MrFranciss
@MrFranciss 9 ай бұрын
Thank you very much, I've followed your tutorial and my initramfs works perfectly. I'll try to add some other stuff to it. Great tutorial!
@dmitryviktorovitch4915
@dmitryviktorovitch4915 2 жыл бұрын
Hello. Can you bring a github with your files from that video or something kind of? It would be great.
@danielzalega8588
@danielzalega8588 2 жыл бұрын
Misleading title. Should be 0.75 hour :D Cool video, thanks for recording. BTW, you can add "-e" to the shebang or "set -e" in any place to exit on error, making "|| exit" unneccessary.
@writeyourownoperatingsystem
@writeyourownoperatingsystem 2 жыл бұрын
yeah, but when you count the fast-forwarded compile-time, it's about 1 hour :-D
@CodeNova
@CodeNova 2 жыл бұрын
@@writeyourownoperatingsystem Great idea, they should add -ff flag to compiler :D
@jlxip
@jlxip 2 жыл бұрын
Yep. "set -e" is a must in shell scripts to me. Kind of like "use strict"; in javascript.
@giveaway4002
@giveaway4002 Жыл бұрын
this is so so so damm good. i learnt a lot, how everything works!
@joir2000
@joir2000 Жыл бұрын
Very cool video. Works well over here too. Thanks!
@mbvj403
@mbvj403 2 жыл бұрын
Hi! Could you please help me? When I compile busybox myself (downloading sources and compiling it exactly like in the video) I get kernel panic about no working init found. But when I download a precompiled busybox binary from their website, I get no errors. What could be the problem? I have Arch Linux too, and I've installed musl and kernel-headers-musl packages as well. upd: lol, I have finally realised what was the problem. I accidentally wrote "sed 's/^.*CONFIG_STATIC=.*$/CONFIG_STATIC=y/g' -i .config" in the script file, but in the default .config file CONFIG_STATIC line has no = sign, so my script didn't link libraries statically, and that was the problem of busybox was not working, so no working init was found.
@daniel_mg88
@daniel_mg88 2 жыл бұрын
Very good video. Will the "Write your own Operating System" series ever continue?
@nbx2001
@nbx2001 Жыл бұрын
Only a remark. The init-script look very static and it don't need to create via echo '...'. Also for the .config it is much simple to add a echo 'CONFIG_STATIC=Y' >>.config. But at all a great tutorial
@cyrusx6872
@cyrusx6872 Жыл бұрын
Thank you for this wonderful informative and enlightening video!👍
@persimmon2298
@persimmon2298 Жыл бұрын
Nice video. One minor note. In busybox build you can type "configure --enable-static" instead having to edit with sed. Perhaps this wasn't available when you made the video. I'm writing this in 2023.
@fabiodefilippo9009
@fabiodefilippo9009 9 ай бұрын
PERFECT, as always!
@clinthsu7229
@clinthsu7229 2 жыл бұрын
Appreciate you share so detailed build process!
@friskdreemurr8171
@friskdreemurr8171 2 жыл бұрын
Der Mann the best teacher thank you man so much love and respect to you
@ChrisPinCornwall
@ChrisPinCornwall 2 жыл бұрын
Ausgezeichnet! I really appreciate your videos, I'm learning a lot. Thank you.
@mousinahanger7621
@mousinahanger7621 5 ай бұрын
Thankyou very much. Good guide. I am still working on it. Now I can launch my GUI apps. My init proccess is still bash 😂. I don't use inird anymore. I found ways to directly mount things. Compiled kernel more than 50 times since the beginning. 😂
@liendatt8347
@liendatt8347 4 ай бұрын
Hey, are you using a persistent storage instead of the ram disk? if so please tell me how I can do that.
@bmflinux
@bmflinux Жыл бұрын
Thanks! Amazing video. I'm looking for a way to put a simple linux terminal on some old Nintendo Wiis I have laying around the house. There are distros out for it but they use the old kernel (2.6). All I want to do is be able to ssh into my development server which has all the tools installed to begin with.
@androth1502
@androth1502 2 жыл бұрын
-compiles linux from source. -can't exit vi. :D
@lulledoom
@lulledoom Жыл бұрын
Great but where are the kernel modules? or did you build also aa static kernel?
@joaogustavomatosmaranhao9160
@joaogustavomatosmaranhao9160 2 жыл бұрын
Amazing! Greetings from Brazil!
@TheDfgdfg345345
@TheDfgdfg345345 Жыл бұрын
Hi, am I understand correctly that you run linux system with initrd as a root and usually "big" linux distributions do chroot ad the end of initrd?
@林柏儒-g3w
@林柏儒-g3w Жыл бұрын
Thank you for making such a great video!!! Anyway, I was wondering if I can write a simple hello world C program, compile it (either in host or busybox environment), and execute it.
@thelaggygamer5853
@thelaggygamer5853 Жыл бұрын
This is very informational, could you make a video on how to get a very minimal de working. I would ask for hyperland or gtk(bspwm) setup but ik that would require a lot of files.
@nightly_builds
@nightly_builds 9 ай бұрын
"now i don't know how to exit it" :D great video
@dnkreative
@dnkreative 10 ай бұрын
How different it'll be to crosscompile it for ARM base platform like Raspberry PI or its clone? I need a minimal system which can run SINGLE and the ONLY GUI app
@dingjunchen2912
@dingjunchen2912 Жыл бұрын
I want to build Linux Kernel 2.4.36, which Busybox version should I use to build it?
@liendatt8347
@liendatt8347 4 ай бұрын
I've done something similar before, although I didn't use busybox. I just wrote a simple c program, compiled it and linked it with static option. I added it to the ramfs and I instructed the kernel to use this program as entry. However the biggest problem that we should address here is about persistent file system. How to load drivers that can talk with the storage medium and tell the kernel to use this driver instead of the ramfs after booting of course. please let me know if someone knows how this is done.
@ragarwal74
@ragarwal74 Жыл бұрын
Awesome! You are a super-hero! 3 cheers!
@dingjunchen2912
@dingjunchen2912 Жыл бұрын
Could you share the final script codes you completed in your video? I want to try it on my WSL under Windows to see if it works. Thanks indeed! I love your video very much.
@therealchonk
@therealchonk 2 жыл бұрын
Great to see you back again. I have watched your WYOOS series a few years ago. I have a couple of minor gripes: Instead of cd PATH ... cd .. better use: pushd PATH ... popd and make the shebang `#!/usr/bin/env bash` instead of `#!/bin/bash` therefore it's more portable.
@wilfridtaylor
@wilfridtaylor 2 жыл бұрын
Don't do /usr/bin/env bash. That is mac nonsense. #!/bin/sh is the most portable because anything that can run posix scripts (including mac) can run it and its actually more portable.
@guzman-do
@guzman-do 3 ай бұрын
Is it possible to add an also minimalistic GUI to this minimalistic Linux distro?
@roddygonzalez8905
@roddygonzalez8905 2 жыл бұрын
39:52 haha a classic one xD
@carlo_geiss
@carlo_geiss Жыл бұрын
very nice ... thank you for tthe education ...do you have github ... with the tutorial in text ...???
@gerhardroediger8331
@gerhardroediger8331 5 ай бұрын
I don't get it. How does this boot without any form of bootloader? qemu does the "bootloading"?
@chrisWSR
@chrisWSR Жыл бұрын
Excellent video, can be better, but when I finally finish and run the vm I got an error What does the error message "kernel panic - not syncing: No working init found" mean and how can I resolve it?
@avocado9227
@avocado9227 Жыл бұрын
Thanks. How then do you boot it on real hardware or generate a bootable ISO image?
@arminmohammadi1
@arminmohammadi1 9 ай бұрын
Hello, how to setup login for this small linux and run some python script after booting ?
@okiforbreakfast
@okiforbreakfast 10 ай бұрын
amazing video! thanks a lot!
@CodeNova
@CodeNova 2 жыл бұрын
Thank you for sharing this. What is memory and disk usage of this build ?
@Bruh-hd4rj
@Bruh-hd4rj 2 жыл бұрын
I think approximatively 12Mb of disk usage
@HK-sw3vi
@HK-sw3vi 2 жыл бұрын
they this video is awesome. thanks for the content.
@jlxip
@jlxip 2 жыл бұрын
You could've used "cut" at 7:18, which is in coreutils. Something in the lines of $(echo $KERNEL_VERSION | cut -d'.' -f1)
@flatassembly
@flatassembly 2 жыл бұрын
Good! Make more about these pls
@junkmauler
@junkmauler Жыл бұрын
Has anyone got this to work using kernel tinyconfig? I know there's things like config_tty, config_binfmt_elf, config_binfmt_script that will be needed, but my config just keeps asking me questions... want to make a very tiny kernel using a nice script like in this tutorial.
@azamaulana6075
@azamaulana6075 2 жыл бұрын
hella awesome content
@sanjaypj5808
@sanjaypj5808 2 жыл бұрын
awesome content :) Thanks a lot
@ChandrashekarCN
@ChandrashekarCN 4 ай бұрын
💖💖💖💖
@yap0916
@yap0916 2 жыл бұрын
Can I do the same things to make a raspberry pi os?
@RaveYoda
@RaveYoda 2 жыл бұрын
Good stuff!!
@sajalkmr
@sajalkmr 8 ай бұрын
Took some time as i was building on wsl
@xoxogamewolf7585
@xoxogamewolf7585 2 ай бұрын
How can I add a package manager?
@alexloktionoff6833
@alexloktionoff6833 9 ай бұрын
Can you make a tutorial how to create minimalistic Linux on a 1.7 or 1.4 floppy? /*there are o such Linux-es any more :(*/
@ThongThong
@ThongThong 2 жыл бұрын
thank you so much sir.
@kennethcarvalho3684
@kennethcarvalho3684 3 ай бұрын
Can we do in windows 10
@wsricardo23
@wsricardo23 Жыл бұрын
Hi Sir, Please do you have text with your explanations and this script to study? Thank you very much. Regards.
@poseidon3032
@poseidon3032 2 жыл бұрын
I just want one for web browsing and watching videos (eliminate screen tearing). Once I achieve that, then I would be interested into increased functionality (build the window manager into such as Windows 9x) until I cross the use vs performance threshold for that system. Instead of building a general purpose OS, Multi-booting for singular functions may be a decent option as well. PSA: Watching your video would be easier if you had utilized Dark Mode.
@yap0916
@yap0916 2 жыл бұрын
Can I install it on an usb and move from a computer to an other?
@mohamedsafy305
@mohamedsafy305 2 жыл бұрын
Hey, did you find any answer for your question? because I]m also searching the same thing.
@yap0916
@yap0916 2 жыл бұрын
@@mohamedsafy305 No
@kendricklamargaming8174
@kendricklamargaming8174 2 жыл бұрын
the approach I'd take here is to make a tar image of the system and copy it to the usb
@Viken43
@Viken43 2 жыл бұрын
Where can I find your scripts?
@Turjak_art
@Turjak_art 2 жыл бұрын
thank you runs
@yap0916
@yap0916 2 жыл бұрын
How can I install it on Hard Disk?
@komram4396
@komram4396 Жыл бұрын
Long story short you will have to make a separate partition, make it bootable, install grub on it and write a simple config for grub to boot the kernel.
@albertopajuelomontes2066
@albertopajuelomontes2066 6 ай бұрын
cool, but if you want to use this on a real machine you also need a bootloader
@GrindAlchemyTech
@GrindAlchemyTech Жыл бұрын
🧑🏽‍💻🙌🏽🙏
@hamicoshop
@hamicoshop 2 жыл бұрын
Hi dear. Can you help me learn busybox operating systems . That installed on Chinese wifi camera? They called hip291 or goke
@yevgenzhuchij3555
@yevgenzhuchij3555 2 жыл бұрын
You can use "Ctrl-A x" to terminate qemu
@pewolo
@pewolo Жыл бұрын
I don't know why people prefer minimalism with today super powerful machines. If I buy a PC, I want to use it to the fullest, that means using all the features the manufacturer says it has
@AnglerfishDeepcuts
@AnglerfishDeepcuts Жыл бұрын
This is extreme minimalism, not really intended for a 'super powerful' PC. It's just a proof of concept for you get started with the topic. There are now boards half the size of a credit card that can run Linux pretty well, with onboard WiFi, HDMI, USB, camera, etc., powered by a small battery--but not packed with tons of ram and ssd space--so you trim some fat off the OS and your apps to get it running best.
@hardwarelabor1631
@hardwarelabor1631 2 жыл бұрын
Good Video but the version mess at the beginning was a bit unneccessary
@jermsbestfriend9296
@jermsbestfriend9296 2 жыл бұрын
Bro you need a mic and a dead air filter. The summary of this video is tiny font and a hot guy whispering to himself
@anupdhond
@anupdhond Жыл бұрын
Nice vid, Howcome you are not using/building glibc for your linux system? For the record , you could substitute that complicated sed expression for fetching kernel version with : echo $KERNEL_VERSION | cut -d. -f1
@sandeshbhusal6905
@sandeshbhusal6905 Ай бұрын
At kzbin.info/www/bejne/l6TRiYqFirCbiqMsi=Eiz9YcordK84A_d4&t=1878 when you do the static linking, why are you linking aganist your system's busybox? with the /bin/busybox. Shouldn't it be ./busybox instead? I am not sure if this will work when creating a different arch image, say, arm from x86..
@sandeshbhusal6905
@sandeshbhusal6905 Ай бұрын
Awesome video btw!
@ABCABC-sw8mh
@ABCABC-sw8mh 10 ай бұрын
why just all with the temp.sh script 🤐🤐🤐
@paulstaf
@paulstaf Жыл бұрын
Great tutorial, but one issue I noticed: line 46: You are in the bin folder and you are creating links using the version of busybox located in /bin/busybox and not the version you downloaded and compiled and just copied to the bin folder. The line should be: ln -s ./busybox ./$prog
@HuyQuang-xu7bj
@HuyQuang-xu7bj 17 күн бұрын
yes :D
Build a LinuxFromScratch System Part 1: Overview
32:55
Write your own Operating System
Рет қаралды 86 М.
Making Simple Graphical Linux Distro from Scratch
17:19
Nir Lichtman
Рет қаралды 63 М.
2 MAGIC SECRETS @denismagicshow @roman_magic
00:32
MasomkaMagic
Рет қаралды 19 МЛН
World’s strongest WOMAN vs regular GIRLS
00:56
A4
Рет қаралды 6 МЛН
Всё пошло не по плану 😮
00:36
Miracle
Рет қаралды 4,9 МЛН
Linux Kernel Programming 03: Drivers
41:54
Write your own Operating System
Рет қаралды 8 М.
Build your own Container Runtime
37:37
Earthly
Рет қаралды 10 М.
Making Simple Linux Distro from Scratch
11:51
Nir Lichtman
Рет қаралды 199 М.
Linux Kernel Programming 01: Compile and Boot
51:57
Write your own Operating System
Рет қаралды 111 М.
Makefiles: 95% of what you need to know
1:01:53
Gabriel Parmer
Рет қаралды 127 М.
Build Your Own Distro With Archiso
34:04
DistroTube
Рет қаралды 67 М.
An Operating System in 1.44 MBs
32:38
WindowsG Electronics
Рет қаралды 87 М.
Linux Distros I CAN'T Stand!
27:01
Trafotin
Рет қаралды 86 М.
Steven Rostedt - Learning the Linux Kernel with tracing
1:07:25
OpenFest Bulgaria
Рет қаралды 96 М.
How does an OS boot? //Source Dive// 001
50:22
Low Byte Productions
Рет қаралды 421 М.
2 MAGIC SECRETS @denismagicshow @roman_magic
00:32
MasomkaMagic
Рет қаралды 19 МЛН