Skip to content

(Migrated) My linux distro installscript suite of scripts. Aims to be 1) Modular, 2) Customizable and 3) Portable. Designing this to eventually be a Standardized/Universal Distribution Installer framework where you can just modify the chroot installation process as specified by the developer, as well as the config files.

License

Notifications You must be signed in to change notification settings

Thanatisia/distro-installscript-arch

Repository files navigation

Base Installation Script (ArchLinux Edition)

Linux Distribution Portable, Modular CLI/Terminal Base-Installation + Essential Scripts for ArchLinux

NOTE

  • This project has been migrated and rewrote into python in this repository, with a consideration on potentially going to write it in golang for the ability to compile into a single binary (do tell me how you feel about this in terms of usability), please follow the attached repository for future updates!
  • Thank you once again for following this project and feel free to dm me on any of my social media and/or create an Issue/pull request if you have any ideas on
    • what to add
    • Bugs Encountered

Table of Contents

Information

Background

Welcome to my (semi)automatic Linux distribution (trying-to-be-generic) installation script!

This project revolves primarily around the base installation area, but this project will also contain various scripts for Post-Installation support as well!

  • The Project was first planned as I had to reinstall my ArchLinux (as do many Arch users) but had to do it manually. Thus, the concept bloomed when I considered how to automatically install a consistent ArchLinux build with similar if not the same packages and users etc without having to re-type them.

  • The project (specifically the Base Installation Linux Install script ) is designed to be

    1. Modular
    2. Portable,
    3. Customizable
    4. Configurable
  • As you will see in Usage, the end result will be that you should get the same build everytime consistently. The only time it might not may be if the installation process itself completely change and/or the tools required by the target distribution changed, thus, leading to the next point

  • The script has been formatted and structured in a way that if you want to create a Linux install script for another distro, you just need to

    • enter the functions that is specifically for that distro (according to the steps for installation)
    • change that line of code and that should do it, as some of the general steps are universal across the distro CLI-based installation steps
    • Thus, with the modular, containerized method, the modification of codes will be easier and customizable

Files and Folders

  • SUPPORT.md : For a list of hardware/software support
  • Source codes : This is the root working directory containing the source files, configuration and scripts
    • base-installation/ : This is the Base Installation script. All files placed here have been tested from those found in dev (Development Folder). This is probably where you want to go first.
    • post-installation/ : This is the Post-Installation related scripts. All files placed here have been tested from those found in dev
  • references/ : This references directory contains various useful files such as Sample configurations, Sample templates and Sample usage scripts.
  • development : This is the development directory. This directory is essentially the Nightly Build branch and to be considered as Testing or unsafe, just to be safe, please test the files found here in a Virtual Machine.
  • documentations : This contains all documentations and guides for references
    • including detailed setup; usage

Setup

This is a basic rundown of how to use the program, please refer to Base Installation Manual for a more detailed rundown

Pre-Requisites

  • (Optional) Internet Connection
    Required for curl and wget
    

Dependencies (General)

  • curl
  • base-devel
  • arch-install-scripts
  • make
  • git
  • parted

Obtaining Installer

  • via Curl (Recommended)

    curl -L -O "https://raw.githubusercontent.com/Thanatisia/distro-installscript-arch/main/src/base-installation/distinstall"
  • Change Permission for use (Execute [x] and User [u])

     chmod u+x distinstall

Obtaining Config File

  • Default config file

    • Default config file name : config.sh
    • WIP/TODO: check if a a config file exists (Default config file name is 'config.sh')
    ./distinstall -g
  • Generate custom config file

    • WIP/TODO: check if a a config file exists (Default config file name is 'config.sh')
    ./distinstall -c [new-config-file-name]
  • (OPTIONAL) Curling the example config.sh

    curl -L -O "https://raw.githubusercontent.com/Thanatisia/distro-installscript-arch/main/docs/configs/config.sh"
  • Edit config file

    $EDITOR [config file name]

Obtaining additional helper utilities/files

  • Makefile
    • (OPTIONAL) Obtaining Makefile

      • I designed this Makefile to automate and make running the installer easier
      curl -L -O "https://raw.githubusercontent.com/Thanatisia/distro-installscript-arch/main/docs/configs/Makefile"
    • (OPTIONAL) Editing the Makefile

      • If you have obtained the Makefile and will be using this to install
      • Edit the Makefile and specify your device labels and information
        $EDITOR Makefile

Obtaining all necessary files

Includes the above - Installer, config file and additional utilities

  • Downloading the latest release

    Includes the above - Installer, config file and additional utilities

  • Download via the Makefile

    • Download Makefile
      curl -L -O https://raw.githubusercontent.com/Thanatisia/distro-installscript-arch/main/src/base-installation/Makefile
    • Execute the 'download' rule/target
      • You should get all the necessary files required (i.e. installer, generated configuration file)
      make download

Documentation

Synopsis/Syntax

./distinstall {options} [positional] <arguments>

Parameters

  • Optional Parameters

    • With Arguments
      • -c [config-file-name] | --config [config-file-name] : Set custom configuration file name
      • -d [target-disk-name] | --target-disk [target-disk-name] : Set target disk name
      • -e [default-editor] | --editor [default-editor] : Set default text editor
      • -m [DEBUG|RELEASE] | --mode [DEBUG|RELEASE] : Set mode (DEBUG|RELEASE)
    • Flags
      • -g | --generate-config : Generate configuration file
      • -h | --help : Display this help menu and all commands/command line arguments
      • --fdisk : Open up fdisk for manual partition configuration
      • --cfdisk : Open up cfdisk for manual partition configuration
  • Positional Parameters

    • start : Start the installer

Usage

  1. Default (Test Install; Did not specify target disk name explicitly)

    ./distinstall start
  2. Test Install; with target disk name specified as flag

    ./distinstall -d "/dev/sdX" start
  3. Test Install; with target disk name specified with environment variable TARGET_DISK_NAME

    TARGET_DISK_NAME="/dev/sdX" ./distinstall start
  4. Test Install; with custom configuration file

    ./distinstall -c "new config file" -d "/dev/sdX" start
  5. Start installation (Did not specify target disk name explicitly)

    sudo ./distinstall -m RELEASE start
  6. Start installation (with target disk name specified as flag)

    sudo ./distinstall -d "/dev/sdX" -m RELEASE start
  7. Start installation (with target disk name specified with environment variable TARGET_DISK_NAME)

    sudo TARGET_DISK_NAME="/dev/sdX" ./distinstall -m RELEASE start
  8. Start installation (with custom configuration file)

    sudo ./distinstall -c "new config file" -d "/dev/sdX" -m RELEASE start
  9. Open up fdisk for Manual Partitioning

    sudo ./distinstall --fdisk
  10. Open up cfdisk for Manual Partitioning

    sudo ./distinstall --cfdisk
  11. Test Install; using Makefile

    make testinstall
  12. Start installation; using Makefile

    sudo make install
  13. Dis/Unmount using Makefile

    sudo make clean
  14. Generate configuration file using Makefile

    make genscript

Wiki

Modes

  • DEBUG (Default) : Test install; Allows you to see all the commands that will be executed if you set the MODE to 'RELEASE'; set by default to prevent accidental reinstallation/overwriting
  • RELEASE : Performs the real RELEASE; must use with sudo

Environment Variables

  • TARGET_DISK_NAME : This is used in the environment variable to specify the target disk you want to install with

Configuration

  • Please refer to the configuration guide for full information with regards to editing the configuration file

FAQs

Remarks

  • Please do contact me in any of the platforms below if you have any ideas | bugs | comments | suggestions or if you just wanna talk!
    • I am open for suggestions as well as talking to everyone
  • thank you again for using!

Contacts

About

(Migrated) My linux distro installscript suite of scripts. Aims to be 1) Modular, 2) Customizable and 3) Portable. Designing this to eventually be a Standardized/Universal Distribution Installer framework where you can just modify the chroot installation process as specified by the developer, as well as the config files.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published