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/mkinitrd_command_generator.sh or run your own
12. update grub or lilo ( I use grub2 )

Done

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

Done

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/mkinitrd_command_generator.sh 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”>
parent.$.fn.colorbox.close();
</script>

Done !

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 http://www.savetheinternet.com/ .   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(yes I make servers hummm).  Drupal as we all know is super bloated, as you add features, modules it gets bigger and fatter.

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

Continue reading

EA is EVIL and now it has a bastard child named Origin.

EA SUCKS

I know I usually write about tech stuff but this , this … Haynes  , outrageous violation of privacy had to be published and hopefully by the end of this post some action will be taken by the reader (scroll to action below in red to skip rant). Continue reading