HOWTO:Manually install Adélie Linux

From Adélie Linux

Revision as of 18:46, 1 February 2017 by Awilfox (talk | contribs) (Boot the live system: add note about booting the PowerPC)
(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 ext2 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 are using a PowerPC Macintosh, you will need to enter the following commands at the GRUB prompt:

   linux (ieee1275/cd,apple2)/bzImage
   initrd (ieee1275/cd,apple2)/initrd
   boot

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.

You will need to initialise your network on the live system. If you use DHCP, you may simply run:

  # dhcpcd enp2s4

where 'enp2s4' is the name of your Ethernet adapter. If you don't know the name of your Ethernet adapter, you can find out using the following command:

  # ifconfig -a

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 ext2 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 add

You will see:

   WARNING: Ignoring APKINDEX.{hash}.tar.gz: No such file or directory
   OK: 0 MiB in 0 packages

Then run the following command to update the available package list:

   # apk --root /target 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 adelie-base eudev

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 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/
   # ln -s /bin/bash /target/bin/sh                        # needed for OpenRC

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.

  • For x86/x86_64, we recommend syslinux.
  • For PowerPC, we only support GRUB 2.

Configure the hostname

You will need to configure the hostname for your Adélie Linux computer. To set the hostname, run the following command:

   # echo 'hostname="name"'> /target/etc/conf.d/hostname

Configure networking

If you are using OpenRC, you will need the 'netifrc' package. To install the netifrc package, run the following command:

  # apk --root /target add netifrc netifrc-doc

Configure your networking in /etc/conf.d/net by using the examples provided by reading the documentation:

  > bzless /target/usr/share/doc/netifrc-$VERSION/net.example.bz2

where $VERSION is the version of netifrc installed.

If you need DHCP, you will need to additionally install the 'dhcpcd' package. To install the dhcpcd package, run the following command:

  # apk --root /target add dhcpcd

If you are using wireless networking, you will need to additionally install a few wireless packages. To install these packages, run the following command:

  # apk --root /target add wireless-tools wpa_supplicant

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 commands:

   # mount -B /dev /target/dev
   # mount -t proc none /target/proc
   # mount -t sysfs none /target/sys
   # 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 output provided:

   # useradd

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