Тёмный

Making Simple Graphical Linux Distro from Scratch 

Nir Lichtman
Подписаться 39 тыс.
Просмотров 49 тыс.
50% 1

In this video I will create a simple graphical Linux distro based upon BusyBox and Nano-X and adapted to run on QEMU.
apt get deps: bzip2 libncurses-dev flex bison bc libelf-dev libssl-dev xz-utils autoconf gcc make libtool git vim libpng-dev libfreetype-dev g++ extlinux
links:
- Kernel: www.kernel.org/
- BusyBox: busybox.net/
- MicroWindows: github.com/ghaerr/microwindows
- X11 Hello: gist.github.com/nir9/098d83c7...

Наука

Опубликовано:

 

23 май 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 154   
@8ack2Lobby
@8ack2Lobby 3 месяца назад
lets go! I can see hundreds of new distros flooding in after this video 😂
@Aryan-de9jw
@Aryan-de9jw 3 месяца назад
:))
@knghtbrd
@knghtbrd Месяц назад
Yup, all the vegan crossfitter zennials who run Arch BTW, all use a tiling WM, think it's appropriate for config files to be literal C source code, insist the "cat" command shouldn't exist even when it's a shell builtin, and call anyone 5 years older than them or more is a "boomer"… Those people, AND YOU KNOW WHO YOU ARE, are all gonna be running their own custom microdistributions real soon. 🤣 I actually did LinuxFromScratch once before some of the above-mentioned children were born. Obviously the system is bigger now and more complex due to cgroups, systemd, EFI (which didn't exist in the real world back then), etc. But it's probably gotten less complex to build. Just more to understand now.
@ADarnSmore
@ADarnSmore Месяц назад
@@knghtbrd how do you know a linux user isn't running arch? they'll immediately start complaining about arch users before you even say anything.
@4t0mic57
@4t0mic57 Месяц назад
@@knghtbrd what did `cat` ever do to you? qwq
@jyothishkumar3098
@jyothishkumar3098 3 месяца назад
The cursor trails are probably due to Nano-X running in Framebuffer mode. I observed that the mouse trails over the window disappear when the window is repainted. The trails are due to the background not being repainted as the mouse is moved. The window itself doesn't leave any traces when moved though. So it's just the mouse cursor that lacks integration with the window management.
@nirlichtman
@nirlichtman 3 месяца назад
Interesting point 👍
@fabrilluviaofficial
@fabrilluviaofficial 3 месяца назад
how can i fix it?
@jyothishkumar3098
@jyothishkumar3098 Месяц назад
​​@@fabrilluviaofficial 7:07 pick the config.linux-X11 file instead of config.linux-fb.
@jyothishkumar3098
@jyothishkumar3098 Месяц назад
@@fabrilluviaofficial At 7:07, choose the X11 option. My last reply got removed for some reason.
@fabrilluviaofficial
@fabrilluviaofficial Месяц назад
@@jyothishkumar3098 ok, thx a lot
@brucoder
@brucoder 3 месяца назад
Excellent example of how we don't all need a fully bloated Linux distro to do real work. Thanks, Nir!
@pixobit5882
@pixobit5882 3 месяца назад
It is shockingly simple to create your own distro. Iv'e always thought, that it is super difficult and LFS was the only option to create a custom distro. Really nice tutorial! I'm gonna try to create my own distro later. Keep up making simple and amazing videos like this!
@fakestiv
@fakestiv 14 дней назад
Nice to see that you read the comment on the last linux distro video and actually explained what the end result would be at the begonning
@faithinverity8523
@faithinverity8523 2 месяца назад
Yesterday I freaked out because I watched your video about creating a non-graphical system. And now this! You redefine what kool is.
@kieferhendricks6680
@kieferhendricks6680 3 месяца назад
Great videos, man! I've done two of your projects so far and have learned so much from them. Keep up the great work!
@fabrilluviaofficial
@fabrilluviaofficial 3 месяца назад
hello nir, i was doing the past tutorial of busybox to make a simple linux distro, and now, I watch at my laptop, at your channel, and i found this 💎. unbelievable. thx for so much
@Nunya58294
@Nunya58294 3 месяца назад
You'll have a blast good sir
@marcusk7855
@marcusk7855 3 месяца назад
What a great video. I have absolutely no use for this but I'm going to follow along and built it myself too.
@patrickprucha5522
@patrickprucha5522 3 месяца назад
very cool! I think im going to try it too. Cheers. BTW i love your vids!
@benarcher372
@benarcher372 3 месяца назад
We all love tutorials like this!
@davidspr6938
@davidspr6938 3 месяца назад
Mental outlaw? Is that you?
@Artimis_the_bird.offical
@Artimis_the_bird.offical 26 дней назад
Amazing, from your old non-graphical distro you already earned a subscriber but this is double as cool, if i could subscribe to you twice i would.
@wiseskeshom4673
@wiseskeshom4673 3 месяца назад
Wow, What a great video. Thanks a lot for teaching us these cool stuff. 😊😊
@spacewolfjr
@spacewolfjr 3 месяца назад
Awesome video, thanks!
@leapbtw
@leapbtw 3 месяца назад
dropped everything i was doing to watch this lol nice content
@notnheavy
@notnheavy 3 месяца назад
hey i stumbled upon your videos recently, they seem to be pretty simple and straight to the point which i think is pretty cool, neat stuff!
@nirlichtman
@nirlichtman 3 месяца назад
Thanks!
@notnheavy
@notnheavy 3 месяца назад
@@nirlichtman no worries! will definitely keep watching just as something to watch in my spare time
@arduinoguru7233
@arduinoguru7233 3 месяца назад
Brilliant, this isn't looks that complicated compare what I thought
@rickybarabba7866
@rickybarabba7866 3 месяца назад
Thanks for sharing. Just subscribed.
@Nunya58294
@Nunya58294 3 месяца назад
This is really good for beginners who want their own OS or distro but don't quite have the knowledge for it; Well done!
@user-gz3zp8hw7z
@user-gz3zp8hw7z 2 месяца назад
Awesome stuff!
@microsuxx
@microsuxx 3 месяца назад
very cool nice pro stuff mate
@bramfran4326
@bramfran4326 3 месяца назад
This looks hard, very very interesting video nonetheless!
@antoniobarbalau1107
@antoniobarbalau1107 3 месяца назад
wow this is amazing
@Gkcrafting
@Gkcrafting Месяц назад
I Had no trouble setting up Nano-X, but when trying to start the server (`nano-X`), I get an error saying: "Cannot initialize keyboard". I wonder why it does that and how can I fix it? Also, I want to use SDL2 on fullscreen with KMS/DRM, how can I do that? I can't find any helpful ressources online.
@suzukiaccess5022
@suzukiaccess5022 3 месяца назад
@nirlichtman the X Window System is supposed to have a complete and transparent separation between the XServer part and the client application part. However, in most cases, both run the same machine so it is never clear how the two components works. Now that you came one tutorial with NanoX and an earlier with writing an X11 application, could you take a shot at a tutorial that clearly demonstrates the two parts? A machine that only implements the XServer part and connects over network to another machine that strictly implements the Client application part.
@nirlichtman
@nirlichtman 3 месяца назад
That is a good idea for next video :)
@RealYukiSan
@RealYukiSan Месяц назад
15:44 why you use /dev/sda instead of / ? I confuse because in the previous video, the root parameter is /
@jak2k
@jak2k 3 месяца назад
How is that theme called that you use to mimic the look of windows?
@nirlichtman
@nirlichtman 3 месяца назад
😂 I use Windows 10, it's not a theme
@tablettablete186
@tablettablete186 3 месяца назад
@@nirlichtman Lol
@rudykfox
@rudykfox Месяц назад
Ideal tutorial. Thank you! But I have one question. How to disable "Please press Enter to activate this console" after startup system?
@milasudril
@milasudril 29 дней назад
LFS spends a lot of steps on the host before the target is bootable. Can we keep going from busybox and nanox as a way to get self-hosting earlier?
@ahmedabuharthieh579
@ahmedabuharthieh579 3 месяца назад
Amazing work
@EzhikOFF13
@EzhikOFF13 Месяц назад
i understood only a half but still great video thanks man
@TheAio
@TheAio Месяц назад
If im not mistaken, wasn't xz-utils recently part of a major exploit? Would it still be safe to use xz-utils?
@user-3bs8jd83js
@user-3bs8jd83js 2 месяца назад
Additional info: while make menuconfig, you can directly press y, n, or m, instead of pressing `space` again and again.
@darkraven4207
@darkraven4207 19 дней назад
Can you please guide me at the start of the video on CMD he ran very first command when i tried to do the same on my CMD windows 10 it says "docker is not recognized as an internal ....." On which platform should I build this?
@skydivertyler
@skydivertyler Месяц назад
Would this have been affected by the XZ/Libzma backdoor vulnerability?
@mzakyr42
@mzakyr42 3 месяца назад
finally, yeah baby
@user-ms4kd9de5l
@user-ms4kd9de5l 3 месяца назад
Drink every time nir says actually
@nirlichtman
@nirlichtman 3 месяца назад
Actually, I didn't notice that 😂
@Dan-Levi
@Dan-Levi 3 месяца назад
Very cool! Is it possible to include chromium-browser (gpu accelerated?) and automatically start it in kiosk mode for a specific website?
@qqwui9989
@qqwui9989 3 месяца назад
This is based on Nano-x which is severely limited in functionality. It cant run chromium and definitely doesnt havr gpu acceleration
@Dan-Levi
@Dan-Levi 3 месяца назад
Thanks, saved me the time to try and fail 😀
@nirlichtman
@nirlichtman 3 месяца назад
Yah Chromium would probably be quite complicated to port but it can run Dillo which is a basic text/css web browser
@ovi1326
@ovi1326 3 месяца назад
You could also just use xorg x11 instead of nanox. Or even go for a wayland compositor instead which might be a notch simpler (I'm thinking gamescope or sway)
@sys935
@sys935 3 месяца назад
Better localhost / localfile where src.html folder in localdisk to work offline/online
@rmassink
@rmassink 3 месяца назад
Pretty cool, but I could not help but notice you copied libc and some other libs from the debian docker distro instead of compiling them from source. Which is fine of course, but why not compile those too, if you go the length of compiling busybox and nanox. Or do you recon that would be a video in itself, to show how to link all programs against a source-build libc version?
@fabiosarts
@fabiosarts 3 месяца назад
If you are using an actual linux distro for it, you can use fakeroot to simulate being root, it's pretty useful when creating the initrd for example C:
@gustawitresh
@gustawitresh 3 месяца назад
excellent video
@IdioticMath
@IdioticMath 3 месяца назад
how would you add smth like git to this? Would it be to /usr and binaries?
@theSoberSobber
@theSoberSobber 3 месяца назад
same way you added nanox man, they are just packages, any package needs itself (the binary), and the shared libs it might depend on (.a or .so's), more often than not they'll have a `make install` or similar.
@IdioticMath
@IdioticMath 3 месяца назад
@@theSoberSobber thanks man
@h4rlystesh491
@h4rlystesh491 5 дней назад
How difficult to add package manager for this distro? For example pacman or nix.
@Tommy-mb8rm
@Tommy-mb8rm 3 месяца назад
Hey Nir. Thanks for the video! If possible, please suggest workarounds and stuff for M1 chip users
@nirlichtman
@nirlichtman 3 месяца назад
I plan on making a video in the future about making a distro for Raspberry Pi, since it is also ARM, it may be helpful for M1 as well
@pastaya
@pastaya 2 месяца назад
asahi linux kernel
@RealYukiSan
@RealYukiSan Месяц назад
nice video!
@AZIZ-bc6xb
@AZIZ-bc6xb 3 месяца назад
what did you choose as a specialty after the first years in college computer science so you can understand and making distro ? i like ur content btw
@nirlichtman
@nirlichtman 3 месяца назад
Thanks! I am actually now on my first year in college, these kinds of stuff I learned by myself for fun, programming is my hobby from a young age.
@manofacertainrage856
@manofacertainrage856 Месяц назад
When starting in qemu, I'm getting an endless stream of "can't open /dev/ttyX: No such file or directory" The X is 1 to 4. What did I miss?
@nirlichtman
@nirlichtman Месяц назад
Sounds like you forgot to create the directories for the root file system, there are a couple I create in the video, including /dev
@davidenglish3801
@davidenglish3801 3 месяца назад
I will run it on my Android device to learn how it works, by termux. May it's possible by using X11-termux close as you did.
@bob-007
@bob-007 3 месяца назад
thx nice video. I was inspired to create a simple BusyBox distro with networking. Every time I try post a link or ref, my post seems to get removed. 😭
@bob-007
@bob-007 3 месяца назад
GitHub EN10/BusyBoxLinux
@theoshaviolation
@theoshaviolation 3 месяца назад
Pro tip: To make Cirrus an integrated part of the kernel, you need to make CONFIG_DRM integrated as well. Also, in the .config file (visible with ls -a), don't forget to replace the Certs part: # # Certificates for signature checking # CONFIG_MODULE_SIG_KEY="certs/signing_key.pem" CONFIG_SYSTEM_TRUSTED_KEYRING=y CONFIG_SYSTEM_TRUSTED_KEYS="" CONFIG_SYSTEM_EXTRA_CERTIFICATE=y CONFIG_SYSTEM_EXTRA_CERTIFICATE_SIZE=4096 CONFIG_SECONDARY_TRUSTED_KEYRING=y CONFIG_SYSTEM_BLACKLIST_KEYRING=y CONFIG_SYSTEM_BLACKLIST_HASH_LIST="" CONFIG_SYSTEM_REVOCATION_LIST=y CONFIG_SYSTEM_REVOCATION_KEYS="" # end of Certificates for signature checking This should work in most circumstances. The main difference with this config is that it doesn't use canonical's certs.
@Paolog_
@Paolog_ 3 месяца назад
Very Cool !!! I'm asking myself how do you know all this things. And can you make a tuto of making a mini-DE for Linux?
@nirlichtman
@nirlichtman 3 месяца назад
Yes, I plan on eventually making a video in the future about setting up either Xorg or a Wayland Compositor and with that a desktop environment as well
@Paolog_
@Paolog_ 2 месяца назад
Very cool!!!
@dj.yacine
@dj.yacine 3 месяца назад
Wee want more high quality content like this 😊
@18sohamkulkarni95
@18sohamkulkarni95 18 дней назад
This is very cool but how to add a config file syslinux.cfg in this process??
@sirk3v
@sirk3v 3 месяца назад
any chance you could do one on making android custom rom?
@nirlichtman
@nirlichtman 3 месяца назад
That could be interesting, I'll consider that for a future video, I think it should be possible to do it pretty quickly using buildroot
@Quadalarm
@Quadalarm 3 месяца назад
@@nirlichtman So far I know, you have to use software or packages to build it for every smartphone separately. How difficult is it to get these packages or software?
@comosaycomosah
@comosaycomosah 2 месяца назад
it would be cool to see a custom rom build i havent thought about grapheneos and the like for awhile but wanna play with some soon @@nirlichtman
@beetledjuice3062
@beetledjuice3062 3 месяца назад
Awesome
@jackkendall6420
@jackkendall6420 3 месяца назад
chad behaviour
@rullypratama
@rullypratama 3 месяца назад
Making a GUI Linux distro in Windows? Sounds legit.
@jreallyrean8208
@jreallyrean8208 3 месяца назад
He used docker
@interrrp_with_three_rs
@interrrp_with_three_rs 3 месяца назад
it's WSL
@caretchara
@caretchara 3 месяца назад
hell yeah
@Ooohhnvfykknjjhyfcvjiuffhhhhhh
@Ooohhnvfykknjjhyfcvjiuffhhhhhh 3 месяца назад
Is it possible to install a de in the os?
@theoshaviolation
@theoshaviolation 3 месяца назад
Probably, but you may need to tinker around a bit. If you can get your hands on the NanoLinux source code, then I would start looking in there for an implementation that will most likely work best.
@guilherme5094
@guilherme5094 3 месяца назад
👍👍Nice!!
@maksimmuruev423
@maksimmuruev423 3 месяца назад
How we should trust guy with windows in linux setup?
@GameBacardi
@GameBacardi 3 месяца назад
👌
@xhalved
@xhalved 3 месяца назад
Could it be possible to make a package system for a distro like this?
@nirlichtman
@nirlichtman 3 месяца назад
Yes, there a bunch of existing options for example using the Alpine package manager which is called apk-tools or maybe opkg, I may make a video in the future about making a distro with a package manager.
@satr14-tech
@satr14-tech 3 месяца назад
make a sequel where you can actually do programming in this with someting like gcc, nasm, python, or any modern language bcuz this could have a lot of extensibility on the os
@komram4396
@komram4396 3 месяца назад
Yeah, the real shit starts when you add a compiler.
@nolemretaw
@nolemretaw 3 месяца назад
can i replace nanox with full x11 or wayland?
@pastaya
@pastaya 3 месяца назад
you can but more complicated
@anirudhsharma2003
@anirudhsharma2003 3 месяца назад
You skipped the hardest part, internet connectivity 🤣.
@RealYukiSan
@RealYukiSan Месяц назад
13:10 what's the difference between dd and truncate?
@nirlichtman
@nirlichtman Месяц назад
truncate is more intuitive for the use case in the video, it also has additional advantages, one of the comments on my previous distro from scratch vid suggested its use and elaborates more on this
@ewof
@ewof 2 месяца назад
what keyboard/mouse do u use
@nirlichtman
@nirlichtman 2 месяца назад
My mouse is Microsoft Intellimouse Optical and my keyboard is DELL SK-8110 (but when I am recording videos I use a more quite keyboard)
@AK11020
@AK11020 3 месяца назад
Without sounding too puritanical, curious as to why you're doing this from a Windows desktop instead of Linux
@maxscott3349
@maxscott3349 3 месяца назад
I don't know but it's really nice that so many of these tools have been ported to Windows so you can do stuff like this on a Windows machine. There's a lot of times where it comes in handy
@nirlichtman
@nirlichtman 3 месяца назад
My main computer is Windows and I find it comfortable to work with WSL and Docker when I need Linux stuff, more info on the welcome link on my channel
@TunifyBasic
@TunifyBasic 3 месяца назад
need some automation.
@chrisxdeboy
@chrisxdeboy 3 месяца назад
Think you could do a FreeBSD version?
@nirlichtman
@nirlichtman 3 месяца назад
Yes, that is a good idea :)
@chrisxdeboy
@chrisxdeboy 3 месяца назад
@nirlichtman he'll yeha! I've kinda wanted to make my own FreeBSD "distro" with a focus on being easy enough for Grandma to use, but powerful enough that you'd want to.
@chrisxdeboy
@chrisxdeboy 3 месяца назад
@nirlichtman well, I gave you a subscribe in case you do make a video on it!
@chrisxdeboy
@chrisxdeboy 3 месяца назад
@@nirlichtman Also, and I hope I'm not bothering you, would it be possible for you to go over, in general, how one includes programs into their distro, like the overall idea?
@nirlichtman
@nirlichtman 2 месяца назад
Yah I will cover that in the FreeBSD distro video :)
@tzebruh
@tzebruh 3 месяца назад
yo! i've been waiting for this one!
@EXITISMYONLYWORD
@EXITISMYONLYWORD 2 месяца назад
why so difficult. how do you work with vim. it is impossible.
@Vimposh
@Vimposh 3 месяца назад
please make a video where you make a linux distro with package managers, installer, proper bootloader (grub), gnome, and stuff like that to make good distro. because there's no really much guides or videos on this topic. maximum what you could find is making really simple linux distro with busybox only, thats bad...
@nirlichtman
@nirlichtman 3 месяца назад
Yah, that is my goal eventually :)
@JamesSmith-ix5jd
@JamesSmith-ix5jd 3 месяца назад
Why would you want to make your own distro, the maintenance of it will take more time than any other productive usage.
@Vimposh
@Vimposh 2 месяца назад
@@JamesSmith-ix5jdi want to do that but im too dum dum
@PAFBEAST
@PAFBEAST 2 месяца назад
​@@nirlichtmanplz do it
@azrael-labs
@azrael-labs 3 месяца назад
Bro... I gonna make the ultimate gaming distro out of this, starts with a console, opens a graphical application when demanded
@moshixmainframechannel
@moshixmainframechannel 3 месяца назад
Yofi !
@Vednier
@Vednier 3 месяца назад
Building Linux distro from Windows. Yeah, rright.
@PAFBEAST
@PAFBEAST 2 месяца назад
He using wsl which literally is Linux lol
@Vednier
@Vednier 2 месяца назад
@@PAFBEAST "WSL is Linux" is so Microsoft...
@PAFBEAST
@PAFBEAST 2 месяца назад
@@Vednier Linux in Microsoft...
@feltmacaroon389
@feltmacaroon389 Месяц назад
@@PAFBEAST No, it's not WSL, it's Docker.
@PAFBEAST
@PAFBEAST Месяц назад
@@feltmacaroon389 its not
@bluescorpian
@bluescorpian 3 месяца назад
Why you using windows lol?
@itscharlie0110
@itscharlie0110 29 дней назад
Windows is cool
@Zeitgeistpionier
@Zeitgeistpionier 3 месяца назад
Schade, dass du nicht erklärst, was du tust.
@theSoberSobber
@theSoberSobber 3 месяца назад
using nanoX is cheating :(( make one with xooooorrrggggg :(
@nirlichtman
@nirlichtman 3 месяца назад
I tried Xorg, Weston and Sway beforehand and they all had very convoluted build and setup. There is also tinyx which comes from Tiny Core Linux but I couldn't get it to build. When I will have more time I might come back to this and try again since this is interesting :)
@iamnotmega
@iamnotmega 2 месяца назад
HOW THE FUCK DO I WRITE IN THE CONFIG FILE
@venkysoftwarehardwarecreat2683
@venkysoftwarehardwarecreat2683 3 месяца назад
🎉super𓽤
@theiaproject3467
@theiaproject3467 Месяц назад
"xz-utils" bum
@ronilichtman5176
@ronilichtman5176 3 месяца назад
This is awesome!
@nirlichtman
@nirlichtman 3 месяца назад
Thanks Bro!
Далее
Making Simple Linux Distro from Scratch
11:51
Просмотров 157 тыс.
Making Simple Shared Object (.so) in C on Linux
5:48
Drawing Graphics with C and Windows API is Easy
5:17
My New Linux From Scratch System
3:31
Просмотров 1,1 тыс.
Become a shell wizard in ~12 mins
12:25
Просмотров 203 тыс.
How Does Linux Boot Process Work?
4:44
Просмотров 495 тыс.
Diving into Windows Keyboard Driver
10:29
Просмотров 18 тыс.
Why Compile a Linux Kernel from Source?
13:38
Просмотров 27 тыс.
Arch Linux One Of The Easiest Distros To Install
14:16
Can you fit a whole game into a QR code?
20:03
Просмотров 8 млн
📱 SAMSUNG, ЧТО С ЛИЦОМ? 🤡
0:46
Просмотров 1,4 млн