Browse Source

Cleanup pass

master
jcmdln 2 years ago
parent
commit
1595dec611
2 changed files with 51 additions and 57 deletions
  1. 14
    20
      Readme.md
  2. 37
    37
      gein.sh

+ 14
- 20
Readme.md View File

@@ -1,8 +1,6 @@
`gein` is a script which installs Gentoo Linux. The primary goal is to
automate the installation of my own ideal Gentoo setup though the
current design allows for others to fork or submit PR's should it be
desired. Keep in mind that this project is NOT a replacement for reading
the Gentoo Handbook.
automate the installation of my own ideal Gentoo setup though the current
design allows for others to fork or submit PR's should it be desired.

You may review the source code at https://github.com/jcmdln/gein for
more information if needed.
@@ -19,35 +17,31 @@ more information if needed.


## Warnings
- gein is NOT a replacement for reading the Gentoo Handbook.
- gein is NOT a one-size-fits-all solution.
- Read the warnings at the top of `gein.sh` FIRST!
- Review all of the files in this repository before using.
- You must manually partition and mount your disks.
- Consult your Gentoo Handbook.
- gein does not install a web browser or office suite.


## Getting Started
1. Download a Gentoo LiveCD from https://www.gentoo.org/downloads/

2. Write the ISO to a USB drive:

$ dd if=~/Downloads/<iso> of=/dev/<usb>

3. Boot from the USB drive on the target device


## Installing
1. Partition and mount your disk(s)
0. Create your Gentoo installation media.
1. Partition and mount your disk(s).
2. Download and run `gein.sh`:

$ wget http://gein.jcmdln.net/gein.sh
$ sh gein
$ sh gein.sh
gein: Linux-based derivative of Gentoo
-h help Shows this output
-b bootstrap Bootstrap the stage3 tarball
-h, help Shows this output
-b, bootstrap Bootstrap the stage3 tarball

Post-bootstrap:
-m minimal Perform a basic Gentoo installation
-d desktop Install a complete gein desktop
-m, minimal Perform a basic Gentoo installation
-d, desktop Install a gein desktop
i3wm A complete i3wm desktop
lxqt A complete LXQT desktop

3. Read the information at the top of `install.sh` and modify the
variables as needed:

+ 37
- 37
gein.sh View File

@@ -24,33 +24,33 @@
# record (MBR) of '/dev/sda'. You will also need to uncomment the line
# pertaining to your GPU and modify it as needed.

CPUCores= "$(grep -c ^processor /proc/cpuinfo)"
Hostname= "gein"
Locale= "en_US.UTF-8 UTF-8"
#PartitionBoot= "/dev/sda"
SwapSize= "2G"
TimeZone= "America/New_York"
#VideoCards= "i915 i965 intel"
#VideoCards= "amdgpu radeonsi"
#VideoCards= "nouveau nvidia"
#VideoCards= "virtualbox vmware"
CPUCores="$(grep -c ^processor /proc/cpuinfo)"
Hostname="gein"
Locale="en_US.UTF-8 UTF-8"
#PartitionBoot="/dev/sda"
SwapSize="2G"
TimeZone="America/New_York"
#VideoCards="i915 i965 intel"
#VideoCards="amdgpu radeonsi"
#VideoCards="nouveau nvidia"
#VideoCards="virtualbox vmware"


# This section defines some command aliases that will be used later on,
# and is primarily used as a mechanism to inhibit or control output in a
# way that can be easily updated if needed.

Emerge= "emerge -v --quiet-build"
Make= "make -s -j$CPUCores"
Wget= "wget -q"
Emerge="emerge -v --quiet-build"
Make="make -s -j$CPUCores"
Wget="wget -q"


# This script relies on downloading configuration files from the main
# repository. Here we will create the $Source variable to simplify
# future sections.

Source= "https://raw.githubusercontent.com/jcmdln/gein/master"
#Config= ""
Source="https://raw.githubusercontent.com/jcmdln/gein/master"
#Config=""


# By default, $AutoKernel is set to 'true' which means that the kernel
@@ -60,8 +60,8 @@ Source= "https://raw.githubusercontent.com/jcmdln/gein/master"
# $AutoKernel to 'false' to use a pre-built kernel config. An example
# kernel config is provided though commented out.

AutoKernel= "true"
#KernelConfig= "$Source/usr/src/linux/x.x.config"
AutoKernel="true"
#KernelConfig="$Source/usr/src/linux/x.x.config"


# Much work has been done to simplify or in most cases fully automate
@@ -71,12 +71,12 @@ AutoKernel= "true"
# prevents using the GitHub mirror. Please leave this commented unless
# you plan to emerge git ahead of time.

MakeConf= "$Source/etc/portage/make.conf"
PackageAcceptKeywords= "$Source/etc/portage/package.accept_keywords"
PackageEnv= "$Source/etc/portage/package.env"
PackageLicense= "$Source/etc/portage/package.license"
PackageUse= "$Source/etc/portage/package.use"
#ReposConf= "$Source/etc/portage/repos.conf/gentoo.conf"
MakeConf="$Source/etc/portage/make.conf"
PackageAcceptKeywords="$Source/etc/portage/package.accept_keywords"
PackageEnv="$Source/etc/portage/package.env"
PackageLicense="$Source/etc/portage/package.license"
PackageUse="$Source/etc/portage/package.use"
#ReposConf="$Source/etc/portage/repos.conf/gentoo.conf"


# This section exists to automate identifying and downloading the latest
@@ -85,13 +85,13 @@ PackageUse= "$Source/etc/portage/package.use"
# errors when executing MINIMAL() or DESKTOP() due to cURL missing
# after completing the BOOTSTRAP().

S3_Arch= "amd64"
S3_Source= "http://distfiles.gentoo.org/releases/$S3_Arch/autobuilds"
S3_Release= "curl -s $S3_Source/latest-stage3-$S3_Arch.txt"
S3_Arch="amd64"
S3_Source="http://distfiles.gentoo.org/releases/$S3_Arch/autobuilds"
S3_Release="curl -s $S3_Source/latest-stage3-$S3_Arch.txt"

[ -x "$(command -v curl)" ] &&
S3_Current= "$($S3_Release|tail -1|awk '{print $1}')" &&
Stage3= "$S3_Source/$S3_Current"
S3_Current="$($S3_Release|tail -1|awk '{print $1}')" &&
Stage3="$S3_Source/$S3_Current"


# Bootstrapping a Gentoo stage3 archive is a fairly quick process though
@@ -207,11 +207,11 @@ BOOTSTRAP() {

echo "gein: Chroot'ing into /mnt/gentoo..." &&
chroot /mnt/gentoo /usr/bin/env -i \
HOME= "/root" TERM="$TERM" PS1="[chroot \u@\h \W]$ " \
PATH= "/usr/local/sbin/:/usr/local/bin:/usr/sbin" \
PATH= "$PATH:/usr/bin:/sbin:/bin:/opt/bin" \
MANPATH= "/usr/man:/usr/share/man:/usr/local/man" \
MANPATH= "$MANPATH:/usr/local/share/man" \
HOME="/root" TERM="$TERM" PS1="[chroot \u@\h \W]$ " \
PATH="/usr/local/sbin/:/usr/local/bin:/usr/sbin" \
PATH="$PATH:/usr/bin:/sbin:/bin:/opt/bin" \
MANPATH="/usr/man:/usr/share/man:/usr/local/man" \
MANPATH="$MANPATH:/usr/local/share/man" \
/bin/bash --login
}

@@ -242,10 +242,10 @@ MINIMAL() {
echo "gein: Setting locale..." &&
echo "$Locale" > /etc/locale.gen &&
locale-gen && locale -a &&
LocaleMain= $(echo $Locale | awk -F '[-]' '{print $1}') &&
LocaleSet= $(eselect locale list | \
grep -i $LocaleMain | \
awk -F '[][]' '{print $2}') &&
LocaleMain=$(echo $Locale | awk -F '[-]' '{print $1}') &&
LocaleSet=$(eselect locale list | \
grep -i $LocaleMain | \
awk -F '[][]' '{print $2}') &&
eselect locale set $LocaleSet &&
env-update && source /etc/profile &&
export PS1="[chroot \u@\h \W]$ "

Loading…
Cancel
Save