Fsarhiver, moving OS

And also backing up all shit, of course.
Links of backing up  and to get SystemRescueCD (has fsarchiver and partimage). Especially first link gives nice overview what happens and so on. Also link to fsarchiver itself.
The following is not so much of backing up, but of moving your (backed-up) distro to entirely different partition.
I chose Fsarchiver because it can write to a partition of different size of original... PartImage can not. Other option could be Remastersys, of course. Somehow it seemed more difficult to me... might be - for no reason.
Anyway, it's an AAR of moving installed distro to another partition, AND making it also a master of multibooting Grub2. Yes-yes, finally I am going to remove my Openboxed Xubuntu from this exalted position and elevate freshly-cooked Wheezy Openbox to be the new boot-boss.

What I did:
Dramatis personae: sdb/MBR - bootloader from sdb6 Xubuntu, sdb8 Vsido, sdb9 Wheezy, sdc2 is a backup partition.
Vsido has fsarchiver out of box - if you don't (have Vsido or fsarchiver), install it.
I started in Vsido, opened terminal and:

# mount a partition to put an archive on
sudo mkdir /mnt/back 
sudo mount /dev/sdc2 /mnt/back 
# make backup
sudo fsarchiver -j2 savefs /mnt/back/backup-sdb9-deb.fsa /dev/sdb9
# last command creates a file from whole sdb9 and puts it to sdc2. 3G was compressed to one and it took 4 minutes. -j2 means that my old AMD X2 can use both cores for this task.
If curious what's in there:
sudo fsarchiver archinfo /mnt/back/backup-sdb9-deb.fsa
# Shows you some information about the file.
sudo umount /mnt/back

Then I rebooted and logged into Wheezy - thinking that then I wouldn't have problems with different grub versions... As I realized afterwards: there is no difference - when chrooted in, you download proper grub anyway.
And another afterthought: it might have been really wiser to make that bloody live usb and do the thing from there - less problems with uuids.
Opened Gparted and formatted sdb6 to ext4. Xubuntu died - and together with it, booting Grub. No going back now...
Then I restored previously created archive to sdb6 (and id=0 means that there is only one file-system in archive):

sudo mkdir /mnt/back 
sudo mount /dev/sdc2 /mnt/back
sudo fsarchiver -j2 restfs /mnt/back/backup-sdb9-deb.fsa id=0,dest=/dev/sdb6
sudo umount /mnt/back 
TWO important things to do now:
1. Fix /etc/fstab of your new 'installation'. Because uuid remained the same for both Wheezys, I couldn't mount the other one. @#%$#@@ and shit! So I opened fstab of old one and replaced uuid with /dev/sdb9. After that I could mount and fix fstab of the new Wheezy: I also replaced this uuid - in this case with /dev/sdb6 (as root partition) and that was that.
2. Harder part. Fsarchiver writes things back, BUT it doesn't put them into exactly the same place. So, you have to reinstall your Grub. Even if the partition is the same you started with.
In my case, it was different and I also needed already installed root-grub to be replaced by new mbr-grub.

sudo mount /dev/sdb6 /mnt
sudo mount --bind /dev /mnt/dev
sudo mount --bind /proc /mnt/proc
sudo mount --bind /sys /mnt/sys
sudo chroot /mnt
apt-get purge grub-common
# 4 packages get removed
apt-get install grub-pc
# 4 comes. AND it asks WHERE to install. Do NOT answer wrong!
# Somehow, it missed Vsido. (But I got it after reboot.)
sudo umount /mnt/dev
sudo umount /mnt/proc
sudo umount /mnt/sys
sudo umount /mnt
sudo reboot
If someone wants to play with uuids, then blkid shows uuids of all partitions, and uuidgen can produce new random uuids. Then do:
sudo tune2fs /dev/sdb6 -U number-you-generated. And your sdb6 partition has a new uuid.

My new 'bootmaster' booted without problems, and additional fast 'update-grub' found, yes, everything that was bootable.
I am not sure if installing from remastersys-backup is not a better way. But doing it with fsarchiver was certainly educating... though somewhat scary.


Make and install Compton

Compton compositor is a good thing to have when there is no 'native' compositing, ie - you are using something like Lxde or Openbox. Without compositing there tend to be tearing when scrolling in browser or when playing videos.
After installing it - you should also try to get your Comptons' starting parameters correct/fitting. And it's very adviseable to have most current version of Compton (the one that can use glx backend).
Whole process was quite baffling and mysterious for me - and even more baffling was that ultimately the thing worked and tearing disappeared...
For help, advice and tutorials - first look into Comptons' page, then Crunchbang forum and Arch forum + wiki. AND do: 'man compton' somewhere, if possible - it shows all available parameters and their meanings (version of man is also here).

Now to business (Debian Wheezy netinstall + Openbox, Nvidia GTX 560, proprietary drivers).
How I did it:
It's markedly easier in Xubuntu (+Openbox) than in Debian Wheezy Openbox ... Means - you can download & install for Ubuntu using ppa.
sudo add-apt-repository ppa:richardgv/compton - but it doesn't seem to be the latest version. But you can't get Compton from Debian stable repos at all and I am not sure about sid... (Vsido came with Compton - and/but it's oldish).

## How to make and install:
One conversation (about installing) is here. Worthy advice is how to avoid installing asciidoc. Other - to use xcompmgr deps: apt-get build-dep xcompmgr - didn't work for me ... I got zero results. So, no advice...
Anyway, to get real fresh version, you have to download tar, unpack, and make.
There are quite a lot of dependencies. List is here.
Almost all packages have to be with ending '-dev'. AND - as 'm4he' in Crunchbang forum said - do not bother with (last one) asciidoc - it's only for make install. Simply copy 'make'd compton file to /usr/bin/ without make install. Especially if taking account that I have never managed in Debian to 'make docs' (step before 'make install'). The same has  not been problem at all in Slackware - so it's possible alright.
Just as an example, what I had missing (additional deps in brackets): libconfig-dev(3), libdrm-dev(2), libdbus1-dev, and nvidia-support (why?).
Edit, feb 2014 | Happened to install compton in fresh Wheezy netinstall... a lot was missing, of course, and the last one took some googling (write down what you did last time!). Conversely, if you get (Debian!)
... fatal error: GL/glx.h: ...
then this is missing libGL and means: libgl1-mesa-dev
One more thing: If you changed kernel and/or especially Nvidia binary driver, and have now strange artifacts in your desktop (missing pieces, transparencies etc), then recompile your compton. It probably helps. | edit
Then, after getting all deps, 'make' agreed to make... with 4 warnings when finally making it. Most curious is that the result works. Being totally n00b in make-things, I have nothing meaningful to say about those warnings ...
'Errors' usually mean terminated 'make' - and then you have to read-and-understand what might caused it. And then fix it.

## We have now 'compton' executable file in folder where we ran 'make'.
Copy the file to /usr/bin/, test it - type 'compton' in terminal. When shadows appear around windowses, it works. Then add to your autostart:
compton --backend glx --vsync opengl-swc --paint-on-overlay --shadow-exclude "! name~=''" --config ~/.compton.conf &
'shadow-exclude' part goes together with part in .compton.conf
In my case:
# Exclude shadows
shadow-exclude = [ "n:e:Notification", "n:e:Conky" , "g:e:Tint2" ];
shadow-ignore-shaped = true;
Quite simply - this excludes shadows for some (your chosen) objects.
Edit 28.06.2013: If having inactive window transparency is a problem for some app (Gimp!), then add to the same conf file a line:
focus-exclude = [ "g:a:Gimp" ];
and Gimps' various popup-menus doesn't make main window transparent anymore! Other apps can be added here too, comma-separated.
PS! This feature is newish - so your Compton has to be relatively new. Edit ends.

And for good measure - here is my current (March 2013) Xubuntu+Openbox start line (older version of Compton (no glx!), tearing still occurs, but in lesser extent):
compton --paint-on-overlay --dbe --vsync opengl --shadow-exclude "! name~=''" --config ~/.compton.conf &

By the way - some parameters exclude each other - so, when experimenting, start your compton from CLI and see if there are errors.
You shouldn't be surprised if procedure described here does not work for you. Compton is one of those things that has about million advices in web - most of them wrong. Search and try and try again.
PS! Might take a look also here: Salix, Openbox - making Compton there.


Wheezy netinstall Openboxed

A project to test if Debian 64bit stable (Wheezy) with Openbox is good enough (i.e. - immortal, invincible, unhurtable etc) to be the master and host of my multibooting Grub2. It's also my first desktopless-console-install evah! Me, proud.

Writing ISO to USB with funny cp command from official Debian tutorial didn't make bootable usb...
But format / write in dear old XP with usb_format_HPU_v2.2.3 and win32imagewriter - gave satisfactory result.

Boot your USB and - if so inclined - pick advanced options / expert GUI install. That's what I did. Put priority to LOW. It's a bit bizarre that this gives you maximum interaction with installer options... Yes, not high ... but low.
Install is quite peachy - if using your reading ability, everything should be OK and clear. If you plan to use smxi script - you have to install bootloader (in my case, because of multiboot, into new root partition), as opposed to skipping it. Or afterwards, when you try to use smxi, then it whines about lack of grub and doesn't want to run.
At the near-end of installation - do NOT choose/mark desktop package - that is, if you are not Gnome fan, because that's what installer defaults to.
Oh, and small different choices really give you different install-results.
For example - if you install root with login permitted, then your user does not get sudo installed... When you do not put priority to low, you simply can't pick non-free option in mirrors... Well, so you can fix those things afterwards - but why not to let installer sweat, right? So I did bloody process twice to get it correct and sweated definitely more than installer. Fancy that.
I did minimal install - standard system was my only checkmarked package. And I was quite surprised afterwards how many essential things were really missing because of missing desktop. Installing distros makes you think that a lot is granted... Everything is installable afterwards, of course.
After first reboot I ended up to console login prompt, like some ardent arch-fiend. 

What I did:
Login as a root.
apt-get install xorg
apt-get install openbox obconf
apt-get install lightdm
Then I installed xdg-user-dirs, python-xdg, apt-show-versions, xfce4-terminal, xarchiver. First two are must if you want your home dirs to be automatically created. Third can be installed later - it's not vital. Terminal is - if you are not happy with crap-looking xterm. And the last one is essential for unpacking - first, for smxi you download next.
Now there should be Lightdm greeter seen hanging on screen, waiting for login... I didn't. I installed smxi (the same way as already written in Crunchbang post).
In there, I installed some non-free stuff, some utilities, threw out 30 useless xorg video drivers (silly thing installs them ALL, including 20 years old legacy). Left kernel untouched, but let smxi to download and install Nvidia drivers ...
During that I got some bonus things - hddtemp, lmsensors, whole pile of python and other libraries etc etc. Less to install afterwards. Though, when using normal desktop, there isn't any need to observe hdd temps - it can be purged with no problems.

Desktop was
an empty screen, of course. Right-click menu helps to open terminal.
First thing, I installed Iceweasel with apt-get for inevitable booty-hunt and help-search.
Got 'weasel going and downloaded Spacefm file manager and udevil for mounting disks (debs both), dowloaded probably 12-13 piles of dependencies, but ultimately did successful
dpkg -i packagename.
So I had comfortable working arena almost ready then. Just a couple of more things:
Installed sudo, did adduser myusername sudo, logout/login(!). Check,
groups myusername - output has to have sudo listed there.
sudo apt-get install medit
sudo apt-get install menu
First is text editor I happen to like. Second installs debian menu which can be base for building Openbox menu, or also - you can open at least some apps without terminals. If you already have customized menu.xml to use - skip debian menu.
I copy/pasted all conf files (including menu.xml), and themes, icons etc from my other openbox distros. Otherways, two base-files are located in /etc/xdg/openbox. They go to ~/.config/openbox/. Where they should be filled with relevant content - which is mostly available in web (First place to search in is Crunchbang forum, which is full of good info. And it's friendly forum - there are NO kill-the-noob tendencies). OB files to look are: menu.xml, rc.xml, autostart;
additionally, you may want: tint2rc, conkyrc, compton.conf .
After fixing menus and confs according to new situation, I did final openbox --reconfigure, installed lxappearance, opened it (and also obconf) and gave my fresh 'desktop' a fast facelift. Then logout/login to see my Tint2 and Conky also finally appear (confs were copied earlier, as I said). Wallpaper was provided by Nitrogen. Compositor Compton was still uninstalled (but will be. And is now, too.).

Now couple of less essential things:
sudo apt-get install synaptic and then also the same to apt-xapian-index.
I meant to use Synaptic for installing numerous parts of alsa... but found this tutorial and installed from terminal. But - Synaptic will be useful anyway.
As it happened, after I also had installed mplayer+smplayer, I still had no sound - player was definitely playing, but nothing was heard. After some searching I found something that worked - for me at least. In terminal, type: alsactl init
And that was that - there was text that my card was found and blah-blah. And it was and it worked.

Voila! Simple Openbox 'desktop' on Wheezy installed and functioning. No crashes and broken bits... yet. Error-logs are virtually empty (which is quite mind-boggling).
And now it will take only thrice as much - or more - time to conf, clean, pimp and rearrange various bits and parts...
And moral here, children, is: It's easier to build your own custom install than, like bastard, try to rebuild readymade distro (sorry, Crunchbang). As an apology - After Vsido, Crunchbang is the ... well... now third - the second-best distro I have yet tried is now Slackware.
Edit (July 2013): I was quite perplexed of Iceweasel suddenly being 'upgradable' but upgrade was actually not possible... My solution: 'remove' icewesel' and install again. Did a trick, and conf remained. Edit ends
See also Jessie to Sid, Openboxed


Crunchbang #!

As already hinted, I was waiting for new Debian stable to install and try Crunchbang linux Waldorf and see if it fits to replace my openboxed Xubuntu as a bootloader-master.
So I did download 64bit version (twice, as first bittorrent download was rotten) and installed successfully from usb (win32imagewriter).
First thing I did, even before first login - went stright into console and installed smxi:
cd /usr/local/bin
wget -Nc
I did that because I am not yet so far-gone that I enjoy installing kernels and video drivers. Also, with smxi you can install inxi (systeminfo script), some non-free stuff and do your first system update stright away.
Crunchbang also has first-time install-script which offers to install some things for you. If you already did smxi-thing, then skip it. Otherways, it might be of use.

Desktop: Tint2 panel sits on top and Conky on right side of screen. Pleasantly, there is nothing else. Well, it's Openbox...
Nitrogen and Compton were of course installed (wallpapers and compositing).
Conky text blends so much with background color that it's almost unreadable. And I really don't like panels on top. So, there we go - onward with rape and pillage.

Copied conf files from my other distros, tweaked them slightly to fit with grey theme... Thought that retaining something from vanilla #! look is kinda nice and polite. :)
Installed Spacefm file manager - downloaded debs and huge pile of dependencies. Success. Killed promptly Thunar and its children. Heh-heh.
Installed medit (somehow I don't like Geany especially) and xfce4-terminal. Crunchbang has Terminator for terminal - which seems to be nice thing, but I am simply used to xfce one.
Uninstalled some apps, installed some. Customized the menu - added icons to first level, removed 'places', various 'install' pipemenus and 'edit conf' type links. There are whole pile of custom pipemenu and other scripts in /usr/bin, by the way (all start with cb-...).
According to very general item-wording and lotsa helpful links, the menu seems to be oriented to very beginners.

There are quite a lot processes preloaded and memory-use is not especially low. Not to mention that some things might be simply unneeded. So I started with serious clean-up - and started to have problems. Removed gnome network manager, and lost whole connection... Edited etc/network/interfaces file and got it back:
auto eth0
iface eth0 inet dhcp 
Removed pulseaudio, installed alsa - and lost all sound. Pulse-things kept creeping out from somewhere despite manually removing various hiding leftovers... boot logs showed alsa loaded alright, but .xsession.errors showed that after that it wasnt alright at all.
Have to say - it's not the first time I remove pulseaudio and I never had such problems before. Or to put it simply, I don't know how I broke it this time.

Unfortunately, at some point I also managed to break something SO much that reboot hung on loading X. Killing process gave slim login screen... or killing it twice did... or not and it hung totally.
After a while I decided two things: That I obviously over-extended myself, and that in its vanilla form Crunchbang doesn't have anything over my Xubuntu. And also, Xubuntu did't break when I openboxed it and did other vicious things to it.
That said, make no mistake - I actually liked Crunchbang, and it's probably very nice distro for a not overly active beginner, or for pro who knows how not to break it. So, it's recommended.
Didn't fit to me, though... or maybe I didn't fit to it.