Giter Club home page Giter Club logo

archinit's Introduction

Archlinux Installation Guide

Recommend to run in tmux mode

set-window-option -g  mode-keys vi
set -g prefix C-a
bind C-a send-prefix

Preparation

  1. Select archlinux source mirror,edit /etc/pacman.d/mirrorlist

  2. Check dns server, set it to 114.114.114.114

  3. set host name

    hostnamectl set-hostname XXXX

  4. download helper script

    pacman -Sy git
    git clone https://github.91chi.fun/https://github.com/ssfdust/archinit

Disk

Clone archiso-zfs

edit archinit/clone-archios-zfs.sh as desired

sh archinit/clone-archiso-zfs.sh

Add zfs support

sh init
Test kernel module available
pacman -S zfs-linux-lts

If the command is failed, you should switch to archzfs-testing repo.

Create partitions and filesystems

sh archinit/init-disk.sh sda
sgdisk -n 4:0:+384G -c 4:"ZFS Vol" -t 4:bf00 /dev/sda
mkfs.vfat /dev/sda3
# the first argument is the zfs partition, the latter is swap memory size
sh archinit/init-zfs.sh sda4 16G
  • Check mounts, if there're some errors. Try umount -lf /path/mount, zfs mount -a

Bootstrap installation

# sda3 is the boot partition
sh archinit/init-pacstrap.sh sda3
...Check whether /mnt/etc/hostname is valid.
vim /mnt/etc/fstab
...zd0 is the zfs swap, it should be uuid format
cp -a ~/archinit /mnt/root
vim /mnt/etc/local.gen

Chroot

Add user and configure sudoers

arch-chroot /mnt
passwd
useradd -g users -G storage,wheel,power,network,audio,video -m ssfdust
passwd ssfdust
cp -r archinit /home/ssfdust
chown ssfdust:users -R /home/ssfdust/archinit
pacman -Syu
EDITOR=nvim visudo

After switch to common user

Syncthing and clash

su - ssfdust
git clone https://github.91chi.fun/https://github.com/ssfdust/dotfiles.git

# config syncthing
syncthing generate
nohup syncthing serve --no-browser > /tmp/syncthing.log &
...Check syncthing log, wait for syncthing to start

syncthing cli config devices add --device-id $(cat uuid)
...Accept the request device and only share the Sync directory on remote
...Check log in local, wait for accept request
nu dotfiles/bin/autoaccept.nu

...Check ~/CloudBox/Sync/apps/clash is ready
...only share the Private directory on remote
nu dotfiles/bin/autoaccept.nu

# config clash
nohup clash -d ~/CloudBox/Sync/apps/clash > /tmp/clash.log &

Install system packages

sh archinit/install-pkgs.sh

cd ~/build
proxychains -q sh download.sh
proxychains -q sh build.sh

cd ~
sh archinit/install-wayfire.sh
sh archinit/install-from-sync.sh
sh archinit/user-disable.sh

cd ~/dotfiles
cp ~/CloudBox/Sync/keys/secrets.yml ~/dotfiles
proxychains -q make headless

Back to chroot

# nvim /etc/mkinitcpio.conf
HOOKS=(base udev systemd sd-plymouth autodetect modconf kms keyboard keymap consolefont block sd-zfs filesystems fsck)
# mkinitcpio -p linux-lts
# sh archinit/init-system.sh

umount zfs and reboot

umount /mnt/boot
zfs umount -a
# umount -lf /path/to/mount
swapoff /dev/zvol/zroot/swap
zfs export zroot

reboot

archinit's People

Contributors

ssfdust avatar

Stargazers

 avatar

Watchers

 avatar  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.