Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

Building your own Linux Distro?


  • Please log in to reply
12 replies to this topic

#1 LinuxChic

LinuxChic

  • Members
  • 19 posts
  • OFFLINE
  •  
  • Gender:Female
  • Location:Louisiana
  • Local time:07:54 AM

Posted 21 March 2015 - 07:03 PM

I have been using Zorin 9 for a while now and have contemplated building my own Linux Distro. I know Zorin has Ubuntu under the hood and is Debian based. Was wondering if any of y'all have had any experience with building or customization. I have an idea of how I want it to look and everything I want it to come with. Just needing a little input. Thank you in advance.



BC AdBot (Login to Remove)

 


#2 shadow-warrior

shadow-warrior

  • Members
  • 188 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Nicaragua
  • Local time:06:54 AM

Posted 21 March 2015 - 08:04 PM

I have Built my own Distro based on a Base install ..I.E Arch linux,  Calculate cls, (gentoo) and a Slackware.....which meant I had to install and configure everything  like Network / wi-fi  display manager, Desktop environment, file manager, etc etc.... all of which is reletively easy if you can read documentation...and be able to research why something isnt playing well with another package and so on...  but I know very little about the underlying systems really and modifying kernels or such is over my head..

 

there is also  Linux from Scratch  where you really do build your own Distro.. http://www.linuxfromscratch.org/lfs/read.html     if you have the time it would be a great learning experience and a lot of fun...



#3 Al1000

Al1000

  • Global Moderator
  • 7,385 posts
  • ONLINE
  •  
  • Gender:Male
  • Location:Scotland
  • Local time:01:54 PM

Posted 22 March 2015 - 03:39 AM

I've recently become interested in doing the same, and it just so happens that I downloaded Arch Linux yesterday.

I've been looking for a lightweight operating system for my main computer to complement Kubuntu, that's different enough to keep me interested in it, and Debian which was my latest choice isn't cutting the mustard.

Edited by Al1000, 22 March 2015 - 03:39 AM.


#4 LinuxChic

LinuxChic
  • Topic Starter

  • Members
  • 19 posts
  • OFFLINE
  •  
  • Gender:Female
  • Location:Louisiana
  • Local time:07:54 AM

Posted 22 March 2015 - 07:12 AM

I had thought about going the way of completely from scratch, but I am not so sure on that one. Several distro's may be different on the outside but are Ubuntu at their core. Zorin is Ubuntu at it's core. Thus the reason I think Wiz ended up with Zorbuntu. The advantages of creating a customized Ubuntu would mean getting regular updates for security and bug fixes. 



#5 shadow-warrior

shadow-warrior

  • Members
  • 188 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Nicaragua
  • Local time:06:54 AM

Posted 22 March 2015 - 10:18 AM

I guess it could be interesting to see how much Ubuntu you could strip off before it went back to Debian.. so you could keep your Ubuntu repos..get your updates etc..   

I have never really used Ubuntu ..i tried it on  maybe its first version ...but i was already happy with Knoppix, mandrake ,mepis, vector, DSL and so on... 

 

I have probably distro hopped almost every disto made at some time.and too many seem like the same distro with a different theme icons etc.....thats why i like to sort of build mine from a core ....

 

I prefer DMs like Fluxbox, Openbox, Icewm or tiling DMs   rather than DEs that way i dont end up with a load of stuff i will never use..   ( i do have 1 XFCE Gentoo machine (for Marital Bliss)

Not many Distros offer Openbox types so another reason to build my own

 

I run this Manjaro laptop which is Arch based just due to the repos being tested before updates.. so i only have to update every 10 days  ..with pure ARCH they were to often.  this Laptop has run Manjaro for about 3yrs and has never had any  OS issues....

 

In another place I have a old PC with AntiX ( Debian Testing)on it ..which is very bare install and that has been built up to be more than adequate though that has had problems at times .and with Debian Stable you are way off the cutting edge  not that it matters that much  and I have had Crunchbang on the same machine for years...sadly its no longer being Maintained..

 

But building from a very basic core has always been more fun and been better for my needs



#6 wizardfromoz

wizardfromoz

  • Banned
  • 2,799 posts
  • OFFLINE
  •  
  • Gender:Male
  • Local time:10:54 PM

Posted 26 March 2015 - 03:15 AM

I like shadow-warrior's approach. I am going to work my way through Linux From Scratch, to the end, in order to de-compile TimNet (formerly known as Zorbuntu).

 

Thus the reason I think Wiz ended up with Zorbuntu.

 

Getting warmer.

 

I believe TimeShift may have had a part in the creation of my hybrid love child, but I have yet to create a test-bed duplicating the circumstances prior to its birth, in order to prove or disprove same.

 

:wizardball: Wizard



#7 cat1092

cat1092

    Bleeping Cat


  • BC Advisor
  • 6,998 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:North Carolina, USA
  • Local time:08:54 AM

Posted 26 March 2015 - 03:53 AM

 

 

I believe TimeShift may have had a part in the creation of my hybrid love child, but I have yet to create a test-bed duplicating the circumstances prior to its birth, in order to prove or disprove same.

 

So evidently you backed up both OS's to the same partition? 

 

The reason I ask, is because I made a rookie mistake with TimeShift, figuring I could backup all to the same partition, each in the folder. No, that didn't happen. I first imaged the Linux Mint 17.1 install my wife uses, then the next was my main desktop with the same OS. When firing up TimeShift on that one, noticed something that I didn't on her backup, it was 'cleaning up' for a couple of minutes, I let it finish, and after it was done. noticed all was in the same dang folder. 

 

Being that both were the same OS, the outcome may not have mattered much. However, had I backed up the fresh install of Ubuntu MATE 14.04.2 on top of it, what a mess it could have been, all going to the same folder. It could have created a unique distro as well. May be something I'll have to do to kill some time one day & am bored. I'm going on record to say that somewhere during the 2nd TimeShift backup, there was a unique blend of the two OS's created and no, you'll likely never repeat it, at least what you have. 

 

So do you run TimNet as is, updating as normal, or just letting it sit? You should take a disk image of it with a backup tool to preserve it, though I figure you already have. I also wonder what happens the day it's upgraded, what path it takes (assuming an upgrade install). 

 

In the end, I discovered that one must have a partition for each Linux OS backed up with TimeShift, used a couple of spare drives to create these. Had you done this, TimNet would never had been born, as the OS's wouldn't had mixed. 

 

Cat


Performing full disc images weekly and keeping important data off of the 'C' drive as generated can be the best defence against Malware/Ransomware attacks, as well as a wide range of other issues. 


#8 cat1092

cat1092

    Bleeping Cat


  • BC Advisor
  • 6,998 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:North Carolina, USA
  • Local time:08:54 AM

Posted 28 March 2015 - 02:53 AM

There was a time when I once thought of creating my own distro, based on Linux Mint rather than Ubuntu. Having an XP like look to lure some into giving Linux a shot. Had even planned a name, but soon discovered there was already a created, but discontinued, 'Linux XP'. A Russian based Linux distro that was licensed, not freely given away, and didn't want to be impeding on another's copyrighted ideas. Being that it was for purchase only, meant it wasn't free to duplicate. The name would have been soon known by veteran Linux users & discarded as rubbish or infringement on others. The base distro is free, the customizations, including any wallpapers, other art, any names or logos that is like the distro, must go. 

 

However after a bit of research, quickly learned there's more to it than removing any Linux Mint logos, and of course anyone would see it's a copycat effort. There was also the making things look as close as possible to resemble XP, w/out using Microsoft trademarks, which surely there would've been, or been reported to in short order. Then would gave to get someone whom knew what was going to to check the ISO for errors (including any Trade violations). That was my goal, in the end, may have caused legal issues for myself, lots of them. 

 

Cat


Performing full disc images weekly and keeping important data off of the 'C' drive as generated can be the best defence against Malware/Ransomware attacks, as well as a wide range of other issues. 


#9 matt_tty0

matt_tty0

  • Members
  • 5 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Cleveland Ohio
  • Local time:08:54 AM

Posted 10 April 2015 - 10:49 PM

I have decided to build a Linux distro after some consideration of how things have changed, seeming to move away from the roots of Linux.

Not liking the changes from real paths for various bin and sbin into symlinks. Want to have an init choice.

Reviewing some things like acl, and the various 'kits', and other things to see what is really needed.
 

The goal is to create a distro with a normal FHS filesystem tree, a choice of init, complete package selection on install.

Fluxbox/Xorg is a first choice, and I am still reviewing some other window managers/desktops.

 

Want a LiveCD to provide a combination of binary installs and source build/installs for packages.

Would like to make a Linux system builder LiveCD with a full compliment of compilers and libraries.

 

I like the LFS idea, but would like to take this a step farther for finer control of the system build.

 

I have found an excellent method for starting the process of building a distro:

  • Use the latest SystemRescueCD + Virtualbox (virtual sata drives: 10 gb + 512 mb swap drive)
  • Use the upstream GNU sources (unbranded) to build a 'base system' (enough to boot)
  • Build a native gcc compiler for the distro (decide on the arch level, like i686)
  • Build a kernel for the distro
  • Build system V init and write some basic rc scripts

Note: SystemRescueCD will give you a zsh for each console, so before working, invoke:  bash

 

A lot of the upstream sources can be found at (http) gnu.org (choose a mirror) and directory.fsf.org/wiki/All

More sources at gcc.gnu.org/mirrors.html and www.gnu.org/prep/ftp.html

 

The kernel from kernel.org (patches are only needed to bring an older kernel version to the version you see listed).

So you just need the kernel, like for 3.19.3 use the tar.xz link, get the pgp signature file too.

 

You can get gcc from gcc.gnu.org, many dependencies are included, except for a few.

Dependencies needed (these are libraries), found on the gnu mirrors, for example (ftp) gnu.mirrors.pair.com/gnu/gnu/

Watch the version numbering, its easy to overlook it by the sort order. Like 3.10.2 is newer than 3.4.2

gmp

mpfr

mpc

isl

cloog

 

Read the gcc install guide (repeatedly, its a lot to digest but worth it, start with 1.prerequisites): gcc.gnu.org/install

I use the Debian package search tool to check dependencies: www.debian.org/distrib/packages

 

This is a great way to really learn and understand how a Linux system works.

I learned a lot just in this past week.

 

I have compiled binutils successfully, and installed it to the distro filesystem.

This is a test version for now because I have some tweaks to add on the next compile.

Mostly wanted to see where things ended up after an install and test the configure options.

 

Stil working on the gcc compiler build - need to resolve the chicken before the egg thing with the gnat/ada compiler.

 

 

Here are some things I did for the binutils build:

 

I already created a single partition using fdisk and created an ext3 filesystem on /dev/sda1 (vbox).

 

Create a full FHS tree on the distro filesystem (make all the base directories needed).

I made a bash script for this if anyone has an interest.

In vbox, /dev/sda1 is mounted as /mnt/distro and this is the distro root / for the install.

 

Make a directory on the distro system for builds, like:  /mnt/distro/builds

Unpack binutils into this directory using tar (one of the below choices):

  • tar -vxzf binutils-2.25.tar.gz
  • tar -vxjf binutils-2.25.tar.bz2
  • tar -vxJf binutils-2.25.tar.xz
  • tar -vx -lzip -f binutils-2.25.tar.lz
  • tar -vx -lzop -f binutils-2.25.tar.lzo
  • tar -vx -lzma -f binutils-2.25.tar.lzma
     

Write the configure options into 2 files (1 is for reference).

You can view one in a console while editing the other.

./configure --help > cfigs
cat cfigs > ofigs

An example of some basic choices in the cfigs file for my machine (Use only 1 space before each --option, no blank lines):

I have specific locations in mind for the install, yours may vary.

 --prefix=/usr
 --exec-prefix=/usr
 --sharedstatedir=/var/lib
 --localstatedir=/var
 --program-prefix=i686-pc-linux-
 --build=i686-pc-linux
 --host=i686-pc-linux
 --target=i686-pc-linux
 --with-arch=prescott
 --with-tune=prescott

Run the configure script by invoking configure and giving the custom options in the cfigs file:

sh ./configure $(cat cfigs | tr -d "\n")

Read the config.log to see if there are needs.

If all is well then invoke:  make

If all is still well then invoke:  make DESTDIR=/mnt/distro install

 

Make sure you use the keyword DESTDIR exactly as it looks.

This is the key to installing to a root path of your choice.

 

I am working from console (did not startx). If you want more tty consoles, invoke: openvty

This will push the dmesg streaming console from tty7 to tty8 and give you tty1 - tty7.

You can open more consoles by repeating the openvty command.

 

These are just some things I worked out this past week, hope it helps,

 

Matt



#10 cat1092

cat1092

    Bleeping Cat


  • BC Advisor
  • 6,998 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:North Carolina, USA
  • Local time:08:54 AM

Posted 10 April 2015 - 11:25 PM

Matt,  :welcome: to BC Forums & the Linux discussion area!

 

Glad to see new members coming in with ideas & goals in mind, hope that you find the forum an enjoyable & learning experience. :)

 

As Linux users, we're constantly learning, as we have to, not having a multi billion dollar corporation backing us, as well as telling us what we can & can't do with their software. That part, we don't want nor need. 

 

Hopefully some members will be willing to contribute some ideas to assist you, as for me, am not good at compiling the needed code to build a distro, but sure would be glad to take one you build for a test drive. I run VirtualBox also, as well as VMware Player, in my Linux Mint 17.1 MATE install, to run various OS's & to test new ones. If you're going to be building, VirtualBox will surely come in handy. 

 

We have a good group of folks here, hope that you soon get to meet a few & just make yourself at home. :thumbup2:

 

Am looking forward to more of your postings.  :)

 

All the Best,

Cat


Performing full disc images weekly and keeping important data off of the 'C' drive as generated can be the best defence against Malware/Ransomware attacks, as well as a wide range of other issues. 


#11 wizardfromoz

wizardfromoz

  • Banned
  • 2,799 posts
  • OFFLINE
  •  
  • Gender:Male
  • Local time:10:54 PM

Posted 11 April 2015 - 03:58 AM

@matt_tty0
 

Create a full FHS tree on the distro filesystem (make all the base directories needed).
I made a bash script for this if anyone has an interest.

 
I may come back to you about that sometime, I have an interest in scripting, wonder why you did not want to use the zsh?
 
:welcome:
 
:wizardball: Wizard

Edited by Queen-Evie, 11 April 2015 - 10:48 AM.
deleted "time table" comment


#12 matt_tty0

matt_tty0

  • Members
  • 5 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Cleveland Ohio
  • Local time:08:54 AM

Posted 13 April 2015 - 03:44 PM

Matt,  :welcome: to BC Forums & the Linux discussion area!

 

Glad to see new members coming in with ideas & goals in mind, hope that you find the forum an enjoyable & learning experience. :)

 

As Linux users, we're constantly learning, as we have to, not having a multi billion dollar corporation backing us, as well as telling us what we can & can't do with their software. That part, we don't want nor need. 

 

Hopefully some members will be willing to contribute some ideas to assist you, as for me, am not good at compiling the needed code to build a distro, but sure would be glad to take one you build for a test drive. I run VirtualBox also, as well as VMware Player, in my Linux Mint 17.1 MATE install, to run various OS's & to test new ones. If you're going to be building, VirtualBox will surely come in handy. 

 

We have a good group of folks here, hope that you soon get to meet a few & just make yourself at home. :thumbup2:

 

Am looking forward to more of your postings.  :)

 

All the Best,

Cat

 

Greetings Cat !

 

Thanks for the welcome - this looks like a great forum where I can be among friends.

 

I'm still in the building/designing/experimenting/learning part of it all so it may take some time as I work out the details.

Want it all to fit together right. Its going to be a lot of ground to cover - I will be learning some things in detail that I only knew generally before.

I may have some delays - will be moving in a few weeks and have some school coming up after that, and then, with luck, on to a new job.

 

I'll keep you in mind when I get this thing standing up on its feet - will be nice to have some input on the design, thanks.

 

I agree with you, having software that gives us room to grow and explore is very welcome.

Seems like with the commercial OS you spend far too much time feeding it with your efforts - instead of the OS fueling your work.

 

Cheers,

Matt



#13 matt_tty0

matt_tty0

  • Members
  • 5 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Cleveland Ohio
  • Local time:08:54 AM

Posted 13 April 2015 - 04:15 PM

@matt_tty0
 

Create a full FHS tree on the distro filesystem (make all the base directories needed).
I made a bash script for this if anyone has an interest.

 
I may come back to you about that sometime, I have an interest in scripting, wonder why you did not want to use the zsh?
 
:welcome:
 
:wizardball: Wizard

 

 

Greetings wizardfromoz !

 

Its really the difference in the way bash and zsh work. I have always used bash predominantly.

Also, I am very adept at bash scripting, and some parts of my bash script code will not work in zsh. I would have to retool.

I foresee the need for a lot of scripts when I build an installer for the distro, so its probably best to stick with what I know best.

I remember using an older version of FreeBSD and trying to work out stuff in csh, I was a bit lost...

 

The FHS tree builder script creates the directory tree, and sets owner, group, and permissions (configurable).

It has easy options for adding or removing directories to be adaptable to your own tree design.

I want to work out some binary locations for gcc and bintools related stuff, so still need to add some of those paths, but it is otherwise complete.

 

It is a bash script, and I know from testing that it will not work in zsh as written.

I am not sure if zsh can do some of the things bash can, but it could be interesting to port it over to zsh (by someone more zsh skilled than I).

 

Cheers,

Matt






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users