#[SOLVED] installation script for installing arch

296 messages · Page 1 of 1 (latest)

maiden patrol
#

Hello, I dual boot windows and linux mint and I am looking to install linux arch on the linux mint partition. I want to install KDE with some packages changed. I asked chatgpt to help me make a bash script to run in chroot, and then I went through the arch wiki to edit the script to make sure it's right. Here's the script, I've got. Would anyone have a look to see if it's okay?

#
#!/bin/bash

# Set locale and timezone
ln -sf /usr/share/zoneinfo/Europe/London /etc/localtime
hwclock --systohc
echo "en_GB.UTF-8 UTF-8" >> /etc/locale.gen
locale-gen
echo "LANG=en_GB.UTF-8" > /etc/locale.conf
echo "KEYMAP=uk" > /etc/vconsole.conf
echo "zenbook" > /etc/hostname
echo -e "127.0.0.1 localhost\n::1 localhost\n127.0.1.1 zenbook.localdomain zenbook" >> /etc/hosts

# Set passwords
useradd -m -G wheel -s /bin/bash jasmine
passwd
passwd jasmine

# Enable sudo
pacman -S --noconfirm sudo
echo "%wheel ALL=(ALL:ALL) ALL" >> /etc/sudoers.d/wheel

# Network + microcode
pacman -S --noconfirm networkmanager amd-ucode
systemctl enable NetworkManager

# Base KDE Plasma (Wayland only) + your apps + fonts + tools
pacman -S --noconfirm \
  plasma-desktop sddm blueman \
  firefox dolphin thunar \
  neovim zed zathura \
  foliate ghostty kitty \
  flameshot speedcrunch ttf-dejavu \
  noto-fonts noto-fonts-emoji pipewire \
  pipewire-pulse pipewire-alsa helvum \
  wireplumber gst-libav ffmpeg \
  base-devel git xdg-utils \
  btop rsync unzip \
  wget curl vlc \
  mpv bat exa \
  fd ripgrep power-profiles-daemon \
  fuse3 neofetch
#
# Enable SDDM with secure Wayland configuration
systemctl enable sddm
mkdir -p /etc/sddm.conf.d
echo -e "[General]\nDisplayServer=wayland\nGreeterEnvironment=QT_WAYLAND_SHELL_INTEGRATION=layer-shell\n\n[Wayland]\nCompositorCommand=kwin_wayland --drm --no-lockscreen --no-global-shortcuts --locale1" > /etc/sddm.conf.d/10-wayland.conf

# Install paru (AUR helper)
cd /home/jasmine
sudo -u jasmine git clone https://aur.archlinux.org/paru.git
cd paru
sudo -u jasmine makepkg -si --noconfirm

# AUR apps: zen browser
sudo -u jasmine paru -S --noconfirm zen-browser

# Set Neovim as default text editor (login shell-wide)
sudo -u jasmine bash -c 'echo "export VISUAL=nvim" >> /home/jasmine/.profile'
sudo -u jasmine bash -c 'echo "export EDITOR=nvim" >> /home/jasmine/.profile'

# Optional KDE cleanup (only if installed via meta)
pacman -Rns --noconfirm konsole kate kwrite gwenview spectacle ark okular kcalc \
  kmail kontact akregator korganizer juk dragon print-manager kdeconnect

# Install GRUB and enable dual boot with Windows
pacman -S --noconfirm grub efibootmgr os-prober ntfs-3g

# Enable Windows detection
echo "GRUB_DISABLE_OS_PROBER=false" >> /etc/default/grub

grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=ArchLinux
grub-mkconfig -o /boot/grub/grub.cfg

# Enable power profile daemon
systemctl enable power-profiles-daemon

echo "✅ All done! Reboot and welcome to your clean Arch + KDE + Wayland system, Jasmine!"
swift bough
#

@maiden patrol hold on

#

make a directory called whatever you want

#

cd into that

#

git init

maiden patrol
#

I haven't started install, I am on mint atm

swift bough
#

touch aurpackages.txt

#

touch packages.txt

#

pick one to edit first

maiden patrol
#

ok

#

ok packages?

swift bough
#

@maiden patrol packages.txt or aur packages.txt?

maiden patrol
#

packages.txt

swift bough
#

put every non aur package into that

#

then for aurpackages.txt put every aurpackage into there

maiden patrol
#

these?

pacman -S --noconfirm
plasma sddm plasma-wayland-session
dolphin thunar
neovim zathura foliate kitty flameshot speedcrunch
ttf-dejavu noto-fonts noto-fonts-emoji
pipewire pipewire-pulse pipewire-alsa wireplumber
gst-libav ffmpeg
base-devel git xdg-utils btop rsync unzip wget curl
vlc bat exa fd ripgrep power-profiles-daemon pw-top
layer-shell-qt fuse3

pacman -Rns --noconfirm konsole kate kwrite gwenview spectacle ark okular kcalc
kmail kontact akregator korganizer juk dragon print-manager kdeconnect

maiden patrol
#

the full command?

swift bough
maiden patrol
#

ok

#

i put in aurpackages.txt?
sudo -u jasmine paru -S --noconfirm ghostty zed-editor-bin pamac-gtk
zen-browser librewolf potluck helvum

swift bough
#

no

#

forget everything from that script you made

#

it's going to be remade

#

from scratch

#

in aurpackages.txt put the aurpackages in there

#

example librewolf

#

check before putting it in there

maiden patrol
#

ok

swift bough
#

because ghostty is out of the aur

maiden patrol
#

ok paru and ghostty not there, rest in .txt

#

oh wait

maiden patrol
#

idk if paru is in aur

swift bough
maiden patrol
#

well, i wrote git command because i need paru for aur access but idk how to check

#

i think it is

maiden patrol
#

hmm, so i install git version, then aur version, then delete the git version?

swift bough
#

open the aur website to check

maiden patrol
#

ok

#

i put paru in the aurpackages.txt

#

done

swift bough
#

actually you don't in this case

maiden patrol
#

it is there

swift bough
#
makepkg -siD paru --noconfirm```
maiden patrol
#

do I write this somewhere?

swift bough
maiden patrol
#

ok

#

done

swift bough
#

show me what's in both of those .txt files please

maiden patrol
#

i failed to copy text from nano editor

#

so i'll send image

swift bough
maiden patrol
#

ah wait wrong file

swift cipher
#

Is this script just to install it on your system once or do you want to run it multiple time?

maiden patrol
maiden patrol
swift bough
#

remove pamac

#

and replace librewolf with librewolf-bin

#

and remove paru

#

replace plasma with plasma-desktop

#

and remove plasma-wayland-session

swift cipher
maiden patrol
#

@swift bough done

swift bough
#

not a install script

maiden patrol
swift bough
#

pw-top is not a package

#

also you don't need layer-shell-qt

maiden patrol
swift bough
maiden patrol
#

which one is better?

#

is not package?

#

mb

swift bough
maiden patrol
#

oh

swift bough
maiden patrol
maiden patrol
#

okke

swift bough
#

zed is not the aur anymore

maiden patrol
#

there's a flathub file

#

flatpak install flathub dev.zed.Zed

swift bough
#

helvum and potluck are not in the aur

maiden patrol
swift bough
maiden patrol
#

i mean in the official pacman repo files

swift bough
#

what do you think?

maiden patrol
#

yea?

swift bough
#

yes

maiden patrol
#

ok it's in the packages.txt

swift bough
#

only zen and librewolf should be in aurpackages.txt

#

why have 2 browsers?

maiden patrol
maiden patrol
#

so a new update might break it

swift bough
#

what's wrong with firefox?

maiden patrol
#

nothing, i heard librewolf is good

swift bough
maiden patrol
#

ok

#

i put helvum in packages.txt

swift bough
#

now show aurpackages.txt

maiden patrol
swift bough
#

is that all you want?

maiden patrol
#

i heard mpv is good

#

but i have vlc

#

mpv-full in packages.txt?

swift bough
maiden patrol
#

not both?

#

and maybe neofetch

swift bough
maiden patrol
swift bough
maiden patrol
#

never tried mpv

swift bough
#

and mpv instead of mpv-full

maiden patrol
#

in case one doesn't work

#

ok done

swift bough
#

#!/usr/bin/env bash at the top of the script

maiden patrol
swift bough
maiden patrol
#

and ghostty?

swift bough
maiden patrol
#

done

swift bough
#

along with sudo sed -i 's/debug/!debug/g' /etc/makepkg.conf sudo sed -i '/#MAKEFLAGS="5"/c\MAKEFLAGS="--jobs=$(nproc)"' /etc/makepkg.conf sudo sed -i '32 a ILoveCandy' /etc/pacman.conf sudo sed -i '/Color/s/^#//g' /etc/pacman.conf

maiden patrol
#

above git command?

swift bough
maiden patrol
#

done

swift bough
#

with sudo pacman -Syu --noconfirm sudo pacman -S $(cat packages.txt | cut -d' ' -f1) --noconfirm

maiden patrol
swift bough
#

for word in $(cat aurpackages.txt); do paru -S --noconfirm --mflags --skipinteg $word || true; done

#

and sudo pacman -Qttdq | sudo pacman -Rns - --noconfirm

#

with paru -Scc --noconfirm

#

do you have any configs you want to use?

maiden patrol
#

after git command?

swift bough
maiden patrol
#

i have no configs

swift bough
maiden patrol
#

no

swift bough
#

no configs for any packages?

maiden patrol
#

no

swift bough
#

or settings?

maiden patrol
#

no

swift bough
#

you use stock neovim with no plugins?

maiden patrol
#

i have never used it

swift bough
#

then why add it?

maiden patrol
#

i want to learn

swift bough
#

what de/wn are you on now?

maiden patrol
#

i am on cinnamon 22.1

#

i have zed editor (and nano)

swift bough
#

and configs in zed?

maiden patrol
#

none

swift bough
#

and nano?

maiden patrol
#

none

swift bough
#

why have 3 editors?

maiden patrol
#

will not install nano, will have 2

swift bough
#

why have 2?

#

ideally you should only have 1 of each

maiden patrol
#

hm

swift bough
#

1 browser one editor

maiden patrol
#

i have 2 of all

swift bough
#

why?

maiden patrol
#

in case one doesn't work

swift bough
#

not the case here

maiden patrol
#

also, maybe in the future I will have neovim with plugins, but now I don't

swift bough
#

go to ~/.config

#

then screenshot that please

maiden patrol
swift bough
#

add # ./configs.sh at the bottom

maiden patrol
#

new dir?

swift bough
#

no bluetooth?

swift bough
maiden patrol
maiden patrol
swift bough
maiden patrol
#

oh

#

done

#

don't replace paru git with paru aur?

swift bough
maiden patrol
#

oh, git command installs paru aur version

#

nvm

swift bough
#

@maiden patrol now save it

maiden patrol
#

ok

#

are these comments ok?

swift bough
maiden patrol
#

okke

maiden patrol
#

@swift bough thank you for helping me create a post install script! ❤️

silk thornBOT
#

killertofus received a thank you cookie!

cosmic thistle
#

@maiden patrol remember to install a firewall too

tidal tiger
#

You ought to post the completed script at the end of the thread for people to see (then close the thread to prevent it from drowning)

maiden patrol
#

Conflict found

swift bough
#

@maiden patrol link the script again please

maiden patrol
#

I can't I'm on phone and the laptop is still on minimal arch.. might need to reboot for KDE idk

#

But all I changed was I added that firewall, rest is same

#

Ufw

swift bough
maiden patrol
#

Pick?

swift bough
maiden patrol
#

I've already ran the script

#

I should reboot first?

swift bough
maiden patrol
#

Or edit the file and rerun script?

#

Oh I don't have a de on launch

swift bough
maiden patrol
#

I should first remove zen-browser?

swift bough
maiden patrol
#

Sudo paru -Rsn zen-browser?

swift bough
#

you don't need sudo

maiden patrol
#

Its working now

swift bough
#

and -Rns is enough

maiden patrol
swift bough
#

@maiden patrol why the echo?

maiden patrol
swift bough
maiden patrol
#

i don't understand most of this yet

swift bough
#

which parts don't you understand?

cosmic thistle
#

set -x at the start will make the shell print the command it runs

maiden patrol
#

so when it says things are happening, it's new to me

#

it all works now with zen-browser-bin

swift bough
#

@maiden patrol and you picked arch?

maiden patrol
#

it has different resolution and refresh rate to my laptop

#

and i get a lot of stuttering and it makes watching things not great

#

am I supposed to 'close post' now?

swift bough
maiden patrol
#

I was on cinnamon
I thought if I was going to pick and chose the things I want, arch might be better for me

maiden patrol
#

i am dual booting with windows, so I installed arch on the partition i had mint on just now

swift bough
maiden patrol
#

few days

#

idk maybe 3 or 4

swift bough
#

that's to soon to be on arch

maiden patrol
#

i installed ventoy on usb with a few distros if i ever want to switch to something else

#

maybe it's okay, i have all the packages I want

swift bough
#

no, it's not

maiden patrol
#

oh I'm sorry 😔

swift bough
#

If you are going to be installing Arch Linux, you should be setting expectations so you know what you are getting into. You should know that the community will not be holding you're hand when it comes to what's documented in the wiki. If you are not comfortable with that then you should go to pop-os

maiden patrol
#

okke, understood

swift bough
#

You can check whether you are ok or overwhelmed by setting up arch

maiden patrol
#

i was able to do the minimal arch install following wiki

swift bough
#

also your question is a bit of a "drama trap": guaranteed to solicit emotional responses. IMO the proper answer to that question is: "what type of person are you"? Because an individual that's self-motivated, quick learning with good reading comprehension and willingness to fail/try again would have no issue installing/running Arch.

swift bough
maiden patrol
#

no, i failed once though, and had to restart

swift bough
maiden patrol
#

for some reason, in chroot, commands weren't working

swift bough
#

but you did eventually install arch with no third party guides/videos?

maiden patrol
#

yes

swift bough
maiden patrol
#

well, i already had the partitions fine because i set up dual boot with mint

swift bough
#

you may now continue to use arch

maiden patrol
#

thanks :)

swift bough
#

you can now say you use arch, btw

maiden patrol
#

I use arch, btw

swift bough
#

@maiden patrol now run the command

maiden patrol
#

hmmm

#

neofetch?

#

sudo pacman -Syu?

#

sudo destroy earth

maiden patrol
#

oh i did that earlier

#

everything is working

swift bough
#

... solved

limber pantherBOT
#

#9742 📣 If there is nothing else that we can do for you, please close this thread by adding "[SOLVED]" to the title.

  • You can do this on desktop by clicking the three dots on the top right of the page, and pressing "Edit Post".
  • You can also do this on Android / iOS by long tapping your post in the text channel list, and tapping "Edit Post".

Your title should be like so: https://cdn.discordapp.com/attachments/503224329191030787/1039841700417384498/image.png
Thank you