Welcome to using the MinderiaOS system. This system is semi-open-box, so you still need to enter commands and copy files during the installation process, but you can also copy the commands to the terminal and execute them to install.
The Live system automatically enters the desktop.
Open the terminal and update the time
Press Ctrl+Alt+T to open the terminal
Enter "timedatectl set-ntp true" and press Enter
Hard disk partitioning
Enter "fdisk -l" and press Enter
If your hard disk partition (such as /dev/nvme0n1pX or /dev/sdaX) is outputted, please enter cfdisk /dev/nvme0nX or cfdisk /dev/sdX
Select GPT and press Enter (if UEFI is not available, please select MBR)
Then, select "Free Space" from the bottom menu and click "New". First, create an EFI partition (512M). From the bottom menu, select "Type" and choose the EFI System partition type. (It is not necessary to create an EFI partition on an old computer.)
Next, we will create a swap partition (optional). Now let's use the same process to create a swap partition. Select the remaining free space again and click "New".
Input 4G, and then press the Enter key. (Usually, the swap partition should be twice the size of your memory, and it is recommended to use 4G to 16G.)
Then, select "Type" from the bottom menu and choose the "Linux swap" partition type.
Next, we move to the root (/) partition. Select the remaining Free Space again and click New. As for the size of the root partition, it means all the remaining available space. Simply press Enter
Then, select "Type" from the bottom menu and choose the "Linux filesystem" partition type
Next, let's write the changes to the hard drive. Select "Write" from the bottom menu and press Enter
Input "yes" and press Enter
Alright, you have completed the hard disk partitioning step. Simply select Quit or press Ctrl+C (terminate) to exit
Create a file system.
Okay, you have completed the hard disk partitioning. Now you need to create a file system. However, we need to view the partition table summary
Input "fdisk -l" and press Enter
You will see partitions like /dev/nvme0n1p1, /dev/nvme0n1p2, /dev/nvme0n1p3, or /dev/sda1, /dev/sda2, /dev/sda3.
Assuming the root partition is /dev/nvme0n1p3 (UEFI) or /dev/nvme0n1p2 (BIOS), EFI is /dev/nvme0n1p1, and Swap is /dev/nvme0n1p2.
mkfs.fat -F32 /dev/nvme0n1p1
mkfs.ext4 /dev/nvme0n1p3 # or your root partition
mkswap /dev/nvme0n1p2
swapon /dev/nvme0n1p2
Alright, we have completed the step of creating the file system.
mount /dev/nvme0n1p3 /mnt
mkdir -p /mnt/boot/efi
mount /dev/nvme0n1p1 /mnt/boot/efi
cp -rp /usr/share/minderiaos-base/* /mnt/
It may take a while to copy system files. Please be patient.
After it's completed, we will repair the system
Fix ownership: chown -R root:root /mnt
Next, we will fix the directory permissions
All directories must have 755 (rwxr-xr-x) permissions to be accessible.
find /mnt -type d -exec chmod 755 {} \;
Then fix the file permissions.
First, set all files to 644 (rw-r--r--)
find /mnt -type f -exec chmod 644 {} \;
Fix executable permission:
chmod -R +x /mnt/bin
chmod -R +x /mnt/usr/bin
chmod -R +x /mnt/sbin
chmod -R +x /mnt/usr/sbin
Check immutable attributes: lsattr -R /mnt/bin/bash. If you see the 'i' flag, execute chattr -i -R /mnt (usually not necessary, but for safety)
Once everything is ready, we will generate the fstab and chroot
genfstab -U /mnt >> /mnt/etc/fstab
mount --bind /dev /mnt/dev
mount --bind /proc /mnt/proc
mount --bind /sys /mnt/sys
mount --bind /run /mnt/run # if it exists
Check the mount options: mount -o remount,rw,exec /mnt
Then set the key directories to 755
Enter "chmod -R 755 /mnt/bin /mnt/lib /mnt/usr"
arch-chroot /mnt /bin/bash
echo "The hostname you want to set" > /etc/hostname
useradd -m -G wheel -s /bin/bash 你的用户名
passwd your username
Input "visudo" and press Enter
Find the line with "wheel" and remove the hash symbol (#) before it:
Translated to: %wheel ALL=(ALL:ALL) ALL
Save and Exit
Fix sudo permissions and install oobe
chown root:root /usr/bin/sudo
chmod 4755 /usr/bin/sudo
chown root:root /usr/lib/sudo/sudoers.so
chmod 4755 /usr/lib/sudo/sudoers.so
su your username
yay -S plasma-login-manager-git
yay -S plasma-setup-git
After installation, we switch back to the root user
Input "exit" and press Enter
Next, it's time for us to remove the user.
userdel -r your_username
Next, we will enable the login manager, network, and Bluetooth services
systemctl enable iwd.service
systemctl enable systemd-resolved.service
systemctl enable bluetooth.service
systemctl enable NetworkManager
systemctl enable dhcpcd
systemctl enable plasmalogin
systemctl enable plasma-setup
Install GRUB bootloader
Install GRUB to the hard disk (compatible with UEFI and MBR)
grub-install /dev/nvme0n1
Then generate the grub configuration file
grub-mkconfig -o /boot/grub/grub.cfg
Then, configure and directly enter the system
nano /boot/grub/grub.cfg
Input these contents:
set root=(hd0,gpt3)
In Linux, set the root partition in /boot/vmlinuz-linux to your root partition (e.g., /dev/nvme0n1p3 or /dev/sda3)
initrd /boot/initramfs-linux.img
boot
Then press Ctrl+O, then press Enter to write the content, and press Ctrl+X to exit