Pages

2014-05-16

Crux 3.0 - 1: Install

Visiting fringes chapter 3. See 1 and 2
http://crux.nu

Now - including Crux to fringes is a lot misleading, especially after pitiable three in 'Fringes 2'. Crux is totally OK source-based distro, pleasantly conservative, works eminently... but, it's definitely out of distros' top 20. Only reason for such a situation - I think, is - Crux is time-consuming to install and renew... seeing gcc compile flicker epileptically for an hour, for example, induces some negative thoughts. Oh, well, Crux also doesn't have anything preinstalled, you have to sweat to get your satisfaction.
But, let's:

# I wrote ISO with dd to USB and booted with no problem.
And landed as auto-loginned root in console. Not being especial fan of fdisk, I had sda8 previously created - and that was the only new partition. I see no reason for swap (with 8GB of RAM), and I don't use separate /home in traditional way. Now:
mount /dev/sda8 /mnt
setup
 
I picked /sda8 as my root partition, and next came choosing packages.
Mind! Those packages you see here in repo, in /core, /opt, and /xorg - are NOT all in your puny 250-meg ISO. ISO contains minimal selection for you to get system up and running, and kernel compiled.
It's wise to do a walkthrough in repo-folders, and make clear what is what, what those packages do, and what you really need.

# Package selection.
-- CORE. I left out only btrfs-progs, exim, reiserfsprogs, vim, xfsprogs - as unneeded.
-- Take most of XORG. That, if you are not planning to stay with console.
-- Pick from OPT. Now, picks here depend very much on what you plan to install ... well, as in 'optional' :)
Anyway, here are my picks, according to 'I am going to use X with Openbox and some apps':
atk, cairo, cmake, dialog, expat, fakeroot, fontconfig, freetype, gdk-pixbuf, glib, gperf, gtk, harfbuzz, hicolor-icon-theme, intltool, keyutils, lib*, mdadm, mtools, nano, nfs-utils, openbox, pango, python, rp-pppoe.
After selection, some packages got added as dependencies.
-- As already said, most of packages needs to be compiled/installed afterwards. Whole run takes hours. So, be smart and pick maximum of compiled ones here.

# 'OK' and it copies your selections to disk. Done, no errors on last line?
Ok then, let's chroot, fix some confs and compile our virgin kernel. See here for manual. Next comes, very concisely, what I did:

setup-chroot  # script, puts you stright into fresh Crux system.

passwd  # create your admin passwd

nano /etc/fstab  # fix it, add missing parts. something like that:
/dev/sda8   /          ext4      defaults         1   1
devpts      /dev/pts   devpts    gid=5,mode=620   0   0
proc        /proc      proc      defaults         0   0
sysfs       /sys       sysfs     defaults         0   0
tmpfs       /dev/shm   tmpfs     defaults         0   0


nano /etc/rc.conf  # See here for guidelines. Services I put there were only crond and net. Later I added more - like alsa and gpm...

localedef -i en_US -f UTF-8 en_US.UTF-8

useradd -m -s /bin/bash -G audio,lp,video,wheel -U yourusername
passwd yourusername
nano /etc/sudoers
  # enable wheel for sudo.
! Mind! Crux creates ids as 100:101. Which means, when you start to meddle with your other installed Linuxes, you get 'permission denied' shit - as at least Debian, Slackware and even Alpine all go 1000:1000. I fixed that like this:
usermod -u 1000 yourusername
groupmod -g 1000 users
usermod -g 1000 yourusername


Network. See here. I went for dhcp and used example script, and it worked (well, after I got missing driver added and kernel recompiled).
Don't forget to create /etc/udev/rules.d/70-persistent-net.rules
Some silly-looking stuff in there - better copy it from your other Linux.

cd /etc/ports
mv contrib.rsync.inactive contrib.rsync
/etc/prt-get.conf
- uncomment - prtdir /usr/ports/contrib
For other repos you have to create rsync files (and add entries in prt-get.conf), like:
cat >> /etc/ports/xfce.rsync << EOF
host=crux.nu
collection=ports/crux-3.0/xfce/
destination=/usr/ports/xfce
EOF

! Good thing: you can also use your local make-dir (where you collect your sources and create packages) as 'prtdir' - and prt-get can see it and operate with your packages.
! Mind! When you do prt-get sysup afterwards, the bloody shit overwrites your freshly-fixed prt-get.conf. So, make a copy before...
For confing pkg and ports, see here.

# Kernel compiling. I went with provided oldish 3.6. That's because Crux 3.1 seems to be coming soon (fingers crossed) - with newer stuff and so on. Also, as my linux-life has shown me several times: Do not go with newest, it might not work!

In 'make menuconfig', take your time and pick all needed... I compiled twice as I missed my network driver at first run. Whole process of kernel creation:

cd /usr/src/linux-3.6.x
make menuconfig
make all
make modules_install
cp arch/x86/boot/bzImage /boot/vmlinuz
cp System.map /boot


Fix/install your bootloader.
Done. exit. umount. reboot. If multibooting, fix your master-bootloader.

! By the way - quite a lot of this command-line conf can be done on other Linux' desktop, in more relaxed way than nano.
! Just to mention: runlevel 1 = single-user, 2 = multiuser, 3,4,5 = not used.

End of part 1. Part 2 - Beefing it up, Part 3 - Later problems

No comments: