Giter Club home page Giter Club logo

dciso's Introduction

Debian Custom ISO Builder

dciso is a tool that I made to help with the design and customization of a Debian ISO (Primarily DEMON LINUX). These scripts have recently been updated to accomodate newer distributions of Debian: Bullseye. The previous version of these scripts relied on Live-Build which is no longer a necessary tool and has been removed due to contrived user complexity.

 Debian Custom ISO Utility
 (c) GNU 2022 - @RackunSec

Usage: ./dciso (args)

Arguments:
Dependencies:
  install-dep - Install all dciso dependencies.
Chroot Tools:
  build-chroot (RELEASE) - Build the chroot directory.
  start-chroot - Starts a chroot session in ./chroot.
  end-chroot - Ends the current chroot session from ./chroot
  clean - Destroys the chroot directory.
In Chroot Tools:
  in-init - Performs first time set of of the chroot, should be ran within chroot.
  in-start-chroot - Sets up the current chroot session, should be ran within chroot.
  in-end-chroot - ends the current chroot session, should be ran within chroot.
Generate an ISO:
  mkiso (ISO NAME).iso - Will create an ISO file from ./chroot

Installation

To install, run the following commands:

git clone https://github.com/RackunSec/debian-custom-iso-builder.git
cd debian-custom-iso-builder
chmod +x dciso
./dciso install-dep # This will install all dependencies

Building your Custom ISO

To build an ISO, we need a chroot to work out of and make our customizations. We build the chroot with the following command:

./dciso build (RELEASE) 

Where "RELEASE" is the Debian release that you want to customize. E.g.: buster, bullseye, etc. This script will build a chroot/ directory. Next we need to put a few tool into the chroot to access it while chrooted:

Chroot Access and Customizations

Now, simply start the chroot shell with the following command:

./dciso start-chroot

Once within the chroot shell, run the tool we passed to it with:

/etc/live-tools/dciso init # installs a lot of stuff
/etc/live-tools/dciso in-start-chroot # starts the chroot and mounts stuff for x11

Now, we are ready to begin installing packages and making our customizations. If you install Xfce4, you can simply run startx from the command line and customize the desktop/menus/etc.

Exit Chroot

Once completed, run

/etc/live-build/dciso in-end-chroot

and exit the chroot shell with CTRL+D and run:

./dciso end-chroot

It will recommend that you reboot - please do to ensure that nothing is mounted within the chroot before generating your ISO!

Generate the ISO

Finally, generate the ISO file with the following command:

./dciso geniso (ISO NAME).iso

Demon Linux Specific Items

I built in a question that get's asked when you run /etc/live-tools/dciso in-init in your chroot which will install a base Demon Linux system if so inclined. Also, if you'd like the Demon Linux Bash shell prompt theme, use this in your ~/.bashrc file:

Root:

PS1='\n\[\033[48;5;;38;5;240m\]╭╴\[\e[m\]\[\e[1m\]${debian_chroot:+($debian_chroot)}\[\e[m\]\[\e[3m\]\u\[\e[m\]\[\033[48;5;;38;5;243m\]\[\e[3m\]@\[\e[m\]\[\e[3m\]\h\[\e[m\]\[\033[48;5;;38;5;249m\]\[\033[48;5;;38;5;239m\]\[[\033[48;5;;38;5;243m\]\[\e[3m\]\D{%m/%d/%Y %H:%M:%S}\[\e[m\]\[\033[48;5;;38;5;239m\]]\[\033[48;5;;38;5;240m\[\e[m\]\n\[\033[48;5;;38;5;239m\]╰⌊\[\e[3m\]\[\033[48;5;;38;5;247m\]\w\[\e[m\]\[\e[m\]\[\033[48;5;;38;5;239m\]⌋\[\033[00m\]\[\033[48;5;;38;5;196m\]→  \[\e[m\]';

User:

PS1='\n\[\033[48;5;;38;5;240m\]╭╴\[\e[m\]\[\e[1m\]${debian_chroot:+($debian_chroot)}\[\e[m\]\[\e[3m\]\u\[\e[m\]\[\033[48;5;;38;5;243m\]\[\e[3m\]@\[\e[m\]\[\e[3m\]\h\[\e[m\]\[\033[48;5;;38;5;249m\]\[\033[48;5;;38;5;239m\]\[[\033[48;5;;38;5;243m\]\[\e[3m\]\D{%m/%d/%Y %H:%M:%S}\[\e[m\]\[\033[48;5;;38;5;239m\]]\[\033[48;5;;38;5;240m\[\e[m\]\n\[\033[48;5;;38;5;239m\]╰⌊\[\e[3m\]\[\033[48;5;;38;5;247m\]\w\[\e[m\]\[\e[m\]\[\033[48;5;;38;5;239m\]⌋\[\033[00m\]→  ';

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.