Pages

Showing posts with label Crux. Show all posts
Showing posts with label Crux. Show all posts

2015-10-18

Lenovo S20-30 Touch + Crux 3.1

PART 3  | See Part 2 and Part 1

So, Crux is meant to be keeper. And this post will be long and occasionally detailed - as Crux' manual is not very long and help is only in form of mailing-list.

Made usb installer: dd if=crux-3.1.iso of=/dev/sdd bs=1M, booted and had auto-login as root.
Did whole fdisk /dev/sda, mkswap/swapon, mkfs -t ext4 /dev/sda2 (and sda3) again.
mount /dev/sda2 /mnt    #sda1=swap, sda2=/, sda3=all stuff
setup

Picked packages manually - left some things out. Installer finished with no errors and then it was time to chroot.
It's not particularly important in which order you do things when chrooted - and some of following can also be done after reboot.
setup-chroot  #script with all needed chroot-things
passwd  #create root password
adduser myuser  #can be done later but I did then
mkdir /media/back  #mount point for sda3
chown myuser:users /media/back
nano /etc/fstab  #has to be fixed, otherways - no boot.
nano /etc/rc.conf  #can be done later, but why wait:
FONT= default
KEYMAP=us   #all availables are in /usr/share/kbd/keymaps
TIMEZONE=Narnia/Mytown  # /usr/share/zoneinfo/
HOSTNAME=cruxlap
SYSLOG=sysklogd
SERVICES=(crond net)  #here go all started services, e.g: alsa gpm ntp sshd
localedef -i en_US -f UTF-8 en_US.UTF-8
cp /usr/share/zoneinfo/America/Yourplace /etc/localtime
hwclock --set --date="2012-04-19 16:45:05" --localtime
hwclock --hctosys

# I have habit to use localtime - because of windows dualboot in my desktop-machine. If Linux is single-system, then it's no problem using UTC.

Created udev/rules.d/70-persistent-net.rules with card mac number as eth0 - otherways udev changes card-name to something - and net is not going to load automatically on boot.

Kernel compilation.
Thought to be clever - and compiled newer kernel (3.18.22) than one provided by Crux. Well, it hanged when booting. Tried changing things / recompiling - but nothing worked. Copied confs to sda3 and reinstalled Crux (to be safe of leftovers). Copied confs back, and compiled original kernel.
Which booted alright. But - surely I was in some totally retarded mode - as I left Intels' video driver out. Recompile. Then I discovered that I left out also sound drivers. Recompile. And afterwards I discovered that I left out i2c - needed by coretemp... well, not essential - no recompile.
Anyway, compiling went exactly like it's written in Crux' page:
cd /usr/src/linux-3.12.24
make menuconfig
make all
make modules_install
cp arch/x86_64/boot/bzImage /boot/vmlinuz
cp System.map /boot


grub-install /dev/sda  &&  grub-mkconfig > /boot/grub/grub.cfg
I didn't like what grub created - so I made my own simple cfg file (can be copied from Crux' page, and then modified).
Copied all my desktop-Crux user-confs to laptop and changed ownership to my user.
exit && reboot

mount /dev/sda3 /media/back  #if not already in fstab
Before starting with updates I changed ports confs - made /media/back/ports and media/back/pac folders and edited /etc/pkgmk.conf and /etc/prt-get.conf accordingly. Also - every .rsync file in /etc/ports has to be changed too.
The point is - all sources+compilations grow very big, very soon. No need to stuff your root.
mv contrib.rsync.inactive contrib.rsync  #enable contrib, also in prt-get.conf
ports -u  #update ports list
prt-get sysup  #whole system upgrade - takes hours!

Only error I had was with xorg-server: missing libepoxy. Installed that and xorg compiled OK.

And then it was installing everything I normally do install. Troubles:

- gpm  # Only thing that worked was usb-mouse. Hacked /etc/rc.d/gpm:
/usr/sbin/gpm -m /dev/input/mice -t imps2
stop/start gpm and all touch-things started to function.
- openbox # cp /media/back/ports/openbox media/back/pac, then edited Pkgfile '--enable-imlib2 \' and also added imlib2 to depends line. The same goes for conky.
- xdotool  # Now there is package to be taken (1,5 years ago there wasn't)
- man needs pager - put into .bashrc: export pager='less'
- tint2 # has waken from long coma - and there is new version 0.12.2
Url in Pkgfile didn't work, though - the one in slackbuilds.org did, so I downloaded tar from there.  
- wmctrl  # url is slightly wrong - /dist has to be taken out.
- volumeicon 4.6  # last version with gtk2, needs patching.
- pale moon binary package to /opt, ln -s /usr/local/bin (I have a habit to put apps to local/bin... In Crux, this folder has to be created.)
- mplayer + smplayer  # Like previous time, there were severe problems. Basically , smplayer didn't play anything and whined about mplayer error. To cut it short - after almost 3 hours of aborted compilations I installed mpv, smplayer started to work with mplayer BUT not with mpv... &^%&#$$#^.
- compton  # Packages point to very old version. I dowloaded new git version but didn't succeed with make install (missing some dep). So I was impatient and ended up with just make and cp compton /usr/local/bin. And it works alright.
- mtpaint  # 3.40 doesn't compile - libpng-16 is too new for it. Git-version compiles ok.
- libunibreak  # is newer liblinebreak. There is no package in Crux - but it's easy to make. Fbreader needs it - and fbreaders' Pkgfile needs then fixing (liblinebreak out).
- libtorrent-rasterbar  # For qbittorrent. But - 1.0.5 from Pkgfile is a WRONG one. Qbittorrent needs 1.0.6 from git.
- qbittorrent  # Refused to make package (error - package is empty) - BUT at the same time - installed it.

And so on... Installing/upgrading Crux and adding your stuff takes 30 hours or probably more. But when all is done - it's real fast and lean. Exactly what fits with shity Celeron.

2014-08-07

Crux 3.1, install and so on

# Install is mostly the same as 3.0
- There were slight differences in installable apps - some of them important, see release notes. Also, see Handbook - surprisingly enough, it is corrected for new release (simply, such kind of care is not so common).
So, let's note here some diffrences from 3.0 install:
- fstab (but you still have to fill it out, mostly)
- kernel pre-made conf is more complite/generally-usable.
- network has been split to lo and net scripts, AND those files are already functional.

# Later stuff
. See this and this of Crux 3.0 - a lot went the same way.
What differs:
- prt-get sysup. One update was xorg-server. Dependency 'libepoxy' was not noted and compile failed (but I think it's already fixed). Also, after update xorg-server needs drivers reinstalled (I picked libevdev, evdev, vesa, libva and got X started ok).
- Kernel, as a cautionary tale: Despite I was very eagle-eyed when in kernels' make menuconfig, I still missed my sound driver somehow... doh.
So I thought that I create it as a module. Downloaded alsa-driver (and alsa firmware) packages for make&kmod ... and spent an hour with googling/fixing 'configure' (version.h in wrong folder). And then - it still erred (some ioctl stuff) when 'making'. Fuck. So I went and recompiled the kernel. Took me less than 5 minutes... One reboot, alsactl init and sound appeared. What a waste of time - but superbly educational. Maybe.
- dbus is not installed out of box. Now, I didn't have that problem in 3.0 - which might simply mean that I got it at early stages as dependency... Whatever - it needs to be installed now.
- xdotool. Used Pkgfile this time... and got libxdo also installed.
- man: This time, it worked for root OK, BUT, still not for user (error was different of 3.0). prt-get depinst most - and man started up, colors and all ... for a user, BUT not for root. Strange. | Missing export PAGER="most" in root .bashrc, nothing else :) |
- jdk - version in Pkgfile is wrong, fix it.
- gegl (for gimp), footprint mismatch = delete footprint. And Gimp installed without whining despite threatening text in readme. Check URL in Gimps' Pkgfile - at some point of time it is/was incorrect.
- qpdfview, qbittorrent. Neither could make package (bsdtar: *: Cannot stat: No such file or directory). I couldn't find any reasonable lead for fixing that... As I didn't have such a message with any other (NOT-QT) apps, I tend to guess that it had something to do with QT. But finally, I went for simple 'make' and they installed with no fuss.
- fbreader. Missing libpng15.so.15 , ln -s from ver 16 helped.
About libpng - this new one craps pointless wrong-srgb warning messages to everywhere. Very bloody annoying.
- smplayer not recognising mplayer version-and-stuff. It started but didn't play a thing, no video, no audio. I reinstalled mplayer, installed docutils... did something ... and smplayer started to function. Oh good - but, I really don't know what that was about.

That's it for now. I'm sure there will be more. I haven't finished with apps, and I also have some unresolved errors... like 'cannot ioremap fb base' (nvidiafb) at startup...

All-in-all, I am a bit dissappointed - not sure if more in myself or in nature of Crux. Means, I hoped it goes easier second time around. It didn't.
Summary: My level of Linux plus Crux means that it will remain as my second distro after Slackware. I simply don't have multitude of hours to spade-work in google-piles. The perspective of continuous fixing of results of updates makes me ...depressed.
But - as I really like Cruxs' ideas and choices - it's a keeper without question.

2014-05-31

Crux 3.0 - 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?
| edit: Well, I certainly had a heavy moment of idiocy - not getting that only problem was missing ' export PAGER="most" ' in roots' .bashrc |

# 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 3.0 - 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/username/.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 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