A Base Gentoo Installation

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
today i'm going to be running through an installation of gentoo i did a gen 2 installation video probably about three or four years ago and i haven't actually installed gentoo myself personally on any of my equipment probably in nearly two years probably so it's been a while for me so today i wanted to actually do a gen 2 installation and record it on camera for you guys because i have been getting people asking me to do this kind of video and i think a lot of people are asking about it because they're curious about the install process for gen 2 many people have this misconception that the gen 2 installation process is really really hard really really difficult and it's actually not hard at all those of you if you've ever installed arch linux for example you know the arch install and the gentoo installation process are practically the same you do a lot of the same commands the only difference is some of these commands once they have to execute take a lot longer in gen 2 right especially installing software because gentoo is not a binary distribution like arch linux and most other linux distributions that you guys know about gen2 is a source based distribution so when it's installing software it has to compile the software and that takes a long time the installation process for gen 2 can take a few hours it could even take a couple of days on really old hardware so it's lengthy the process of installing gentoo but it's really not hard at all now i do have to consider that gentoo you know to install it in a timely fashion so it doesn't take all day you know i need to do it on a machine that has some beefy specs the only machine that i have that's halfway decent as far as the specs on it is my main production workstation here at this desk the only problem is that you know recording video and editing video and streaming and things like that you know doing this kind of work that i do on this youtube channel also requires a beefy machine and i again i only have the one machine so i can't install gentoo on this machine and also record it using this machine so what i'm going to have to do today is i'm going to install gentoo inside a virtual machine but don't worry every time i do one of these arch installs or gen 2 installs inside a virtual machine i get people asking hey man could you do it on real hardware because they think the process is different the process the commands you enter are exactly the same so don't worry that i'm doing this in a virtual machine the installation process i promise you is exactly the same i've installed gen 2 on physical hardware just like i'm going to install it inside a virtual machine i've installed arch you know in in virtual machines and on physical hardware the commands i enter are exactly the same you guys if this is your first time installing gen 2 i also strongly suggest installing it in a virtual machine first you know installing it in something like virtualbox just to practice before you actually try to do it like on a main production machine because you may screw up right and because the installation process is such a lengthy process it's better to practice a few times in a virtual machine before you actually you know format the drive on your main production machine and then you know you mess up the installation process two or three times and you're without a computer for a couple of days so do this inside of virtual machine if this is your first gen 2 installation so let's go ahead and get started the very first thing you want to do is you want to pull up the gen 2 handbook so the handbook is basically your installation guide the installation guide first of all the very first thing you want to do is select your cpu architecture from almost everybody that's going to be amd64 that's your standard x86 64 processor there were other architectures available such as arm they even had a risk 5 and there's even some old power pc stuff there but for most people what you want to do is get the gen 2 amd 64 handbook so let's go ahead and get into the installation installing gentoo now some of this i'm going to skip because some of it is covering really basic stuff like the very first chapter here about the gen 2 linux installation that introduces you to you know some of what you're about to get into with installing gen 2 i'm not going to bother reading that if you guys want to read it go ahead and check that out choosing the right installation medium i'm not going to cover this either this is you know how are you actually going to install it i'm telling you right now i'm going to go grab one of the isos from the gen 2 downloads page i'm going to grab a stage 3 iso that's what most gen 2 users probably do is a stage 3 installation this page here also covers how to verify the iso as far as checking the checksum i'm not going to do that here on camera also i'm not going to cover how to burn the iso to a usb stick i hope you guys know how to download an iso and burn it to a usb stick if if that seems like you you need help with that then please just stop with the gen 2 installation right now you're not you're not ready for it the next chapter is configuring the network now i will open this just in case i need it we may not need it but this is for setting up the network the ethernet connection i'm going to be on a wired connection i know some of you guys are probably going to do this on a laptop you're going to need wi-fi understand that i'm going to install gentoo for my machine so i'm going to do you know certain things that maybe aren't going to be what you need on your particular hardware just understand that don't copy me you know if you're doing this on a virtual machine it's fine to do exactly what i do if you're doing this on physical hardware then some of the commands i enter you need to enter different commands so don't blindly follow this video actually read the handbook and make sure you're doing what you need to do for your particular hardware now let me switch over to my desktop this is the virtual machine i created i gave this vm of six threads of my 24 thread thread ripper so that's plenty for the vm to work with it should install gen 2 rather quickly for us i gave it 12 gigs of ram typically what you want is however many cpus you give a vm you want to give it twice that much of ram and let me go ahead and start the vm and we get a boot prompt if i don't do anything it's going to try to boot off the disk and we haven't installed anything so there's nothing to actually boot into so i'm just going to hit enter and we get into a tty prompt essentially a live environment it's just a tty prompt first we need to load the key map if i don't hit anything in the next few seconds it automatically defaults to us keymap 43 was the number of the usq map if i needed to enter the number and then we get to this prompt here now if i go back to the handbook you can read a little bit about how to check your ip address check to see if the network is working i'm not going to read all of this to you guys if you guys want to check this out go ahead and read it i just want to verify that networking is working and if it is then we can move on to the next thing so if i run this command here ping and i'll just ping google.com and i'm getting you know output return it's actually hitting google.com so networking is working control c will kill the ping if you just wanted to give it a number of things to do i could do a dash c for account three and then google.com and it will ping google exactly three times and then i don't have to bother doing the control c to kill the ping now the next part of the installation process is probably the most important part of installing any operating system really is preparing the disks so this is setting up your partitions now i strongly urge you guys i know i skipped you know the first three chapters essentially in the handbook but you like you can get away with that i strongly recommend though that you read this so really pay attention to preparing your discs you need to decide whether you're going to do a legacy boot or uefi so we're talking about master boot record versus you know gpt if you don't know what that is again read this page i'm going to do legacy boot in this vm but it's really the commands for installing legacy boot or uefi are practically the same they're just some minor differences i may mention those differences as i go through the installation process if i scroll down the page you get an example of a default partition scheme you should create three partitions at least according to them and you don't have to do this but this is just what they recommend you should do a boot partition a swap partition and then of course your main partition for your data and that's exactly what i'm going to do and they recommend using the fdisk utility or parted those are two command line utilities you can use to set up your partitions i'm not actually that familiar with either f disk or parted i usually use a program called cf disk but for this video what i'm going to do is i'm going to use fdisk because since that's what the gen 2 handbook recommends i want to follow the handbook as closely as possible i don't want to veer away from it because then you know you guys might be a little confused about what i'm doing so the first thing i need is the name of this device because it's not going to be sda the way it is in the handbook in this virtual machine that's typically vda but if i run this command lsb okay for list block you will see that my drive is vda so that is the actual device so i want to do fdisk slash dev slash vda and then i don't know the fdisk commands because i don't run f just that often so it tells you to hit m for help that's what i'm going to do and then it gives you all the commands for f disk here and it looks like we need to create a new partition table now do i want to do a dos partition table for master boot record or do i want to do gpt for the uefi i'm going to do the dos partition table so i'm going to hit o and then enter and it said created a new dos disk label with disk identifier yada yada yada now let's go ahead and add our partitions n adds a new partition so i'm going to do n and then is it primary or extended it's going to be primary and then what is the partition number one through four for legacy boot if you're doing uefi you have potentially up to 128 partitions you could choose from we're gonna do partition one here the first sector just hit enter and let the first sector be the first sector and then the last sector you could give it a number but what i like to do is just do plus and then however big you want to make it this is that boot partition that they recommended in the handbook and they recommended 256 megs so do plus 256 capital m for the last sector and that created a partition one of type linux the size 256 megabytes great now let's do n for new partition uh primary partition and this time it's going to be partition 2 and the first sector once again just hit enter and then the last sector how big do we want to make this will be our swap i'm going to make this only one gigabytes here in the vm because the swap partition is kind of wasted space in the small vm if i make a huge swap partition i'm not going to have enough disk space to actually do the installation but i did want to create a swap on camera it'll just be a small one gigabyte swap partition created new partition type of type linux size one gigabyte we will have to change the partition type for the swap because it needs to be type swap instead of type linux but we'll get to that in just a second one more time let's do n for partition and then primary and then the partition number this time will be three and then the first sector just hit enter for the default and then the last sector we want it to take up all the remaining space on the disk so this time just hit enter all right now let's change the partition type of that swap especially so hit m for help and let me see type t to change a partition type so let me hit t on the keyboard and then what partition number are we changing to was the swap that's the one i want to change and then the hex code or the alias i could type l to get a full listing of all the available types and uh swap is 82. see aliases linux is 83 swap is 82 and that's the only ones we really need uh i'm going to do 82 of course for this swap partition all right and then m for help one more time now one thing we didn't do we haven't made anything bootable yet so let's hit a to toggle a bootable flag what partition needs to be bootable well partition one obviously needs to be bootable that was our boot partition and if everything we've done is correct so far right now i think we could just write the table to the disk and exit so just type w for right hit enter and that should be all we need to do with fdisk and setting up our partitions now let's get back into the documentation now we gotta talk about creating our file system now the file system i'm gonna go with extend4 that's typically what i go with you guys want to install anything else you know butter fs or xfs or riser or whatever file system you want to put on the machine you do you you just read the documentation for me i'm gonna do extend four so i need to run the command mkfs.extend4 that's make file system extend four so let me switch back over to the desktop here and let's go ahead and start making these now they recommended doing extend two for the boot partition that's kind of the old school linux way extend four would also work for the boot partition but since they recommend doing extend to so let's do mk fs dot extend to space and then slash dev slash vda1 is the first partition on the virtual machine on physical hardware typically this is going to be sda1 but here because it's a virtual disk you know they call it uh vda1 let's write that all right and now we've made that file system now let's make the swap so mk swap is the command to make a swap slash dev slash vda2 what's the swap partition and we've just created the swap now let's actually turn the swap on so do swap on and then slash dev vda2 and now finally let's make the extend4 partition on the third partition so four mkfs.extend4space and then slash dev slash vda three and now that we've created that third partition especially you know we got that extend four partition we need to actually mount that because that's where everything we do from here on needs to actually be placed on that particular partition so let's mount slash div slash vda3 and then i'm going to space and then where am i mounting it to i'm going to do slash mount gentoo and hit enter and let's get back into the install guide in the handbook the next chapter is installing stage three so i mentioned we were gonna do a stage three installation now what do you need to do is you actually need to from the command line go and download the stage 3 tarball before that though they also talk about setting up date and time you typically won't need to do this if the date is correct so if i type date let me verify that that's actually yeah that's correct on my system but they do in the handbook discuss how to change that that time and date if for some reason it is needed so let's go ahead and download the stage three tarball so the first thing we need to do is we need a cd into slash mount slash gentoo so let's go ahead and do that cd slash m t slash gen two i'll just tab complete and then what the handbook recommends is downloading the path to the stage 3 url using the command line download utility wget now that's great except getting that very lengthy url and name of the iso it's not a a small path to that iso right so you could use wget but what i strongly recommend is what they talk about next is using one of the terminal browsers like links li nks or links l y n x uh both fine terminal web browsers and i'm gonna actually use links we'll use links l i n k s for this because it makes downloading stuff very easy so i'm gonna go in here i'm going to type links space and then https colon slash slash gen2.org downloads i believe will actually get us to the downloads section here and just click ok here and then with the arrow keys just go down and that one right there stage 3 open rc i'm going to use the open rc init system those of you that want to do a system d installation would choose the system d install but there's the documentation for the most part is mostly built around using the open rc init system that's the traditional init system that gen 2 has always used so that's what i'm going to do for purposes of this video so i'm going to hit enter on the stage 3 open rc and then it's going to ask me do i want to save this yes and it's asking do i want to download it ok and it's going to download it right here in the browser and once this bar has reached 100 we will hit q to quit out of the links browser let me queue to quit out of links now that we've downloaded that we downloaded it right here in the directory we're in which is slash m t slash gentoo the next thing we need to do that was a a compressed tarball right we need to unpack that tarball and how you do that is entering this very lengthy command here make sure you add the correct flags at the end of it as well so let me switch back over and i'm going to type the command tar and then the flags are x p v f space and then just type s t and then tab complete and that's the stage three tarball we just downloaded using the links browser and then space and then these flags dash dash x a t t r s dash include equals and then in single quotes we need to do asterix period asterisk then the ending single quote and then space and one more flag dash dash numeric dash owner and if we did that right let me verify that looks good and hit enter and it's going to unpack that tarball this is going to take a few minutes and unpacking the tarball took about 5 or 10 minutes and the next part of the installation is configuring the compile options so this is the flags so this is our make flags uh it gives an example of a make.com and the safe flags here this link here if i remember correctly this is actually pretty useful because depending on your cpu architecture you know for me i'm i've got the threadripper so i'm going to do the ryzen the threadripper i've got its model 1920 so the 1000 and two thousand series it tells me exactly you know the flags that i may want to do in the make dot conf so let me switch over and go ahead and open the slash etsy slash portage slash make dot com is vim installed i don't think it is yeah so vm is definitely not installed so i can't do vm it's vi i'm pretty sure is it here so let's do vi etsy slash portage slash make dot com so vi is here if you guys wanted to use nano i know nano is also available for you i'm going to go down to this line here common flags here and i'm going to edit this line because uh going back to the page my particular cpu architecture it tells me to make this dash o2 space dash march equals zn v er one space dash pipe so what i need to do is in between dash zero two and dash pipe i need to go ahead and add dash m arch equals zn v e r one and then the last thing i need to do is the documentation did mention one other thing that you probably want to do is you want to tell the config file here how many cores to use make ops equals dash j2 that would be what you would use for i guess a two core processor now i gave this machine six cores right or six threads but the virtual machine treats them as cores so i'm gonna go in here and i'll just add this to the end of this document here so i'm just going to create a new line and i'm going to do make ops equals and then inside double quotes dash lowercase j and then the number that i gave this so six scores there then i'm going to hit escape and then i'm going to write and quit and then let's get back into the documentation and let's click on the next chapter which is installing the base system so this is where some of the magic really starts happening first we need to get our mirrors and we want the fastest mirrors obviously to download the software so i'm going to enter this mirror select command here let me get back into the desktop and i'm going to type mirror select and then space dash i space dash o space and then two greater than signs that's very important it's two of them because we're gonna add to a an existing file here we're gonna write to it slash mount slash let me make sure i got the path right slash chin to slash etsy slash portage and then make dot comp so alright so we get a in curses menu where we can select the mirrors that we want to add to the make.com for me i'm going to add mirrors in the us which i believe is alphabetical by country so let me go toward the end here and i'm just going to go ahead and hit the spacebar on each usa mirror i don't know if i need them all but that's plenty let me go ahead and hit okay the next thing we need to do is uh the gentoo e-build repository we need to make a directory and then we need to copy some stuff over to that directory so the first thing we need to do is a make directory so m k d i r space dash dash parent so give it the parents flag and then space slash m t slash gen 2 slash etsy slash portage slash repos.com let me make sure i spill that because it's a new directory i couldn't tab complete it let me yeah repost.conf is the name and then what we want to do is copy so cp space and then that same path we just typed so slash m t slash gen two slash etsy slash portage slash repose dot com space and then what we want to copy that to is slash m t slash uh gentoo slash etsy slash portage slash repos.com gen2.com you'll have to type that and hit enter and it says cp dash r not specified so what happened here is i typed something wrong so let me verify the page here i got ahead of myself here and copy uh i thought these paths were the same the copy path but it's not you see instead of mount gentoo etsy portage it's mount gentoo user share portage alright so let me fix that so i'm going to go back in here and instead of m t slash gen 2 etsy m t slash gen two slash user slash share slash portage slash and then there's one more directory config slash repos all right so let me make sure that's right slash m t slash gen 2 slash user slash share slash portage config slash repos dot com all right and then we're copying to mnt gentoo etsyportagerepos.com gentoo.com right so this command should work now all right no errors were returned to verify that work what we should really do is actually make sure that this file that we were writing to that something was actually written to it so if i did a cat on slash m t gen 2 etsy portage repost.com2.conf yeah so it did write something to it and getting back into the handbook the next thing is copy dns info so looks like we just need to do this command here this copy command so i'm gonna do cp space dash dash d reference space and then slash etsy slash resolve can't tab complete oh it does tab complete so resolve dot com space and then slash m t slash gen 2 slash etsy and hit enter and then the next part of the installation is mounting the necessary file systems there's these five commands you have to enter you do need to actually enter these correctly and this is probably one of the more tedious commands you know as far as you know you've got some typing to do here so let me just go ahead and get this done here so i'm going to do mount space dash dash types space proc space and then what are we doing this we're doing this as a slash proc space and then slash mnt slash gen 2 slash proc so again that would be something very easy to mistype or misread you know but i'm pretty sure i got that right that time so then the next command is mount space dash dash r bind space and then slash sys and then space slash m t slash gentoo slash sys and then mount space dash dash make dash r slave space and then slash m t slash gen2 slash sys once again then mount space dash dash r bind uh r bind space slash dev this time space slash mnt slash gen 2 div and then last one mount space dash dash make dash or slave space slash mnt slash gen 2 diff then getting back into the handbook here it says if we were installing this on a non-installation media non-gen 2 installation media so you are installing this from inside another linux distribution you may have to do this here in the red box i i'm doing this from the official gen 2 installation media so i'm just going to skip that but you guys again you know you may be doing things a little differently than i i can't do everything possible with a gen 2 installation on a single video just know that if you deviate in any way read the handbook and finally we need to char root into the new environment so we need to root into the new mounted file system and that's where of course everything's going to get compiled and installed to and everything so this is very important here so let's go ahead and do charu space slash mnt slash gen 2 and then space and then slash bin slash bash of course the best shell and then we need to source the etsy profile and then finally they recommend this here i this isn't really needed what they're doing here but you want to change the prompt so export ps1 ps1 is your shell prompt and then what they recommend is doing the word to root inside parentheses space and then your standard ps1 prompt so and then the ending double quotes there and you see all that does is just change the prompt instead of live cd and then the path and now it's true live cd and then the path so that just lets us know you know the prompt gives us confirmation that we're actually in the rooted environment and the next part of the installation is mounting the boot partition so this is very easy so let's go ahead and mount space and slash div they say sda1 but remember in my virtual machine here it's the disk is actually vda one for the partition space and then slash boot and then finally configuring portage portage is gentoo's package manager uh the command line interface to portage is a utility called emerge and installing a gentoo e-build repository snapshot from the web emerge dash web rsync i this is kind of optional i think i think i could skip this if i wanted to but just for sake of you know being on the safe side i'm going to go ahead and run the emerge dash web or sync and go ahead and let that go ahead and sync to the repositories here this probably will take a few minutes so i'm going to step away make a cup of coffee i'll be back when this is done and the emerge web rsync has finished the next thing that we need to do in the handbook it says uh yeah after running you know emerge you may get some e-select news this is important messages from the gen 2 teams it could be critical messages about things you need to know i usually just skip this but if you actually want to read the eselect news you type eselect news and then read and it's going to list the messages of course it's all going to scroll by a better way to do that would have been to do uh eselect news list i believe would have just yeah gave you the overview of the messages and there were six messages so it gives you the title of each one and the next thing we need to do is choose our right profile so eselect profile list and let's make sure that we actually do this correctly this is another thing that you want to make sure you get this right because there's a lot of different profiles you could choose and depending on whether you want to do 32-bit libraries or strictly 64-bit if you only wanted 64-bit only then obviously that one of the profiles you need needs to include the word no multi-lib uh also we've got some things like musl for those of you that would rather do musl than glib c i guess i i wouldn't recommend that unless you really know what you're doing got some systemd stuff of course we're doing open rc the default profile is number one and it looks like it's already selected because that's why it's got the blue asterisks but if you needed to select a different one you would do eselect profile and then set and then the number so if i was changing from profile one to profile two for example i would you know deselect profile set two but for me one is fine it's already set but i could select it again and getting back to the handbook the next step is updating the world list i know this step usually takes a while you have to enter this command here emerge uh dash dash ask etc etc updating the world set what is the world set well we can click on the gen 2 wiki link for world set and it explains world set encompasses the system set and the selected set and the system set contains the software packages required for a standard gen 2 installation so obviously we need that and the selected set contains packages the admin has explicitly installed so let's go ahead and update the world set so let me switch over to the desktop and i'm going to type emerge space dash dash ass space dash dash verbose space dash dash update space dash dash deep space dash dash new use space at world hit enter and uh obviously because again as a source based distribution there's going to be a few things that it's going to have to update here install or update actually it's just a few things five but i think this process usually takes a little while so i'm gonna pause the recording i'll be back once this is completed and updating the world set finally finished i i did remember that that took a long time and i was correct that took almost an hour to do that the next thing configuring the use variable so this is some of our use flags and if you wanted to see what use flags are already in use let me go ahead and enter this command emerge dash dash info and then what you want to do is pipe that into grip and then we want to do the carrot symbol that symbolizes the beginning of a line and then all caps use so it's going to find a line that starts with use and then you have use equals and then a whole bunch of flags here so that is all the use flags if you wanted to edit that you could you could actually edit the make.com i'm not going to do that i'm not really interested in playing with the flags if you wanted to see what the flags actually are as far as the description you could use the less command and then what you want to do is take a look at slash bar slash db slash repos slash gen 2 slash profiles slash use dot d e s c and that will pipe all of the flags into lists just hit enter to to get the list to go down but you can see for example if you had the also flag that add support for media libraries and also libraries you know just hit enter to go down and read the entire list q to quit out of lists and the next thing in the handbook is configuring the accept license variable they say it's optional so it's what kind of license do we want to accept as far as installing our software do we want only gpl compatible software or only fsf approved or osi approved et cetera et cetera since they say this is optional i'm assuming i could skip this step if i really wanted to though i probably would accept probably the most liberal set of licenses just to cover all bases so i didn't run into a situation where i was trying to install something but couldn't scrolling down even further we get optional using systemd as the init system and they say the remainder of the gen 2 handbook focuses on open rc and this is the reason i'm doing the open rc installation is because it focuses really on open rc if you want to do system d the documentation is kind of sparse right so moving on time zone so we probably need to go ahead and set up a time zone so let me go ahead and do an ls and i'm going to do an ls in user share zone info and if i do an ls you see you get a listing of the possible regions so this if you've ever done a graphical installation of ubuntu or anything that uses like the calamaris installer for example you know that typically it sets the time zone sometimes automatically for you typically you know i'll just click on the little world map and choose america slash chicago well where is that graphical installer getting that information well it's getting it from user share zone info you know this particular directory here and i see america in the list so if i did a ls on user share zone info america you know did an ls in that you see chicago in the list and so that's exactly what i want to set my zone to america slash chicago so how you do that is you need to echo and in my case america slash chicago and that needs to be wrapped in quotes and then space and then a single greater than sign and then we're going to write that to slash xc slash time zone and then we need to emerge space dash dash config space sys dash libs slash time zone dash data and that emerged very quickly so that was just updating the local time to now reflect in my case america slash chicago no i'm not actually in chicago you guys know the southern accent i'm actually in louisiana but chicago's the central time zone louisiana the central time zone so that's why i always just choose chicago out of the list and the next step is configuring our locale so we need to open the slash etsy slash locale.gen so let me go ahead and do that and that they were using nano i'll just use vi since it's here actually because a merge is already set up i probably could go ahead and just emerge vim and i'm looking through the gentoo wiki for vim and vm is app dash editors slash vim well let me just go ahead and do that let me do an emerge and then app dash editors slash vim just to get me a better text editor i'm not that comfortable with vi and i can't use nano at all so let's just go ahead and get them installed so vim finally finished installing that took about half an hour to install was it worth it well for me i was eventually going to install them no matter what anyway if you guys don't use film obviously you don't need to do that now back to configuring our locales now if you're not sure what locale you need to choose you can check it out in user share internationalization supported so let me go ahead and show you guys that if i wanted to run this through list let's do less and then slash user share now that was internationalization that's i 18 in worth 18 signifies there's 18 letters in between i and it it's just a short form for internationalization and then supported and there are all the locales again piping it through the list just hit enter to go down of course you could pipe it into grip if you wanted to search for a specific locale obviously i'm going to do uh english us here and they actually already have the codes for english us here so let me go ahead and i'm going to open this in vim so i'm going to vim slash etsy slash locale dot gen and they already have c dot utf-8 here i'm just going to go ahead and leave that but i'm going to add english us iso and then add english underscore us dot utf-8 you need to have at least one utf-8 locale specified some things just need that i'm gonna go ahead and write and quit and back to the browser here and the next thing you need to do is run the command locale gen so let's do that locale dash gen generating three locales because that's how many locales were in the file that we added and going back to the handbook if you want to see the available locales you could always type e-select locale list so i could do eselect locale list and there were the locales the default one right now is set to seven now if i wanted to change that i could do eselect locale set and then let's do uh english us utf-8 so i'll set number six now we need to resource our slash etsy slash profile for that change to take immediate effect and it gives you the command to type you need to type period space and then slash etsy slash profile unfortunately doing that it ruined our root prompt yeah we're still rooted but it set the ps1 prompt back to its default form if i wanted to i could take the time to put that back so let's export ps1 equals and do you guys remember what it recommended it was to root inside parentheses it could be anything it's just the main thing is changing the font to something different uh just so you know that you're actually too rooted and going back to the handbook uh now reload the environment with env update and then source the etsy profile and then export okay so i actually ended up doing basically this not this exact command but we already took care of that if i had actually read the rest of the page i would have just run that command there so let's go ahead and click on configuring the kernel so first we need to choose an appropriate kernel source and install it using a merge so i'm just going to type that first command there and emerge space dash dash ask space and we're going to install sys dash kernel slash gentoo dash sources and i'm just going to click enter for yes this may take a few minutes to install all right and the gen 2 kernel sources installed that took about 20 minutes so not terribly quick but not terribly long and when i give the times of course that's particular for this virtual machine i created those of you that have even better beefier machines you know these things may install quite a bit quicker those of you that are trying to install gen 2 on a potato this could take hours and hours right so all right so the next thing we need to do after the emerge of the gen 2 sources let's do an ls dash l user source linux just to verify that it created a symbolic link and i do apologize guys if you hear the train going by here there's a train track not too far from this office here and user source linux is what we needed no such file or directory so let's go back into the documentation it looks like we need to do a eselect kernel list and then choose a kernel so i don't know why they gave the ls command before that because yeah because it's obviously not going to return anything until we actually choose something from the list available sim link targets so then run eselect kernel set and obviously there's only one target available so set number one it says can't load module kernel i misspelled kernel instead i typed kernet so okay e select kernel set one alright and now let me up arrow back to uh ls dash l user source linux and now that sim link has been created and finally the moment everyone's been waiting for kernel configuration and compilation now uh the handbook here the gentoo handbook says manually configuring a kernel is often seen as the most difficult procedure a linux user ever has to perform nothing is less true okay so it's hard but you know what it's really not hard so uh and if you want to actually do this we need to install the pci utils so we need to emerge cis dash app slash pci utils so let's go ahead and do that so emerge space dash dash ask space and then sys dash apps slash pci utils and hit enter alright and now that the pci utils are installed the next thing we need to do is cd into user source linux remember that uh that was created for us so cd into user source linux and then we need to run this command make space menu config and this should launch an incursive program where we can configure the kernel manually and this is typically not something i do but they do have some good information here in the wiki for those of you that want to configure the kernel some things that you may want to enable or disable things like dev temp fs support scuzzy disk support selecting necessary file systems depending on what file system you're using typically i don't care to go through and manually configure you know every module in the kernel that i want typically i just installed the big kernel the generic kernel so that's what i'm going to do so i'm going to merge sys kernel slash gen kernel so let me get back over here and you know again if you guys want to configure your own kernel i mean you can go through the menu and hit enter and tick on and tick off things what i'm going to do though is i'm just going to exit out of this and then what i'm going to do is i'm going to merge space dash dash ask space sys dash kernel slash gen kernel and we're just going to install the big generic kernel and i get some errors here so let's read the errors it says uh sys kernel linux firmware so something is wrong with installing linux-firmware saying something about redistributable license so if i get back into the handbook here and go back you remember the licenses that i said were optional because it does say optional configuring the accept license variable and we didn't set one one of them was redistributable binary dash redistributable and i've actually got some notes here this is not in the gen 2 handbook but i've done a search for this in the past and i've got some personal notes here on what i need to do to fix this problem apparently i've had it before i need to echo and then in double quotes sys dash kernel slash linux dash firmware because that's the the program that's having a problem it's because we didn't accept a binary dash redistributable license so let's go ahead and do the at symbol and then all caps binary dash redistributable make sure i spelled that right yeah and then what i'm going to do is i'm going to pipe that into this command line utility called t t takes standard input so it's going to take that echo command and it's going to uh write that to a file and i just noticed i didn't do the ending double quotes there let me do that okay then pipe that into t dash a to append a file meaning add this as a line at the end of the file don't overwrite the entire file with this with this echo and this needs to write that to slash etsy slash portage slash package dot license and of course the package.license file i had to type the whole thing in because we never created it in the first place so and now that we've done that you get the output here you know in the command line but it also wrote the output to slash it c portage package dot license and now that should allow us to up arrow and then emerge again the gen kernel and it should allow it yep no more licensing issues now installing the kernel is going to take a while i'm expecting with the system resources that i gave this vm it might do it in a half hour maybe it takes up to an hour i don't know what i'm gonna do is i've been at this computer now uh going on about four hours so i'm gonna step away i'm gonna actually go out to lunch and i'll probably be back before this big generic kernel has finished compiling guys it's been two hours since i had started the compilation of the generic kernel so i actually cancelled it compiling because i think it it hung up it didn't look like the virtual machine was using any cpu so i think the emerging of the gen kernel have reached a point where it was just frozen it wasn't doing anything and it had already been two hours passed by and it's been nearly six hours since i actually started the whole installation process so what i did is i went ahead and hit control c and canceled the compilation of the gen kernel and i went ahead and installed the uh gen2 dash kernel dash bin package that is a binary of the gen 2 kernel so hopefully that will install correctly hopefully it'll go a little faster i found that by the way in the gen 2 handbook uh this was the gen kernel if i scroll down there were some alternate uh distribution kernels that we could install including gentoo dash kernel and gentoo dash kernel dash bin so dashbian i'm assuming it's a binary it should maybe install quicker we'll see all right so the gen 2 kernel dash bin kernel actually installed in about 25 minutes so a much quicker installation than the gen kernel trying to compile i really think the gen kernel probably compiles a lot quicker than two hours i really think that for whatever reason the whole process just froze up because after two hours i i've never had a kernel take that long to compile especially since i gave this vm plenty of resources to work with now since i installed one of these alternate distribution kernels it says post install and upgrade so every time there's a kernel upgrade i need to run this command here which is a merge dash dash ask at module dash rebuild to rebuild the kernel modules all right so moving on let's get past all of this finally installing the firmware emerge dash dash assist dash kernel slash linux dash firmware i think we already installed that though earlier because that was the uh the package that had a problem with the licenses that you know it wanted to force us to agree to that binary redistributable license but just to make sure i'm gonna do a merge space dash dash ask sys dash kernel slash linux dash firmware just to make sure it's here so would you like to merge these packages it didn't tell me it was already installed so i'm just going to go ahead and emerge it again might as well i mean we've been at this install now nearly six and a half seven hours and that really took about one minute to install the linux dash package now let's move on to configuring the system and this is about the fstab so this is the file system table so it asks us to do nano slash etsy fs tab does it give an example of what the fs tab should look like yeah here's an example at cfs tab example and this is using mbr so that is a good example for me to follow there so let me get back over into the vm and i'm going to do vim space slash etsy slash fstab fstab stands for file system table so i'm going to go down here and clean some of this up first thing we need to do is actually just uncomment all of these now if i wanted to use the labels i think i could if i wanted to specify specific partitions for example instead of label equals boot i could actually change this to actually the name of the drive or the path to the drive so i could change this to slash dev slash vda1 was the uh the boot partition and if i wanted to do the big partition the same way let's just get rid of uuid and i'll do slash dev slash vda 3 was that partition the swap was of course slash dev slash vda 2 and then let's go ahead and uncomment slash dev cd-rom for the optical drive even though i won't be using that really in this vm one thing i noticed in the example fs tab here is they assumed that uh the slash boot file system here was extend four and of course we did make that uh i believe we made that extend too so i better change that and then let me write and quit here so do colon wq here in vim and the next thing we need to do is the networking information host and domain information so we need to set a host name at slash etsy conf dot d slash host name so this is very simple here so in your text editor nano or in my case vm hostname and hostname is set to localhost obviously change that to anything you want i'm going to name this particular machine i'm going to call it vert dash gen 2 just a nice descriptive name especially if i ever ssh into this vm i'll actually know exactly what it is because of the host name vert gen 2 tells me it's my gen 2 vm and going back to the handbook next thing it talks about is the slash xc slash comp.d slash net file it doesn't exist by default and it says uh if a domain name is needed then we set that file we don't actually need that though i'm just going to skip that for now i don't think we need to play with that let's go down to configuring the network and we need to install some network utilities so we need to run this command this emerge command so let me go back here and let me clear the screen here so you guys can better read what i'm typing here emerge space dash dash ask space dash dash no replace space net dash misc miscellaneous slash net ifrc and that installed very quickly and back to the handbook it talks about the uh comp dot d slash net file again i don't know maybe we actually do need that we're going to be using dhcp i'm going to be using that of course for ethernet and it mentions adding that line to etsy comp dot d slash net so just in case that is needed i don't see what it would hurt for us to actually go into that so i'm going to vim slash xc comp dot d slash net and of course that file it was a empty file meaning we just created it so the line i wanted to add according to the handbook is config underscore f 0 equals dhcp then i'm going to escape colon wq to write and quit now at the zero we need to make sure that that is actually the interface here so i'm going to do ipa and make sure yes it is actually f0 and back to the handbook now we need to make sure that networking automatically starts when we reboot so cd into slash xc slash init dot d so cd into slash xc slash init dot d and then we need to create this symbolic link here well using this command ln space dash s so we're creating a symbolic link for net dot lo space net dot eth0 and then we need to make sure that this starts this service this networking service starts every time we reboot we need to make this happen with open rc so we need to run this open rc command rc dash update space add space net dot i tab complete eth0 and then space and then the word default can i tab complete that now i have to type it all the way out and it says added net dot eth0 to run level default moving on we need to edit our slash etsy slash host file and they give an example of what one might look like these are actually pretty simple it looks more complicated than it is so open in your editor slash etsy slash host and for me what i'm going to do is i'm going to go down here and it's already got 127.0.0.1 localhost that looks pretty good i'm also going to add the uh the host name for this computer so i'm just going to do vert dash gen 2 and then tab over and we'll also leave localhost here and then colon colon 1 i'm just going to do the same thing so let's go ahead and add the host name for this computer so vert dash gen2 and we'll also leave localhost in this file and that's really all i'm going to do in slash etsy slash hosts all right and we're getting really close to being able to reboot into our freshly installed gen2 now but we need to set a root password so we need to obviously run the pass wd command so pass wd and of course we're logged in as the root user so this will be the root password now gen 2 requires you to create a strong and complicated password it has to be 8 to 40 characters it can't use dictionary words and it would be advisable to use a mixture of upper and lower case letters so let me type a strong and complicated password i hope i remember this password i think i will all right so we've created the root password the last three things here i don't really think i need to play with those uh one is editing slash etsy slash rc.com that's open rc uh it's like startup services and if i really needed to play with the init system i could play with that file i don't need to do that then it talks about slash etsy slash conf dot d slash key maps for our key map it's already set to a us key map so i don't really need to go back in there and play with that file and then hw clock is the clock make sure it's set to local i guess just to make sure that that is the case i could vim slash etsy slash conf dot d slash hw clock now it's actually set to clock equals utc if i wanted to i could set it to local note that you if you dual boot with windows then you should set it to local this is not a dual boot machine so i'm good on that so let's get back to the handbook and then installing tools so this is your system logger installing a system logger that's very important so let me go ahead and get to the desktop here and i'm probably just going to install the first one that they recommend which is called cis k log d so emerge space dash dash ask space app dash admin slash sys k log d and now that sys k log d has been installed the next thing we need to do is actually make sure that that auto starts every time we log in again once again we have to use open rc here so let's do rc dash update space add cis k log d and then default and cis k log d added to run level default and back to the handbook this is optional but on most linux systems you probably want to add a cron daemon and they advise you to install crony and then of course register that with open rc i'm actually going to skip this because in this vm i'm not going to be setting up any kind of crime jobs or anything you could also add m locate which that allows you to use the locate command to find files and directories on your system i'm fine just using the find command which is just a part of the standard new core util so i don't need m locate ssh you may want to install the ssh server on your system if you plan to ssh into the machine right now i don't need to add that but if you need to add that to your open rc startup services then of course you need to do that once again with the rc rc-update add command then it mentions you may want to install some file system tools so depending on what file system you used in my case i used extend for there's some extra tools that that come along with that file system that you may find useful in my case i need to install cis dash fs slash e2fs progs and i will do that because i think that is actually very important to do i'm going to do an emerge dash dash ask and sys dash fs slash e2 fs progs and hit yes to that and the next thing is installing network tools mainly we need a dhcp client so we actually have a working internet when we reboot so we need to go ahead and emerge dhcpcd so let me go ahead and do that emerge space dash dash ask space net dash misc slash dhcpcd and that's finished installing next after dhpcd optional we could install ppp if that is used to connect to the internet i don't need that you also could install wpa supplicant that's needed for wi-fi this is strictly ethernet so all i really needed was dhcp in my case so you know go ahead to the next chapter which is configuring the bootloader and of course this is going to be about installing grub the first thing we need to do is emerge grub 2 so let me go ahead and do that clear the screen here if i can type correctly and i'm going to do an emerge dash dash ask space dash dash verbose because i guess we want to actually see the output from what's going on with this dash command slash grub colon2 and i'm going to answer yes to that question now while that is emerging i should mention that i am doing master boot record and that is actually what that command is for those of you that wanted to do a efi boot i mentioned i mentioned this when we got to it it's the differences the difference is is you actually need to run this command which adds this line grub underscore platforms equals efi-64 it writes that to the make.com file and then you need to emerge the grub to bootloader and grub has finally finished emerging that took about an hour and 20 minutes to emerge grub a very long time so when i said earlier that you know after a little over two hours i quit trying to compile the the generic kernel the big kernel and i thought maybe the virtual machine was hung up maybe it wasn't it's just really slow at compiling some of this stuff because i did not expect a grub to really take that long to emerge and we're really not through with the grub install because we still have to run the actual grub dash install command on our device on most machines that's going to be it slash dev sda of course inside this virtual machine the device is vda so let me run grub dash install space slash dev slash vda it says installation finished no error reported once again just for sake of completeness that was for me doing legacy boot bios those of you doing efi instead of the grub install and then the path to the device you would do grub install dash dash target equals x86 underscore 64-efi and then give it the dash dash efi directory equals slash boot flag and now that we've run grub dash install the last thing is to actually create a grub config file so we need to run grub dash mk config for make config so let me clear the screen here because this is a very important command let's make sure we get this right so it's grub dash mk config space dash o space and then slash boot slash grub slash grub dot cfg and at this point we could go ahead and reboot the machine but let's exit so let's go ahead and do that exit and then what we want to do is cd and then we want to unmount so run u mount for unmount space dash l and we're going to unmount slash mnt gen2 div and then inside the braces here i'm going to put slash shm's comma slash pts comma and then u mount space dash capital r m t slash gen 2 and then finally let's go ahead and reboot so let's go ahead and see if the machine reboots all right we get a grub menu so our installation is completed it worked thank you let me get some init system information so yeah open rc's working we get some networking information it looks like the networking is working let's go ahead and make sure though we have to log in right now all we have is a root user so vert dash gen 2 was my host name it says vert dash gen 2 login so what user do we want to log in as of course root is the only one now i need to enter our strong and complicated password i hope i remember what i'd set for the password okay and now we're actually logged in as root so let's go back to the documentation and the last chapter is finalizing and really the only thing left is to add a actual user that's not root so you need some other user other than root on the system and you need to use the user add command and let me go ahead and just show you guys this here let me clear the screen we're going to type user add dash lowercase m space dash capital g and then we need to add this user to some groups i'm going to add the user to users comma wheel comma wheel is the most important because that adds it to the sudoers group we also need comma audio comma video uh no spaces between these commas by the way some other groups that you probably want your home user to be a part of cd-rom you may want him to be a part of floppy you may want him to be a part of games i think right now that may be all i need one more i should probably add usb that probably covers most of the groups so then space dash s and this is for the shell we want the default user shield to be slash bin slash bash and then finally space and then the name of that user i'm going to call my user dt and it says the group games does not exist so let me go ahead and up arrow i'm going to remove the games group i was actually looking at the documentation for groups to add and games was actually listed there but let me up arrow and just remove games from the group list and now we've created the dt user now the dt user needs a pass so do pass wd dt and now choose a password for the dt user so let me create a strong and complicated password for the dt user again you have to follow the rules for gen 2 so 8 to 40 characters and uppercase lowercase no dictionary words so now that we've set that password let me try to log in to the dt user so su dt for switch user to dt and uh it just allowed us to do that because we were already the root user the root user can do anything and i think that's where i'm going to quit with this portion of the installation because honestly that's the end of the installation guide where do you go from here on this final page uh well where you go from here is whatever you want to do is this going to be a server this is going to be an actual desktop you know do you actually want a graphical environment so if you want to actually have it as a desktop computer obviously you're going to have to install xor right the x11 display server and then you're going to have to put a desktop environment or a window manager on top of that you're probably going to want to log in manager where you go from here is a million different paths you know everybody's going to do something different so i'm not going to do that on camera for two reasons because everybody will want something different but the other reason i'm not going to do it is because it's going to take hours especially if you guys wanted to see me install the full gnome desktop environment or the full kde plasma desktop environment it's very easy you just emerge those desktop environments the problem is it's going to take hours like if i had to install full gnome or full kde plasma it literally would take probably as many hours as i've already put in to this point just to install those packages i'm not going to do that maybe in the future i'll do some kind of minimal install we'll do xorg and maybe a really minimal window manager i don't know something like dwm which you don't even have to bother emerging because dwm you just go grab the source code from success.org and you manage that stuff yourself what i suggest you guys do is try does if you're going to be a gen 2 user stay minimal because it takes so long to compile this software updates also take forever you don't want a really big heavy bloated desktop environment stay light do window manager only also if there's binary packages available for a program use it because it'll save you from compiling for example many gentle users don't compile the web browser that's another thing if i had to compile chrome or firefox they would take hours many many hours there's binary packages available for the web browser install those same thing with the full libre office suite don't compile that thing there's a binary for libreoffice install that instead so right now what i'm going to do is i'm going to go ahead and just leave this vm as is i may clone it a couple of times and we may come back to it at some point and again maybe i'll throw xorg on it and a window manager if i do of course i'll do that on camera and share it with you guys now before i go i need to thank a few special people i need to thank the producers of this episode i'm talking about absie james gabe mitchell wes akami alan chuck kurt david dillon gregory aryan alexander paul polytech scott stevens finn and willie these guys they're my highest tiered patrons over on patreon without these guys i couldn't have spent all morning all afternoon and all evening compiling gentoo today i couldn't have done it the show's also brought to you by each and every one of these ladies and gentlemen as well all these names are seeing on the screen right now i sincerely appreciate each and every one of these ladies and gentlemen their support because i don't have any corporate sponsors i'm sponsored by you guys the community if you like my work and want to support me please consider subscribing to distrotube over on patreon alright peace after all that if i rebooted and didn't get a grub screen i probably would have punched my monitor
Info
Channel: DistroTube
Views: 47,125
Rating: 4.9406052 out of 5
Keywords: gentoo linux, install gentoo, gentoo install, stage 3, how to install gentoo, gentoo tutorial, gentoo kernel, how to install gentoo linux, gentoo guide, gentoo installation guide, gentoo linux (operating system), how to install gentoo on virtualbox, gentoo linux vs arch, linux, gnu linux, base gentoo installation, gentoo install guide 2021, installing gentoo in a virtual machine, distrotube, command line installation, gnu linux tutorial
Id: 2sOfX_Lb1As
Channel Id: undefined
Length: 71min 22sec (4282 seconds)
Published: Tue Jun 29 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.