Rocky 9.x Configure new laptop for personal use
Home > Rocky Linux or CentOS > Rocky Linux 9.x > System Administration > New machine configuration > Configure new laptop for personal use
OS installation
- Prepare bootable Rocky Linux 9 USB using:
- dd if=Rocky-9.0-x86_64-dvd.iso of=/dev/sdd
- sync
-
- Assumes umount /dev/sdd* is done and that /dev/sdd does not has any critical data before itself.
- This can ideally be done via Rocky 9.x Ventoy to have multiple installers on a single USB
- Ideally boot using UEFI (F12) key so that Windows partition and boot manager are left untouched
- During installation select
- In Installation destination
- Select all available disks and custom partioning
- For partitioning dont format /boot/efi (100MB) and mount it on /boot/efi. Tyepe if "EFI System partiton"
- Reformat (or Create new ) root (/) and swap and mount them as / (50GB) and swap (16 GB) respectively
- If there is existing /mnt/data1 then mount it on same path without reformat. Or create a lvm /mnt/data1 with all other remaining available space.
- Dont mount /mnt/cdrive yet. We may need to install ntfs-3g before we mount that. It is possible only when C-drive is not encrypted using bitlocker.
- In Software Selection go with "Server with GUI". Select "Graphical Administration Tools" and "System Tools"
- Select Asia/Kolkata timezone and optional am/pm format, even if time is reported wrong. After installation correct time is automatically shown.
- Disable kdump and security profile
- On "Network & Host Name" set hostname as barjatiyarklp(N)
- Set root and user accounts. Allow root ssh login with password. Make the user administrator.
- Begin installation
- In Installation destination
- After installation setup repositories:
- dnf -y install https://mirrors.rpmfusion.org/nonfree/el/rpmfusion-nonfree-release-9.noarch.rpm
- dnf -y install rpmfusion-free-release-tainted
- dnf -y install rpmfusion-nonfree-release-tainted
Initial configuration
- Boot and login and skip tour
- Allow user to run sudo without password:
- visudo
- Enable sudo access without password for wheel group
- Ensure that "Location services" are turned off
- In "Screen Lock" Disable automatic screen lock and set Blank Screen Delay to never.
- In "Power" enable "Show Battery Percentage"
- Disable SELinux (setenforce 0, /etc/sysconfig/selinux SELINUX=disabled)
- Edit /etc/hosts and add appropriate entries:
- 172.31.1.164 rekallcm1
- Other relevant /etc/hosts entries from other machines
- Configure history retention Storing date / time along with commands in history
- (Optionally) Configure alias for checking battery status CentOS 7.x check laptop battery information
- (Optionally) Logout and change the display to "Standard (X11 Display manager)" from "Standard (Wayland)" and login again
- (Optionally) Edit /etc/yum.conf and configure keepcache=1
- Full update system using 'dnf -y update --skip-broken --nobest'
- dnf -y install epel-release
- dnf -y install screen tmux
- Start a tmux or screen session for rest of the tasks
- CentOS 8.x gnome prevent grouping of similar windows with alt-tab
- Optionally Go to settings -> Online accounts and add google account with 5TB storage
- Install "Passwords and Keys" Gnome application
/mnt/data1 files
First setup /mnt/data1 encrypted via Rocky 9.x Encrypt LVM logical volume before filesystem setup
If it is a new laptop with empty /mnt/data1 then copy following from old machine to new:
- /mnt/data1/large_files/operating_systems
- /mnt/data1/plain_folders
- /mnt/data1/setup
- /mnt/data1/windows_setup
- /mnt/data1/workspace/ excluding owncloud folder
Sample command:
rsync -a --exclude 'lost+found' --exclude 'owncloud' root@<remote-ip>:/mnt/data1/ /mnt/data1/
If existing laptop is formatted while keeping /mnt/data1 intact then perhaps we only need to empty the owncloud folder under /mnt/data1/workspace
Also if existing laptop already had encryption enabled then we need to still do /etc/crypttab and /etc/fstab based mounting of encrypted partition in new OS also.
Install and configure required packages
dnf based packages
dnf -y remove bind-chroot dnf -y install htop atop #Colorful command-line top dnf -y install gimp #Advanced image editor useful for editing pdf as images dnf -y install fdupes #Duplicate file detection dnf -y install p7zip #Support for 7zip dnf -y install expect #For shell automation. Includes mkpasswd utility dnf -y install bind bind-utils #For DNS related tasks dnf -y install git #Version control dnf -y install wireshark #Packet capturing dnf -y install libreoffice-writer libreoffice-calc libreoffice-impress #Libreoffice dnf -y install telnet nc #For TCP connection checking dnf -y install freerdp #For xfreerdp to Windows machines dnf -y install texlive #For latex dnf -y install brasero #For burning CD/DVD dnf -y install livecd-tools #For creating live USB dnf -y install minicom #For working with serial ports dnf -y install iw #For wireless iw command dnf -y install libguestfs-tools #For virt-sysprep dnf -y install ImageMagick #For image editing dnf -y install dia #For diagrams dnf -y install xsane #For scanning dnf -y install texlive-wrapfig texlive-capt-of texlive-ulem texlive-translator #For org-latex exports dnf -y install texlive-translator #For compiling beamer presentations using latex dnf -y install gparted #For partition management dnf -y install pandoc #For documentation generation dnf -y install encfs #For fuse encrypted filesystem dnf -y install s-nail #Replacement for mailx dnf -y install python3-distro hplip #For HP printers, without python3-distro hp-setup, hp-plugin dont work properly dnf -y install iotop #For iops monitoring dnf -y install lm_sensors #To get motherboard sensors reading dnf -y install openconnect #For VPN dnf -y install simplescreenrecorder #For screen recording dnf -y install erlang #Programming dnf -y install byobu #For working in background similar to screen dnf -y install nethack xrick zork #Games dnf -y install aria2 #For parallel download dnf -y install transmission #Torrent downloader dnf -y install vokoscreenNG #Screen recorder
Not found packages to be searched later:
dnf -y install kolourpaint #Basic image editor dnf -y install kile okular-libs #Latex editor -- Give okular library error dnf -y install yaws #Erlang web server dnf -y install bzr kdiff3 #For versioning and comparing files dnf -y install unetbootin liveusb-creator livecd-tools #For creating live bootable USB from iso files
Install brave browser
sudo rpm --import https://brave-browser-rpm-release.s3.brave.com/brave-core.asc sudo dnf -y install dnf-utils sudo dnf config-manager --add-repo https://brave-browser-rpm-release.s3.brave.com/x86_64/ sudo dnf install brave-browser -y
Install Owncloud Desktop client
See Rocky 9.x Owncloud client via AppImage
After this also download and install KeePassXC via AppImage for password management.
Install and configure emacs
- dnf -y install emacs
- Ensure /home/saurabh/.emacs and /home/saurabh/.emacs.d are symlink to appropriate folders of application-data
- Validate things are working by opening to-do.org file
- Configure nautilus to open .org file via emacs by default
Configure nautlius
- Open nautilus
- Create bookmarks for (Open folder and press Ctrl+D)
- /mnt/data1/workspace/gbb/owncloud/saurabh
- /mnt/data1
- /mnt/data1/plain_folders/documents/Desktop/rekall
- Configure nautilus to open .org file via emacs by default, if not done already
- vim ~/.config/user-dirs.dirs #As saurabh user
- Comment all except Desktop and Downloads
- vim /etc/xdg/user-dirs.defaults #As root user
- Comment all except Desktop and Downloads
- Logoff and login again
- Open nautilus and remove bookmarks for Documents, Music, Videos and Pictures
Refer:
Install vlc
Use the Flatpak version of VLC, which comes with its own set of codecs and dependencies:
sudo dnf install flatpak flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo flatpak install flathub org.videolan.VLC
Then run VLC using:
flatpak run org.videolan.VLC
This Flatpak version should include all necessary codecs and may resolve the H264 decoding issue.
Configure firefox
- Ensure that /home/saurabh/.mozilla is symlink to application-data folder
- Starting firefox and see that various profiles are appearing properly.
- Validate history and stored passwords are working as expected
Install and configure thunderbird
- dnf -y install thunderbird
- Create symbolic link
- ln -s /mnt/data1/workspace/application-data/thunderbird/ .thunderbird
- chown -h saurabh:saurabh .thunderbird
- Run thunderbird and validate email accounts are accessible
- Set date-format display using OpenSuse Leap 15 Change date-format displayed in Thunderbird
- Optionally set correct calendar response email ID using CentOS 8.x Thunderbird calendar invitation response email address
Configure SSH
- Symbolic link ssh from /mnt/data1
- cd /home/saurabh
- ln -s /mnt/data1/workspace/application-data/ssh .ssh
- chown -h saurabh:saurabh .ssh
- ssh root@rekallcm1
- Enter passphrase (4cs..) and enable automatic unlock during login
Install Google chrome
- Refer CentOS 7.x Installing Google chrome
- Start chrome
- Do not make chrome default browser and Disable submitting of usage information
- Test by opening www.google.com
Configure git
- Configure various git parameters:
git config --global user.name "Saurabh Barjatiya" git config --global user.email "saurabh [at] sbarjatiya.com" #Correct email address git config --global color.ui true git config --global color.status auto git config --global color.branch auto git config --global core.editor vim
- Configure to use simple push by default
- git config --global push.default simple
- Refer https://stackoverflow.com/questions/21839651/git-what-is-the-difference-between-push-default-matching-and-simple
Install Teamviewer
- Get latest teamviewer setup from https://www.teamviewer.com/en-us/download/linux/
- Install using 'dnf -y localinstall ./<file-name>'
Re-add various older VMs
- dnf -y install libvirt virt-manager
- Add VMs with "Import existing disk image" option
Install nomachine
Note that Noamchine works only in wayland. It is not working with X11 display.
Sync files from rekallcm1
cp /mnt/data1/plain_folders/documents/room-documents/documents/programs/shell_scripts/sync_files_from_rekallcm1.sh /root cd ./sync_files_from_rekallcm1.sh
Install and configure RustDesk
Download rustdesk after expanding "Assets" at https://github.com/rustdesk/rustdesk/releases At time of writing there was no specific Rocky 9.x rpm so use https://github.com/rustdesk/rustdesk/releases/download/nightly/rustdesk-1.2.0-0.x86_64-fedora28-centos8.rpm instead.
Install and configure OBS Studio
Install AI tools
Install AI tools including:
- Ollama installation including downloading of useful models Ollama model feed-back and Ollama GPU usage validation
- Open Interpreter
- Pinokio
- N8n
- Msty
Home > Rocky Linux or CentOS > Rocky Linux 9.x > System Administration > New machine configuration > Configure new laptop for personal use