 Have you ever wanted to create your own ISO? A lot of people want to create an ISO. They want to create their own custom image of their desktop. They want all their custom programs and everything burned to an ISO that they can then flash to a USB device. And some people, of course, want to create an ISO maybe as eventually to create their own Linux distribution that they can distribute to the masses. And honestly, if you want to create an ISO, especially if you're on an Arch Linux based system, it's actually pretty easy because Arch Linux has a built-in tool called Arch ISO. And what this tool does, it actually creates the Arch Linux ISO image. So if you go to the Arch Linux website and you go to their downloads page, right, they put out a new ISO every month, you can go download from various mirrors, but again, you have this tool where you can actually build the Arch ISO yourself with the Arch ISO tool. Now, that's interesting, just making an exact copy of the Arch ISO, right? But the thing is with this tool, you can go in there and you can change things because the Arch ISO program, it has a recipe, a recipe of programs and configurations to build the Arch ISO. But you can go in there and change that recipe. You can make it anything you want. And then when it builds the ISO, it'll build that ISO with your recipe, right? It's going to bake the cake that you told it to bake. So to get started with the Arch ISO, you need to make sure that the Arch ISO package is installed. There is an Arch ISO package in the standard Arch repositories. There's also a Arch ISO dash get package in the AUR. And then let's talk about getting started with Arch ISO. The first thing you need to know is there's two profiles. Now, the one almost everybody's going to want to use is Relang. There is also a baseline profile. The baseline profile is a really minimal configuration that includes only the bare minimum packages required to boot the live environment. The Relang profile is actually the one that creates your standard Arch ISO. And that's the one that we're going to be playing with. And then all you need to do is you need to copy with the CP command, a user share Arch ISO configs Relang, the Relang profile. That's the one we're going to use and copy that to some folder. You can name it anything. In this example, they're going to name it Arch Live. So let me switch over to a terminal here. And I'm in my home directory. And I've created a directory in my home directory called ISO, if I LS, you can see there's nothing in this ISO directory, I'm going to make a directory. So I'm going to make directory DTOS dash 2304, because I can envision making multiple ISOs eventually all going in this ISO directory, maybe I make one every month. I don't know. This is hypothetical. I'm actually not building this ISO for public consumption. This is for educational purposes for this video. But now when I LS, you can see there's the DTOS dash 2304 directory. And now if we follow the Arch Wiki and do a copy dash R, so a recursive copy of slash user slash share slash Arch ISO slash configs. And then the profile is the Relang profile. And then we're going to copy that. And I'll copy that into this new DTOS dash 2304 directory by doing LS, again, nothing is here. But if I CD into DTOS dash 2304 and doing LS, you can see now I have Relang now let's CD into Relang and doing LS. And this is the actual stuff we're going to be working with building the ISO. So we've got some config files here, the most important ones, one you're going to play with immediately is probably packages dot x86 underscore 64. So let's go ahead. I'm going to do Vim packages dot x86 underscore 64. Now this is just a list of all the packages that get installed when you build the default base Arch ISO. There's not much here, right? So there's no XOR, there's no graphical programs and web browsers and things like that. This is a real base Arch Linux installation package list. Now let me open up Emacs because because I maintain DTOS, one of the cool things about that is what I do with DTOS is very much like maintaining an ISO. It's just a different way of installing things. I do it through a post installation script, but I maintain a package list. This is all the packages that get installed with DTOS when you run the DTOS installation script. So if I happen to have that, I could actually just copy my package list over into this package list and that's the DTOS package list, right? So that's what I'm going to do. So I went ahead and made the copy. So my new packages dot x86 underscore 64 includes a lot of extra stuff to have a proper working graphical environment with all the programs, all these DTOS dash packages. These come from the DTOS core repository. So by default, the Arch ISO does not know the DTOS core repository exists. So we're going to have to do something about that because these packages will not get installed properly otherwise. But you can see, I've got a lot of stuff going on, some drivers and now let me do an LS in this directory again. So that was packages dot x86 underscore 64. Now I need to edit this pacman.conf so that it knows that the DTOS core repo exists. So off camera, I went ahead and added these three lines here. You can see DTOS dash core dash repo in brackets. That's letting pacman.conf know, hey, go search for this repo or is it going to search while the server is on my git lab at this address. And then because my packages are signed, I build them with signatures. I set the sig level to be required. So let's go ahead and write that. Now probably where you're going to spend most of your time customizing the ISO is in the AI root FS, right? So that's the Arch ISO root file system. So if I CD into AI root FS and doing LS slash etsy slash root slash user, right? So think of this as your eventual root file system once it builds the ISO. So again, just go in here and just, if you need certain config files in slash etsy, go put them there. If you need certain config files and slash user, go put them there, yada, yada, yada. Let's go ahead and CD into etsy and let's see what is here by default. So some of the stuff we're going to have to play with. So if you want to go ahead and set a host name, you can do that. If you want to play with your locales, you can do that. One thing we're going to definitely have to play with is past WD. So let's go ahead and I'm going to VM into past WD. Now I've mentioned the past WD file on camera before many times we've played with it. This is a standard file on all Linux systems that contains all the users on the system. Now when the Arch ISO builds its default ISO, there's only one user, the root user, right? Root user, his ID is zero, his home directory is slash root, that's the root home directory. And then slash user slash bin slash ZSH is his default shell. We're going to set that to bash just to be on the safe side, but we need to create a home user. So I went ahead and created this new regular user for the live environment. So we're going to have DTOS as the live user and his ID number will be a thousand. That's typically when you create your first home user on a Linux system, the ID number is typically a thousand. And then his home directory will be slash home slash DTOS and then his default shell will be slash user slash bin slash FISH. Let's write and quit. Now the next file after playing with past WD, we need to play with the shadow file as well. So the shadow file is an interesting file on Linux systems. This contains your password hash for each user. So user passwords are not shared in any accessible format on the system, but the shadow file contains a password hash that contains the passwords, if you will. So you can see root, root doesn't have a password set. So there's really nothing here. So we need to actually create a password hash for the DTOS user. So the way you're going to do this is you're going to use open SSL. I think I can spell that correctly. Open SSL then space past WD space dash six. And it's going to ask you for a password. Create a password for the DTOS live user. His password should be DTOS. So username DTOS password DTOS. And it's going to spit out this lengthy hash here. This is what needs to go into the shadow directory or shadow file. It's not a directory. I'm going to copy that. And then what I'm going to do is up arrow and vim into shadow again. And now I'm going to do DTOS colon and the field after the first colon is the password hash. The root user didn't have one, but everything else after that, I could just make the same for both users. So I'll copy the rest of that string and then get back to the end of the line, paste the rest of that. And that should work. So it's basically the exact same thing except in between the first and second colons, make sure you add that password hash that was created for you. We also may need to add a G shadow file, which is not here by default. So let's create it vim G shadow for group shadow file. And the good thing is the documentation for Arch ISO and the Arch Wiki is pretty good. So I'm already going to just do a copy and paste. So this is what suggested in the Wiki is the string for root and then this string for the standard user you created, of course, like called my user DTOS. You just change DTOS to whatever user you created. And that's it for the shadow file. And finally, we need to edit our profile def.sh. So if I cd backup, cd backup two directories. And in this top level directory, you know, the relaying directory that everything is in. You can see I have profile def.sh. So let's go ahead and edit this file. And what we need to do is file permissions here. You see this block here. You have to make sure that the shadow file and the G shadow file are set to 400 for file permissions. Now, the Etsy shadow file is already set to 400, but there is no settings for the G shadow file because we created that, right? So let's go ahead and add that with 400 permissions. So while we're in the profile def.sh, let's do some branding stuff. The ISO name is not going to be York's Linux, it's going to be DTOS. The label of the ISO, so when the ISO gets created, it's going to be DTOS underscore and then I'm in date stamp. And then ISO publisher would be DTOS and then the location to some website. I could just say distro.tube here. And then ISO application, this would be DTOS live ISO. Then the install directory and all that, just leave all of this the same. That's right and quit out of that. Now a standard file on Linux systems is the OS-release file. So if I vim slash Etsy slash OS-release, this gives you some information about the distribution you're on. So when you're doing certain queries on the system with certain commands, how does it know what Linux distribution you're running? Well, this file helps out, right? The name of the distribution I'm currently running is R-CodeLinux. So that's the OS-release file on my machine. Now if I CD back into the AI root file system slash Etsy and do an LS, they have OS-release but it's just a sim link that points to user lib OS-release, which I don't think is actually in the AI root file system. We could make one and you could, of course, you would want to change the values, the names to whatever distribution name you want to add for branding purposes. But if I vim the OS-release file in this directory, nothing is here, but I could go ahead and do what I could do is let me actually just copy the existing one on my system. Copy slash Etsy slash OS dash, well, a release over into OS-release that's in this directory not writing through dangling sim link. So you can't do that with the sim link. Well, I wonder if I could just open the sim link with vim and just add something like name equals DTOS, for example. Would it be able to write that? No, you can't open link file. So the problem here, the sim link for OS-release is pointing to this file that is not in the AI root file system. So let me make dear, let's make dear and user. I don't think the lib directory is there. So now that I've made the directory, now let me up arrow, I'm going to copy the existing slash Etsy slash OS-release file on my system into the user lib directory. By doing ls, you can see now the sim link is pointing to a file that actually exists. Now if I vim OS-release, yeah, now we could go in here and let's change the values. So name DTOS ID DTOS lowercase id like. So it's an arch like distribution, right? So we're rolling home URL, I can go in here and change all of this. I'll do distro.tube where I could do my GitLab where I host all the source code for DTOS or whatever it is. Maybe this one, since it's a support URL, I'll do gitlab.com slash DTOS slash DTOS and bug reporting should probably be the same, gitlab.com slash DTOS slash DTOS logo. This will be an icon file, arco linux-hello is what they're using for me. I really don't know. I'd have to go search for icon file for purposes of this video. I'm just going to leave it arco linux-hello. One thing we need to do, let's cd into the airoot file system slash user and we need to create some directories. One thing this will be mainly for me, this won't be for you, but if you have your own repository software and you've added it to the pacman.conf like I did, you may also have to create a keyring directory and some keyring files as well. I'm going to go ahead and makedir-p, so make the directory and all the parent directories. So we're already in slash user. I need user share pacman keyrings and now let's cd into user share pacman keyrings. Doing ls, nothing is here. Two files need to go in here. One of the files needs to end in .gpg. The other file needs to be labeled some name dash trusted. And I went ahead and added those files off camera and I don't want to spend too much time on it because most people are not going to need to do this, but those are the two files and just quickly I can show you these by do dtos-gpg. All this is the public key block for my key because my packages again are signed packages. So we needed that the dtos-trusted file is an even simpler file, just the last few characters of the key. Now let me cd, I'm not going to cd back into my home directory because I got to get back into the top of everything here, so back into relaying here. So one of the most important directories on a Linux system, not necessarily for users, you guys rarely interact with this directory, but on every Linux system for the most part you have a slash itsy slash scale directory that's S-K-E-L skeleton. So when you make a user on most Linux distributions, it creates a home directory and it puts some config files there like your default bash rc and you know other various config files for that home user you just created. Where does it get those default config files? Well every Linux distribution will have a slash itsy slash scale folder that when you make users the scale folder is essentially a skeleton home folder that gets created for that user. So on my system what I'm doing with dtos is I kind of use the skill format in a different way. Because dtos is a post installation script, I can't play around in slash itsy slash skill because your parent directory that you're installing stuff dtos too is already going to have stuff in skill, I don't want to overwrite their skill with my skill. So I have my own version of skill if you will in slash itsy slash dtos here locally on my system, but think of this as slash itsy slash skill. I'm going to copy recursively over slash itsy slash dtos and I'm going to copy that over into the ai root file system slash itsy slash skill. And now let's hope that I wrote that command right so cd into ai root file system atsy there is skill cd into skill if I do an ls yes that is all the dtos config file so that is dot bash rc the dot zshrc and then in dot config you'll have the fish config the xmode net config also window manager config qtall config by the way I added five different window managers to my packages dot x86 underscore 64 we're installing a ton of stuff on this iso. Now one thing you got to be careful with is anything that needs to be executable let's make it executable now before the iso is built so the dot local folder here inside atsy slash skill let's go into dot local slash bin so these are scripts that I use but you can see none of them are executable that's chmod 755 so change the permissions to 755 on period slash asterisk so everything in this directory now when I do an ls you can see all the files now have executable for permissions because this would have caused a problem because some of these files like the polybore stuff and dmenu stuff now we would have had some issues with that stuff not being executable so let me cd up three levels here back into the ai root file system slash etsy we need to make a directory I'm going to make dear sddm.com.d because I use sddm as a login manager so we need to make that directory let me cd into sddm.com ls it's an empty directory of course so I need to copy this config file that's on my system so slash etsy slash sddm.com.d slash kitty underscore settings.com so this sets things like the default theme that sddm is going to use well we need to copy that over into this directory so let's just copy that and now that file is here and honestly I could play around forever in the ai root file system right and slash etsy slash user to build a proper ISO as far as if you're building a distribution that you're going to share with people you'd have to spend so much time placing everything in the right spots but I think I've covered enough that let's go ahead and build the ISO as is and then see if it actually builds correctly and then I'm going to load it up inside a virtual machine and see if it actually runs correctly so I'm in the relaying directory I'm gonna go one directory up so inside the parent directory of relaying I'm gonna copy this command here let me move my head it's not in the way so the command is sudo have to run this with sudo sudo make arch install dash v dash w this is the working directory it's going to create a working directory called output and then dash o is where is the output from where is the ISO going to be created well it's going to be created in this ice this output directory again it's going to create the output directory for a working directory also place the ISO in that directory as well and then finally space and then the profile that it's looking for it's going to only find one profile right the relaying directory that's in the directory we're currently in so if this is all right if I hit enter it's going to ask for a sudo password it's going to start installing software and if something was going to fill is it was going to have a problem with keys and with the pacman.com adding DTOS dash core repo right it looks like it's going to install everything correctly this will take a few minutes so I'm pause the video I'll be back if anything either fails or if the ISO succeeds. So it ran for a few minutes but after it downloaded all the programs and then started to install them one of the DTOS core repo packages corrupted invalid PGP signature yada yada you failed to commit package so let's go ahead and investigate this I'm going to CD into the AI root file system let's CD into slash etsy let's take a look at the pacman.conf make sure that we didn't booger anything up well there's no pacman.com here let's go up to levels so that's the pacman.conf here at the top level but I wonder if we should go ahead and copy that into slash etsy where it belongs so let's copy pack well meant to tab complete there pacman.conf into etsy pacman.conf into AI root file system etsy I'm just taking a shot here I really don't know if that is the fix or not but I mean the packages there's nothing wrong with the packages I got them all installed on my host machine right there's nothing wrong with the DTOS repo so there's something some issue with some of the configs here so I'm going to rm dash rf this output directory that was created right the working directory we're going to need sudo permission because some of that stuff is owned by root now we're working with a clean directory again so once again I'm going to up arrow back to the sudo make arch ISO command and let's try to build the ISO again all right and that ran for just a couple of minutes it failed but it's not the same error so I think we solved the problem with the DTOS repos because you know aura from the repos was just fine but there was an issue with some files that exist in the file system so some of the files I'm trying to install or already owned by the file system it's complaining about this package file system it doesn't like that we did the os release file okay so we probably should just delete that for now and then grml dash zsh dash config doesn't like that I added my own zsh config into slash etsy slash skill so do we really need this grml zsh config program hmm let's vim relang slash packages dot x86 and grml zsh config ah just get rid of that we don't need you so that probably should take care of that error now the file system error we do need the file system package to be installed but you know what I don't necessarily need this os release file I can do something else to get that later so let's just remove it just to get rid of the the error so remove I thought I copied the path it's a very long path copy paste yes we really want to remove that cd actually we're already in the directory we want to be in so su rm dash rf the output directory and up arrow one more time I I bet this is it I think we've solved solved two errors surely we're not going to get a third but this is part of what goes on with something kind of complicated it's not like that it's complicated it's just time consuming there's so many moving parts you know you're you're going to have errors you're going to have to do some trial and error with things like this I would have been shocked actually had the ISO built on the first try because I was certain we probably overlook some things and it looks like we are going to get a third error still complaining about something owned by file system so once again let's remove the file it's complaining about which I thought I cannot remove it so that was the problem we never remove that file because it needs sudo permissions now it's removed all right now really we should be ready but I bet it already created the output directory so let's do it ls yeah it did so let's do sudo rm rf and now let's up arrow back to the command to build the ISO all right now it's gotten to the point where it's actually installing all of the programs so I think we've solved that error again is even after it installs all the programs it's still got a lot of time that it takes to build the ISO so probably take probably 10 minutes or so so I'm going to go make a cup of coffee I'll be back once the ISO has been created and it looks like it finished building the ISO that took about five minutes or so you can see I've got the finished ISO 1.7 gigs in size again I installed five different window managers on it so let's go ahead and see if this ISO works so let me switch over to this workspace that I usually open my virtual machines on and let me go ahead and create a new virtual machine here in vert manager so the browse for a cd rom so go into my home directory what was the directory iso dtos output and in this output directory we should find dtos dash 2304.04.14 ISO and then choose the operating system of course this is based on arch so let's search for arch linux here and then go forward I give it about six gigs of ram two threads of the 24 thread cpu we're not installing it so we really don't need to enable storage for this so we'll just tick that off and we'll call this dtos this virtual machine and let's finish that and see if it boots and it does we get the arch linux splash screen now I could have went in and changed the artwork and logo and everything as well for branding purposes but for sake of time you know there's so much stuff you'd have to go in and change to remove all the arch linux branding I didn't do that on camera but let's just see if it boots up if it does we should get sddm for our login manager with my custom theming says welcome to arch linux which I could change that as well I could I believe I could have changed that in the profile um def file I'm not sure on that or it may be reading that from the os release file which we deleted from the system that's probably why it defaults to arch linux all right and we don't get sdm because of course I forgot to actually add sdm to our system d startup services so let's log in we can log in well we're already logged in as root so let's run a system ctl enable sdm of course this will not persist right this is not on storage what I would have to do is I need to actually actually go back into the AI root file system and add all of this um and then rebuild the ISO but that would take a minute but I'm just gonna do it this cheap way right now and let's go ahead and system ctl start sdm let's assume that I made the ISO right and I didn't have to do this manually this is actually what should have happened when we booted the ISO we get sdm we didn't get my custom theming but that's fine um qtl walen will not work we didn't install any walen packages so let's log into xmonad which our user dtos his password was dtos remember when we created the uh password and the shadow file so and xmonad did launch you think xmonad didn't launch it launched it's just the config files and it didn't set a background or anything by default xmonad is a black screen um actually it did it just took a minute for it to launch screen resolutions all wonky it looks like uh xmo bar also did not launch or poly bar i'm not sure which one was supposed to launch by default but again we kind of did this rather quickly but uh we can super pb to set a wallpaper yeah i'll keep that wallpaper if i do super shift r now to restart we'll get the conky back in the right spot uh poly bar is still not launching does the uh poly bar xmo bar yeah so one of the things is it did not save those permissions so if i cd into slash local slash ben remember the scripts where we changed all the group missions to 755 it did not remember so i'm not sure why that is the case but we'll set them right now you know if i restart yeah everything everything is running correctly uh some of the widgets and xmo bar are not running correctly but that is because they have dependencies that i did not install but alacrity is running just fine um doom emacs is not going to be installed we didn't run through a doom emacs installation so this is just vanilla gnu emacs which i barely know any of the key binding so i'm going to close that for now well i think that's all i'm going to do on this video i've already actually i spent a good couple of hours right running through this trying to uh get this working iso here and you can see it's a complicated process right building your own custom arch iso it's not something that i think a lot of people take lightly they think anybody can just go make an iso you can just know that it's a lot of work depending on how much customization you're wanting to put into this it could be a ton of work now the next thing i know i'm going to have people in the comments asking okay now i've built my own iso using arch iso but how do i install it to a drive well you don't right we don't have any installer arch iso is for creating the arch iso now you can customize it and and make it your arch iso i guess but we didn't have any kind of installer that's installed with the arch iso right it's just all you can do with this iso is flash it to a usb drive right i guess you could copy it files or whatever from this file system to another file system you'd have to get real creative if you wanted to actually take this and put it on a different drive but eventually what you'd have to do to create a proper linux distribution is you're going to have to put an installer on this what you would have to do is when before you build the iso you would have to also add calamaris to the package list and you would have to add your own custom build of calamaris because calamaris is not built for arch linux calamaris the installers actually built for all of linux meaning calamaris is his own beast i could make a video about that at some point but it's it's as complicated or even more complicated than what we just did with arch iso so you got to build your own calamaris build your own package for it and make sure it gets installed with the arch iso so that when your arch iso pops up you know calamaris is in the auto start directory and it auto starts and then hopefully you can run through an installation it's complicated now if you guys want me to go down that rabbit hole and maybe do a video about how to add calamaris to the arch iso i might do that let me know in the comments down below but before i go i need to thank a few special people let's thank the producers of this episode gave james maxima homies to bald matt mimit michael paul roll west armored dragon bash potato chuck commander ringry george lee march on methods nate ur yon paul peace hearts and four polytech realities for less red prophet rolling tools deviler willy and zinnabit these guys they're my high steered patrons over on patreon without these guys this episode about the arch iso it wouldn't have been possible the show is also brought to you by each and every one of these fine ladies and gentlemen all these names you're seeing on the screen right now these are all my supporters over on patreon because i don't have any corporate sponsors i depend on you guys if you like my work want to see more videos about linux and free and open source software subscribe to distro tube over on patreon peace