Slackware lvm + encryption

There are plenty of docs on the net to get one started with lvm and encryption on Slackware, this is more of a quick bullet list to get you there in 0 time.

Boot up from the cd and start the following once at the prompt:

1. fdisk /dev/sda ( create one boot partition 100mb and another partition to fill the drive )
2. mkfs.ext4 /dev/sda1
3. cryptsetup -y -s 512 -c aes-xts-plain luksFormat /dev/sda2
4. cryptsetup luksOpen /dev/sda2 slackcrypt
5. pvcreate /dev/mapper/slackcrypt
6. vgcreate slackvg /dev/mapper/slackware
7. lvcreate -n swap -L +5G slackvg (if you are using an ssd , put swap on something else)
8. lvcreate -n root -l %FREE slackvg
9. mkfs.ext4 /dev/mapper/slackvg-root && mkswap /dev/mapper/slackvg-swap
10. run setup and install to your lvm partition and also use the boot partition as well
11. after installation chroot to your mounted root partition run mkinitrd, use /usr/share/mkinitrd/ or run your own
12. update grub or lilo ( I use grub2 )


Slackware chroot from cd

Simply do the following when you need to do some repairs:

1. Boot from the cd
2. mount your root partition to /mnt , if you have lvm paritions use vgchange -ay first.
3. If you have additional partitions for boot,usr, var etc etc mount them as well
4. mount -o bind /proc /mnt/proc ; mount -o bind /sys /mnt/sys ; mount -o bind /dev /mnt/dev
5. chroot /mnt


Slackware + btrfs + encryption

Another bullet list of how to get btrfs with encryption on your system.

1. fdisk /dev/sda ( create one boot partition 100mb, create one root partition and one swap [ I dont use swap, so you dont have to create a swap partition ]
2. mkfs.ext4 /dev/sda1
3. cryptsetup -y -s 512 -c aes-xts-plain luksFormat /dev/sda2
4. cryptsetup luksOpen /dev/sda2 slackcrypt
5. mkfs.btrfs /dev/mapper/slackcrypt
6. mount /dev/mapper/slackcrypt /mnt ; cd /mnt
7. btrfs subvolume create system ; btrfs subvolume create home ; btrfs subvolume create var ; btrfs subvolume create usr
8. confirm you’ve created the subvolumes : btfs subvolume list /mnt
9. cd / ; umount /mnt
10. mount -t btrfs -o subvol=system /mnt (mounting the main subvolume)
11. mkdir -p /mnt/{home,usr,var,boot}
12. mount -t btrfs -o subvol=home /mnt/home ; mount -t btrfs -o subvol=usr /mnt/usr; mount -t btrfs -o subvol=var /mnt/var
13. mount /dev/sda1 /mnt/boot
12. run setup & DO NOT FORMAT and do not exit once finish installing
13. chroot /mnt
14. use /usr/share/mkinitrd/ or run your own mkinitrd command.
15. update grub or lilo and point to the initrd file

—I forgot the rest of the steps I took, I’ll redo the process on a virtual box or something but this should 99.9999 % to being finished.

Django close colorbox popup

Ok I had a ton of popups with forms using colorbox and django but on successful submission they needed to be closed instead of standing around. So after some tests and trials the best way to tackle this is to create a template called closed_pop.html or something and have the view render that after a successful submission. In the template closed_pop.html should have the following code:

<script language=”javascript” type=”text/javascript”>

Done !

Slackware urxvt 256 colors

For Slackware users wanting to have 256 colors in urxvt , add the following configuration options to your slackbuild.


–enable-256-color \
–enable-xterm-colors=256 \
–with-term=rxvt-256color \

Net neutrality

I do not know if you are already aware regarding net neutrality bill being voted on, but if you like the idea of having an open internet .   Please use social media and mailing lists to spread the word, the ability to communicate and have free speech is a great asset we as a society and human beings cannot afford to lose.
They will vote on the bill this Tuesday November 8th 2011 in the Senate, please call your representative and let them know you do not support net neutrality.


Turning drupal into a lean mean …water drop?, supporting 10k concurrent users & beyond

Working with some clients lately to speed up their drupal webiste from 100 concurrent users to 10k on a single server.  Drupal as we all know is super bloated, as you add features, modules it gets bloated.

“Disclaimer: I am no Drupal fan nor PHP, arrrrrgh i say to both of them”

Continue Reading

Freebsd Icinga install issues and fix

If you are on this page you might have had issues  with installing Icinga on Freebsd, These issues are due to not respecting CFLAG variable, you can read about it here: .  You will  run into this when running make, I’ve tried this with  icinga 1.4.2 & 1.5.0 (dev) on Freebsd 7.4 (amd64).

Continue Reading

Django row based user permission

Went google hunting today for a decorator to manage permissions per record. Found a cool snippet here , modified it to work and to my particular needs, this should work on any model that has a fk pointing to User.

To use just add the following on top of your view, like so: Continue Reading