Installation

Stage4 helps skip a lot of steps used during standard stage3 installation. When you install from stage4, you'll have a ready desktop environment, built for a specific CPU architecture. With only a few commands, you can install Stage4Linux straight from your current linux system, without having to reboot into a live flash or DVD environment.

This installation guide assumes you are currently running another linux distribution

1) Create empty partition(s) and format them under the desired file system

Just like with live installation medium, use any of the disk partitioning tools you are most comfortable with such as parted or gparted to allocate free space and assign whatever file system type you wish.

NOTE: since you are using a linux system, it is assumed that swap partition is already available.

2) Download stage4 tar archive and mount the partitions

It is assumed that you have assigned partitions for /boot, /, and /home:

Run the following commands, as root:

(In this example, 'X' represents partition number (e.g. sda1) you assign for '/' mount point)

stage4linux   /home/me # mount /dev/sdaX /mnt

stage4linux   /home/me # cd /mnt

Download one of the stage4 tar archives from here:

For example, if you are downloading stage4 plasma build, issue the following command:

stage4linux   /mnt #  wget http://www.stage4linux.com/downloads/stage4_plasma_basic_2017_09_05.tar.bz2
stage4linux   /mnt #  tar xvjpf stage4_plasma_basic_2017_09_05.tar.bz2 --xattrs
stage4linux   /mnt #  mount /dev/sdaY /mnt/boot
stage4linux   /mnt #  mount /dev/sdaZ /mnt/home

Then run the following series of commands:

stage4linux   /mnt #  mount -t proc proc /mnt/proc
stage4linux   /mnt #  mount --rbind /sys /mnt/sys

stage4linux   /mnt #  mount --rbind /dev /mnt/dev

And now 'chroot' to your new system:

stage4linux   /mnt #  chroot /mnt /bin/bash

Configure fstab:

stage4linux   / #  nano /etc/fstab

At this point, we need to edit the fstab file to ensure that the file systems would be properly mounted. The sample below shows one possible fstab configuration based on the partition layout that we are currently using (i.e. /, /boot, /home). The UUID value in your case, of course, will be different:

UUID=8a2cab2b-7efe-4e2b-b484-7b0757afadae /boot ext4 noauto,noatime 1 2
UUID=c09b1138-c388-4997-9256-c05e54918d78 / ext4 noatime 0 1
UUID=0fe76156-360e-44af-90a9-94c7a7765c81 /home ext4 noatime 0 1
UUID=b0f82c0f-3652-4089-ae6a-f82fa0da3346 swap swap defaults,noatime 0 0

The most recent, up to date, kernel flavor can be obtained from this location: https://www.kernel.org/ OR using this command:

stage4linux   / #  emerge --ask gentoo-sources

Next, select the desired kernel version:

stage4linux   / #  eselect kernel list

and from the list of available kernels, for example:

stage4linux   / #  eselect kernel set 1

Depending on the selected version, e.g. 4.12.8, run:

stage4linux   / #  cd /usr/src/linux-4.12.8

Configure and install kernel:

stage4linux    /usr/src/linux-4.12.8 #  make menuconfig

stage4linux    /usr/src/linux-4.12.8 #  make && make modules_install

initramfs installation:

stage4linux    /usr/src/linux-4.12.8 #  genkernel --install initramfs

Set root password:

stage4linux    /usr/src/linux-4.12.8 #  passwd

Create new user:

stage4linux    /usr/src/linux-4.12.8 #  useradd -m -G users,wheel,audio,video -s /bin/bash user1

Note: GRUB can be configured to load stage4linux installation using GRUB tools provided by your host Linux distribution.

That's it! Reboot and enjoy stage4linux!