Documentations for Base Installation script [distinstall]
- git
- wget/curl
- If you are using an existing linux distro
- arch-install-scripts
-
Installer
-
via cloning (Whole)
- This method will require you to download/clone the entire repository
git clone https://github.com/Thanatisia/distro-installscript-arch
-
via cloning (Folder)
- This method will use the git 'sparse-checkout' to download a specific folder in the repository
- in this case : base-installation
- Syntax:
- Initialize Local Git
git init
- Add path of remote repository
git remote add -f origin https://github.com/Thanatisia/distro-installscript-arch
- (OPTIONAL) Add config
git config user.name {username} git config user.email {email}
- Initialize sparse-checkout git local repository folder
git sparse-checkout init
- Set path to tree
git sparse-checkout set "https://github.com/Thanatisia/distro-installscript-arch/tree/main/base-installation"
- Verify sparse-checkout
git sparse-checkout list
- Update new repository from sparse-checkout remote repository url
git pull origin {branch}
- Initialize Local Git
-
via curl
- This method allows you to download specifically the script to use
- Syntax:
curl -L -O https://raw.githubusercontent.com/<author>/<repository_name>/<branch>/[folder/to/script_name.sh]
- Usage
curl -L -O https://raw.githubusercontent.com/Thanatisia/distro-installscript-arch/main/src/base-installation/distinstall
-
-
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
-
-
All necessary files
Includes the above - Installer, config file and additional utilities
- Download the latest release from 'https://github.com/Thanatisia/distro-installscript-arch/releases/latest'
-
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
- Download Makefile
-
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
- NOTE:
- You can just edit those labelled with "# EDIT: MODIFY THIS" if you do not know where to start
- Change the variables, you do not need to change the associative arrays but feel free to do so (only if you know what you are doing)
- In the case whereby you would like to edit the Associative Array, this is found in setup() for modularity
$EDITOR [config file name]
- NOTE:
-
-
(OPTIONAL) Backup the config file for re-usage
- Change Permission for use (Execute [+x])
chmod +x distinstall
Currently installation is not required as it is using shellscript, however, there are plans on making a Rust-based/python installer for even easier configuration
./distinstall {options} [positional] <arguments>
-
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
- With Arguments
-
Positional Parameters
- start : Start the installer
-
Default (Test Install; Did not specify target disk name explicitly)
./distinstall start
-
Test Install; with target disk name specified as flag
./distinstall -d "/dev/sdX" start
-
Test Install; with target disk name specified with environment variable TARGET_DISK_NAME
TARGET_DISK_NAME="/dev/sdX" ./distinstall start
-
Test Install; with custom configuration file
./distinstall -c "new config file" -d "/dev/sdX" start
-
Start installation (Did not specify target disk name explicitly)
sudo ./distinstall -m RELEASE start
-
Start installation (with target disk name specified as flag)
sudo ./distinstall -d "/dev/sdX" -m RELEASE start
-
Start installation (with target disk name specified with environment variable TARGET_DISK_NAME)
sudo TARGET_DISK_NAME="/dev/sdX" ./distinstall -m RELEASE start
-
Start installation (with custom configuration file)
sudo ./distinstall -c "new config file" -d "/dev/sdX" -m RELEASE start
-
Open up fdisk for Manual Partitioning
sudo ./distinstall --fdisk
-
Open up cfdisk for Manual Partitioning
sudo ./distinstall --cfdisk
-
Test Install; using Makefile
make testinstall
-
Start installation; using Makefile
sudo make install
-
Dis/Unmount using Makefile
sudo make clean
-
Generate configuration file using Makefile
make genscript
- TARGET_DISK_NAME : This is used in the environment variable to specify the target disk you want to install with
-
cfg_name : the default configuration file name, change this variable before executing to use a specific config file AND/OR generate a default file in this custom filename
- Default Value : config.sh
-
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
- Please refer to the configuration guide for full information with regards to editing the configuration file