Coder Social home page Coder Social logo

ilmikko / workspace Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 166 KB

An initializer script to create a new workspace, so that I don't have to manually install everything I want/need.

License: GNU General Public License v2.0

Shell 96.13% Awk 2.10% Vim Script 1.77%

workspace's Introduction

Workspace

An initializer script to create a new workspace, so that I don't have to manually install everything I want/need.

Configuration options

OOS_INSTALL_DEVICE

The device this installation will use (for example /dev/sdb). All the information on this device will be lost. This is a required option, there is no default value.

OOS_INSTALL_NAME

The name of the installation. This will determine some settings such as the bootloader ID.

OOS_INSTALL_PACKAGES

Which packages to install using pacman / pacaur in stage 3.

Localization

OOS_LOCALE

Which locales are enabled? Does not have to be the full locale; for example: en_US fi_FI would enable all locales starting with these values

OOS_TIMEZONE

Which timezone to use? You can check the available timezones in /usr/share/zoneinfo

Partitions and mounting

OOS_PARTITIONS

Which partitions to create (there should be an example of this)

OOS_MOUNT_FOLDER

Where to mount the installation temporarily for writing. For example: /mnt If omitted, the mount folder will be a temporary folder in /tmp.

OOS_USE_GRUB

Use grub as the bootloader. Currently the script only supports this bootloader.

OOS_BOOT_UEFI

Use UEFI boot instead of BIOS boot.

OOS_UNMOUNT_AFTER_INSTALL

Unmount the filesystems after installation Default: 1

Network settings

TODO: If any specifics are needed to be provided, we can just turn the options straight into the corresponding settings. For example: OOS_NETWORK_MAC_ADDRESS becomes mac-address in the system connections. Or, if you want to, OOS_NETWORK_KEY_MGMT becomes key-mgmt, etc...

OOS_NETWORK_DRIVER

Which network driver to support? Currently only wpa_supplicant is supported, however nmcli is also planned. Default: wpa_supplicant

OOS_NETWORK_SSID

SSID of the network to connect to. This needs to be supplied - we need internet connection to install. TODO: Could this be probed?

OOS_NETWORK_PSK

Password of the network to connect to. TODO: These settings could be probed as well

Advanced options

OOS_PARTITION_DISK_LABEL

The partition table label to use (default: gpt) Please note: If you use something else than GPT, such as MBR, you need to make sure your partition list is <4 partitions, as logical partitions aren't supported.

OOS_LANG

Which LANG to set in locale.conf?

OOS_HOSTNAME

The hostname to use - this is usually the same as the INSTALL_NAME, but can be overwritten by this option.

OOS_BOOT_ID

The bootloader ID to use - this is usually the same as the INSTALL_NAME, but can be overwritten by this option.

Installation steps

OOS_USE_PARTITIONING

Use partitioning

OOS_USE_REMOUNT

Use remount

OOS_USE_STRAP

Use strapping

OOS_USE_SKELETON

Use skeleton

OOS_USE_REBOOT

Use reboot

OOS_USE_BOOTLOADER

Use bootloader installation

OOS_USE_PACSTRAP

Use pacstrap

Debug variables

OOS_FASTTRACK

Skip some confirmations and fast track to the installation process.

Other variables

Timeouts

OOS_ERROR_TIMEOUT

How much to wait when an error (like when mounting) happens.

System specifics

OOS_SHELL

Which shell are we running?

OOS_ARCH

Which architecture are we using?

OOS_DISTRIBUTION

If possible to tell, which distribution of linux are we using?

OOS_ADDITIONAL_PACKAGES

Which additional packages are needed in the installation process?

OOS_DEFAULT_PACKAGES

Default packages that are installed in any case

Paths

OOS_INSTALL_PATH

Location of the install.d directory. This directory will contain the stages for the installation.

OOS_AWK_PATH

Location of all of the awk scripts used by the script.

OOS_HELPER_PATH

Location of all of the helper scripts

OOS_INSTALL_CONF_PATH

Where will the install.conf be located? This file will be used to contain the configuration throughout the installation.

OOS_SKELETON_PATH

Location of all of the skeleton folders that will be used by the installation. User skeletons are stored in a different location

Idea space

The way I see is that the installation step contains three phases. Without going too philosophical, here is a list of those:

Phase 0

A setup phase that should work with every setup, it's main task is to choose which phase to pick next.

Phase 1

This phase is where there is a shell of some kind, but not necessarily all the tools required to complete an arch installation. The installation script should detect this phase and then do all in its capability to get the process to Phase 2. The dream would be to be able to say curl workspace-server.net/script.sh | bash - or similar, and have a interrupt-less installation from there.

Phase 2

This is a phase which works in an arch-like linux installation, and the toolset is readily available to complete the installation. The installation script should again detect this phase (we can also be booted from phase 1) and clone a new arch installation to whatever disk was provided. There are some things we could do in chroot, but most of it is left for Phase 3. In the end of Phase 2 we reboot to Phase 3. On arch installations, the script can simply skip to this step as the tools are already there.

Phase 3

This is the last phase, which is already booted into the new installation. Some final configurations are set in this phase. After this phase the script should finish and leave the user in a working installation (with or without a reboot.)

Footnote

The initializer script is yet to be completed; this is because my "workspace" consists of a variety of tools that I variate between, and as everything is subject to change it's hard to pin down everything I want in my installation script. However, I believe it will grow with time.

workspace's People

Contributors

ilmikko avatar

Watchers

James Cloos avatar

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.