Installing Hadron (with an Archlinux host)
From HadronWiki
*** STILL NOT FINISHED ***
This page will try to briefly describe how to install Hadron GNU/Linux to a chroot directory, using an Archlinux system as host.
Contents |
Assumptions
- You will install Hadron to /mnt/hadron directory (which probably is another partition on the system)
- Your host system is an Archlinux which connected to internet and you can use AUR packages (we'll use yaourt as example, which has the same syntax with pacman)
- You know what you're doing and won't blame a silly wiki page for shredding all your important files with an error
Preparing the host system
First, install the "lpms" from AUR. As we mentioned before, we're using yaourt, you can use whatever tool you like as lots of scripts you can use for this job:
yaourt -S lpms
This will install all needed packages to build Hadron root file system. After installing lpms with its dependencies, you need to checkout the "main" repository, which is included in /etc/lpms/repo.conf file. You can do this by typing:
lpms -Su
**Important Note**: You must not use lpms for installing a package to your Archlinux system, unless you want to fuck your package management.
Now you should be able to see the main repository in /var/lib/lpms/main directory.
And now the holy mounting; mount your partition which you want to install Hadron on to the /mnt/hadron directory (let's say /dev/sda1):
mount /dev/sda1 /mnt/hadron
And we're ready for installation in theory.
Configuration
First things first, you should edit the /etc/lpms/build.conf file for your needs. Default configuration can't know what you want in your new Hadron. Here we have an example build.conf file with descriptions:
CHOST = i686-pc-linux-gnu ### Do not change, we're not that much crazy (yet) CFLAGS = -march=i686 -mtune=generic -O2 -pipe ### See here: http://goo.gl/V3I2w CXXFLAGS = -march=i686 -mtune=generic -O2 -pipe ### Same as CFLAGS LDFLAGS = -Wl,--hash-style=gnu -Wl,--as-needed ### You can add your favorite LDFLAGS MAKEOPTS = -j3 ### How many processors your system has? Add 1 and replace the number options = X dbus python perl ncurses gtk nls -introspection ipv6 static-libs extras gudev berkdb cracklib engines jpeg sse2 pm-utils opengl lpms-completion consolekit policykit udev thunar synaptics intel dri ithreads gnutls ssl keymap threads xml wide-unicode ### This is the options part, your choices are listed here. ### They're not random, they come with packages in Hadron. ### They're similar to Gentoo's USE Flags http://goo.gl/fHYTY build_dir = /var/tmp/lpms ### I don't think you'll want to change this sandbox = True ### This is good. Just believe us.
After having a look to the build.conf , now let's see what your fresh Hadron will have:
lpms -p @rootfs
-p means "pretend", so you'll just see what would be merged. Change your options line in build.conf to fit your needs. For example, how would you want your new "wget", with or without "ssl"?
Installation
We can have some environment variable problems during installation, so I suggest you to export a p.i.t.a. variable before starting:
export PYTHONDONTWRITEBYTECODE=1
Also from now on, we will use every lpms command with --change-root parameter. As a suggestion again, define a temporary alias for lpms --change-root="/mnt/hadron/" :
alias lpmsh='lpms --change-root="/mnt/hadron/" '
So we can use lpmsh for packages we need to install in /mnt/hadron directory.
We're ready!! Now let's start to install our Hadron:
lpmsh @rootfs
This is going to install Hadron root filesystem under the /mnt/hadron directory.
After a long wait for all the compilations, your base system should have installed. If you had any problems:
1- Read The Fucking Output 2- Still can't solve? Repeat step one. 3- Still nothing? Then post it to Our trac, we'll help.
Chrooting to Hadron
Before we dive in, put your configuration files in their places:
cp /etc/lpms/* /mnt/hadron/etc/lpms/
Now we can chroot to Hadron partition to solve number of things;
mount -t proc none /mnt/hadron/proc mount -o bind /dev /mnt/hadron/dev chroot /mnt/hadron /bin/bash
Now you're in your shiny Hadron.
- Uncomment the line(s) which you want to use as your system locale in /etc/locale.gen, and run locale-gen command.
- Edit /etc/fstab and put your partition information.
- Run lpms -Su to checkout main repository in the new system.
-- To be continued --

