HOWTO:Manually install Adélie Linux
From Adélie Linux
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.
- 1 Disk layout
- 2 Installing the base system
- 2.1 Boot the live system
- 2.2 Create the disk layout (optional)
- 2.3 Create the file systems (optional)
- 2.4 Mount the target root file system
- 2.5 Configure APK
- 2.6 Install the base packages
- 2.7 Choose an init system
- 2.8 Create necessary files
- 2.9 Choose a kernel
- 2.10 Configure the hostname
- 2.11 Configure networking
- 2.12 Set up user accounts
- 2.13 Configure services
- 2.14 Install the boot loader
- 2.15 Reboot in to Adélie Linux
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, and XFS. 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 contains mkfs for all supported root file systems: ext2, ext3, ext4, JFS, and XFS. You will need to format other file systems using your current operating environment.
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.
You will need to initialise your network on the live system. If you use DHCP, you may simply run:
# dhcpcd <eth0>
where 'eth0' is the name of your Ethernet adapter. If you don't know the name of your Ethernet adapter, you can typically 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
If you have additional partitions, such as ones for /home, /boot, or /usr, mount them now as well:
# mkdir /target/boot > mount </dev/path/to/partition> /target/boot # mkdir /target/home > mount </dev/path/to/partition> /target/home
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 must be prepared before it can be used. To prepare the package manager, run the following command:
# apk --root /target --initdb add
You will see:
OK: 0 MiB in 0 packages
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/
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 bash-binsh ssmtp
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 the only option as of 1.0-alpha4. To install the OpenRC init system, run the following two commands:
# apk --root /target add openrc sysvinit # cp -PRr /target/usr/share/openrc/runlevels /target/etc/
Create necessary files
# cp -p /etc/shells /target/etc/ # cp -p /etc/resolv.conf /target/etc/
If your system requires an /etc/fstab, you may create it now:
# vim /target/etc/fstab
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
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 'name'> /target/etc/hostname
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:
# less /target/usr/share/doc/netifrc/net.example
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
To create your own account, run the following command, and follow the output provided:
You will likely want to add yourself to at least the
video groups. Also consider
lp if you have USB devices or printers you wish to use.
You'll need to create a startup script for each network interface and add it to the default runlevel, if you will be using networking:
> ln -s /etc/init.d/net.lo /etc/init.d/net.eth0 > rc-update add net.eth0 default
Ensure that hardware is correctly detected on boot by adding the two udev services to the boot runlevel:
# rc-update add udev boot # rc-update add udev-trigger boot
If you want to have the ability to remotely connect to your computer and transfer files, you may wish to add OpenSSH:
# apk add openssh # rc-update add sshd default
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 (including x86_64) and PowerPC, we only support GRUB 2.
- Some newer PowerPC computers using skiboot may not require a bootloader.
- ARM computers typically require a model-specific bootloader, such as U-Boot. Installation instructions for U-Boot are beyond the scope of this guide.
Reboot in to Adélie Linux
You may now reboot in to Adélie Linux. To exit the chroot environment, run the following command:
To reboot into Adélie Linux, run the following command: