HOWTO:Manually install Adélie Linux

From Adélie Linux

Revision as of 07:04, 10 December 2016 by Awilfox (talk | contribs) (Import from GitLab snippet - will revise as needed)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This HOWTO will guide you through manually installing Adélie on your computer. Before proceeding, please ensure that the Horizon installation system will not meet your needs. Manual installation of any system can be error-prone, and can be potentially dangerous to any data currently on the target system. Always ensure you have a readable backup of all important data on the target before installing Adélie Linux.

Disk layout

To be able to boot Adélie Linux, you will need a disk layout that your system firmware is capable of booting. You may need to consult your vendor to determine the correct disk layout for booting your computer. For the majority of x86 and POWER systems, you will need a boot partition and a root partition. Other architectures may have different requirements.

The boot partition should generally be formatted ext3 unless you have specific requirements. The root partition, and any additional partitions or LVM volume groups, may be in any format that the kernel is capable of reading; most file system drivers are built-in on the Adélie Easy Kernel package, including ext2, ext3, ext4, JFS, btrfs, XFS, ReiserFS, and NILFS2. To determine if a file system is supported by the Adélie Easy Kernel, you may search the configuration database online at (link).

You will need to create or modify your disk layout before installing Adélie Linux. The Adélie Linux x86 and x86_64 Live CDs contain fdisk and parted; the POWER Live CD contains mac-fdisk and parted. Other tools may be available for your system, provided by your vendor or available in your current operating environment. You may use them if they allow you to create the correctly typed partition structures.

The Adélie Linux Live CD only contains mkfs for ext2, ext3, and ext4. You will need to format other file systems using your current operating environment. This limitation may be changed in the future.

Installing the base system

Boot the live system

To begin, insert the Adélie Linux Live CD into your computer. Ensure that the CD drive you use is bootable by your firmware, and that the controller is supported by the Live CD kernel. This includes all PATA and SATA controllers, and most popular SCSI and SAS controllers. If the kernel shows the message "FATAL: no boot medium detected", please file a bug on the Adélie Linux BTS describing what disk controller your CD drive uses.

If you have written the Live CD to USB media, ensure your firmware supports USB booting. Virtually all USB controllers are supported in the Live CD kernel.

Create the disk layout (optional)

If you have not already done so, create the desired disk layout as described in the previous section, Disk layout. You may use parted on the Live CD.

Create the file systems (optional)

If you have not already done so, create the file systems on the disk. It is highly recommended to use ext3 for the boot partition and ext4 for the root partition.

Mount the target root file system

You will now mount the target file system to /target on the Live CD. Usually, your disk will be /dev/sda, /dev/vda, or /dev/hda. If you used the typically recommended disk layout, your target will most likely be /dev/sda2.

   > mount /dev/path/to/partition /target

Configure APK

You will now proceed to configuring the APK package manager. It requires the Adélie keys to be installed in /etc/apk/keys to ensure package validity and integrity. To install the default keys from the live CD, run the following two commands:

   # mkdir -p /target/etc/apk
   # cp -r /etc/apk/keys /target/etc/apk/

The package manager also requires information on what mirror to connect to for downloading the packages you wish to install. Typically, you should copy the repositories file from the live CD, but you may create your own if you desire. To copy the repositories file from the live CD, run the following command:

   # cp /etc/apk/repositories /target/etc/apk/

The package index must be prepared before it can be used. To prepare the package index, run the following command:

   # apk --root /target --initdb update

Install the base packages

You will now install the packages that comprise the base Adélie system. To install these packages, run the following command:

   # apk --root /target add shadow libffi adelie-base

If you would like to use the bash shell instead of zsh, you will need to additionally install the bash package.

Choose an init system

You will now need to choose what init system you wish to use on your computer. The OpenRC init system is highly recommended, as the s6 and systemd init systems are still highly experimental at this stage. To install the OpenRC init system, run the following two commands:

   # apk --root /target add openrc openrc-openrc eudev udev-init-scripts-openrc
   # cp -PRr /target/usr/share/openrc/runlevels /target/etc/runlevels

Create necessary files

   # cp -p /etc/{passwd,group,shadow,shells} /target/etc/

Choose a kernel

You will now need to determine what kernel you will run on your Adélie Linux computer. If you will be compiling the kernel yourself, you may do that now. If you would like to run the Adélie Easy Kernel, run the following command:

   # apk --root /target add easy-kernel easy-kernel-modules easy-kernel-firmware

Install the boot loader

You will now install the boot loader to your system. Depending on your computer's firmware and architecture, you may have different choices for boot loaders. Consult the appropriate architecture-specific documentation for your computer, and your firmware vendor, for more information.

Set up user accounts

You will now need to create a password for the root account, and create an account for yourself to log in to your Adélie Linux computer. To accomplish this, you must first chroot in to the new installation. To chroot in to the new installation, run the following command:

   # chroot /target

You may now create a password for the root account. To create a password for the root account, run the following command, and follow the prompts provided:

   # passwd root

You will now remove the live CD default account and create your own. To remove the live CD default account, run the following command:

   # userdel live

To create your own account, run the following command, and follow the prompts provided:

   # adduser

Reboot in to Adélie Linux

You may now reboot in to Adélie Linux. To exit the chroot environment, run the following command:

   # exit

To reboot into Adélie Linux, run the following command:

   # reboot