Pinterest Stumbleupon Whatsapp
Ads by Google

create an operating systemDo you know how customizable Linux really is? Well you should if you’ve even heard of Linux or dabbled in it a bit. If not, try taking a look at a list of over 1,000 different Linux distributions currently available. All of them try to cater to your exact needs and tastes, so a reasonable mind would think that there’d have to be a distribution out there with which you’ll find the perfect companion.

However, maybe you don’t want to take the time to look through and test every single distribution, especially if there are well over 1,000 of them out there. Maybe you don’t want to take your chances on whether a distribution is a match made in heaven, but instead you want a guarantee. What better way to know you have the perfect match in your hands than to make the operating system yourself?

Why Should I?

Why and how can you make your own Linux operating system? It’s quite simple (well, relatively speaking anyway) as a project exists to help people get started with something like this. The Linux From Scratch project was created specifically to get people going on making their own Linux operating system to meet their own needs, whether it’s for special hardware accommodations, maximizing performance, staying on the bleeding edge, or learning the internals of Linux.

Don’t think that Linux From Scratch is another distribution which simply starts with bare-bones. LFS is actually just a collection of documentation, so everything you do literally comes from each project’s source code. In other words, with the help of LFS documentation, you can download the Linux kernel’s source code directly from their site and work your way from there until you’ve eventually built a complete operating system — or at least as much of an operating system as you need.

Use Linux to Make Linux

create an operating system

When creating your own Linux operating system, you’ll need to understand that you’ll have to use a Linux distribution to create another one. This is because, as you’re creating everything directly from source code, you’ll need common tools provided with most Linux distributions in order to compile and install your LFS system. You don’t have to have the temporary distribution installed; you can just run one off a LiveCD like Ubuntu if you wish.

Ads by Google

Getting Started / Partitioning

make an operating system

Before you even start, it’s mandatory that you go over to this page and open up the latest LFS documentation on getting an LFS system started. The documentation will contain links and detailed information on how to accomplish the required steps, which is something this article won’t cover in full.

The first real step after opening up the documentation is to create a new partition where you’ll install your new LFS operating system. You shouldn’t have to do anything different from what you ordinarily do, whether it be a single ext4 partition to hold everything, separate root and home partitions, or whatever else you might do. You’re welcome to create these partitions using your favorite partitioning tool, such as GParted GParted - The Ultimate In Partitioning Software GParted - The Ultimate In Partitioning Software Read More .

Downloading Initial Source Code

Once you have your partitions ready, you’ll need to head over to Chapter 3 to download the source code for all necessary packages and patches. As far as I’m aware of, all of these packages are absolutely required, so your system won’t run without these. Then again, the front page of LFS brags that a system can be tweaked down to a mere 5MB, but you really have to know what you’re doing in order to accomplish that.

Compiling & Installing Your Base System

create an operating system

After making a few more changes as final preparations as defined in Chapter 4 of the documentation, you will begin to build the bare-bones of your LFS system. By following the guide, you’ll be compiling the tools which will make up the toolchain which you will then use to build the rest of the basics. Once you’ve completed that, you’ll “chroot” into your new system (which is the equivalent of restarting into your new operating system, except you are not literally restarting and the change only applies to your terminal window) and begin compiling everything else that will make up your new operating system.

Once you have a simple configuration going, you can begin to install other software that will make your system truly yours. What other software you should install is completely up to you, your wants, and your needs. Just remember, there is no package manager 5 Great Tips For The Ubuntu Software Center [Linux] 5 Great Tips For The Ubuntu Software Center [Linux] Read More as the software’s source code is downloaded and compiled.

Conclusion

Creating an LFS operating system will definitely take some time as compiling software is not always a fast process, and people who haven’t tried Linux or aren’t comfortable with the terminal or other nitty-gritty aspects of an operating system shouldn’t try this unless you’re doing this to learn. If you belong in those groups but want to try anyway, I recommend you try it in a safe, isolated location so that you don’t destroy something you want to keep by accident. If you have any questions, don’t hesitate to leave a comment! Have fun with your project and good luck!

What would you make your own LFS system for? What kind of software would it include, and what would be its purpose? Would you even create your own LFS system? Let us know in the comments!

Image Credits: lacinda

  1. Anonymous
    October 16, 2016 at 3:11 am

    Go t o pegasusos. jimdo. com

  2. Anonymous
    October 16, 2016 at 3:10 am

    Go to pegasusos. jimdo. com

  3. Tharnax
    May 8, 2015 at 8:17 pm

    I have a question: I had one issue when I installed linux, and it was because I couldn't play my games on it. Is it possible to create one so that my games will run on it? (right now my house is dominated by Windows, which most of our games use, and I was wanting something that would work just as well if not better for gaming and coding)

    • Ishtiak
      November 21, 2015 at 2:19 pm

      Actually it's not possible directly, but u can play windows game on Linux by using a additional software. But i can not remember one right now. You may do some search. you will get one.

      • RacerD123
        December 31, 2015 at 3:32 am
        • Althrin
          June 2, 2016 at 9:29 pm

          Wine is not a good alternative to running high performance binary programs like videogames in today's age. You are better off sticking to games that 'work' with linux. These games do exist, but take it from someone who has wanted this for years. It is taking forever for linux support to come to major titles.

          Wine has a lot of problems with Visual C dependencies and other dependencies which makes it hard to run anything written in C++ or C#. Even if and when you get it running it under performs because you are basically recompiling on the fly.

  4. rahul sharma
    April 27, 2015 at 9:51 am

    Can I make one Operating system in 6 months? I am willing to take this as my project in college.

  5. Josiah
    March 23, 2015 at 3:56 am

    Nice tutorial. It motivated me to create my own Linux. Thanks for the detailed instructions and links!

  6. sainadh
    February 17, 2015 at 7:10 am

    hi to all,

    I am studying diploma in it. I recently build LFS/BLFS 7.6 os and tell this about to my lectures they asked to me is it possible to use this LFS system on any computer? I don't answer because I don't know.LFS is only learning perpose is it correct?

  7. Sean
    February 5, 2015 at 9:40 pm

    Looks pretty cool. I want to learn Linux now. What is the checklist of concepts I should learn?

  8. Sensei Araya
    January 7, 2013 at 12:11 pm

    Can I use LFS to learn how to code? And if I can, how long will it take?

    I really want to do this, but I just can't seem to find time for it. With my current level of skill (absolutely minimal, as in, barely able to code the most basic programs with lots of help from the internet), it would probably take me years. Too bad, I found a slew of speed tricks and system tweaks on the internet that I wish I could include in my OS by default. I also wish to eliminate a lot of the OS features that I never use.

    *SIGH* Maybe I'll just go browse the distros list...

  9. TheFrawg
    December 20, 2012 at 12:14 pm

    Starting my build today from scratch. I will have a blog post on it and will post the link with updates. Seems like a daunting task, but why not. I've always wanted to learn a bit more about the inner workings of linux anyways. Good thing my boss lets me experiment as long as my work is done :)

    • Saqlain
      December 28, 2012 at 10:20 am

      I have created a small distro (it got minimal packages and i followed LFS approach), it is terminal based i.e. no desktop environment like gnome or kde etc.

      I want to distribute it as an ISO image I need some help on how to create this tiny distro ISO image? I got couple of questions kindly guide

      1) Is there some command line tool which i can use to create ISO image. I would have to install that software in my tiny distro?
      2) How to create partition layout for user, before even starting the kernel, do i need to write script? How can i invoke that from ISO image? etc I want minimal user interaction at this step. I would have to install boot loader also, at this stage?

      Might be basic question, but i am new to this, so kindly guide.

  10. Neil Pattanaik
    December 15, 2012 at 3:18 pm

    cant find source

  11. elijah hagberg
    November 24, 2012 at 11:27 pm

    very interesting.
    I plan to do this in my free time. i got a raspi and will try to make the os for it

  12. Kennedy Richard
    November 22, 2012 at 10:59 pm

    Thanks a lot for introducing me to this project! I'm planning to make my own operating system to help society to overcome its main problems.

  13. Sourav
    November 15, 2012 at 12:04 pm

    hi i have a few question 1st is after completing general steps for making os should i configure ubuntu software center so that i can install all my need with apt-get command?
    2nd is after building os how to make a iso image so that i can install it ?

  14. Sourav
    November 14, 2012 at 11:41 am

    hi great article.i want to know one thing can we use existing partition which have some data for making os??

  15. sudeep
    November 4, 2012 at 10:39 am

    How much time does one need to dedicate for LFS? when I heard of LFS on quora, the person took 1 week to make it. I want to go deeper into linux, i suppose LFS gives me a shot at that.

  16. dragonmouth
    November 2, 2012 at 8:19 pm

    Another, less traumatic, way to build a system is to install antiX Core and then, using apt-get, install only the packages that are wanted/needed.

  17. baby
    October 27, 2012 at 3:17 pm

    what do you do on this!!!!!!!!!!!!!!!!!!!!!!!!!!!

  18. Benn Agnew
    October 25, 2012 at 7:20 pm

    Quick question:

    How would a create a O.S. (mobile), from Android (as I'd like the play store)?

    • Danny Stieben
      October 29, 2012 at 3:44 pm

      It's possible, but like I said to ashu, I'm unable to help you there because it's a whole other world when it comes to mobile.

  19. ashu
    October 18, 2012 at 2:03 pm

    sir! i am trying to make my own mobile operating system and i am using linux kernel 2.6.10 but i am not able to understand how do i test my operating system.
    it will be very kind of you if you can help me out..

    • Danny Stieben
      October 29, 2012 at 3:43 pm

      Sorry, I'm afraid I can't help you out! Mobile operating systems are a completely different subject, and it's extremely hard to get them to work correctly as most mobile devices need specific (often proprietary) drivers.

  20. Rohil
    October 13, 2012 at 8:38 pm

    What all things do we need to create our own operating system? And does this article provides them all?

    • Danny Stieben
      October 29, 2012 at 3:42 pm

      The article and the suggested tutorial has all the information you need. I'd suggest going back to the tutorial and reading (or at least skimming) through it.

  21. Earl
    October 12, 2012 at 4:55 pm

    I am in the process of building my own Linux OS right now and I followed your advice to use a live USB of Ubuntu to build this. And using the live USB so far has worked great but this is the first problem I am encountering I am in chapter 3 and downloading the software and patches. I have just so far a hard drive with partitions and no software on the hard drive. The LFS pdf suggests to download the patches and software using wget I do not know how on a blank hard drive to use or download wget. So I am downloading the software and patches with archive manager. So I am sure I can find the files which are going into the archive manager so are these files on the hard drive where I am going to be able to get to them since I am using the live USB? Thanks for the help.

    • Danny Stieben
      October 29, 2012 at 3:42 pm

      wget is a command-line program which downloads files from the internet. When the tutorial asks you to use wget, it should have been Ubuntu's wget to download from the internet and save onto the hard drive. In any case, if you've downloaded the necessary files, just extract them onto the hard drive, as the instructions tell you.

  22. Rohil Bansal
    October 1, 2012 at 8:42 pm

    I have never used linux before but i have a great interest in developing a linux distribution. Do you think i need to do any preparations before i start with the project with the help of your article??

    • Danny Stieben
      October 29, 2012 at 3:40 pm

      It would be very advantageous to play around with an existing Linux distribution so you'll understand how it works. I'd only suggest creating your own distribution after you have a fair amount of knowledge in general about Linux.

  23. Ahmed Khalil
    September 7, 2012 at 7:25 am

    linux is good but need a big company to support

    • Danny Stieben
      October 29, 2012 at 3:38 pm

      Not always the case. Linux Mint doesn't have a big company supporting it, and it's quite popular. Then again, using Linux Mint as an example is cheating a bit because it relies on Ubuntu, which has Canonical.

      • dragonmouth
        November 2, 2012 at 8:05 pm

        There also is Fedora which is backstopped by Red Hat

  24. Freecycle Me
    September 5, 2012 at 11:06 pm

    if you are using the Ubuntu distro it would be easier to start with the Ubuntu Customization Kit http://uck.sourceforge.net/

    • Danny Stieben
      October 29, 2012 at 3:39 pm

      Thank you, I've been looking for this!

  25. Henrik Kaare Poulsen
    August 10, 2012 at 8:48 pm

    Dear all,

    I would like to point you to
    http://kaarpux.kaarposoft.dk/

    This is a Linux distro based on LFS,
    but where everything is build by scripts.

    /Henrik

    • Danny Stieben
      August 14, 2012 at 8:20 am

      That's a nice way to speed things up a bit. Thanks!

  26. Eric Wardowski
    July 28, 2012 at 8:39 pm

    Much thanks for an excellent article! I was hoping to install Linux over a weekend, but this project looks a lot more intense and time consuming. Still, inspirational.

  27. Dieka
    July 23, 2012 at 3:06 pm

    I'll definitely try the linux from scratch operating system. Found also inspiration on this website: http://www.operating-system.org

    • Danny Stieben
      July 25, 2012 at 1:21 pm

      Nice link!

  28. Dieka
    July 23, 2012 at 3:03 pm

    I'll definitely try linux from scratch. I found also this website useful in general topic about operating systems: http://www.operating-system.org

  29. LovesFLSun
    July 19, 2012 at 4:17 am

    Linux is the Bomb!! Love all your articles and this one is just "doing it" for me!!

    • Muz Rileks
      July 28, 2012 at 1:07 am

      Yes linux is the best and powerful operating system XD

  30. Jonathan Vicencio
    July 19, 2012 at 12:50 am

    This would be awesome to try when I find enough free time.

  31. Kevin Larsen
    July 19, 2012 at 12:24 am

    as ben stated - Definitely not for the faint hearted. - I'm on my third build 7.1 I'm attempting the XORG now I'v susessfully built 6.3, 6.7, and the custom live CD.
    good luk to all that try it is a learning experience

  32. Russ Dahl II
    July 18, 2012 at 1:12 pm

    This is something on my to do list.

  33. druv vb
    July 18, 2012 at 10:54 am

    With Puppy Linux working well for me as a rescue boat.
    XBMCbuntu working as a media station.
    I am getting over with terminal coding for an entire OS.

    But some casual console work is necessary when things go bad...

    Maybe this project can help students and aspiring computer scientists to create new stuffs...

  34. 8ee43e9fdb1fbca035ae6e52f3024f1f
    July 18, 2012 at 2:10 am

    Used Linux for about years now. A lot has changed in that time but mainly use Mandriva after falling off Redhat as it became more commercial oriented. Lot safer than Windows and half the crash problems. There are many great distros out there that would probably fit most anyones needs in a Linux distro without building one or you can start with a stripped down version of a major distro and add programs as you need. The command line function of Linux makes it much easier to do things that you can't get access to in Windows and it's fun and easy to learn and work with. Since getting into opensource I haven't bought an operating system in 10 years now but have occasionally supported some of the open source projects out there.
    Danny's ideas are sound and a good way to tweak and learn a very reliable and secure operating system. Give it a try.

    • Danny Stieben
      July 19, 2012 at 7:59 pm

      I agree, I've always found the Linux terminal to be way more understandable than the Windows command line. Then again, maybe it's because I was never turned on by Windows' command line in the first place! :P

      • Pax
        July 21, 2012 at 7:27 pm

        I agree about the stock command line but JPSoft's 4dos (command.com replacement) was an amazing experience back in the pure DOS days. I think you would have loved it.

  35. Gian Singh
    July 17, 2012 at 9:58 pm

    too many to chose from

  36. Shawn Ashree Baba
    July 17, 2012 at 6:43 pm

    This would be a great project to do.

  37. Shivam Anand
    July 17, 2012 at 10:46 am

    I dont want to waste my time

  38. Siddhesh Wani
    July 17, 2012 at 4:43 am

    Definitely a good article.

  39. Tracy
    July 17, 2012 at 4:20 am

    I'd just go with

    Suse Studio

    http://susestudio.com/

    You can build what you want- easy as pie. It might be a better way to ease into Linux? If that floats your boat, then you could have a whack at source-code building.

    Imho... ;)

    • Danny Stieben
      July 19, 2012 at 7:57 pm

      SUSE Studio is also a good choice. I actually wrote about it a long time ago (well, for me it's a long time ago).

      http://www.makeuseof.com/tag/create-custom-linux-installation-disc-suse-studio/

      • Tracy
        July 20, 2012 at 9:50 am

        I agree. It's sort of like having a bit of a go without having to get right into the guts of it. However, everyone has to start somewhere, and for a lot of people, starting with a success gives them the confidence to push further next time (LFS?).

        One nice thing about SuseStudio is how you can hover the add-ons to read exactly what it is before adding. That gives new folks a good intro into what's available, what it's called, & what dependencies are, etc...

        Great article, as are all I've seen @ makeuseof. :)

  40. Frank ScanMan
    July 16, 2012 at 11:03 pm

    It is a fun ride and a great learning curve. There's lots of information out there on the net. Recently I stumbled upon this site which toolkit handles lots of repetitive actions;
    Build GNU/Linux System Architect Toolkit - http://www.happy-monkey.net/architect/
    It's cool check it out :)

    • Danny Stieben
      July 19, 2012 at 7:55 pm

      Thanks Frank! I'll take a closer look.

    • dragonmouth
      November 2, 2012 at 7:56 pm

      That project has been discontinued.

  41. Austin Halsell
    July 16, 2012 at 11:02 pm

    I'd love to do this one day, but just figuring out how to install to my mac without destroying my computer was challenging. Maybe one day... :)

    • Danny Stieben
      July 17, 2012 at 12:37 am

      Quite honestly, I have still unsuccessfully been able to help a friend of mine (who loves his iMac) get Linux on it. As a geek, I have failed.

      • Joe Johaneman
        July 18, 2012 at 12:52 pm

        I've done it twice successfully. The trick is that Macs limit the number of partitions, so instead of setting up a swap partition, you set up a swap file instead. This is especially true of Santa Rosa era Macbooks. I'd also recommend that if you do install Linux on a Mac, you install rEFIt as a boot loader (http://refit.sourceforge.net/)

        • Danny Stieben
          July 19, 2012 at 7:54 pm

          Yeah, we've tried rEFIt, and installing isn't an issue, but actually booting it up was where problems started to occur. Oh well, maybe I'll have another try at it someday. Thanks for the tips!

        • Galan
          July 21, 2012 at 10:54 pm

          Do you really need to install Linux on Macs. It is already based on BSD.
          Just install what you need from BSD resources using mac console commands. I installed mc and it was very nice to have it,

  42. John R Carter Sr
    July 16, 2012 at 6:39 pm

    I tried this with Minix decades ago. It's not something I would bother with again. Off the shelf Ubuntu or Zorin works for me.

  43. Dan
    July 16, 2012 at 5:27 pm

    While this could be interesting in terms of learning, I wouldn't personally use this method to build an OS for daily use after having to put up with "dependency hell" when installing software within Linux distros I used 10+ years ago. It would seem to me that remastering an existing distro makes more sense.

    • Danny Stieben
      July 17, 2012 at 12:37 am

      I agree with that. This really has its learning and special-case uses. I don't remember much about dependency hell from way back in the day, but some of the stories I find could be told during Halloween! :P

  44. De Buck Paul
    July 16, 2012 at 12:25 pm

    I've always wanted to make my own Linux OS this seems to explain it very well, i'll give it a shot when I have some free time, thanks for the tips !

    • Erica
      July 16, 2012 at 10:06 pm

      please let us know how it goes! You'll have to tell us all about it from start to end!

    • Danny Stieben
      July 17, 2012 at 12:35 am

      Good luck! Please do share with us how it went if you can. :)

  45. Ben
    July 15, 2012 at 11:57 am

    Definitely not for the faint hearted.

    • Danny Stieben
      July 17, 2012 at 12:35 am

      Most definitely. People will actually need to prefer the terminal to do this with enough courage. :P

Leave a Reply

Your email address will not be published. Required fields are marked *