-
Notifications
You must be signed in to change notification settings - Fork 0
Installation
Once extracted or cloned, all that should be required is to add spkg
to your PATH via symlink or appending it to your PATH.
If you choose to use spkg as a distribution you will need to run a few commands a few hours of time.
First Setup a partition, format it, and mount it. Let’s say we booted from a live CD and we only have 1 hard drive (/dev/sda)
cfdisk /dev/sda
A reasonable setup consists of:
- 1M BIOS boot [sda1]
- 128M /boot (This will be enough to store about 4-5 kernels) [sda2]
- 4G swap [sda3]
- Rest of the disc for your / [sda4]
mkswap /dev/sda3
If you choose to use ext2 for your boot:
mkfs.ext2 /dev/sda2
If you choose to use ext4 for your /:
mkfs.ext4 /dev/sda4
mount /dev/sda4 /mnt/leaf
A new system needs to be built so we initiate it via:
spkg --bootstrap /mnt/leaf
On my 15yr old system, Stage 1, took ~73mins without download time.
Once your basic environment is setup, we’ll need to install our tools to finalize our system.
First however we’ll need to chroot into our new system. The 1st stage installed a chroot.sh
script:
/mnt/leaf/chroot.sh
And install our tools used to build the rest of the system.
spkg @temptools
On my system this took about 15mins.
Finally we need to finish installing the rest of our system
spkg -e @basicsystem
On my system this took about 112 mins.
To finish the system there are a few finishing touches we need to do, namely setup a timezone and install our boot loader and kernel to boot into.
To find your Timezone you can run the tzselect
Then setup a permanent link via:
ln -sf /usr/share/zoneinfo/[timezone here] /etc/localtime
Now we need to setup our bootloader (grub)
grub-install /dev/sda
Next Install a kernel:
spkg linux-kernel
You can configure it via:
cd /usr/src/linux; make menuconfig
Once done, run: spkg --buildKernel
This will compile the kernel and install it into our /boot and run grub-mkconfig for you. From now on unless you wish to change the configuration, you may update kernels by simply running spkg --buildKernel
after installing any new kernel version.
Keep in mind if you used the size recommended earlier for your /boot only 4-5 kernels (depending on options selected) will fit on the partition, you may need to clean them out from time to time.
Older kernels’ generated files installed into /usr/src are also not automatically removed and should also be cleaned out from time to time.
Likewise modules installed in /lib/modules via kernels are not removed.
At this point edit the /etc/spkg.conf and add a few options to your USE and run: spkg @system
To update your system run:
spkg --sync -U