Menu

Installation Guide

JaysonProject

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.

  1. Open the terminal and update the time
    Press Ctrl+Alt+T to open the terminal
    Enter "timedatectl set-ntp true" and press Enter

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

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

Format EFI (UEFI only)

mkfs.fat -F32 /dev/nvme0n1p1

Format the root partition

mkfs.ext4 /dev/nvme0n1p3 # or your root partition

Format and enable Swap (optional)

mkswap /dev/nvme0n1p2
swapon /dev/nvme0n1p2

Alright, we have completed the step of creating the file system.

  1. Attach the hard drive and install the operating system

Mount the root partition to /mnt

mount /dev/nvme0n1p3 /mnt

(UEFI only) Create a directory and mount the EFI partition

mkdir -p /mnt/boot/efi
mount /dev/nvme0n1p1 /mnt/boot/efi

Copy system files

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

Generate fstab file

genfstab -U /mnt >> /mnt/etc/fstab

Mount the virtual file system to prepare for chroot

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"

chroot into system

arch-chroot /mnt /bin/bash

  1. Configure the system
    We have successfully chrooted into MinderiaOS installed on your hard drive. Next, we will set the hostname, install the OOBE (Out-of-Box Experience) part, and enable the service

Set hostname

echo "The hostname you want to set" > /etc/hostname

Install the oobe component, enable the service, and configure pacman

useradd -m -G wheel -s /bin/bash 你的用户名

Set user password

passwd your username

Add the created user to the wheel group

Input "visudo" and press Enter
Find the line with "wheel" and remove the hash symbol (#) before it:

%wheel ALL=(ALL:ALL) ALL

Translated to: %wheel ALL=(ALL:ALL) ALL
Save and Exit

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

  2. Install GRUB bootloader
    Install GRUB to the hard disk (compatible with UEFI and MBR)

/dev/nvme0n1 is an entire hard disk, not a partition

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

  1. Restart your computer and enter your new system
    Enter "exit" to exit the chroot environment
    Then enter "umount -R /mnt" and press Enter to unmount all mount points
    Input "reboot", or click the start menu in the lower left corner, click "Restart", and press the Enter key to restart.
    Remember to unplug the USB drive or CD~
    Then wait for the system to load, and you will enter the oobe stage. After completing the oobe stage, enter the password you set to enter the desktop. Although the login interface is still in English, the desktop is in Chinese.

MongoDB Logo MongoDB