Linux from Scratch

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
this is what you want I warned you I warned you ahead of time I said okay we won't do it we won't read anymore and then everyone in chat said lfs maybe we check in in 15 minutes and see where we go I'm not going to do a poll right now because I know lfs would win but I think it's good to outline what LF LS is lfs is an entirely from scratch Linux meaning no distribution no package manager nothing you just go now we've already done Gen 2 on stream and it's actually really not that bad Gen 2 and they actually package like with emerge and other things it actually gentu has a package manager now so not everything is compiled it's not actually that bad okay all right a buy the book lfs system is fairly minimal and Design to provide a strong base in which you can add Pro add any packages you want all right we're doing this blfs project what is beyond Linux from scratch is a project that continues the LF oh oh Lord okay so where do we get started here is the question so we have the lfs from scratch now let's say we want to do it let's go read online the current latest lfs book is considered stable most people want to read this book all right then you got the system D version of lfs all right let's click one of these what is this uh nothing all right Linux from scratch huh this looks like it might be interesting guys how big is it all right the forward uh not everything in emerg is a binary but a lot of things are yeah so I mean jitu doesn't have the same flar as back in the day ah all right lfs let's go with the forward get ready to either go to sleep or enjoy me suffering through Linux from scratch here we go my journey to learn and better understand Linux began back in 1998 I was in high school in 1998 I had just installed my first Linux distribution had quickly become intrigued with the whole concept and philosophy behind Linux there are always many ways to accomplish a single task the same can be said about Linux distributions a great many have existed over the years some still exist some have morphed into something else yet others have been relegated to our memories they all do different things to suit the needs of their target audience because so many different ways to accomplish the same end goal exists I began to realize I no longer had to be limited by any one implementation prior to discovering Linux we simply put up with issues in other operating systems as you had no choice you dirty Windows and Mac users it was what it was whether you liked it or not with Linux the concept of choice began to emerge if you didn't like something you were free even encouraged to change it I tried a number of distributions and could not decide on anyone there were a great systems in their own right it wasn't a matter of right or wrong anymore it had become a matter of personal taste with all the choices available it became apparent that there would not be a single system that would be perfect for me so I set out to create my own Linux system that would full fully conform to my personal preferences to truly make it my own system I resolved to compile everything from source code including of using precompiled binary packages the perfect Linux system would have the strengths of various systems without their perceived weaknesses at first the idea was rather daunting I remained committed to the idea that such a system could be built after sorting through issues such as circular dependencies and compile time errors I finally built a custom Linux system it was fully operational and perfectly usable like any other Linux system out there at the time but it was my own creation it was very satisfying to have put together such a system myself the only thing better would have been to create each piece of software myself this was the next best thing as I shared my goals and experiences with other members of the Linux Community it became apparent that there was a sustained interest of these ideas it quickly became plain that such a custombuilt Linux system sered not only to meet user specific requirements but also serve as an ideal learning opportunity for programmers and system administrators to enhance their existing Linux skills out of the broaden interest the Linux from scratch project was born this this Linux from scratch book is a central core around the project it provides the background and instructions necessary for you to design and build your own system while this book provides a template that will result in a correctly working system you are free to alter the instructions to suit yourself which is in part an important part of this project you remain in control we just lend a helping hand to get you started on your own journey I sincerely hope you will have a great great time working on your Linux from scratch system and enjoy the numerous benefits of having a system that is truly your own this is the precursor to Linux from scratch and I had to read it because y'all don't know what we're in for you just thought hey the cool kids said Linux from scratch and you all just went along with it it's time to rename it got to rename the streams one second Linux from scratch it's happening let's come to here oh it still said day one on wrestling oh my bad um we probably should change the from game and software development to Science and Technology switching out of software into science we go this is going to be a lot of text here we go and now we start audience lfs Target architectures okay we're going to skip some of this primary target architectur for LX from scratch is AMD 32 and 64-bit CPUs okay great let's get to it prerequisites building an LF system is not a simple task oh you're kidding it requires a certain level of existing knowledge of Unix system administration in order to resolve programs and correctly execute the commands listed in particularly as an absolute minimum you should already know how to use the command line shell to copy and move files and directories list directories and file contents and change the current directory is also expected that you know how to use and install Linux software because the lfs book assumes at least this basic level of skills the various lfs support fors are unlikely to provide you with much assistance in these areas you will find questions regarding such basic knowledge like go unanswered and will simply be referred to lfs essential pre reading list thank you Secret Squirrel joining the text on YouTube all right here we go so uh before building an LF system we urge you to read these articles software building howto and also beginner's guide to installing from Source now I already know how to do installing from source and everything um most of this is just like using make I want to say although it might have a different interpretation I usually use GCC but we will see if we're running problems I'm not going to read that I think we I think we're okay but important note all right lfs and standards let's see what this one's about Norm thanks for the prime the structure of Ls follows Linux standards as closely as possible the primary standards are pic file system hierarchy uh file system hierarchy standard Linux standard base LSB okay okay packages supplied by lfs needed to satisfy the LSB requirements bash sweet BC bin utils Cory tails and so on all that looks good let's go I think we're good most of this looked pretty easy super simple hardly an inconvenience rationale for packages in the book okay well I don't need rationale we already know that typography to make things easier to follow this section contains top okay no I think we're ready introduction 1.1 let's get it the LSS system will be built using an already installed Linux distribution such as Debian mandriva is mria still a thing i' I don't know Fedora open soua the existing Linux system the host which will be used as a starting point to provide necessary packages including a compiler Linker and shell and build a new system such as development during the distribution is to include these tools as an alternative to installing separate distributions on your machine you can do live CD we're fine here chapter two book describes how to create a new Linux native partition and file system where the new lfs system is compiled and installed chapter 3 packages and patches downloaded to build lfs package four set up appropriate working environment uh also explain several important issues uh before you begin your way through chapter 5 and Beyond okay so then we have explains the installation and initial tool chain this is like GCC used to build stuff bin utils for believe executing uh and then lib C is just a standard C library using cross compile techniques to isolate new tools and host systems shows you cross compile basic utilities all right then enters a CH root environment where we use new tools to build all the rest of that needed an lfs okay so like with Arch you'll do all the build and CH rout do like an ar- CH rout into the new environment and then you actually do it from there the full-blown lfs system is built in chapter 8 another Advantage provided by the CH rout is it allows you to continue using the host system while lfs is being built all right I mean honestly from this perspective I think we can just uh I think we can just do a normal VM probably in this regard we might actually do a live CD now that I'm thinking about it or I kind of want to do an arch install in the uh VM and then go from there ProMaster thanks for the prime to finish the install the basic system configuration to be set up in uh chapter 9 the kernel and bootloader are created in chapters 10 and 11 I wonder for the bootloader is it going to use grub or are we going to just do our own thing system deboot there's a lot of different different ways to approach that kind of curious to see what they do contains information and continuing the lfs experience behind the book after the steps in the chapter have been implemented the computer is ready to boot into the new lfs system this process in the nutshell great perfect that's how we build it what's new change log resources help don't care chapter 2 We Begin introduction uh in this chapter yeah okay LS blah blah blah we already went over it's going to download oh my God it's going to download XZ [Laughter] no it's been patched to see whether to host system and all appropriate versions the ability to compile run the following commands uh should just do that um let's let's put a whole new test environment up together I think is the best way to do this let's shut down old windows here we're going to create a new one yeah the new qual chips look amazing by the way I'd love to build an arm-based system using the new Snapdragon they're supposed to be close to being on par with uh Apple the M series chips is this uh come on all right here we go now we'll create our test environment I'm going to use arch for this one just because I love me some Arch just an easy an easy walk in the park of a system um you know what it's been a little bit since I download let's let's get a fresh version of arch we can show on stream how fast we can install Arch too it'll be the last time you're impressed today though there will be nothing else that happens that you're going to be like oh that Titus fellow knows his stuff uh after this it's just going to be all downhill 501 can't you lfs from WSL maybe I don't know on that specifically you're not going to have Hardware like W WSL is kind of weird because it locks off parts of your Hardware so I would say maybe but probably not I I think you actually need a full either Live CD or like if you probably boot into a buntu live CD would probably be okay I I like to actually be booted into an actual Linux system though so that's why I like Arch it's just so darn easy like Arch gets a bad wrap why is this in light mode that's kind of strange anyways it's kind of odd H anyo huh yeah that looks good anyo let's keep going all right we're going to go images refresh we should see Arch I think it's lower case a Arch Linux 51 choose and go forward generic Linux uh we're going to give it h what are you guys thinking eight nah we need 16 CPU cores let's go ahead and give it uh 10 gigs of RAM 25 gigs should be sufficient nah yeah 25 is fine but I'm going to manage this let's go default Titus BMS and create Arch server let's make this uh actually let's make this 50 just because I know sometimes I'm always like I want a little bit more let's go forward we'll customize this selection Arch server we're just going to use this to build lfs all right so now we have that let's go to our hosts uh we're going to manually set the topology just something I like to do anytime you're going to do any virtualization uh we're going to go eight cores two threads apply uh everything else looks pretty sufficient here that should be fine and let's boot uh actually let's see all right Arch install yeah QT theme issue there was kind of interesting I'll bro that another day I'm just like eh uh let's scale this up a little bit all right old Arch oh did you guys see VMware Workstation Pro for those windows user out want to do this I'd highly recommend downloading VMware Workstation Pro it's free now for personal use I thought that was kind of interesting all right let's set font uh we're going to go tur V 28b all right yeah nice and big and let's use the old Arch Titus project to just get this done quickly you're unfamiliar with Arch Titus something I did on GitHub and should be curl DL I couldn't remember the command it's been so been a minute been a while all right let's uh I don't know let's go curl okay curl is there I was like I can't remember remember exactly what it was but um Dash L and then oh no it's bash and then into okay yep my bad and the reason for this is just to set up the uh host environment and stuff so here comes our Arch install set our timer it'll be done in 2 minutes here we go and this is going to be a server install yes uh we're going to do ext4 on this Chicago and us all right install an arch how long you think it'll take chat oh is it just a 3 30day okay uh I think you have to still register with them but I believe it was free last time I checked so we're just setting up the mirrors now and Arch see if this project still works I haven't used it in a minute but the whole reason I made the project or kind of morphed it into what it is today is uh specifically just install Arch as fast as possible uh you you think 2.04 or8 minutes I guess we'll find out here I think we'll get it in under I think we'll get it in under 2 minutes I know that sounds crazy like people are like I I installed arch in under 30 minutes and then I'm over here going I did it in 120 [Laughter] seconds it's how nerds Flex right how fast you can install Arch can anything break in Arch Titus uh maybe there might be some updates or changes to ISO that could break it uh but I haven't updated in probably a year or two probably two years actually yeah I I like to still use it every now and again if I need like a test environment that's just Linux based because it's the fastest install of any Linux drro because there's just not much to it which is great I think it I I think I couldn't remember if I grabbed a yay or not during this I think I did yeah yeah if you got a slow download speed it's going to definitely take a little bit is it is it over 120 seconds now we missed the time cut off oh it's not going to be a fast one I guess I should have cashed the servers for the download if we could get the download speeds around ah probably of over one gig we we should be able to do it in two minutes all right we did it in 60 this is no 2 minutes in 49 seconds so not not too bad cool all right Arch Linux yes all righty so we got our part oh let's just go set font so now we we are on live Hardware Arch is installed uh oops set font oh I don't have uh Pac-Man one second let's go pseudo Pacman Sy Yu yeah I threw like grub customization and just like some things I like in every install so we were under 3 minutes I said 2 minutes it was still 2 minutes and 40 seconds no big [Laughter] deal oh let's go pseudo Pacman let's get terminal uh Terminus fonts Terminus font yeah Terminus font all right there we go now we can do it all right now we got our there was it part you was yay in here no yay wasn't never mind I didn't even grab the a although oh fast fetch is in the standard repos it's just mandatory after every install that we do we do some some type of thing also uh let's pseudo Pac-Man uh qmu agent actually can't remember the exact H qmu uh what was it I can't recall was it spice feed the agent I was just thinking to make the it go a little faster there is a agent specifically for packman let me see let's just come on over to our main install all right um qmu agent Arch oh qmu guest agent is the package okay oh what nope all right there we go let's go s qmu guest agent uh we're just doing this so we can since it's a virtualized instance some people are like why is it so slow or whatever it is uh when it comes to Linux or any anything you're virtualizing just make sure you actually have the proper um uh proper agent loaded so a good way to check if you're unsure uh system CTL status I think qmu can't remember yeah that's it uh just make sure that that is loaded and active because then you're going to get the full performance of qmu okay so now we have this set up we're ready to we have a whole environment um we might do like Dev tools or something like that but I think uh this is a good starting spot now let's come into our host system Let's Go version check or actually how does it want to start off so these are the requirements bash binutils GCC uh let's see I bet someone's already done this lfs requirements Arch see if someone already has all of those packages bundle up in a dependency I don't think we can copy and paste anyways but oh heck I think I might actually just do this H you know what we're going to do I hate switching back and out out of this system let's just build something really quick here just so we can jump around um you have get okay get clone I'm just going to grab my dwm all right and for this one all right we need xli I thought I had like the dependencies in a read me file no I didn't okay well uh yeah we'll need xor it it'll grab that though um I'm just getting a read me file that I can read a little bit better um uh is it okay more I thought I listed this but apparently I did not all right good to know uh let's put in yeah I love me some xorg just long live it man as long as I can uh this reminds me I need to update my dwm project to grab all the dependencies uh let's go search what was the Search Command what why am I drawing a blank on that syn is it oh it's query I don't know why I forgot that XL oh s oh okay I did that's what I I was like man I know it's close I just can't remember the freaking name it's draw in a blank XL should be in here uh note to self install and figure out the dependencies of dwm so I can make this easier on myself lib X11 thank you thank you Chad all right now then it's xft I think there's still like xenor as well yeah yeah lib X xenor okay there there it is mental note to self all right do that next time just I need to do like a simple setup script for this okay it's working uh let's go and we're going to just grab uh stardex um let's just I think this all the dependencies it should grab for this which should sufficient perfect uh now all right star x no go all right well it's not as simple as I thought it would be but that's okay oh I'm I'm definitely special we knew that in my own way uh all right let's go start uh actually I think we can just go uh Vim uh let's just do dwm I think I think that should be fine oh didn't it didn't grab the it says user bin no such fileer directory yeah we forgot I didn't get xorg uh yeah that should be exact dwm did I miss xorg X doesn't exist so it should be xorg is it just xorg jeez let's go s xorg exor server yes that's it which is we need set rate too oh all right yeah just use Arch Arch is all anyone ever needs they just don't know yet uh ex set rout all right good enough o forgot about uh one downside to doing the full screen mode uh I can't what was the command to get out okay just need a a little bit of that hotkey yeah so it's a VM and I need to send it a control alt to meet or really I need to send it a TTY command cuz I forgot to install a terminal kind of need terminal yeah Kitty um I just forgot like the big silly person I am uh anywh who yeah St is not even there we don't have any terminal all we have is TTY twitch going to hard carry through this lfs install probably I'm hoping okay let's uh come on should be right in here there it is there we go so let's go PSE sudo Pac-Man s Kitty uh what else should we grab let's just grab Firefox and Roi let's grab that too uh oh that's interesting okay Control Alt G let's see Control Alt G doesn't release but that's okay it's hard to do it like full screen mode really does a good job of capturing everything so I don't mind it um so now that we've got those we should be able to come back into is it F1 yeah so from here perfect and then we should have our terminal which if you go shift plus I want to say oh don't know there we go control Plus+ so we have that and I just want to be able to well oh there we go all right so one's going to be here two is going to be there and I think we go Firefox and I'm just setting up just a really base environment for Linux from scratch all right now we got that and we just go read online uh let's go download as well current development but we want Stable download the stable but can vary through the stable Direction okay so it comes in like the pdf version really let's see all right oh I kind of like this better so now we can just flip back and forth so we have all of this that needs to be set up and installed um I think most that should be there by default yeah perfect all right bash binutils bison let's just let's just make sure bash well obviously we're bash bin utils bison so yeah all these are in I I figured it would be there I think all this would be there make I've already done fine utils all this should be essentially there you have better have luck with the system V init version Chris personally wow okay well let's see Benji I'm really good with system D Famous Last Words uh to check if your system has all the appropriate versions and ability to compile run the following commands check version check now there should be a repo or something we're cloning right is there a repo or anything we're cloning to get to where we need where are you at where are you at where you at it's just what's new change log resources okay maybe not yeah we already went through the stages you only download the tar balls for the program okay good all right there's that creating a new partition well then all right to see whether or not the host system has the appropriate versions run the following uh okay this version check um I wish this was a h see since it's a PDF it's not going to actually grab the whole thing is it maybe h no I guess we can just kind of hope and pray well no no okay we almost got it all right there we go might be enough that's not I guess it wanted to feed it directly I didn't need to do that okay grabed A little little much anyways uh let's go probably like uh there we go all right let's check our version everything looks good uh command not found line 28 and 29 need to look at uh everything looks good here uh what was line 28 oh those were page numbers okay so if you go version check again everything looks good beautiful I copied the page numbers all right building lfs in stages can be built in one session chapter 1-4 blah blah blah run command uh chapters 5 through six mounting chapter 7 blah all right I'll be right back we're going to create a new Partition and it begins one second I got to get a drink well if everything goes well here we will just switch switch it out should be fine all right good Lord adds Galore H can we uh oh does that oh it doesn't work it doesn't not it doesn't work this page is protected by browser what control shift a can we not uh bypass that cannot PDFs are protected from dark mode all right one second let's let's back out one second uh okay all right all right uh chapter two you know like a true Linux nerd Let's uh let's go into chapter two oh actually I think we can do this through HTML okay we're good uh I think we can just add that right H all right it should be like an index okay watch this watch this oh come on oh I thought I was being fancy that's hilarious you only get dark me dark mode around the really okay see off on no way oh I'm sorry chat outplayed [Music] like control shift ey all right well you think it'd be in here but you'd be wrong you're going to just have to deal sorry this is postponing lfs we want to get to the meat and potatoes it's fine sorry you're just going to deal all right creating the new part creating the new Partition like most other operating system lfs is usually installed on the dedicated partition the re approach is building an lfs system to use an available empty partition or if you have enough unpartitioned space create one okay um because there's always enough random axes ah well if we're going to just do a whole new Partition the grab bios okay so we probably should just situate another another one on there yeah we can just add another V dis so what this looks like so you have creating a file system on the partition blah blah blah so let's let's do that let's just create another V disk and we'll just go power off go information what we're going to do here is just add Hardware let's go storage I'm not going to give this very much though no why am I not seeing sto oh storage is the top I was like where is this it's here all right and we're going to add a volume lfs we're only going to do 20 perfect choose volume okay Finish let's open that guy back up and now we have this so we only have boot partition let's rename can we can we rename it I mean we could specify it here but it's fine it's just dis 2's lfs so if we look at boot partition dis 2's LSS dis one's Arch let's boot back into our system and all righty all right and then Firefox Perfect all right now we have that so we look at our lsblk we should have VDB and what we're going to do is just to make FS uh we I think we might need to to do file system and everything first so probably like CFS so we're going to go pseudo C CF dis Dev VDB all right going to be GPT cuz that's just you're going to always do that nobody uses doll or Legacy anymore all right first partition size let's go one gig all right and type for that going to be in an EFI I believe that should do and then the next one 19 gig let's go type Linux file system is fine okay so now we've got those two things let's write that out why not CG dis I don't know I like CF dis a little better what are yall think in chat okay so now if we go lsblk we see the two new drives right nothing's tooo crazy about this yet now now we just do ext4 and uh vdb2 all right so now we have the xt4 and then we also need to do the boot does it not say boot in here I guess we're going to do boot later all right well let's not get it too Ahad of vers although it should probably tell you did it not say I guess they just assume you already know that make a swap partition I'm not big on Swap partitions to be honest I did a uh a bunch of testing to see the speed difference between a make file and and a make swap partition and everyone made it out seem to be like swap partitions would be so much faster than swap files it's just not the case swap files are fine I didn't see any performance degradation between swap partitions and files very minor if any uh all right throughout this book the environment variable lfs will be used several times you will ensure that this variable is always defined throughout the lfs build process it should be set as the name of the directory where you will be building the lfs system we will be using mount in lfs for an example but you may choose the directory if you want if you're building lfs on a separate partition this partition is the direct Mount Point choose the partition as following I'm just going to make MNT I I guess we can export lfs it's fine though and we we'll just we'll just mirror it just in case we get in trouble and I end up copy pasta on something yeah the make fat they didn't tell us to do that but yes uh it would look like this and uh VDB uh vdb1 make FS fat uh maybe I didn't have make FS do fat oh we might need to actually install uh tools yeah that's what it is it's like that should work okay there you go wait you can't do UEFI it appears lfs you can't do UEFI are you for real you can't do even ufi with lfs what the hell is the point are you sure that doesn't sound right it appears lfs you can't do ufi it's in Beyond lfs so I guess we got to go beyond okay okay well it doesn't make any sense to do lfs if okay all right we're Switching gears here guys we're going to Beyond lfs we haven't even done anything so very easy all right Beyond lfs what's the difference between the two okay oh okay so we got to do lfs and then beyond lfs okay never mind then we're still doing lfs all right well let's go Linux from scratch you know what we're going to go back to the book I like the book with the bookmarks since it's already white might as well all right root partition graub partition yep convenience parti okay that's crazy uh boot sure temp file create the file system on the partition we do that set the lfs variable okay then we mount it do we really need to use this I don't I don't really want to use l it's fine though all right so we've got our partitions let's Mount I'm just going to do it to MNT I don't see a point in doing a subd directory in MNT so we're going to go Dev VDB 2 to MNT let's just let's just go into here tired of riding is sudo always run his route all right VDB two to MNT uh oops no not MN boot ah okay vdb2 to MNT is fine then make directory MNT boot then Mount vdb1 to MNT boots so now if we do LSB okay it's mounted three times how the hell is that even possible what is happening okay odd I've never seen that before any who now that looks right all right let's export lfs equal to M into so now you have your lfs parameter everything's gravy moving on with the world let's do that so we have the Mount of all the lfs stuff blah blah blah great uh uh does want to do home so yeah it wants a home folder as well we're not going to do that because I really don't care about having a separate home folder with lfs all right the Bim you do not restart your computer throughout the process once you do FS tab will break all these yes if you're using a swap partition ensure that is enabled by using swap on we're not all right packages and patches introduction this chapter includes a list packages in order to build a basic Linux system all right so now we grab the sources of lfs so we'll grab this guy right here and paste it into here then make this directory writeable and sticky sticky means even if multiple users have right permissions of directory only the owner of the file can delete it in there so nice here we go so there's that we've created the sources we should start building soon right there are several ways to obtain all the necessary packages and patches to build lfs files can be downloaded individually as described in the next two sections for stable versions of this book a tarb of all needed files can be downloaded from one of the mirror sites let's do that the files can be downloaded using WG all right great I like it so far um let's come on over here North America oh file Planet you guys remember file Planet that's cool any who let's grab this lfs packages we are on version 12.1 here is all the packages so we got to download each one individually let's just grab this W list what do we got here ah perfect okay uh so what we're going to do is we're going to just use w get list and then just grab all of them in one Fell Swoop is I'm not about to just sit here and download all this crap so uh W get list mm whatever flag blah blah blah is there correct way to download each files blah blah blah how do we do a WG list thing quick man WG input file reads URL so we should be able to do that so if we do we have the W get list um let's remove LS book now let's W get with an input file of WG list perfect and then we'll just grab all of it I was like I'm not sitting here downloading all this that's not fun okay well I I was actually unaware of the input command for WG so that was actually news to me so well right now we're just downloading all the tar files for WG oh yeah yeah well that's okay we can move it all it's not that big a deal probably should have just gone directly to sources and then just grabbed it all right there but that's okay like I said it's it it'd be fine so that's that guys so this is everything we're downloading all right so we get all those download all the packages using WG list system D command as an input of the W command you can you oh okay oh are we downloading the wrong files oh we are so this if we look one second I think we're down on the wrong thing I don't think these are actually system D oh no it is we're fine okay never mind I was like um I'm not seeing system D but yeah they're here never mind I just saw WG system D I was like oh no and then we should have done the directory prefix so honestly we could have just grabbed this whole thing and put it in there I just is the W get list system d as an in command it's interesting I just want to see if there was another it's kind of wild to have it all the way back to six but if you go down to W it's just WG Dash list so it's just grabbing everything okay I was like Hey am I'm missing a WG list file here or using the wrong one would be terrible uh does anybody ever do M md5 checks to see if everything's valid yeah let's build six 7.4 holy smokes that would be a disaster right yeah nobody ever does md5 it's cool that it exists but does anyone do it no all right so then we got CH rout take ownership of it all the packages what are we doing with that so read the security advisory and packages to figure out if the newer package is available veral abilities blah blah blah blah blah blah more packages we're just going to do everything needed packages okay what's the patches I wonder needed patches in addition to the packages several patches are also required these patches correct any mistakes in the packages that should be fixed by the maintainer patches also make small modifications to make the packages easier to work with the following patches are needed to build an lfs system so we'll have to use uh probably like the patch command require any additional patches to suit your system needs so what does that look like final preparations in this chapter do the final ones so we have all that do a listing you can see all of uh all of our stuff here so uh everything but 12.1 should be grabbed so I think we can just move star and then we're just going to go Mount sources then if we do it listing oh toss the manual over there too whatever M and sources all right so this is our sources all right create a thing add an unprivileged user create a build environment for that user all right creating a limited directory layout for the lfs system in this section We Begin populating the lfs file system with pieces that constitute a final Linux system final step in creating a limited directory hierarchy so the programs compiled in chapter six as well as lib uh libc and stdc Plus+ can be installed on the final location create the required directory layout by issuing the following commands as rout so we're manually creating like Etc VAR Benin lib sbin that's cool all right and then we're doing a for Loop can you do for loops and Bash like this this kind of crazy huh this is kind of wild right here yes okay wow I don't think I've ever done that in Bash that's neat so this made Sim links to MNT bin to USR bin and was that right did we just make a bunch of oh no I think we're okay actually Ben USR Ben okay just making sure it did the correct thing there done all right great now we make the tools directory we're going to be compiling uh will be compiled with a cross compiler all right the cross compiler installed on a special directory and separated from other programs still acting as root create the directory all righty so far it's just been like copy paste copy paste nothing nothing too complicated adding an lfs user I wonder why we're doing like a group AD in our Arch instance it's kind of kind of wild but okay I do keep doing control C control shifty old habits die hard all right what this line means all right makes batch the default shell adds an option for the user lfs in the group lfs prevents copying all right name of the new user all right you want to log in as lfs switch to lfs all right um I think actually we might change that up a little bit now that I'm looking at it yeah no I I double checked it's fine all right whatever let's go all right GR user access to all the directories it's kind of wild that it uses this uh these little nested Loops it's neat and then we're just switching over to lfs user all right and then we set up the environment the new instance of the shell is a non-login shell which does not read write or execute the contents of Etc profile or bash files but rather reads and executes The Bash RC file instead create a bash RC all right I have my own BC we could probably do later but whatever for now let's just get it going um well Rando whenever you do any of my windows toolbox stuff it just grabs the existing script so if I update it today you get the latest so it just runs the script it's not actually a program I think a lot of people uh forget that the windows toolbox was never intended to be really a program it was meant to be just a script so everything you see is is actually just a script that runs and then as soon as you close it it just closes the script and the executable is just a wrapped power shell script executable container so whenever you run it it just that's all it's doing it's not actually installing a program or doing anything uh to the using that system or that program itself it just runs in memory and then as soon as you exit it clears it out oh no no it's all good random thanks man I appreciate the support will ly youtil be also the same yeah I think we'll have uh something to that extent I might do a bash probably a bash script much like how I kind of installed Arch Titus here or God bless I got to do I used Arch Linux on this install right for this test environment for Linux from scratch that was a bash script and that bash script was just basically just pulled through the internet much like I did like with Windows utility I did it for this this install and they just grabbed that script ran it all and then I just had a whole bunch of options that I already preconfigured for server and that's how we were able to get like dwm up in like no time flat it just was like bam there it is done and I think we installed it like 2 minutes and 40 49 seconds I think was the total time and again that was all just because it was a bash script sitting on GitHub and I I love that I love that just for a time saer so you don't have to actually go download clone do all that business you can just grab it and run it and you can actually do that with things that aren't bash scripts too like obviously I've shown bash scripting and Powershell scripting but you can do it with full-blown executables you don't necessarily have to do it as a script at all there's a lot of there's a lot of things that people just don't usually do online uh mainly because they want money and if you want money it's a terrible system to have uh it just so exposed like that because what ends up happening is people just can grab it at will on any system without really authenticating or doing anything and run it which I mean the only other thing really that exists that works this way is a virus a virus works exactly that same way they want it spread as wide as possible and as easy as access as possible uh to get the most infections that's pretty much how my toolbox works too it's just a little script that can just be run from anywhere and it's kind of cool but you could also do that with like a rust program I don't see a reason why you couldn't just curl and run that directly uh it would still download the binary locally and there's different ways I'm I'm thinking in my head to do so the end user wouldn't it wouldn't necessarily install it per se but it would still download the binary to at least a temp folder to run in place so it' be a little bit more overhead than actual script but uh the premise is the same and I man there's a lot of there's a lot of cool stuff we can do and a lot of uh a lot of fun so it doesn't really matter too much and you can also mix and match like let's say we're doing it in Russ like we started the stream out with Linux util we can also transition into bash we can actually transition into Powershell in Linux if you wanted uh is you know don't don't think gets limited by just like one language it's very much and businesses work the same way too oh awesome man well I appreciate it ah man all right so we're still we're doing Linux from scratch still here we go where we've got most of everything in I think is just kind of going over the ins and outs of it um the meaning of all these settings in bash RC I don't care like this is just setting local uh local or localization um TGT I don't see that like this I don't see very often uh now that Basher C there is something wrong with it that mount point is actually not not valid oops uh anything else here yeah all right we're good uh what else we have lfs TGT variable not Define uh not non- default but compatible machine description for use of building cross compiler and Linker okay and that and we should be good I don't see anything else here that could be problematic now important several commercial distributions add undocumented instantiation of Etc bash. bash RC okay to ensure lfs's user environment is clean check the presence of Etc see it present move it out of the way run as this okay so it's checking to see if that file exists I don't think it does on Arch but we can go ahead and do that I'm just going to put it in this other prompt oh yeah okay it actually does exist on Arch Etc bash at bash RC does exist in the ETC folder what's in that folder uh oh well let C over here then huh maybe it needs to be run as root user maybe I'm just curious what this is okay it listed as bash at bash RC no use oh okay so if not running interactively don't do anything case of terminal it changes the prompt around interesting okay I'm just clearing that out I was just I did not realize learn something new for many modern systems with multiple processors of cores the compilation of time can be reduced by doing a parallel make we're definitely doing that uh let's see going from here we can do we're going to do 16 cores I believe so we'll do a j16 let's make that I think we actually have make flags already let's just cat make flags oops Echo make flags make flag H all right well j16 all right well it's there now uh I thought I had that in my script apparently I did not and we will to use all logical cores you can set this in your bash RC all right we'll just do that so if the cores change it'll be fine and then we just Source it all right so now we're in lfs oh no I have not with the home stick yet need to take a look at it I I saved it though I started what the heck's spu many people would like to know beforehand approximately how long it takes to compile and install each package because links from scratch can be built on different systems it's impossible to to provide absolute time estimates the biggest package GCC will probably take approximately five minutes on the fastest systems but could take days on slower systems instead of providing actual times the standard build unit measure will be used instead okay so considering a package where compilation time is 4.5 standard Bill units this means if your system took 10 minutes to compile and install the final first pass of B utils it will take approximately 45 minutes to build the example process oh I like how that's done staron thanks for the prime man when multiple process are used this ways the standard Bill units in the book will vary even more than they normally would well we're using a Zeon so it'll definitely skew on our favor if anything it should build pretty damn fast KitKat thanks for the prime I love it love it all right uh so far Linux from scratch has been treating me pretty good uh the the documentation is quite good haven't seen anything thus far is like oh my gosh what the world you know knock on wood it probably shouldn't have said that about test Suites most packages provide a T Test Suite running a test suite for a newly built package is a good idea because it can provide a sanity check indicating that everything's compiled correctly a test Suite that passes the set checks oh my word what is happening Casper you're awesome thank you so we got the test Suites coming Boom come on let's get to the compiling I want to get going ah here we go the fun begins building lfs cross tool chain and temporary tools so this is where we start to build the the binaries this is where the fun happens this is where the suffering begins so far as I actually I've just been having a good time this has actually been really fun I'm like ah cool yeah okay that makes sense that makes sense so this is where it's definitely going to start to diverge a little bit the next section is a technical introduction to the build process one presents very important General instructions okay so no just smoothing over here yeah and we also need to do blfs after lfs so we can actually boot because we got to have UEFI I just I refuse to use Legacy it's 2024 what are we trying to do maybe if we were doing like some kind of weird retro experiment and go hey Linux from 10 years ago we can run sure but like doing Linux from scratch with a legacy that doesn't make any sense oh man all right thank you D wolf this is great though like I said I think it's cool I mean and honestly with me using dwm and everything being built with GCC anyways this is actually not that farfetched to being used as a main system it really wouldn't be hard in theory uh all right the build process is based on Cross Compilation All Right cross compilation involves same Concepts and deserve a section on their own this section may be omitted on a first reading coming back later will help you getting a fuller understanding of the process the build the host the target yeah so you're just compiling stuff using the host or on on the host for for the Target that makes sense stage one aab and then it's ABC so the what those letters mean let's see what's the let's call it machine a is the compiler the fast machines B with no compiler slow machine C wait what the hell all programs needed by Machine c will be compiled using gcc2 on the fast machine B I guess they're using multiple machines to build different sections of the program or something oh nice Powershell Kit Kat all right check it out man implementation of cross compiling for lfs all the cross compiled packages in this book use an autoc comp based building system autoc comp based building system accepts system types in the form of CPU Vernal uh vendor kernels OS referred to as a system triplet since the vendor field is often irrelevant autocom let you Adit it an astute reader May wonder why a triplet refers to a four component name the colonel field and the OS field begin as a single system field such a three field form is still valid today for some systems I know right just thinking that myself for example the x86 64 unknown free BSD but two systems could share the same kernel and still be too different to use the same triplet to describe them for example Android running on a mobile phone is completely different from Ubuntu running on an arm 64 server man I had no idea even though they had both running the same type of CPU RM 64 and using the same kernel Linux wow without an emulation layer you cannot run an executable for a server on a mobile phone or vice versa so the system field can be divided into fields and Os fields to design the systems unambiguously INR for example the Android system is designed in Arch 64 unknown Linux Android and the entu system is designated Arch 64 unknown Linux GPU the word triplet remains embedded in the Lexicon the simple way to determine the system triplet is to run the config do guess script that comes with the sources and for many packages unpack the binary sources run the script config guess and note the output for example a 32 pit Intel processor will output I 686 PC Linux ganu on a 64-bit system it'll be x86 64 PC Linux ganu on Linux systems it's even simpler GCC dump machine command will give you a similar information you should be aware of the name of the platform's dynamic Linker often referred to as a dynamic loader not to be confused with the standard Linker LD as part of venue tills are they just trying to confuse people doing all this like there there's so much more simplification of ways of describing this it's just so like I feel like that YouTube video right now where he's like going off on all this techno Babble that's what this is like okay this could be explained so much easier but it sounds a lot cooler when I'm reading it like this so I appreciate it all right the dynamic Linker provided by the package GBC finds and loads the shared libraries needed by the program and prepares the program to run and then runs it the name of the dynamic Linker is for 32-bit Intel machines LD linux. o.2 it's LD Linux x86 64s SO2 on 64-bit systems is sure why away to determine the name of the dynamic Linker is to inspect the random binary from the host system that is running readed elf DL name of binary GP interpreter and note that put authorative reference covering all platforms is in the shibl shib versions file in the root of GB sea Source tree all right here we go we need to we need to oh I don't have uh I don't have old jippy over here old jippy too long didn't read triplet is a processor platform Colonel sorcer yeah all right in order to fake a cross comp compilation in lfs the name of the host triplet is slightly adjusted to be by changing the vendor field in lfs TGT variables so it says lfs we also use the with CIS root option when building the cross Linker and cross compiler to tell them where to find the needed host files this ensures that none of the other programs built in chapter 6 can link to library is on the build machine that's quite important on two stages are mandatory plus one more for a test so build machine PC host PC Target lfs got it stage 1 two 3 and then stage three is alls so it goes in stages so you have the building machine so it goes with this right here you build it then I think this is the CH root phase really in stage stage two and then stage three we actually boot into it although we're going to have to do the Beyond lfs because there's no ufi support in uh standard lfs just copy paste the commands at this point true I I I mean it's probably it's well documented it's the whole whole purpose of a lot of lfs is to have a deeper understanding on how Linux is done so I get it I make fun of it but I get it you're definitely going going here um let's see ah all right this is not the end of the story not even close the sea language is not merely a compiler it defines a standard library in the book the gnu sea Library named jblb C did I say jibb GBC is used in their alternative muscle that's how it's pronounced the library must be compiled for the lfs machine that is is using a cross compiler CC1 but the compiler itself uses an internal Library providing complex sub routines for functions not available in the syar instruction set the internal library is named lib GCC and it must be linked to the GBC library to be fully functional furthermore the standard library for GC Plus+ must also be linked to GBC the solution to this chicken and egg problem is first to build a degraded C11 based GB CCE lacking some functionality such as threads exception handling and then build GBC using the degraded compiler GBC itself is not degraded it also to build lib sdd C++ the last Library will lack some of the functionality of lib GCC did you get all that all right I I got it I was just checking to see if you got it all right let's move on the upshot of the preceding paragraph is that C+ or CC1 is unable to build in the fully functional lib CD blah blah blah blah all right continuing on all right blah blah blah blah blah I know should have read more I'm getting bored so we're going to skip through this all right Ben utils this is probably important Ben utils is installed and first us as the configure command and both GCC and lib uh GBC perform various feature functions and assembly and Linker determine the Okay blah blah blah okay bin utils installs assembler and Linker to two locations tools bin and also the TGT bin the tools in one location is hard linked to the other important factor is the Linker of its library and search order detailed information obtained by LD by passing the verbose flag for example TGT LD bbose grap search illustrate the current search pass in that order okay the next patch is install as GCC man they really just break it all down for you all right respect this is important for the reasons mentioned above it demonstrates the GCC configure script does not search the path directories and find the which tools to use however during the actual operation of GCC itself the same search paths are not necessarily used to find out the standard Linker GCC you will run uh L lfs TGT GCC D prant frog name equals ID again remove the lfs TGT prefix it's coming back later all right damn I honestly I would love a drink right now I really don't drink anymore but man I would really just kill for just big old Feer just wine or hard alcohol or pretty much anything it make this so much better anyways uh let's keep going all right sanitized the links API headers great next comes GBC and this talks about probably all the linking and stuff from before yep yep as mentioned above standard C++ library is compiled next cool native lfs compilers installed first the binutils P to is built and then other stuff and then temporary installs all right ah you like it okay when are you going to release reading the Man pages as an audio book SK I think uh this is going to be uploaded to YouTube here in about 4 days days so 4 days from now content that's what this is I think that's what somebody said in chat earlier all right caution during the development cycle of lfs the instructions in this book have often modified to adapt a package update and take advantage of new features from updated packages mixing up the instructions of different versions of lfs book can cause subtle breakages the kind of issue is generally a result of reusing the sunscript created prior PR to a prior lfs release such a reuse is strongly discouraged if you are reusing scripts for a prior lfs release for any reason you need to be very careful to update the scripts to match current version of the lfs book standards all right here are a few things you should know about building each package several packages are patched before compilation good to know during the compilation of most packages some warnings will scroll by the screen so you're going to be seeing warn a ton H all right use of C is probably egregious and everywhere so if you don't like seeing C compiled well this isn't for you check one last time that the lfs environment variable is set up properly just checked it's set up now finally two important items must be emphasized the build instructions assume the host system requirements in calling symbolic links have been set properly bash is the shell to use it's the best shell sh is the symbolic link to bash must be set up o is the symbolic link to gaw and Yak is a symbolic link to bison or a small script that executes bison here's a synopsis of the build process place all sources and patches in a directory that would be accessible from the CH route environment done change to the sources directory ah where the hell did I put the sources directory again okay we're in the sources directory okay for each package using the tar program extract the package to be built in chapter 5 and six ensure you're using lfs when extracting the package ah make sure we switch user to lfs really important important all right uh do not use any method except the tar command to extract the source code notably using cp-r command to copy the source code tree elsewhere can destroy links and timestamps in the source tree and cause the build to fail so don't use the CP command change the directory created when the P package was extracted follow instructions for building the package change back to the source directory when the build is complete delete the extracted Source directory unless instructed otherwise finally are we getting to some compilation I thought the compile time would be the thing we fall asleep to but I was wrong I'm falling asleep reading this thing all right chapter five damn we're already to chapter five rock on this chapter shows you how to build yeah we got it let's build come on build time the real stuff happens now it's 1 sbu 663 me bytes required disc space it's time to do this we're going to make the directory um one quick thing though I really I thought I was going to like the that but I it it turns out I really don't so we're going to actually change that just a hair one second I'm sorry we just we just got to fix it I thought I was going to like it but I was like like oh God I'm about to do a bunch of copy paste and that's not going to be cool all right now yeah that's going to be great all right great all right so now we got the build directory and we're in the build directory you can see we're in sources build this is where the fun happens now we prepare the bin utils for compilation compile that was a big buildup for that okay really uh uh do we need to build it as lfs oh yeah yeah yeah yeah you see nothing why doesn't sources show up here ah so oh yeah yeah okay uh we don't even have pseudo installed never mind um one second uh little bit of a false start but that's okay we first first mess up but that's okay we are almost there all right yes uh extract oh we got to extract t files okay okay so important to bin tools so bin tools is what we do first okay never mind it's okay we're just doing practice just practicing just practice all right let's uh let's just extract some bin tools yeah so this is the bin tools make directory build CD build yep all right let's just do that easy okay great done so now we prepare the bin tools great so the prep preparation tells the configure school to install the this in the tools directory uh cross compilation and all the other stuff we just read it's super important now we just do make make install okay so we just do make so there there we go quick little uh spin up of the make now did we set the parameter when we switch to lfs or we using single thread because I don't hear my system ramping up that makes me think we're using single thread okay let's just make sure um make flags H yeah no we're using 16 man we should have gave it more cores anyways make install all right so now we've installed great so we've done build uh Ben utils done next GCC so for GCC let's come back all right uh back remove our Ben utils oh man can't okay great so Ben utils done oh yes RF I make sure I do RF on the next one I know I should have done 32 all right gcc's next uh we are doing this is only 3.8 sbu standard Bill units 4.1 gigs this time around so this one's going to take a little bit longer so we're going to do mpfs GMP and MPC there are frequent misunderstandings about this chapter the procedures are the same as any other chapter as explained here first extract GCC as a tarbo and sources directory then change to the directory created only then should you proceive with the instructions below all right so now just a VCF wait no the XF xvf my mind's going guys it's going ah all right now we get GCC come back to here grab this guy copy it and now extract it all perfect Now set the default directory for the 64-bit libraries to lib all right gravy let's do that done next make the GCC documentation recommendations during the build directory all right done we're in The Bu build directory now prepare GCC for compilation uh anything here anything here no everything looks good all right bam do a quick little configure Perfect all right right now just a make and make and stall nice yeah I should have gave it more cores this would have been great if um we didn't have the cores I would have been able to really stretch this Zeon system but alas here we go no no no no it's I mean 16 is going to be slow for most residential boxes uh Zeon will probably perform double or triple especially since this is really what this processor is meant to do it's meant to just compile so this is the best case scenario now this is still virtualized if we were using my main host and we were doing it raw it would be uh a lot faster probably about triple to speed so we could definitely beat some speed runs with lfs maybe we do a speedrun of lfs on my main system after now that I kind of get the gist of it it's really not too bad um we could time make uh probably right now we're switched as the lfs user so there are some things about lfs but usually I would uh you can do time command takes do you game with this system yeah sure do why that builds here let's just uh launch into steam like most people don't realize when it comes to steam see we're only using 50% of our processor up here by the way yeah so like let's say I want to play some Fallout while we're compiling Linux from from scratch Just Launch in just not hell divers 2o yeah so then we got uh got our game uh performance is okay on Zeon zeon's not like a great gaming processor like if you're a hardcore gamer you're going to probably want like a I would say probably like an AMD 3D what is those 3DX processors from AMD those are pretty solid but like for the stuff I do I I really don't care like this is pretty good do we have any free one second I need to get my free stuff for today yeah get this where is the free what are they giving away today got to get my freebies ah free scrap CP oh that's a good one Perfect all right and then if I wanted to jump into game how we doing on her ah cool uh let's go make [Music] install I mean gcc's going pretty quick look at that pay no attention to the artifacting all right let's uh so we got GCC all right CD [Music] minus the build of GC has installed a couple internal system headers normally one of them is when H okay note the command below shows an example of a nested command substitution using back ticks I don't think we really need to do that um yeah so this is the game itself oh let's see was just playing this the other night actually and let's go [Music] down what is somebody shooting oh man the FPS is not great got to say running all this uh virtualization and then playing a game not a good idea all right any who uh that was the game you can play games just maybe not run an entire VM on the other side all right uh keep going I think GCC is fine though just double checking the command below shows an example of a nested command substitution using two methods back quotes and dollar sign parenthesis construct it could be Rewritten and using the same method with both substitutions but shown to demonstrate this is this generally the dollar sign parenthesis method is preferred so I don't to be I don't want to just blindly copy this but so it's just copying taking that out and pushing it over there okay let's uh let's do that perfect next up Linux API headers yeah actually a fun fact Carson um with hell divers 2 I think it's something with the zeeon processors and in protect so on my I went ahead and loaded this up on here with pass through and hidden VM and Hell divers 2 crashed on me again in Windows so I think it's something with my processor and Hell divers 2 just not liking Zeon processors I like oh damn okay so that that's apparently a thing all right now the link kernel needs to expose the API of the C library make Mr proper make sure there are no stale files embedded in the package now extract the visible kernel okay so let's grab Linux next oh I got to order some food the natives are getting rest restless and texting me uh texture pack don't want to ignore the life that would not be good going to get some pizza Health Food um all right bam yeah I needed barebones windows for sure if if uh I wanted to boot into it I just don't want to destroy my current windows I guess I could and do a test make uh Mr proper she said thumbs up to 5 minutes all right that's obviously whatever um all right Linux API LS Linux so it's just Linux so I guess we just extract this all right extract uh the Linux kernel and then we go make proper right okay then we do make headers find and copy so now we're doing the headers all right I didn't see you run the make install GCC did you run it I think so yeah that's there contents of the API headers blah blah blah sound headers Zen headers blah blah blah all right great we're good to go next up GC so GBC is next I know it said to I'm tired of deleting all this does it really matter it does I know it said it did but I I don't believe it nope ooh this one has a patch interesting first create a symbolic links to the lsv for reference so we need to apply the patch next so let's move GBC dasf patch into GBC oh I can't move I can't move files that's right oh are we going to run out of dis space God bless are we all right fine uh not GBC uh GCC okay just copy the old one is probably sticky okay copy should be fine then so we'll just copy that into GBC perfect okay that one took thank you chat so now we're going to do the patch command copy this um now I want to say okay yeah that does work okay hunk succeeded hunk succeeded all that looks good now we set up the build directory all all right we're in the build directory let's check our config prams and then finally configure get our Linux kernel configured all right configuration during this stage you will following warning might appear no we didn't get that warning I guess so we're just lucky we're just lucky like that all right compile the package oh I didn't even need to copy that over so yeah that's looking good and then finally make destination directory are we ready the Linux Colonel's getting compiled oh man this isn't a mess this is this is perfectly fine it's just the way I like it so beautiful I probably could go a little bit less on the well I still like the chat seeing what I'm typing in now so if lfs is not properly set despite recommendations you're building is roote the next command will screw up everything good to know I like how they put that there so we put make and now the next command is make install here we go hold on to your butts let's make it happen oh yes all right now we've got make install fix the hardcoded path to the executable loader in the ldd script ah yes the old said it's going to go through LD D switch that out for us and get that done perfect caution at this point it's impaired to stop and check that basic functions compiling linking of the new tool working expected to perform a sanity check run the following all right all right requesting interpreter lib 64 LD Linux X 8664 SO2 exactly everything is working correctly you will get this which we did perfect once all is well clean up the test file all is well all right and then we come back and now GCC or GBC is done so let's remove RF GB c39 solid and now we're to lib STD C+ plus and GCC well this is where we have to take a break guys my family will come and devour me if I don't go order food and eat so I hope you've enjoyed the first stage of this wonderful experience with Linux from scratch we're not quite done we're only to chapter 5.61 but we knew this was going to happen One does not simply just pick up Linux from scratch and install it in an hour it's just that's how things roll so we will pick up the next one starting with this chapter 5.61 uh I think we might do it later tonight I kind of want to just kind of get this done just to say we've done Linux from scratch on stream and had a good time with it I think this is fun so you know Tito it's coming your way soon I like the I like the stage one is done I mean we're I mean we're getting close to stage two it's amazing thank you all I am a little bit spent for the day but man this was a fun stream whether it was reading from the rust manual for an hour or two or doing the Linux from scratch I might chop this up into two sections for people to rewatch I think we'll do the rust manual section for stage one or part one and then I'll probably do another one one because this ended up being a 4 and 1 half hour stream I had no idea I was just having so much fun towards the end on links from scratch that I didn't realize it went so long so I will I'll split this up in two parts first one's going to be the Rust part and then the second one's going to be Linux from scratch cuz I think that has two different audiences and that's just a lot of fun all right so I probably once this one comes out I usually space them out every other day I might actually just do every day because this is going to be another stream this weekend to finish up so later all until part two all right I've been dreading coming back on this stream I said I'd come back that night so long ago on last Thursday when we did Linux from scratch and started the install it's haunted my dreams ever since and here we are Linux from scratch I've totally forgotten everything thing we uh I checked the VOD just to make sure to see where we were we're at 5.6 in the build process we'll continue Linux from scratch today not looking forward to it but should be entertaining nonetheless we'll have to reset up the environment as I had to shut down the virtual machine all right we're going to resume the Linux from scratch I think it's safe to say based on everything here it just doesn't matter what we put in this poll if Linux and scratch is there people want Linux from scratch so that's what we're going to do all right you are the directors of this stream uh let's Echo make flags oh okay well let's go 16 so we got j16 for our make flags what else we got uh bash RC okay fine then I think we still so we we already did this once but we got to re set up everything uh I think there was lfs we already set up and did the user ad and group AD and then we want to switch to lfs but we also need to set up the lfs variable so what does that look like make directory we already did that already did the tools so okay Linux from scratch I think yeah it's mainly just a trolling you know on that I get it you know it's fun it's all good ezz thanks for the sub man new subscriber all right glad to have you with us let's go home where are our setup the the thing is you have to build this a specific way setting the lfs variable so we have to export this like so CU if we get any of these builds wrong it's not good so we have lfs right like that and then if we do like EXO uh Echo lfs you'll see it's an MNT I just chopped off lfs I didn't think there's a really a point doing two sub directories we already did this or the mounting of the drives now and we weren't doing a swap either and then packages okay perfect all right let's go full screen um so we have lfs set up we have that I felt like there was another thing for the build Suite so I think we're around right here 56 so we did 55 now let's go 56 and I think this is where we stopped during this build so we're going to we're on to lib STD C++ so if we do a LS um we need lib oh man this going to take a minute it going to take a minute h now look at this GCC pass one okay we had to defer its install because we needed to build GCC we already built GCC and now we just do this library but I don't see uh switch user lfs switch user lfs all right this is wrong too I think we got to do a CH rout we're missing root lfs what was that do we I don't think no no no I don't think we do c rout yet we're not there okay Chris would you install uh would you install for super light web development workstation de Window Manager witch thanks for reading uh uh eie I would probably do a window manager just because that's what I'm really comfortable with these days and desktop environments are just really big and there's just so many moving parts to them so there's a lot lot more to go wrong that's why I really like window managers it's just very minimal and they just work pretty well and uh yeah that's that's why I almost everything I do now is I just like hey let me just toss a window manager in here so then I can just kind of flip around and then I'm good so that's my thought on that all right so yeah let's just do switch user lfs I think we can build it just like this I can't remember when we were doing the setup but I feel like that was okay let me look at all this so these root and huh so the thing is we don't have le lib C++ here is kind of odd we do have Linux Force Linux DW works pretty well you break my heart hey it works incredibly well that's so true well there's nothing to break it's just one binary file so that's the nice part it either builds or it doesn't so that's what I love about dwm even on bare installs like this it's still nice all right so okay so GCC do we have GCC I think it's the GCC 132 okay so let's go tar xvf GCC I guess we didn't build GCC last time so let's extract GCC and we're back so we've set up our environment variables we're going to do just like a CD and make directory build like so and then we're in the build directory then we should be able to go ahead and compile such as this so we'll just do the check and compile oh I could just do SSH that's true just just Linux user that might be a little bit easier for building this Ah that's the way to do the build just SSH into the environment and then do it I like that uh all right well let's finish this these instructions so we got the make and then we got the make install so let's do a make yeah I mean when we built a Linux in here it actually wasn't too bad it was surprisingly easy did not take long to build all this stuff all right remove the cross compilation uh the lib tool archive files because they can they're harmful for cross compiles okay so we'll remove those Perfect all right now up next so chapter 5 is done now we're on to chapter six cross compiling tipay tools all right let's uh RF GCC now before we start chapter six I do really like the idea of just doing uh SSH uh let's exit Pacman uh is it sshd what is it on Arch for SSH I rarely set up S on Arch tiny SSH no no open SSH that's it all right so now we got open SSH going um let's go with system CTL enable SSH service Dash Das now so we'll start that SSH service let's go into Etc go SSH all right let's Vim sshd config we got our authorized keys and then we're just going to make the super insecure password authentication yes system CTL restart SSH done all right so then let's exit out of this and and can I get the top menu screen come on I need to set up a hotkey for this I think it's a control alt it's in here somewhere it's in here somewhere come on give me that menu any second now it's going to happen all right what the hell come on all right uh we'll just close it I was like ah we'll just kill it it's fine so let's just SSH um let's grab what was the IP let's go into our Nick 122 SSH Titus I think we can actually just rout oh no I think it was Titus right yes okay Arch server 122 okay cool MNT we're at sources LSB okay all right perfect so now we're thank you for mentioning just s shn uh just Linux user I appreciate that password off doesn't make you any less secure than token off I mean it's a layering a bit you you want to use both password and token with keys frankly you really shouldn't expose Port 22 to the external World anyway so uh who does that right change the prompt color in VM really what's the prompt color what's wrong with my prompt why do you have to change the color oh yeah Richard um if you're looking for that let's here I'll just send it to you here you go Richard if if you want uh the fast fetch it's there for the config uh obviously change like the logo and stuff like that yeah you're appreciate it man uh let's see anything to avoid switching doing this all right so now we're here let's make sure we're mounted everything let's go into MNT sources do you ever use syntax light highlighting in uh terminal yeah sometimes burrito just depends does window util work on wind server uh Peter I probably wouldn't run it on Windows Server it probably it probably would work but Windows server is a little bit of a different animal and not something I probably would be doing all that with specifically the service optimizations I could totally see screwing stuff up Greg thanks for the Prime oh because you'll get confused and kill your system well hopefully not but I that's a risk I'm willing to take think of the entertainment value killing my system gives the whole reason for doing Linux from scratch uh all right so we have this so now let's let's pull up Linux from scratch over here Linux from scratch and we're going to just come back into lfs going go read online and we're going to go stable system D we're on to chap six this chapter is how we cross compile basic utilities and build a cross tool chain utilities are installed on their file location and cannot be used yet Basics task still rely on the host tools nevertheless installed libraries are used when linking great all right cool so first up installation of M4 let's uh get it so M4 is next XV F M4 M4 and this one we're actually not doing a build we're just doing a configure so we'll configure M4 I'm not leaving till Chris kills the system well that's not saying much might just wait 5 minutes and we'll get there all right so we got our configuration now we just do a make make install so we go make and then while that's making we're going to just grab this now technically I think we could just change the destination directory and manually do this feel like making an alias for this I'm tired of typing it all right so now we did that m4's in M4 all right on to the next now we go in curses yes in curses uh you know I think we have the extract command now because we changed the bash prompt here let's see if this works switch it up a little bit Ah extract isn't there is it ah well it was a good thought we'll just do it the old school way all right CD into in curses and then we're gonna first do said we're going to be changing and substituting out mock with nothing basically just erasing M awk ensure that gawk is found first during the configuration okay so M mock should that say gawk I feel like that's a typo shouldn't it be gawk wow thanks Peter I merge request just to add a show help function cool not a typo okay uh gawk is the ganoe okay oh never mind we shall not run that command I don't want to ah just looked like a typo to me all right paste that in configure and then we got this once we switch to the build all right so now we're building in curses we'll do the make and then these the meaning of this install tick path we need to pass the newly built tick program onto the build machine then we got lip curses s SW uhhuh said uh going to match if. star open substitute with if okay cool nice all right oops should have done a make before this oops that's okay we'll just go make we'll just run it again sure it's fine all righty good stuff although it does say fail to create symbolic link user in curses file exist Ah that's okay all right on to the next bash let's grab that born a new born again shell is what bash stands for I didn't know that learned something new cool all right all right curses it would suck to do all this and then just get to the end and be like oh yeah you did it wrong uh I mean technically that that probably will happen it is Linux from scratch and I think that feels like the Linux from scratch experience make snapshots if you have better FS well I got time shift so we're we're solid on this regardless always have your your backups I agree they it saved our bacon like when we did the whole like basite um side side project where we kind of installed basite and tried to do like the pass through we actually did did all that it worked pretty darn well I was like oh man that that was surprisingly uh a good good project I didn't anticipate liking baz that as much as I did but I say all that because we did have like an old time shift from the arch we had to like rebuild it and like change the U ID and few other things but it wasn't bad all right core utils is next guys we're jamming right through it how much I kind of get the gist of this now I just don't understand what's the I mean they kind of get the purpose of Linux from scratch but it's I guess it's just because you can just like do it all yourself which is kind of nice just just my thought process do you have time shift inside the VM no uh for the VM we could just do a a snapshot so if you're unfamiliar with uh like using qmu you can come into here and let's say you're like hey I want to take a snapshot from here you can actually I want to say snapshots and then you can just add snapshot one finish uh operation not support internal snapshot of VM with P flash based firmware are not supported oops anywh who I don't feel like trouble shooting this right now but the qmu and invert vert manager has a built-in snapshot capability and you can just use that worked pretty well what was my last command I ran AIG so let's do a make if this fails I blame chat for distracting me it's all chat's fault start hedging my bets all right so fix that bam core utils in diff utils it's YouTube chat's fault uh that's awesome oh okay Jennifer Jones actually said in YouTube chat should be Gro Stranger in Strange Land reference interesting all right next up is diffutils all right remove ourf core yous and get our diff utils and then we're going to do a configure I feel like just totally making the uh I can't use that right now so if you screw up lfs you'll have to start from scratch eh oh well it's not going to be the end of the world having to start all this over I think I would probably um just do like a whole script and just script the entire uh thing like there's so much repetition with lfs especially this I get why they do it like this because you're supposed to be reading and like fully comprehending each command you're running and then they break down what each part of the configure command does it's it's really cool from a build experience and that's why they do it this way but you could technically I'd probably just do a bash script and call it call it a day yeah just just my my two cents um did I finish all that I felt like there was something else after that no there isn't all right is there's just so much just like moving around in here that you're just like oh more of it I it's not bad though if you screw it up you're going to have to do install gentu uh gentu is actually got binaries now so gentu is not as bad as it once was where everything's compiled they actually started hosting binaries so I guess you you almost have to go Linux from scratch now to be considered a true neck beard Gen 2 is just not not the the mountain it once was did I hit that uh oh oh no the lfs TGT uhoh oh no we got it okay no we're good oh good I was worried there for a second I was like oh no we missed up the L lfs TGT but no we didn't we're we're all good uh nothing huh okay so that's made copy then we have some Sim links I think it needs to remove oh it just wants to get rid of this lid magic okay next up is find you tills all right configure this guy when I run in rare occasions I tend to make long steps therefore less movement requirements okay all right so this was the config then we just do a make right then we do the make install all right we got find utils done moving on to gawk all right and for gawk we got to do a said with a replace it looks like substitute that out and then we're just going to configure this then we got to make and then make install again you can skip make and just do make install thanks man I was thinking that same thing I guess the make can help with like some error messages but I I'm usually pretty good at spotting those all right all right we got a gawk next up is going to be grep dude I love me some gra grep man couldn't live without that uh actually I think yeah XV gret oops there we go r ah nope let's do our configure man these config commands are kind of wild I guess because of the Cross compile yeah I don't know I'm reading your chat there Peter I think uh maybe maybe one day one day I might get there I guess I just I'm just a busy guy so now we got gzip for the next one all right T xvf and gzip gzip all right configure force him to learn rust well I'm holding you guys to it we'll see yeah configure that help I really love the TLD drr command so like if you're just getting into it I just absolutely adore tldr it just gives so many like really good examples H so nice all right funny thanks for the sub man new subscriber all right lots of new subs today got like three people that are first time subbing good to see you guys love it all right all I had to do was just do a Linux from scratch that's what everybody was waiting on they were just waiting for me to do Linux from scratch all right the patch command we'll be using that right all right make proton all right thank you for the prime good sir all right um so we have our config now let's just do our make install question for chat and cryst how many people in reality actually use terminal knowing what commands they input Pace do o probably like 5% SM you know that's a uh for me yeah probably about I I'm probably around 70 or 80% of the commands I type in I'm pretty familiar with some of them like I say 70 or 80% because there sometimes I use options that aren't quite like I know exactly what it does but I got a gist of it so that's kind of like my thought process behind it nsz thanks for the sub all right so we got patch going we got this going all right now we got our make install CD dot dot remove patch all right y focus focus you got this we're getting towards the end we're getting towards the end here the end of the chapter so now s's turn I think most of these config commands are are pretty repetitive at this point yeah all right so now we're getting said going now do our config I kind of feel like just doing a bang M well I know that's a little dicey did it through the right command I was feeling feeling like living on the edge yes it did I was like I'm tired of typing all this in I think probably most the people that fail lfs just get lost probably in there and then they end up missing one command and then that's it then it's game over all right now we got tar all right yeah this is the first lfs install I've ever done you could untar all of them the problem is we might run out of space because you got to compile and do that that's why it's a little tedious doing it this way but it kind of is a good check and balance I'm taking a couple shortcuts here because well frankly I just want to get done but and get to the point where we actually try it out I don't want to leave the stream with like still a whole bunch of packages left XZ oh the infamous XZ guys uh this one actually requires a little bit different of a config command well let's not do that and then we got to remove this archive tool all right getting close build utils pass two here we go now we go into B utils to four okay so now let's go tar xpf B utils interesting so we're doing a second pass on Ben utils then we got the make directory build change directory into it okay and then config now we already built Ben toodles once so this is kind of an interesting uh interesting change cool though that's wrong W what happened there let's just do a make real fast and see well yeah I didn't do the right thing I'm going to try and do a make and then we'll do a make install yeah I don't think it did the correct command that's okay we'll just do uh the make install again uh it should be D Dr so it's it's an actual portion of it's a variable in make so you wouldn't use the dollar sign because it's not a it's not a it's not a user variable it's it's just part of make so you're saying hey destination directory equals this variable which is lfs so now if we do make Des okay yeah we're good that one it took that time but see I'm reading I'm reading not just I'm not just copy pasting everything just mostly uh all right let's get out of here and as the first build of GCC well all right we're doing a pass okay unpack and tarball them and required directories so let's uh xbf GCC we'll see how well I can read though oh jeez all right so then it says that there's these inside of GCC let's see okay yes they are inside so now we are building 64 change the directory for these to lib okay then we're going to do a set changing thread header in the make file then finally we go into our build directory make and build and then we got our full configuration all right so now we have we have that we'll do a make and then our make install and then we're actually creating a link for once instead of destroying one that's exciting H yeah the nice thing is the Zeon processor I've only allocated about 16 cores to this thing and it just chews right through links from scratch because when we did the full compile of the Linux kernel it took three or four minutes it was not bad where some people have like taken days to build the Linux kernel so this system is really good for Linux from scratch as Mo most Linux from scratch installs would be just a giant snor Fest where this one you know we're turning through it at a pretty good clip yeah I'll remove the B utils folder I forgot I didn't really forget I looked at it I was like ah maybe we'll come back to it we'll get rid of GCC and Ben utils after this though this one's actually turning taking a little bit too yeah you can actually see our uh our processor Peg that 50 if I had to rebuild the test environment again I probably would go ahead and switch it out to probably like 80% of my cores available so probably like 26 or 28 cores instead just to make it a little bit faster can you tell me what happened to the RTX 7800 yeah ah uh the 7800 I moved to my inside Windows PC and it's great for gaming like the 7800 XT is a fantastic F ftic gaming GPU and all I really do on that one's game it has some resolve but resolve uh and it works pretty good on resolve I think I don't do a lot of work in there except for maybe these streams I like to chop up inside I'll probably do that later tonight so I'll let you know on the 7800 XT Windows based usage but overall the 4070 has been a champ I i' I've this past day I've I've I've traded in team red for Team Green sad yeah right now we're doing a j16 it's for the for the make so this should be 16 threads instead of eight threads now I don't see our processor going did this finish h no not yet oh yeah yeah that was the thing too you guys remember how Hell divers 2 just kept failing over and over it actually works now this was so strange to me so um here let's just launch steam we'll just show it why it's doing that make I think it was oh it's still building um close out of that so here's our Steam and then let's hit hell divers too now for the actual options this is the options I'm running just mango HUD game mode run and then it's just the dash dash used use uh use D3 d11 right so nothing crazy here just basic options yeah I'm running the build environment for Linux from scratch in a VM so we can see that it's still building probably shouldn't run this while building Linux from scratch but it's fine it'll be okay [Laughter] entertainment uh it could be from Linux 6.9 it works true the problem is I tried all this before this and it was not good so when I say the Nvidia is working a lot better for me I mean it's working a lot better like a lot better I did not remove the other Nvidia GPU you can pass through multiple Nvidia cards the thing is you can't pass through multiple Nvidia cards that are the same so you're how pass through works is you're specifying the hardware ID so if the hardware IDs match or are very similar you're going to run into a bad time but that was like a 1660 so a very old GPU I was passing through to my windows box and because I do most of my gaming obviously just in Linux most of the games I play these days I'm playing a ton of Fallout 76 um maybe some other like Bethesda type games but um there's nothing I play that I can't just play on Linux I'm trying to think of something that I would maybe like EverQuest like back in the day I I still love pulling up EverQuest from time to time and that's pretty good but uh yeah the rest of it's fine and things just work better I don't know I don't know what the deal is like I said I I've been a shill for AMD for like the past four years I'm like like hey if you're in Linux use an AMD card and here we are just popped in a a 4070 and dude it it works really well like look just capped 60 capped smooth as butter oh my gosh see like you got to love that how awesome is that anyways back to our build did we do a make on that yeah that was a make let's do our make install so yeah I mean it's so good this is not Nvidia open driver this is just the closed source dkms and like when we're doing this like check this out guys this is the Zen kernel like using custom kernels with like a dkm module in the past was a nightmare that's no longer a thing at least from what I could see or maybe I've just gotten more knowledge since the last time I tried it but regardless just make sure whatever you're using custom kernel or not you got your headers right you got your Linux Dash headers for whatever kernel you're using then you just install Nvidia D dkms that's it you're done install your card reboot it just boots right in that's the only configuration I did when I slammed in the 4070 super and it just took and I've had zero problems with resolve with games with everything and I'm like dude this when I say it's working really well for me I mean it's working really well for me uh so yeah and you don't necessarily need to use Nvidia dkms you could just use standard standard Nvidia it would work great too I if you were just on stock colonel which most people will be on stock kernel there's not really a reason to use Zen I just wanted to be different all right so we got that so we got our link done now let's uh remove RF we're going to go GCC and was it bin utils yeah I think it was binutils as well so let's get rid of GCC and Ben utils all right chapter 7 entering tro and building additional temporary tools let's let's get it it's about to enter phase two of the Linux from scratch install changing ownership all right now we change ownership of this to root all right currently the whole directory hierarchy in lfs is owned by the user lfs this exists only on the host system if directories of the fil are blah blah blah if they're kept as they are user ID without corresponding account this is dangerous because the user created they later blah blah blah could do stuff manipulation all right cool to address this change the ownership of all of these to rout all right uh all right so now uh oops did I just do that on my home system oh um I'm sure it's fine no no no we're fine so luckily my incompetence kept uh kept me out of trouble there because we're still on our main system not on our main system we're still on the other system uh we just like equals T the thing about that that I'm like uh okay yeah we're fine slight hiccup um let's just Echo lfs one second here all right now we're good all right now we're cooking ah monk yeah you're about to see some beautiful beautiful things happen here so we got our directories all right and then we're going to bind these directories bind them mold them yes then we shall Mount them uh oops out oops my bad a little bit a little bit overzealous there on the copy paste all right there we go so now we got our mounts we're looking good now change that and temporary mounted the shim entering the CH route all right the Moment of Truth can we tro into it lfs tro time h do we not have uh b h oh hell divers too Zed uh no you can run in a VM uh there's also ways to trick the VM to make sure uh it's in bare metal as well so you can just do hell divers to one you can you can emulate it directly on your you can just do it right on your main machine in Linux or if you wanted to do it through a VM you can modify your uh XML for your VM to hide that a fact it's a VM you don't necessarily always want to do this I would set up like a script to take it on and off Hikari Knight's done this a whole bunch and that's uh that that method works but you do lose a little bit of performance when you hide it as a VM because there's some optimizations that happen uh so Thor probably just hadn't seen that before yeah Thor's great though I love Thor he's amazing dude all right user bin environment is not there why is that not there user bin EnV it's there all right well H CH rout H so for this we're on Route on the art server we're in MNT so your CH rooting into MNT why it doesn't I like that yeah let's check if it's a surely it does e NV yeah it's there that's what I thought and then if you LS user bin over here you got EnV over here and just to double check this even more let's grab EnV it is executable too so why why does it not like it which source package contains EnV I want to say that uh well big liner I think that's H I want to say that was like the Linux package that's pretty hor of the system um maybe we need to be as the lfs user possibly we can try it yeah I didn't think so yeah I'm pretty sure we have to be root doesn't make any sense to run it as a secondary user because if you're CH rooting into something you need to be at the highest elevation maybe I did something when I Was preparing it it did Mount oh I did Mount stuff twice yes that's what it did it I bet you let's just go uh LS user bin well no that looks right how's lfs going about as well you think it would be yeah Ron doing that would have worked if I actually mounted it there but I actually mounted lfs directly to the MNT I so the actual official directories seeing if there's anything in there uh that variable though I set set to that so H all right let's Google it Google it let's just double check I think when we yeah let's just go here okay there it is you know did you Echo lfs and make sure there's actually something there yeah MNT yeah well I didn't do MNT I should have probably done that just to keep the same as directions but it's fine it's mentioned in this thread posted after I post this one the issue was the Sim links not being made properly I've redone up to CH route and has worked thus far so for the Sim links and lfs is mounted right yes okay what is lfs Dev and LS Brock is they're virtually mounted okay LS Dev LS proc yeah those are all good and populated yeah we got through all the the churning portion of it so that's good proper environment variable set lfs is mounted virtual systems mounted according to the guide yes similar problem feel like there's like an environment variable I didn't set though because we had to relaunch everything and me not leaving the system running I regret shutting it down I'm pretty sure I didn't set something up correctly when I relaunched it probably in this chapter 55 the links Sim links not made properly let's go back to 55 take a look we can redo has been resolved took you two to three hours oh my gosh that is patience of a saint we we ain't doing two or three hours of rebuilding this crap all right go 55 let's find those symlinks let's rerun it um cross comp piling setting up the environment 5.51 okay let's go no GCC nope API headers I still don't see any seam links in here 5.5 G okay here we go this is it additionally create symbolic for GB GBC okay let's switch user lfs let go into sources and that was GBC GBC now we have all of that we should be able to do the proper links here you know what let's Echo lfs okay that's permission denied okay interesting sudo it no that's terrible okay all right um D if I do pseudo it's going to set the permissions incorrectly that's a problem let's see what what what does the internet have to say about this no be's root and force it that's great um let's try Linux from scratch same garbage oh my gosh the days of actually getting something good here I think is kind of over uh failed to create symbolic link on G install okay it's not a link da my guess is the area you're not having it is lfs lib 64 crated first oh okay damn okay let's see what's in lfs lib 64 first really nothing nothing huh lib 64 H lib 64 is root oh when we did the CH own we're not able to do it ah that that makes sense actually so to fix this SN uh this link what we could do CH own lfs lib Liv 64 uh 64 actually let's take a look at that uh that makes sense to me okay no um we're back we're back we're fine so we got that and then 64 so what we're going to do is CH own lfs to lib and lib 64 and then we do that um on the lib let's do that recursively recursive and don't worry we're going to fix this we're going to fix this I'm not going back and redoing all this crap it's not happening I'll do a th pull-ups before we do that so now what we're going to do switch user to lfs go to sources again see GB C now we're in G Li C right bam now we can establish these links again perfect no error that time now with those errors in let's go home let's come back into the cleanup portion was right at the introduction I think and then changing the ownership of all these see we just ran these commands and what we're doing is we're just changing the ownership so when we come back into M MNT and we change the ownership well let's exit change the ownership back now we're back to rout everywhere which is fine and now we should be able to get into the CH rout environment easy Victory we're in we've Tred in Victory Is Ours easy you had doubts I quelled those doubts done Tred Now The Bash promp will say I have no name this is normal because there's no etcp all right continuing on oh on our way to Conquest there we go all right create our directories and do some clean up here create our subdirectories from the root level ooh cancel let's see what do we got did I fat finger that ah The Taste the text contains terminal control codes if a terminal programming pasting it does not properly sanitize the paste to text this can lead to code execution vulnerabilities how would you like to proceed interesting I've never seen this when pasting code into it do we sanitize or do we paste paste anyways right paste anyways I like it live on the edge sanitization no not in this house all right that's good all right the directory tree blah blah blah file system hierarchy standard such as that in lfs we create only directories that are really necessary however feel free to create more directories if you wish all right creating the essential files now we're making the mtab interesting and then we create our host file which not familiar paste anyways is so interesting I've never seen that done before let's just cat Etc host I'm just worried that kitty is sanitizing something it shouldn't no looks good now we got our password file what the heck is that so strange it just started doing that today I've never had it do that at any point in life huh maybe because it's SSH that kind of makes sense any thoughts on setting up zavix or graph on Linux in a stream uh you know graph zavix I mean definitely interesting projects but it's been a while since I've I've set up stuff like that there's up to time Kuma as well and some other ones that I've looked at uh I'm kind of old school in the system monitor type thing so a lot of times it's SSH it's always SSH Peter uh uh a lot of times though I'm kind of a naos fan from way back in the day probably no one even knows naos these days or nagios or however the heck you say it I've always called it naos sounds cool it's like nachos naos just rolls off the tongue but I don't even know if that's around anymore it's not popular on YouTube anymore but you saw it in business like 10 years ago quite often it's the open- source standard in monitoring used by UPS BP Apple Bose Phillips anyways they have a Community Edition I remember using and I had to like program and create plugins for it was cool and it worked it was kind of cumbersome but it did it did the job it's pronounced naos hey that's how I like it uh but yeah no I don't really have anything for like direct monitoring because I mean everything's in this room and there's it's really not like I I mean this sounds kind of like I don't really go anywhere so it's like oh things are down let me go run over there and just press the power button it's not like I'm away anywhere so it's like eh although I would like some like histo or historics or um historical data of of what's going on with like internet that type of thing there's some that's reped to by some of the UniFi stuff I have that's okay it's like very rudimentary so yeah just my thoughts Kitty have an input lag on your system uh maybe maybe it is maybe if I had alacrity it wouldn't wouldn't be that way atas here we are all right now we grab the groups file feel like we should just like w get all this stuff just just my two cents all right creating all the groups now we're echoing tester really okay we're to delete this account at the end of the okay like I don't want my username to be tester but that's fine now we execute bash login now we are rout oh creating some VAR log files and such all righty that looks good and now we got G text installation of G text o interesting so now that we're moving moving on to chapter the late in chapter 7 we've done all this as route all right and this is setting up this but we still have like log in and Getty to do not already exist initially as log files whatever yeah we really cares about that right now huh so for this do we switch from route to lfs again I guess since we're CH route it doesn't matter so technically you should just be able to go sources oh let me think about this screw up on something else yeah no we're fine we're fine we're just going to we're going to do it as root and that's totally okay get text CD get text because now we're in phase two so running as route is okay and then we do the configure notice how the configure is kind of chop down you're no longer having to specify like destination directory and those types of things because we're CH rooted in yeah there is no lfs user to go to as well so we're officially in our Linux from scratch install we've accomplished the impossible so then we'll do a make and then we'll install MSG fmt message merge and then get text programs into the USR bin that's an interesting way of doing it I wonder why they're not using make install here yeah make install usually puts it in USR bin probably some reason probably something with the cross compile now I can silly say I'll use links from scratch yeah just doesn't have the same ring to it as an arch I'm an arch user although you could do uh I think Beyond Linux from scratches the next uh next next go here now that was the config so now we do the make this should make our binaries and then we'll should be able to copy those binaries over to our USR bin the name is a lie I never tried doing it but it feels like Linux from another Linux with packages provided to be built where my shims and provisioning you know you're not wrong I I think Linux from scratch is pretty much there's one guy that did it pretty much just like took all the packages that are needed the bare minimum and kind of said okay here's all the packages and then let's use said and kind of like strip about some of the things that make it not work and then like package it back together and go okay here we go this works so I mean I really appreciate it I think it's cool but I agree with you it's not really from scratch because you're still grabbing everything from official sources it's cool and I'm I'm glad someone's doing this would I ever run my main system as Linux from scratch no like why I I I think it's it's really a good learning experience it's cool but I don't know I mean why wouldn't you just use debban or Arch I guess in case they go Rogue and start doing something silly you're like okay at least I can do it from scratch which is good but I don't know I I feel like if you're doing like your new like if you're making a new Linux distribution you need to get in here and do this if you're just doing like another like Ubuntu or Debian spin I really don't care about that project worthless distri distribution is what I say there's you know just it's just a script at that point it could it could just be Debian with a script I think that's like 95% of the dros out there it's like arch with the script Debian with the script that's pretty much what all those distros are doing there's some Nuance to that but not very much really those two dros like encapsulate most of Linux desktop all right let's copy these and bison is next bison all right all right so we copied those out let's just how how are we doing on our space By the way plenty of space to spare 14 gigs all right bison all right and now we do our configuration of Bison oh my word what in the world is up with that I got to figure out something with SSH and kitty it has some kind of weird fail safe that's annoying new question what Dro is Linux from scratch like its name what what is its package manager Omega it doesn't have a package manager it's using it's it's actually a really good question it's literally just using the Linux kernel and then some of the tool sets that are used to like make packages the thing that drives me crazy about like online Linux users is people think like their distribution actually matters like yeah to an extent makes your life simpler to do stuff but at the end of the day it's all sitting on top of like usually it's it's Linux the Linux kernel then you have like the init system which is usually system D which is made by red hat which initializes most of the system components and then on top of system D you're going to have uh probably like some GLE tool sets like GCC right that's what's used to build C programs and then you might have like Python and other stuff but these are the things that make up the system the drro doesn't do really anything all all the dro is is like an a collection of stuff and it's just picking those pieces out for you so what Linux from scratch essentially is is it's just the Linux kernel with just a little few packages needed to make programs and compile programs so then you can make the most minimal system possible that's really the what's cool about from Linux from scratch and that's all this is It's not like this crazy thing and I think a lot lot of people think oh I have to do a buntu or I have to be an arch user or I have to be a gintu user you know pick your poison Red Hat Fedora they all have their nuances but all it is fundamentally almost all of them now I can tell you the parts you have the Linux kernel that's there right you have system D almost everything I just named Debian Arch Red Hat they all use system D for the init system so those two components really don't change and then you have like the ganu tool set on top of it so almost all the gnu stuff is like GCC and those types of things that doesn't really change so almost all of them have that so really then you're like okay so what's the differences between the distributions not a whole lot you got package managers but honestly you don't even need to use repositories or package managers you could straight up just build everything no matter what Linux you're on what distribution you could literally just download The Source make it put it in USR bin run it that's awesome totally awesome yes okay so that's that's so cool that's just so that's why I kind of get worked up a little bit about it I'm like ah you know so we just make bison make install so what we're doing right now is we don't have a package manager and we just made bison we made GCC we just made all these it it's just it's uh it's one of those things I love it though I mean it's cool like lynux from scratch is neat because it teaches you some of that it teaches you kind of what comprises that Linux thing that's why I was like I need to make a a more in-depth video and it's it's and get back into doing that type of thing because too many people get confused and go I have to be on pop Os or Ubuntu or Debian or you know those things I'm like you know that's all pretty much the same hell Debian Ubuntu poos Elementary Linux Mint every single one I just named from the distributions use the same package manager essentially they're damn near the same thing just a couple little system variables are changed between them and some of them like Ubuntu uses a little bit different kernel sometimes it has like a few extra features like live patch it kind of you can get in the Weeds on this stuff there's little nuances between them but to say they're fundamentally different is just a lie they are very similar okay sorry get off my soap box now I'm exhausted I think uh that was that was good I think we made a lot of progress on Old Linux from scratch we're at 7.8 or actually we're up to Pearl 7.9 um if we look here we're right here on our packages we are almost done done just a just a few more things to build there maybe we'll get there pretty soon I did finish bison now we're at Pearl and then Python and then Tex so to address someone earlier too if this was a package manager like say you're on Debian and you wanted to do all this everything we just spent like an hour doing it'd take you 30 seconds to a minute you would just go ask install and then just paste all the packages we just had and then it would just install everything we just did for the past hour that's kind of cool right that's the whole purpose of a package manager but having said that guys we're going to shut it down for today uh we're we're officially seven and a half chapters into Linux from scratch I got to say it's it's it's going pretty well so far I love it all right y'all hope you have a fantastic evening I will be seeing you guys here on Thursday uh and we'll we'll see if we continue I don't know we'll take another poll you guys just love to see Linux from scratch bunch of weirdos all right peace all
Info
Channel: Titus Tech Talk
Views: 97,989
Rating: undefined out of 5
Keywords:
Id: oV541sgHKGo
Channel Id: undefined
Length: 155min 42sec (9342 seconds)
Published: Tue May 28 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.