SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1 2015-06-24 02:15:20

Ozitraveller
#! Junkie
From: Less is More!
Registered: 2011-04-26
Posts: 289
Website

DIY Distro - Debian Live-Build

I've created a live-build development environment for those
interested in how to make there own distro using Debian Live-Build.

Live-Build 4.x has been used, which supports Debian Jessie.

The first place to start is with the manual and the manpages. I suggest
that the manpages lb_config.1.txt and lb_clean.1.txt, should be looked
at first, after reading the manual.

I've also used is live-boot.7.txt if using -bootappend-live in lb config.

http://live.debian.net/manual/4.x/html/ … al.en.html
http://live.debian.net/manpages/4.x/en/txt/

Overview

This Debian Live-Build demonstration will endeavour to provide the reader
with the basics of Live-Build and some essential commands necessary to use it to create an installable/live iso.

For the purposes of this demonstration and to keep it simple, the target
desktop environment will be:

  1. both graphical and text installers

  2. installable from live session

  3. Jwm - Joe's Window Manager http://www.joewing.net/projects/jwm/

  4. 64 bit

  5. small set of applications

Requirements

This example uses Debian Jessie as the build environment

Step 1. Install live-build on Star or Debian Jessie
sudo apt-get install live-build
Step 2. Setup

Open a terminal window in your home directory and run the following commands:

wget -c "http://sourceforge.net/projects/linnix/files/diy.tar.gz"
tar -zxvf diy.tar.gz
cd diy-distro
sudo ./setup

Main directory structure

diy-distro
├── diy-build
└── diy-source

Sub-directories

diy-build
├── auto
├── config
└── local

diy-source
├── auto
└── config
    ├── apt
    ├── archives
    ├── bootloaders
    │   └── isolinux
    ├── hooks
    ├── includes.binary
    ├── includes.chroot
    │   ├── etc
    │   │   ├── dpkg
    │   │   ├── lightdm
    │   │   ├── live     <--------- live user setup
    │   │   └── skel     <--------- skeleton /home directory
    │   └── usr
    │       ├── bin
    │       ├── lib
    │       ├── local
    │       └── share
    ├── includes.installer <--------- installer preseed.cfg file and logo/theme update for the graphical installer
    └── package-lists <--------- lists of packages to be installed

   
   
The setup script does the following, and should only need to be run once:
1.    creates a clean diy-build directory
      WARNING: diy-build directory is deleted in the process, if it exists
2.    runs the update script - copies contents of diy-source into diy-build

You should now have a directory diy-distro in your directory and there should be
2 sub-directories diy-build and diy-source inside diy-distro.

NOTE : diy-build is owned by root.  If the owner of the build folder
       isn't root the build will fail or be corrupt.

The update script is used to update the diy-build folder from the diy-source folder and
can be run at any time. I find it easier to work with files/folders I own and
then run the script to do the copy. It's up to you whether you do it my way
or not. This script also updates the files with version number inside
that are in /config/includes.chroot/etc/   replacing VERSION with the version number from the update script.
       

sudo ./update
Step 3. Running the Build

In the diy-build folder there is a build script, which runs lb clean, lb config and lb build

./build

diy-hammer-jwm-64 iso

Disclaimer: This is not intended as a clone of either crunchbang or bunsenlabs, and is only intended
as an example of Debian Live-Build.

Tips:
1. These hooks: 990-cleanup.chroot, 300-localepurge.chroot, are used to remove and resize files to make the image smaller.
2. Setup-user script is run on login from /etc/light/lightdm.conf - session-setup-script=/usr/share/diy/setup-user
3. Installer preseed used to pre-answer install questions is in /config/includes.installer. The update script copies preseed.cfg to /config/includes.binary/install so the live install can use it. Also see live-build config
--bootappend-live.
4. Setup session-manager, there is a hook session-manager_alternative.chroot and 2 files in /config/includes.chroot/usr/share/xsessions jwm.desktop, lightdm-xsession.desktop.

References:
25-06-2015 : LightDM Default Session and x-session-manager setup

Star website

Last edited by Ozitraveller (2015-07-21 23:37:32)

Offline

Help fund CrunchBang, donate to the project!

#2 2015-06-24 05:04:46

tknomanzr
#! Die Hard
From: Heavener, OK
Registered: 2014-12-09
Posts: 777

Re: DIY Distro - Debian Live-Build

Bookmarked so I can give it a look over.

Offline

#3 2015-06-24 11:01:36

iMBeCil
WAAAT?
From: Edrychwch o'ch cwmpas
Registered: 2012-03-22
Posts: 1,026
Website

Re: DIY Distro - Debian Live-Build

@ozi: thank you very much for this. I have always wanted to study making a live iso, and even started to read documentation, but your 'how-to' will certainly shorten the time I have to read docs significantly. Once more: thank you very much!


Postpone all your duties; if you die, you won't have to do them ..
--> The very new BL forum! <--

Offline

#4 2015-06-24 19:56:53

pvsage
Internal Affairs
From: North Carolina
Registered: 2009-10-18
Posts: 13,970

Re: DIY Distro - Debian Live-Build

^ +1  There's so much cruft in the Live Build Manual that it's hard to see the trees for the forest there.

Offline

#5 2015-06-24 21:48:31

Ozitraveller
#! Junkie
From: Less is More!
Registered: 2011-04-26
Posts: 289
Website

Re: DIY Distro - Debian Live-Build

Morning All! Well it's early morning here!

This is exactly the problem I had when I started looking at live-build, I couldn't find any decent working examples. Most of what I found in searching was either out of date or only fragments.

I gave an early version to a friend to try and he has moved on to customising it to his own liking now.

This is what works for me, I like to keep it simple.

I have done localepurge and also minimised the manpages to give me more space for drivers and to keep the image to around 600mb.

Offline

#6 2015-06-25 00:22:11

tknomanzr
#! Die Hard
From: Heavener, OK
Registered: 2014-12-09
Posts: 777

Re: DIY Distro - Debian Live-Build

I found the manpages for lb config to be the best source of info. I used the manual some and it certainly helped to get me up to speed on the whole process, but given there is only 3 commands to the whole system, lb config is where 90% of the magic happens.

Offline

#7 2015-06-25 02:23:45

Ozitraveller
#! Junkie
From: Less is More!
Registered: 2011-04-26
Posts: 289
Website

Re: DIY Distro - Debian Live-Build

live-boot.7.txt is also very useful if you used --bootappend-live in lb config.

I'm uploading an iso atm that I built using this process this morning.

Upload complete see the link above at the end of the post #1

Last edited by Ozitraveller (2015-06-25 02:48:18)

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.
Server: zapp

Debian Logo