Archive for the 'Linux' Category

Perpetual Screen

December 29th, 2008 | Category: Linux

So, I’ve been tossing around the idea for the past while to make is so that screen starts up every time I ssh into my box at the house.  Well, I finally broke down and did it, and it wasn’t that bad at all.  I’ve named my screen session main you can call it whatever you want.  Just add the following to the end or your .bashrc If you don’t put it at the end, you the rest of your .bashrc won’t get evaluated.

if [ $TERM == "screen" ]
# If we are already in a screen do nothing
then
     echo -n ""
elif [ $TERM == "dumb" ]
# If we are using scp do nothing
then
     echo -n ""
else
# Startup screen
screen -Rd main && exit
fi

It works so far with everything I’ve had to do, but we’ll see if I run across any other problems.

No comments

Mutt and gnupg

December 12th, 2008 | Category: Linux

Part of my job has now required me to actually start using my gpg key for more than just goofing off, or the occasional one-off.  So, as part of that I wanted to make sure I have all of my work mail clients configured to work with gnupg.  As a I talked about in a previous post this is pretty easy in thunderbird and firefox (for gmail).  And I thought it would be difficult for mutt.  But it’s not.  Pretty much the first link in a google search for ‘gnupg mutt’ lead me to this page.  Which has everything you need.  Then I realized that I already had it in my .muttrc, but it was commented out.  So I’ve updated my .muttrc on dotfiles.org The only thing that wasn’t explained in the documents is how you ecrypt or sign if auto-sign is off.  After commiting the email, before hitting y to send the email, hit p to bring up the gpg.  It’s pretty straight forward from there

No comments

Running Boxee on Ubuntu

December 07th, 2008 | Category: Linux

First,  I know I’m going to hell for using Ubuntu.  But, I’m too lazy to compile xbmc and boxee on Fedora.  So, now that it’s out of the way.  Here’s the step-by-step:

  1. Install Ubuntu 10.4
  2. Add the extra boxee repo based on the instructions on boxee.tv
  3. Install mingetty and rcconf
    apt-get install mingetty rcconf
  4. Disable gdm with rcconf
  5. Add a boxee user with and add them to the “admin” and “audio” group
    useradd -G admin,audio -d /home/boxee boxee
  6. Add a .bashrc to /home/boxee
    case "`tty`" in
    /dev/tty1) startx
    esac
  7. Add .xinitrc to /home/boxee
    #!/bin/bash
    while [ 1 ]
    do
    exec /opt/boxee/Boxee --standalone
    done
  8. Make it executable
    chmod a+x .xinitrc
  9. Edit line in /etc/event.d/tty1
    #exec /sbin/getty 38400 tty1
    exec /sbin/mingetty --autologin boxee tty1
  10. Reboot and pray
No comments

Firefox, gpg, gmail and other security stuff

June 27th, 2008 | Category: Linux

So, I’ve started listening to a couple of podcasts:

TWiT – This Week in Tech

Security Now

And the later one has rekindled my love for security and whatnot.  It’s definitely made me put back on my tinfoil hat.  Because of this, I wanted to set back up my GPG stuff for email and whatnot.  It’s super easy in Thunderbird, by installing the Enigmail plugin (just make sure you pick the right arch and OS).  However, since I use google’s hosted mail for my personal mail, I was in a bit of a pickle.  Luckly, somebody else out there had the same idea and wrote FireGPG that will allow you to sign, encrypt or decrypt and GPG signed stuff on the web (such as the body of an email from gmail)

Just thought I’d plug those plugins and the podcasts.

No comments

Custom boot isos and imgs

June 06th, 2008 | Category: Linux, satellite

I’ve spent the past couple of days banging my head against the desk trying to get this to work out correctly.  And now it finally does.  Just as a note, I’ve tested that the general steps work.  I have not verified that i haven’t skipped a step.  So if anything’s missing let me know.

Disclaimer: This has only been tested with RHEL and nothing else, but there is no reason why it won’t work.  And if you don’t have a satellite you can use this with any old kickstart.  Assuming you have the tree setup correctly.  Please test your kickstart tree first.

Satellite prep

Create your kickstart as you normally would. Then, make sure the kickstart is accessiable via the following style URL:

http://satellite.example.com/kickstart/ks/view_label/<kickstart_label>

Replace <kickstart_label> with the name of label set on the satellite.  Remember this URL, you’ll need it later

view_label VS label

In the kickstart URL, you can use either view_label or label.  view_label will not register the box if there is not an activation key set inside the kickstart.  label generates a one time use activation key and registers the box to the satellite

Why use one over the other?

view_label is good if you are using an activation key, or if you have to install a box a bunch of times, and don’t want to have a bunch of extra profiles lingering around.label is good if you don’t want to have to set up an activation key, and a machine is only going to be kickstarted once.  If you are going to be using the disk image in a PXE like fasion, view_label is your best option.

Rolling the disk image (For usb-key)

Get the first disk of what ever you are trying to install from the kickstart. For this document, I will be using RHEL 5 U2 x86_64

NOTE: The arch and update must match or it will fail.

  • Copy the images/diskboot.img file to /root/rhel5u2-64bit.img
  • Mount the /root/rhel5u2-64bit.img file on the loopback (/mnt/)
  • Edit the /mnt/syslinux.cfg file, and add/edit the following:

default custom
prompt 0
timeout 0
display boot.msg
label custom
kernel vmlinuz
append initrd=initrd.img ks=http://satellite.example.com/kickstart/ks/view_label/<kickstart_label> ksdevice=link noipv6

  • Edit the /mnt/boot.msg to say what you want. I recommend removing the lines below ’splash.lss’ and replace with something like:

Your install of Red Hat Enterprise Linux Update 2 (x86_64) will start shortly.

  • Unmount the diskboot.img file
  • Then burn to a cd, or copy to a jumpdrive with the following command:

dd if=/root/rhel5u2-64bit.img of=/dev/sdc

NOTE: Replace /dev/sdc with the device name of your jumpdrive

Rolling the disk image (For cdrom)

Get the first disk of what ever you are trying to install from the kickstart. For this document, I
will be using RHEL 5 U2 x86_64

NOTE: The arch and update must match or it will fail.

  • Copy the images/boot.iso file to /root/rhel5u2-64bit-boot.iso
  • Mount the /root/rhel5u2-64bit-boot.iso file on the loopback (/mnt/)
  • Make a directory in /tmp/ (/tmp/rhel5u2-64bit/)
  • Copy /mnt/* to that directory
  • Unmount the rhel5u2-64bit-boot.iso file
  • Remove the rhel5u2-64bit-boot.iso file to reduce confusion
  • Make the /tmp/rhel5u2-64bit/isolinux/isolinux.cfg writable by root
  • Edit the /tmp/rhel5u2-64bit/isolinux/isolinux.cfg file, and add/edit the following:

default custom
prompt 0
timeout 0
display boot.msg
label custom
kernel vmlinuz

append initrd=initrd.img ks=http://satellite.example.com/kickstart/ks/view_label/<kickstart_label> ksdevice=link noipv6

  • Edit the /tmp/rhel5u2-64bit/isolinux/boot.msg to say what you want. I recommend removing the lines below ’splash.lss’ and replace with something like:

Your install of Red Hat Enterprise Linux Update 2 (x86_64) will start shortly.

  • Then make a bootable iso by running:

cd /tmp/
mkisofs -r -T -J \
-V “RHEL 5u2 x86_64 kickstart iso” \
-b isolinux/isolinux.bin -c isolinux/boot.cat \
-no-emul-boot -boot-load-size 4 -boot-info-table \
-v -o “/root/rhel5u2-64bit.iso” /tmp/rhel5u2-64bit/

  • The burn the cd as a cd image

Boot

The insert the media into the machine and boot off of it.

No comments

« Previous Page