# - bof - # # - - # # - scp command - # # scp is_derayo@192.168.2.100:/home/Data3/Images/Programs/Linux.Img/Linux_Arch.Img/Arch_Install/DTs_Arch.Ins/ArchBase_1.sh . # - - # # - When this error happen on ssh command - # # @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ # @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @ # @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ # # - - # # # - Fixing this error - # # ssh-keygen -R "you server hostname or ip" # ssh-keygen -R 192.168.1.238; # ssh-keygen -R 192.168.2.40; # ssh-keygen -R 192.168.122.240; #:1 # - - # # - Initial configuration - # :a # - - # # - Start VBox with Arch ISO - # passwd root; ip address; :b # - - # # - ssh from linux terminal - # ssh root@192.168.1.122; lsblk -f; sda ├─sda1 vfat FAT32 EFI BOOT 25E1-2FEC ├─sda2 ext4 1.0 Linux 1e35bba8-e08f-43bc-ad4c-6fc099ab834d └─sda3 ext4 1.0 Data ce14d90a-c899-47ec-9100-9fc3cc12aa73 :1.1 # - - # # - Mount partition to install arch - # mount /dev/sda2 /mnt; # - - # # - Efi mount (Arch alone install) - # mkdir -p /mnt/boot/efi; mount /dev/sdb1 /mnt/boot/efi; :1.2 # - - # # - Create & swapon file - # fallocate -l 2G /mnt/swap.img; chmod 600 /mnt/swap.img; mkswap -L Swap /mnt/swap.img; swapon /mnt/swap.img; :1.3 # - - # # - Install Arch base - # pacstrap /mnt base base-devel dhcpcd dialog gedit git grub linux linux-headers linux-firmware \ mesa nano net-tools netctl networkmanager network-manager-applet openssh samba sudo \ sshfs tilix vim wpa_supplicant; :1.4 # - - # # - Generate fstab - # genfstab -U /mnt >> /mnt/etc/fstab; :1.5 # - - # # - Get into the new ArchLinux (login as root) - # arch-chroot /mnt; :8 # - - # # - Set localtime & hardware clock - # :8.1 # - - # # - Set localtime - # ln -sf /usr/share/zoneinfo/America/New_York /etc/localtime; :8.2 # - - # # - Set hardware clock - # hwclock --systohc; date; :9 # - - # # - Activate language - # :9.1 sed -i 's/#en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen; locale-gen; :9.2 # - - # # - Set language - # echo "LANG=en_US.UTF-8" > /etc/locale.conf; cat /etc/locale.conf; :9.3 # - - # # - Set keyboard layout - # echo "KEYMAP=en" > /etc/vconsole.conf cat /etc/vconsole.conf; :10 # - - # # - Set hostname - # echo "Arch" >> /etc/hostname; hostnamectl set-hostname Arch; hostnamectl; :11 # - - # # - Set local ip address - # echo "127.0.0.1 localhost" >> /etc/hosts; echo "::1 localhost" >> /etc/hosts; echo "127.0.1.1 Arch.localdomain Arch" >> /etc/hosts; :12 # - - # # - Install additional software - # # - - # # - All video cards - # pacman -S xf86-video-vesa xf86-video-ati xf86-video-intel xf86-video-amdgpu xf86-video-nouveau --noconfirm; # - - # # - Audio - # pacman -S pulseaudio pulseaudio-alsa pulseaudio-bluetooth --noconfirm; # - - # # - Intel, AMD & nvidia - # pacman -S intel-ucode amd-ucode nvidia nvidia-utils --noconfirm; # - - # # - Utilitary software - # pacman -S acpi acpi_call alsa-utils dnsutils inetutils powertop reflector tlp xdg-utils xdg-user-dirs --noconfirm; pacman -S bluez bluez-utils wireless_tools --noconfirm; # - - # # - UEFI Only - # pacman -S efibootmgr dosfstools os-prober mtools --noconfirm; :13 # - - # # - Install grub - # #:13.1 # - UEFI Only (Arch alone install) - # grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=grub_uefi --recheck; #:13.2 # - - # # - NOT UEFI - # # - - # #grub-install /dev/sda; # - - # # - Create grub.cfg file - # grub-mkconfig -o /boot/grub/grub.cfg; #:14 # - - # # - Enable ssh & NetworkManager - # systemctl enable sshd; systemctl enable NetworkManager; #:15 # - - # # - Root password & create new user & password - # # - - # # - root password - # passwd; # - - # # - Create my user & password - # useradd -m is_derayo; passwd is_derayo; usermod -aG wheel,audio,video,optical,storage is_derayo; usermod -c 'Djalmar Enrique Rayo' is_derayo; -m Own directory -g Primary grout for the user -G Suplementary group "wheel" #:16 # - - # # - Authorize wheel to sudo - # sed -i 's/# %wheel ALL=(ALL) ALL/%wheel ALL=(ALL) ALL/' /etc/sudoers; #:17 # - - # # - Printer - # sudo pacman -S cups cups-pdf hplip libcups system-config-printer --noconfirm; sudo systemctl enable cups; :18 # - - # # - Additional software - # :18.1 # - - # # - Programs - # sudo pacman -S audacious bash-completion bleachbit bpytop curl dolphin evince filelight file-roller \ filezilla firefox gcc geeqie gimp gnome-disk-utility gnome-calculator gnome-multi-writer \ gnome-packagekit gnome-terminal gnome-system-monitor gpart gparted gpicview grub-customizer \ gvfs htop kpat libreoffice man mysql-clients neofetch nmap pavucontrol pinta plank postgresql \ pv python p7zip reflector rsync screenfetch simple-scan smplayer spectacle testdisk thunar \ transmission-gtk tree unrar unzip viewnior vlc whois wget yajl --noconfirm; sudo pacman -S albert --noconfirm; :18.2 # - - # # - Media utilities - # sudo pacman -S brasero clementine xfburn --noconfirm; :18.3 # - - # # - To install yay & yaourt - # sudo pacman -S binutils fakeroot gcc make --noconfirm; :18.4 # - - # # - Arch themes - # sudo pacman -S adapta-gtk-theme arc-gtk-theme arc-icon-theme archlinux-wallpaper gtkmm3 \ papirus-icon-theme ttf-freefont --noconfirm; # - - # # - Exit & root - # printf "\e[1;32mDone! Type exit, umount -a and shutdown now.\e[0m" #exit; #umount -a; #shutdown now; # - If this error - # @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ ssh-keygen -R 192.168.1.122; ssh-keygen -R 192.168.2.32; ssh-keygen -R 192.168.122.63; :19 # - - # # - Configure Data partition & Data folders - # sudo fatlabel /dev/sda1 'EFI Boot'; sudo btrfs filesystem label / Arch; :19.1 # - - # # - Configure Data partition in fstab - # Open 1-Swap-fstab_Configuration.txt :19.2 # - - # # - Configure Data folders - # Open 2-ArchBase3_Ermanno_DataFoldersConfiguration.sh :19.3 # - - # # - .bashrc - # :19.4 # - - # # - Additional software - # DTs_ArchBase_AdditionalSoftware.sh :19.5 # - - # # - Install samba - # :19.6 # - - # # - Shutdown - # sudo shutdown now; :19.7 # - - # # - Backup system - # :19.8 # - - # # - Install Desktop Enviroment - # :20 # - - # # - inxi - # # - Whole system info - # #yay -S inxi; # System utility # Installed in additional software inxi; inxi -SCMm -t c -P -x; sudo inxi -SCMm -t c -P -x; inxi -b; # Basic info inxi -d; # Drivers inxi -i; # Network info sudo inxi -m; # System memory info inxi -n; # Network card additional info sudo inxi -o # Unmounted partitions inxi -p; # Partitions inxi -r; # Repositories info inxi -s; # System sensors info inxi -w; # Local weather inxi -A; # Audio inxi -C; # CPU inxi -G; # Graphic inxi -D; # HDD inxi -D -xx; inxi -M; # Bios & Motherboar inxi -N; # Network card info inxi -F; # Whole system details inxi -F -xxx; # More details :22 # - - # # - Snapper - # :22.1 # - - # # - Configuration - # # - root - # sudo umount /.snapshots; sudo rm -r /.snapshots; sudo snapper -c rootSnapper create-config /; sudo btrfs subvolume delete /.snapshots; sudo mkdir /.snapshots; sudo mount -a; sudo chmod 750 /.snapshots; sudo chmod a+rx /.snapshots; sudo chown :is_derayo /.snapshots; :22.2 # - - # # - Install snapper software - # yay -S snap-pac-grub snapper-gui; :22.3 # - - # # - Edit configuration file - # sudo vim /etc/snapper/configs/rootSnapper; ALLOW_USERS="is_derayo" # limits for timeline cleanup TIMELINE_MIN_AGE="1800" TIMELINE_LIMIT_HOURLY="5" TIMELINE_LIMIT_DAILY="7" TIMELINE_LIMIT_WEEKLY="0" TIMELINE_LIMIT_MONTHLY="0" TIMELINE_LIMIT_YARLY="0" :22.4 # - - # # - Enable snapper - # sudo systemctl enable --now snapper-timeline.timer \ snapper-cleanup.timer; :22.5 # - - # # - Add EFI partition to Snapper - # sudo mkdir -p /etc/pacman.d/hooks; sudo vim /etc/pacman.d/hooks/50-bootbackup.hook; [Trigger] Operation = Upgrade Operation = Install Operation = Remove Type = Path Target = boot/* [Action] Depends = rsync Description = Backing up /boot... When = PreTransaction Exec = /usr/bin/rsync -a --delete /boot /.bootbackup :22.5 # - - # # - Enable grub-btrfs - # sudo systemctl enable grub-btrfs.path; sudo systemctl start grub-btrfs.path; :22.6 # - - # # - home - # sudo snapper -c homeSnapper create-config /home; sudo btrfs subvolume delete /home/.snapshots; sudo rm -rf /home/.snapshots; sudo btrfs subvolume create /home/.snapshots; sudo sudo chmod a+rx /home/.snapshots; sudo chmod 750 /home/.snapshots; sudo chown :is_derayo /home/.snapshots; sudo vim /etc/snapper/configs/homeSnapper; # Add your user ALLOW_USERS="is_derayo" # Limits for timeline cleanup TIMELINE_MIN_AGE="1800" TIMELINE_LIMIT_HOURLY="5" TIMELINE_LIMIT_DAILY="7" TIMELINE_LIMIT_WEEKLY="0" TIMELINE_LIMIT_MONTHLY="0" TIMELINE_LIMIT_YEARLY="0" :22.7 # - - # # - Edit fstab - # sudo vim /etc/fstab; UUID=f73cc622-cb12-414b-aedf-81ed427c4940 /home btrfs rw,noatime,nodiratime,compress=lzo,ssd,discard=async,space_cache=v2,subvolid=257,subvol=/@home 0 0 UUID=f73cc622-cb12-414b-aedf-81ed427c4940 /home/.snapshots btrfs rw,noatime,nodiratime,compress=lzo,ssd,discard=async,space_cache=v2,subvol=/@home/.snapshots 0 0 snapper list-configs; sudo snapper list-configs; ls -lah /etc/snapper/configs; sudo snapper -c rootSnapper get-config; snapper -c rootSnapper list; snapper -c homeSnapper list; sudo snapper -c rootSnapper create --description 'Manual rootSnapshot '$(date +%Y-%m-%d_%H-%M-%S); sudo snapper -c homeSnapper create --description 'Manual homeSnapshot '$(date +%Y-%m-%d_%H-%M-%S); :22.7 # - - # # - Create Data Snapper config - # snapper list-configs; sudo btrfs subvolume list /Data; # - - # # - Data - # sudo snapper -c DataSnapper create-config /Data; sudo vim /etc/snapper/configs/DataSnapper; # Add your user ALLOW_USERS="is_derayo" # Limits for timeline cleanup TIMELINE_MIN_AGE="1800" TIMELINE_LIMIT_HOURLY="5" TIMELINE_LIMIT_DAILY="7" TIMELINE_LIMIT_WEEKLY="0" TIMELINE_LIMIT_MONTHLY="0" TIMELINE_LIMIT_YEARLY="0" snapper list-configs; sudo btrfs subvolume list /Data; sudo btrfs subvolume delete /Data/.snapshots; sudo rm -rf /Data/.snapshots; # - - # # - Create & mount Data folder - # cd /; sudo umount /Data; sudo mkdir -p /Data; sudo mount /dev/vda4 /Data; # - Create @Data subvolume - # sudo btrfs subvolume create /Data/@Data; sudo btrfs subvolume create /Data/@.DataSnapshots; sudo umount /Data; sudo mount -o ssd,noatime,nodiratime,compress=lzo,space_cache=v2,discard=async,autodefrag,subvol=@Data /dev/vda4 /Data; sudo mkdir -p /Data/.snapshots; sudo mount -o ssd,noatime,nodiratime,compress=lzo,space_cache=v2,discard=async,autodefrag,subvol=@.DataSnapshots /dev/vda4 /Data/.snapshots; sudo umount /Data/.snapshots; sudo umount /Data; sudo mount -a; sudo sudo chmod a+rx /Data/.snapshots; sudo chmod 750 /Data/.snapshots; sudo chown :is_derayo /Data/.snapshots; UUID=fe7a30c2-c0db-4868-8d04-13767d4266df /Data btrfs rw,noatime,nodiratime,compress=lzo,ssd,discard=async,space_cache=v2,subvolid=257,subvol=/@Data 0 0 UUID=fe7a30c2-c0db-4868-8d04-13767d4266df /Data/.snapshots btrfs rw,noatime,nodiratime,compress=lzo,ssd,discard=async,space_cache=v2,subvol=/@.DataSnapshots 0 0 # - - # # - Como stuff to /Data/Documents/Videos - # # - - # # - Create Data Snapshot - # sudo snapper -c DataSnapper create --description 'Manual DataSnapshot '$(date +%Y-%m-%d_%H-%M-%S); snapper -c DataSnapper list; # | Type | Pre # | Date | User | Cleanup | Description ---+--------+-------+---------------------------------+------+----------+---------------------------------------- 0 | single | | | root | | current 1 | single | | Thu 10 Feb 2022 07:36:18 PM EST | root | | Manual DataSnapshot 2022-02-10_19-36-14 2 | single | | Thu 10 Feb 2022 07:52:23 PM EST | root | | Manual DataSnapshot 2022-02-10_19-52-18 3 | single | | Thu 10 Feb 2022 07:56:17 PM EST | root | | Manual DataSnapshot 2022-02-10_19-56-17 4 | single | | Thu 10 Feb 2022 08:00:13 PM EST | root | timeline | timeline # - - # # - Rollback to snapshot 2 - # sudo snapper -c DataSnapper status 2..3; +..... /Data/Documents/Videos/DT_ArchInstall_Videos +..... /Data/Documents/Videos/DT_ArchInstall_Videos/DTs_Arch_linux_installation_guide(2019)-MBR_installation.mp4 +..... /Data/Documents/Videos/DT_ArchInstall_Videos/DTs_Arch_linux_installation_guide(2020)-UEFI_installation.mp4 sudo snapper -c DataSnapper diff 2..3; sudo snapper -c DataSnapper undochange 2..3; sudo snapper -c DataSnapper status 1..2; sudo snapper -c DataSnapper undochange 1..2; sudo snapper -c DataSnapper diff 1..2; sudo snapper -c DataSnapper delete 1; sudo snapper -c DataSnapper delete 2-3; # - - # # - Installation finished - # # - - # # - Don't use this section - # # - - # # - Edit grub-btrfs (if error with grub snapshot) - # sudo systemctl enable grub-btrfs.path; sudo systemctl edit --full grub-btrfs.path; [Unit] Description=Monitors for new snapshots DefaultDependencies=no Requires=\x2esnapshots.mount After=\x2esnapshots.mount BindsTo=\x2esnapshots.mount [Path] PathModified=/home/Data/.snapshots [Install] WantedBy=/home/Data/.snapshots.mount sudo systemctl reenable grub-btrfs.path sudo systemctl list-units --type=mount --all; sudo journalctl -ru grub-btrfs.service; sudo systemctl reenable grub-btrfs.path; sudo systemctl start grub-btrfs.path; :23 # - - # # - Install desired desktop environment - # Arch install is finished :30 # - - # # - Reboot - # umount -l /mnt; umount -R /mnt; shutdown now; Detach ISO in VirtualBox before reboot. :31 # - - # # - Update system - # sudo vim /etc/pacman.d/mirrorlist; # - Only line to be - # Server = https://mirrors.kernel.org/archlinux/$repo/os/$arch # - Save, exit & update - # sudo pacman -Syu --noconfirm; sudo pacman -Syyuu --noconfirm; sudo pacman -Syu --overwrite /usr/lib/p11-kit-trust.so --noconfirm; :32 # - - # # - Update fastest ArchLinux mirror - # https://linuxhint.com/pacman_mirrors_arch_linux/ https://www.youtube.com/watch?v=9cGy034XDwg&feature=youtu.be :32.1 # - - # # - Working - # # - Use only if mirrolist fails - # sudo reflector --country 'United States' -a 6 --latest 200 --sort rate --save /etc/pacman.d/mirrorlist; :32.2 # - - # # - Update fastest mirror - # curl -o ~/Documents/Downloads/mirrorlist.txt https://www.archlinux.org/mirrorlist/all/ :32.3 # - - # # - Uncomment all mirror lines - # sed -i 's/#S/S/g' ~/Documents/Downloads/mirrorlist.txt # - eof - #