-
-
Notifications
You must be signed in to change notification settings - Fork 1
Guide (Master)
This is the very last guide of ISM usage.
This documentation focus on the master branch version and help actually the tester to setup a good environment to test the last software features.
All test are perform under a virtual machine with VirtualBox.
First start a new virtual machine with any Linux LiveCD. Will be easier with a graphical environment.
Normally, all distributions can do the job, but it's possible some of them will require bit more effort to setup properly the environment
Minimal hardware requirements.:
- 100GiB of storage
- 16GiB of RAM
The current user should have sudo access.
Start to check first if the system have the minimal software requirements. Normally should not be a big deal, because most of that command are normally available by default in all linux distributions.
Needed commands/programs:
- Bash, Binutils, Bison, Yacc, Bzip2, Coreutils, Diff, Find, Gawk, Awk, Gcc, G++, Ldd, Cat, Grep, Gzip, M4, Make, Patch, Perl, Python3, Sed, Tar, Makeinfo, Xz, Crystal, Autoconf, Automake, Meson, Git, Pkg-Config, Tzdata, Libpcre2 Libevent, Libyaml, Libgmp, Libssl, Libxml2, Libz
At the end of your ~/.bash_profile, add the following line:
exec env -i HOME=$HOME TERM=$TERM PS1='\u:\w\$ ' /bin/bash
The same for the ~/.bashrc file:
set +h
umask 022
LC_ALL=POSIX
PATH=/usr/bin
if [ ! -L /bin ]; then PATH=/bin:$PATH; fi
PATH=/mnt/ism/tools/bin:$PATH
export LC_ALL PATH
And to finish, as root, run this command:
[ ! -e /etc/bash.bashrc ] || mv -v /etc/bash.bashrc /etc/bash.bashrc.NOUSE
Then, everytime you log in a terminal to use ISM, make sure to load the new ~/.bash_profile:
source ~/.bash_profile
Generate the default directory where we will install the new system:
sudo mkdir -pv /mnt/ism
And make sure actually the path /mnt/ism is owned by you current user, not root:
sudo chown -R username:username /mnt/ism
First clone the ISM repository:
git clone https://github.com/fulgurance/ism
Move the ism directory to /usr/share with sudo:
sudo mv ism /usr/share/
And change the default owner for this directory:
sudo chown -R username:username /usr/share/ism
Go now to the ism source path:
cd /usr/share/ism
And build it:
crystal build --release Main.cr -o ism
Then, as root, copy it to /usr/bin and clean the current directory:
sudo cp ism /usr/bin/ism && rm ism
Before the next steps, format and mount the partitions you need in /mnt/ism
Before anything, we need to generate two required directories to make ISM work. That directories need to be owned by the current user.
sudo mkdir -pv /etc/ism
sudo mkdir -pv /var/ism
sudo chown -R username:username /etc/ism
sudo chown -R username:username /var/ism
And then we need to temporary disable the secure mode to be able to create properly the cross toolchain, and restore properly the rights:
sudo ism settings -dsm
sudo chown -R username:username /etc/ism
Now we will start to configure ISM to setup the root path, a proper make option to reduce the compilation time, open the ports we need to install the system base , synchronize them.
PLEASE NOTICE FROM NOW ALL COMMANDS WILL BE RUN AS NORMAL USER.
So first , set the root path where we will install the new system:
ism settings -srp /mnt/ism
(Optional): Set an appropriate job number, adapted to your virtual machine capacity (replace by the correct number):
ism settings -ssmo -j8
Now open the required ports we need:
ism port open https://github.com/Fulgurance/Firmwares-Main
ism port open https://github.com/Fulgurance/Utilities-Main
ism port open https://github.com/Fulgurance/DisplayManagers-Main
ism port open https://github.com/Fulgurance/Shells-Main
ism port open https://github.com/Fulgurance/InitSystems-Main
ism port open https://github.com/Fulgurance/SecurityLibraries-Main
ism port open https://github.com/Fulgurance/BaseLibraries-Main
ism port open https://github.com/Fulgurance/KdeSoftwares-Main
ism port open https://github.com/Fulgurance/WebBrowsers-Main
ism port open https://github.com/Fulgurance/ProgrammingLanguages-Main
ism port open https://github.com/Fulgurance/ProgrammingTools-Main
ism port open https://github.com/Fulgurance/MultimediaSoftwares-Main
ism port open https://github.com/Fulgurance/NetworkingLibraries-Main
ism port open https://github.com/Fulgurance/GraphicsLibraries-Main
ism port open https://github.com/Fulgurance/NetworkingTools-Main
ism port open https://github.com/Fulgurance/Bootloaders-Main
ism port open https://github.com/Fulgurance/Fonts-Main
ism port open https://github.com/Fulgurance/Kernels-Main
ism port open https://github.com/Fulgurance/XorgBase-Main
ism port open https://github.com/Fulgurance/FileSystems-Main
ism port open https://github.com/Fulgurance/MultimediaLibraries-Main
ism port open https://github.com/Fulgurance/SystemBase-Main
ism port open https://github.com/Fulgurance/SecuritySoftwares-Main
ism port open https://github.com/Fulgurance/NetworkingTools-Extra
ism port open https://github.com/Fulgurance/NetworkingSoftwares-Main
ism port open https://github.com/Fulgurance/Archivers-Main
ism port open https://github.com/Fulgurance/Xml-Main
ism port open https://github.com/Fulgurance/WindowManagers-Main
ism port open https://github.com/Fulgurance/VideoDrivers-Main
ism port open https://github.com/Fulgurance/TextEditors-Main
ism port open https://github.com/Fulgurance/Terminals-Main
ism port open https://github.com/Fulgurance/KdeBase-Main
ism port open https://github.com/Fulgurance/InputDrivers-Main
ism port open https://github.com/Fulgurance/InputDriverLibraries-Main
ism port open https://github.com/Fulgurance/GraphicsTools-Main
ism port open https://github.com/Fulgurance/Sgml-Main
ism port open https://github.com/Fulgurance/Shells-Extra
ism port open https://github.com/Fulgurance/DatabaseLibraries-Main
ism port open https://github.com/Fulgurance/OfficeSoftwares-Main
ism port open https://github.com/Fulgurance/SystemGroups-Main
ism port open https://github.com/Fulgurance/SystemUsers-Main
ism port open https://github.com/Fulgurance/SystemLanguages-Main
ism port open https://github.com/Fulgurance/SystemTimezones-Main
ism port open https://github.com/Fulgurance/WebBrowsers-Main
ism port open https://github.com/Fulgurance/VirtualizationSoftwares-Main
ism port open https://github.com/Fulgurance/QtLibraries-Main
Now we can synchronize the remotely ports:
ism software synchronize
ISM is now ready to use !
In this section, we will start now to install the cross toolchain and some temporary tools needed for the next steps. Make sure to copy past properly the commands, because at the beginning, all commands will be execute with normal user, but after, it will be required to run it with sudo.
Just before we install the minimal tools for a chroot, we need first to set the desire kernel, or ism will complain about an unselected unique dependency. Notice that will don't block you later to install an additional kernel source. That just set the main kernel for the system. You can substitute than command by the wanted kernel:
ism software @systembase-main:kernel -sd @kernels-main:selinux-kernel-sources
Now, as a normal user, start to install the minimal stuff for a chroot under the new system:
ism software install @systembase-main:chrootbase
ISM will calculate all the dependencies we need , and just enter y for yes and then press enter to start the installation of the main base.
Then, install with sudo systembase with the pass2 option, and then disable the option:
ism software @systembase-main:systembase -eo pass2
sudo ism software install @systembase-main:systembase
sudo ism software @systembase-main:systembase -do pass2
Before we will install the last needed temporary tools, we need first to mount some required file systems. As root, run:
mknod -m 600 /mnt/ism/dev/console c 5 1
mknod -m 666 /mnt/ism/dev/null c 1 3
mount -v --bind /dev /mnt/ism/dev
mount -v --bind /dev/pts /mnt/ism/dev/pts
mount -vt proc proc /mnt/ism/proc
mount -vt sysfs sysfs /mnt/ism/sys
exit
Now we can start to install the last required softwares for the system base.
First we can enable the installation by chroot, because the generated system now have the minimal requirements for that.
sudo ism settings -eibc
(Optional): Again as before, you can set an appropriate job number for the generated system adapted to your virtual machine capacity (replace by the correct number):
sudo ism settings -scmo -j8
Just before to start the most exciting part, don't forget to copy the network information for the new system:
sudo cp /etc/resolv.conf /mnt/ism/etc/resolv.conf
We are ready now to switch to the secure mode and install the main base of the system:
sudo ism settings -esm
sudo ism software install @systembase-main:systembase
Then we can start to install a full plasma desktop environment.
The main configuration is managed by a virtual software called SystemConfiguration.
SystemConfiguration have as options other virtual softwares those manage the main components of the system. By this options, you can select the bootloader, kernel, init system, the used filesystems, languages, timezones, shells, loggers, crons, windowmanagers, desktop environments, display managers and graphical servers.
First for each components, we will select the options we need/want.
sudo ism software @systembase-main:bootloader -eo grub
sudo ism software @bootloaders-main:grub -eo efibootmgr
sudo ism software @systembase-main:init -eo openrc
sudo ism software @systembase-main:filesystem -eo dosfstools
sudo ism software @systembase-main:filesystem -eo btrfs-progs
sudo ism software @systembase-main:language -eo english
sudo ism software @systembase-main:timezone -eo europe
sudo ism software @systemtimezones-main:europe -eo london
sudo ism software @systembase-main:shell -eo bash
sudo ism software @systembase-main:cron -eo cronie
sudo ism software @systembase-main:logger -eo sysklogd
sudo ism software @systembase-main:windowmanager -eo kwin
sudo ism software @systembase-main:desktopenvironment -eo plasma-desktop
sudo ism software @systembase-main:displaymanager -eo sddm
sudo ism software @systembase-main:graphicalserver -eo xwayland
sudo ism software @systembase-main:graphicalserver -eo wayland
sudo ism software @systembase-main:graphicalserver -eo xorg-server
sudo ism software @multimedialibraries-main:alsa-lib -eo elogind
sudo ism software @xorgbase-main:libxkbcommon -eo wayland
sudo ism software @networkingtools-main:modemmanager -eo elogind
sudo ism software @securitysoftwares-main:polkit -eo elogind
sudo ism software @utilities-main:udisks -eo btrfs-progs
sudo ism software @utilities-main:udisks -eo dbus
sudo ism software @utilities-main:udisks -eo dosfstools
sudo ism software @utilities-main:udisks -eo elogind
sudo ism software @graphicslibraries-main:gtk -eo wayland
sudo ism software @graphicslibraries-main:gtk -eo wayland-protocols
Now we can install the configuration we setup:
sudo ism software install @systembase-main:systemconfiguration
Now actually, you finished to install all needed softwares for the very first base of your new linux system.
We are ready now to perform a chroot under the generated system to prepare the last details to be able to boot our new system properly.
First, we will install in our new system ism. For that, first install the required dependencies:
sudo ism software install @programminglanguages-main:crystal @programmingtools-main:git
Mount the uefi partition:
sudo mount -t efivarfs none /mnt/ism/sys/firmware/efi/efivars
Then we can chroot under our system:
sudo chroot /mnt/ism
Now clone the ism repository and then install it:
git clone https://github.com/fulgurance/ism
mv ism /usr/share/ism
cd /usr/share/ism
crystal build --release Main.cr -o ism && cp ism /usr/bin/ism && rm ism && cd
The system is ready to setup the last things we need !
First under the chroot, we will install few softwares we will need.
ism software install @texteditors-main:nano \
@utilities-main:kbd \
@networkingtools-main:iproute2 \
@utilities-main:chrony \
@fonts-main:dejavu-fonts-ttf \
@multimediasoftwares-main:alsa-utils \
@securitysoftwares-main:sudo \
@kdesoftwares-main:konsole \
@utilities-main:bc \
@utilities-main:upower \
@utilities-main:tlp \
@utilities-main:acpid \
@utilities-main:power-profiles-daemon
Then configure the file /etc/fstab (this step depend how your partition the new system). The following text is just an example:
# <fs> <mountpoint> <type> <opts> <dump/pass>
/dev/sda1 /boot btrfs defaults 0 2
/dev/sda2 / btrfs defaults 0 1
Set the hostname in /etc/hostname:
hostname
Now we will enable the required services:
rc-update add acpid default
rc-update add tlp default
rc-update add sysklogd boot
rc-update add alsasound boot
rc-update add dhcpcd default
rc-update add wpa-supplicant default
rc-update add networkmanager default
rc-update add elogind boot
rc-update add dbus default
rc-update add display-manager default
rc-update add udev sysinit
rc-update add udev-trigger sysinit
rc-update add chronyd default
rc-update add power-profiles-daemon default
Then we will setup the bootloader. First we will need to configure the kernel.
cd /usr/src/main-kernel-sources && make menuconfig
When you are happy with the configuration, now you can start to build it (substitute the number by the appropriate one for your virtual machine):
make -j8 modules_prepare && make -j8 && make -j8 modules_install && make -j8 install
Now we will install the bootloader:
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=ISM
Setup the /etc/default/grub file according to your partition scheme. This is the minimal variables you will need to set (this is just an example):
GRUB_DISTRIBUTOR="ISM"
GRUB_CMDLINE_LINUX_DEFAULT="root=/dev/sda2 root_trim=yes selinux=0 enforcing=0 quiet"
GRUB_GFXPAYLOAD_LINUX=keep
Name the generated boot files and copy the current kernel config into /boot:
cd /boot && sudo mv System.map System.map-linux-6.11.0 && sudo mv vmlinuz vmlinuz-linux-6.11.0 && sudo cp /usr/src/main-kernel-sources/.config /boot/config-linux-6.11.0
If it is required for your system, you can generate an initramfs with dracut:
ism software install @bootloaders-main:dracut
dracut --force --kver=6.11.0 /boot/initramfs-6.11.0.img
If it is required for your system, you can enable encryption via dmcrypt and lvm support at boot time:
rc-update add lvm boot
rc-update add dmcrypt boot
Then we can finally build the grub configuration:
grub-mkconfig -o /boot/grub/grub.cfg
And finally create a new user in the required groups to run sudo and use plasma properly:
useradd -m -G wheel,video,plugdev ism
passwd ism
And now before the reboot, just set the default display manager for your system in the file /etc/conf.d/display-manager:
DISPLAYMANAGER="sddm"
As you can see now, even the project is still in test, bit experimental at some part, it start to be really usable. I hope you will appreciate the work already done.
Enjoy !
This is the main page of the ISM wiki.
You will find here all available documentations: