Pages

2014-05-31

Crux - 3: later problems

Crux, part 1 and 2.

So, after happyness of 'it's installed, yee' comes usual 'oh shitty, and this doesn't work too'. Means - there appeared more quirks, and some of them still unsolved.
The following is not only 'how to fix Crux', but also 'how to fix certain things in quite general way'.

Advice - good places to track deps and script-configs: http://slackbuilds.org and http://slakfinder.org; BUT, do visit also LFS - as there you get not only deps lists but also explanations and advices. And lastly - apps' home. Last because a lot of those are without any sensible info, or filled with irrelevant drivel.

# GUI su or sudo (as it's annoying to have multitude of terminals hanging around for menu-started sudo apps).
-- First, I tried ktsuss. Made it from different sources, with different configs etc. But - if it wasn't stright segfault, then the thing simply failed with recognizing passwd.
-- Then I tried xdg-su. That worked alright from OB menus, sprouting xterm (after checking for all possible 'friendly' alternatives like kdesu, gksu ...). Xterm for that can be confed as small and in corner of screen. That is - if you have other terminal for normal work. But! - Spacefm doesn't start xdg-su. It looks like it has wrong '-c' parameter in source... As of now - I simply do not know what is good replacement parameter to recompile with. So, no satisfactory gui-sudo-solution yet.

# startup blah: couldn't mount (ext2,3) because of unsupported optional features - Put 'rootfstype=ext4' into your boot command and this message goes away.
# startup blah: Drivel about lvm. If you don't use it, uninstall lvm. I think it comes as dep for something... ie - I definitely didn't pick it...

# SHUTDOWN. I do not have PAM and *kits installed. My usual exit-py-script simply hung ... So I changed script to do shutdown in old way:
groupadd shutdown
In /etc/group , add user to shutdown group, in /etc/sudoers:
%shutdown ALL=(ALL) NOPASSWD: /sbin/reboot  # and the same for /halt
-- if using bash script, make tiny file like this (and another for /halt):
    #! /bin/sh
    sudo /sbin/reboot $*

-- OR - If having some py-script:
Define: os.system("sudo /sbin/reboot") , and the same for /halt
It works alright - and looks especially nice after you add some colored 'echos' to rc.shutdown (and/or rc.multi). Which needs some 'shell-colors' resource-file in /etc ... 

# Windows partitions (ntfs-3g) - no write access:
Add your-user to group 'disk',
ln -sv ../bin/ntfs-3g /sbin/mount.ntfs
chmod -v 4755 /sbin/mount.ntfs

reboot (or logout/login) - and you can write.

# No man-pages displayed at all, but error: sh: most: command not found. Error executing formatting or display command...
-- First, (installed) man port-folder had no packages downloaded or made. At the same time, 'isinst' claimed it IS installed ...
I reinstalled man (-d -u) and packages appeared. Man for root started up - almost. Ie, with silly ESC chars hanging everywhere. After adding 'R' to 'man.conf' line:  
PAGER /usr/bin/less -isR
ROOT started to get clear and readable man-pages. But, for USER man remained with an 'error'.
Then, I installed libslang2 , and after that, 'most'...
Halleluya!! Suddenly I had sillily colorful man for a user working.
... What's odd - there is no colors for root. Seriously perplexed, me. How comes that the app behaves so cardinally differently for different users?

# Spacefm and udevil: Udevil comes 'out-of-repo'. And it has problems with umounting... do for udevil: sudo chmod +s /usr/local/bin/udevil

# I still have startup error for terminus-console-font. No idea why.

# And some solved problems with apps:
-- gcolor2: needs patches (three!). I took them from SBO, patched, and the result compiled ok (no segfault as with vanilla).
-- gimp: problems with deps pkgfiles' URLs. Fixed them. AND there is missing udev machine-id, do:
sudo dbus-uuidgen --ensure
The same id-fix is needed for making qbittorrent!
-- fbreader: also needs a patch, then compiles ok.

Crux 3.1 will be released very soon. That means - I will format my Debian Sid (there will be NO systemd init in my box!) - and install new Crux to this partition. We'll see what gives, compared to 3.0...

2014-05-16

Crux - 2: Beefing it up

See part 1 - Installation.

So, we have system and xorg installed, network-capable, and bootloader fixed. Time to:
# Get back to Crux and see what gives ... and start adding stuff.

As mentioned before, I complitely missed checking network driver in kernel, and so spent some time seeking non-existing conf-problem ... before discovering that there isn't any driver. After quick re-chroot and re-compile everything was dandy. I system-upgraded and started building desktop:

ports -u  # update/get ports. Downloaded ports go to /usr/ports/
ports -d  # see versions' difference between installed and available
prt-get sysup  # system-upgrade. Take a nap. A loooong nap.

Problems / not-upgraded:
- Perl gave error 404 - version in /usr/ports/core/perl/Pkgfile was old, incorrect. Fix it, and delete md5sum file. Then it compiles.
- atk, gdk-pixbuf, pango, gtk - all missing gobject-introspection. Install it.

Next I got proper video going:
sudo prt-get depinst nvidia
sudo prt-get depinst gl-select
sudo nvidia-xconfig
sudo gl-select use nvidia


I had some strange permissions for and in my /home and X didn't start. Check, fix if needed. Everything there should be 1000:1000 or username:users (if you changed ids to 1000). If things look fishy, do
sudo chown -r 1000:1000 /home/username

Installed apps needed for my Openbox environment (conky, lm_sensors, tint ...)

Exited root and as user:
cat >> /home/andrus/.xinitrc << EOF
exec openbox-session
EOF


startx

When I was meanwhile in my grub-master Wheezy, I copied most of my various conf files to Crux, and fixed them accordingly. So I got new Openbox with menus and shit up at once (as opposed to normal black nothing).
- First observation - not Openbox nor Conky got image support. Recompiled them with --enable-imlib2 option added to Pkgfile.
- Sensors (in Conky) were not working. I probably left them out in kernel (?). Anyway, they can be added as external module: Did 'sensors-detect', and got names of module(s). For me it was coretemp. I downloaded coretemp.c and its Makefile, did 'make' and then insmod coretemp.ko
Stuck it also to /lib/modules/linux-xxx/kernel/drivers/hwmon/coretemp.ko
It worked and temps showed up.

! To stress trivial: All personal conf -  like .bashrc, .bash_aliases, .profile, .dircolors etc - has to be created or copied from somewhere. Well, of course you personalize as you want ... Crux is not some silly we-know-better-Ubuntu.

# Package management. Yes, see Handbook and see wiki and see prt-get manual, I am not going to quote commands here.
Time to install all those still-missing packages ... after making sure that at least /contrib - besides 3 main ones - is also enabled.

To mention some essentials here (from those 3 main repo-folders):
alsa-utils, alsa-plugins; bash-completion; gdk-pixbuf; gobject-introspection; imlib2; pango; lsof; startup-notification; rxvt-unicode; xorg-font* ... etc etc. After that, and also in between come things from /contrib. I didn't enable any other repos yet - but used separate rsync in some cases.
Crux' packages are really just bash install-scripts, with source URL. Dependencies are mostly listed (and consequently downloaded && installed). That's if you do 'prt-get depinst packagename'. But, dep-listing is not a requirement. Expect surprises once and a while.
When taking Pkgfiles from peoples' repos, always check Pkgfiles - those might be outdated and/or not with conf you expect. Well, there are few errors even in base 3 repos.
Package availability is quite good - for my tastes. And - everything missing can be cooked from source - with Pkgfile && pkgmk -d -i for easier maintenance, or - if Pkgfile-making seems too difficult - with simple ./configure && make && make install (or whatever source wants).

Some notes on installed packages:
- Installed Firefox esr. Unpacked it to /opt  && ln -s binary to /usr/local/bin. This folder has to be created and 'path'ed. Repo has this new nasty chrome-puke version 29 for taking - if one likes such stuff.
- There is spacefm package (Yee!) ... but no udevil. Ignorantgurus' installer works alright, though.
- tint2 is available in antique form only. No surprise here, as tint seems to be quite comatose. I did my usual, and didn't bother with Pkgfile.
- There is wmctrl package, but no xdotool (they both fit in with my openbox setup - not that they are relatives). Xdotool was the last simple 'make' for me (after that I started to create Pkgfiles). Xdotool compiled alright but, didn't copy its' libxdo library. So I did that with cp and then ldconfig to update libs.
- compton+libconfig compiled OK, so did lxappearance.
- With volumeicon there was more hassle - I didn't want to install gtk3 (ver 0.5.0 dep), so I went with 0.4.6. And this one has glib bug (= no compile). At the end, I found the patch, unpacked the source and patched it manually, repacked and compiled successfully.
- I briefly considered installing gksu - but the bloody crap has as many dependencies as a street-dog has fleas... No deal.

All-in-all, I have Crux nicely running, without *kits, gtk3 and display-manager.
Only serious problem still remaining - 'man' is not working. Only thing i get is error about 'display and formatting'. Still no idea what it wants.

# Conclusion.
My home-distro presently is Slackware-current - and I tend to put Crux to nearly same level of pleasantness. Crux is kinda more flexible... dealing with Slackware takes a bit less time. Slackwares' slackpkg (with +) seems to me, maybe, a bit more convenient than prt-get system. But it might be habit talking.
Anyway, I am going to keep Crux, and when 3.1 comes out (with eudev, ie - no systemd perversions), it will rule my linux-roost together with Slack.
Crux is recommended to anyone who wants play with Linux without all bloaty crapware... And doesn't mind messing with compile.
Part 1: Crux install, Part 3: Later problems

Crux - 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

2014-05-08

Minix, OpenIndiana, Haiku

Visiting fringes, chapter 2. See chapter 1

Going to extremes now... Fortunately for me, what comes here is more like educational overview, a total hearsay - otherways, I am afraid - I would be now complite drooling and gibbering wreck. I mean - not just slightly nuts as now ... errr ... This longish sentence meant that I didn't install any one of those three, but simply tried to get A Picture by reading various bits and pieces.
The goal of that: Are those three usable as desktop systems?

# Minix
A review, and another.
Minix is independent operating system, not a variation of linux at all. Though it uses Clang as a compiler and some Gnu utilities. There is closer connection with Netbsd nowadays - Minix3 uses their userland stuff. Which is probably very good thing - so they have at least something to use... Package management uses Netbsds' pkgsrc with 'pkgin' frontend.
It's development team has always been marginal - and that's sure way NOT to get WHOLE operational system properly done. Which is, it seems, recognized by Minix project - as focus lately tend to be on embedded ARM.
Some info-bits:
- tutorials and help in Minix3 page are .... kinda like afterthought, semi-finished, raising questions like 'what?', 'and?', 'eh?'.
- installation is non-trivial and by some comments - can be frequently unsuccessful.
- hardware support can be considered ... errr.. hugely lacking.
- There are three window managers available. I myself quite like JWM - but choice of only three here simply means - Minix is not for desktops.
- Quoting: 'Currently, only text-mode browsers are supported under MINIX 3'.
- From 'Goals' of project it's also quite clear that Minix is NOT trying to be usable desktop.
So don't bother to try Minix as desktop system. For embedded systems with arm processor - it seems to be OK. Google Minix Neo X5 and X7, for example.

# Haiku
There are some reviews from 2012-13, this for example.
Quoting: 'The key highlights that distinguish Haiku from other operating systems include: specific focus on personal computing ... blah-blah' - so it's for desktops.
- First - it looks childish and outdated. So, one has to have certain dispositions to like and use it at all...
- Haiku has graphical installer, nothing overly complicated here. That is - if you reach that point - Haikus' hardware-support is (of course) rather limited.
- It uses its own BFS file system - do not expect any other op-system to read Haikus' partition.
- Whole desktop+apps complex is incomplete. There seems not to be any seriously taken and/or flawless app in existence.
Taking to account how difficult and time-consuming it is to create and maintain an operational system WITH usable whole-range bunch of apps, then - Haiku never will be complite. Not ever. No.
According to Haiku looks and (not)functioning - is there any point to try it? No, not really - a) If looking for simplicity, take some flavour of linux-for-simpletons and you get what is not so bloody win31-looking and it even works and has thousands of apps. b) Or if you want reasonably functional retro-look, why not to install Trinity on Ubuntu?
Conclusion:
Last Haiku alphas make colorful desktop-like picture alright, but ... You can't use it really for anything remotely serious.
Oh, well, I can say it, alright: But its obviously interesting for devs which is so good. See?

# OpenIndiana
A review here, quite nice by the way.
Quoting: 'OpenIndiana is a robust enterprise operating system, based on the illumos kernel. Blah-blah ..., and suitable for servers and desktops.'
OI is the only one of three which seems to me usable as desktop op-system. Quite simple to install, though somewhat buggy, and unfortunately in semi-zombie state.
Anyway, brave people who tried, say: it makes (gnome2) desktop and has some (great) apps.
It's based on SunOS and/or OpenSolaris... whatever. Commandline is allegedly close to bsd.
- tutorials, support and helps are quite pitifully lacking,
- It only has x86-version. At the same time - looks like zfs is only installable file system - which some people drool over, but which I consider serious overkill for average desktop-user (and there are compatibility issues with linux),
- when installing, Grub (legacy) has NO where-to choice. Beware.
- there are several good server-apps,
- desktop looks antique. OI has quite a lot of apps ... that is - compared to Haiku. But it lacks others, and really, repos are not big at all. It has several conf-utilities, it has nifty backup-utility...
XFCE and KDE are also installable, but allegedly very buggy.

Despite boasting (on their homepage) enterprise-quality, heritage, and more-big-words; it's one of those op-systems severely lacking dev-resources - and probably will be put to sleep after some more futile struggle.
As I noticed somewhere - a user opined that OI should stick with server-side and stop with desktop... I agree, but I think that it's too late for that. I would be very (pleasantly) surprised if OI survives and prospers.
OI really is a functioning system - as opposed to some which simply pretend. Good.
But there isn't any reason to pick it as your desktop platform. If one doesn't like linuxlands' late antics with systemd, gnome3 and tendencies to blindly fuck-up as much as possible - then PC-BSD is your unix-like desktop system.

For those who prefer shorter forms of information. Usable as a desktop:
Minix - No;
Haiku - hell, No;
OpenIndiana - Yes, maybe, but why?