May 19

I back up my DVDs. I rip them to H264 using handbrake and then store the originals in a DVD holder and hopefully never have to touch, or scratch, them again. But I occasionaly run into a DVD that I can play, but I can’t copy. Shoot Em Up is a good example. So here is how to dump the stream to an mpeg that can then be used in handbrake with mplayer.

mplayer -dumpstream -dumpfile test.mpg -chapter 1-17 dvd://1

Should be pretty obvious, but chapter is the title chapters and dvd://1 is your dvd drive title number 1.

Sep 16

The iproute2 tools are default installed on most major linux distributions now, but few people know how to use them. Once you are familiar with them though, you will lament having to use ifconfig and route. Here is a quick chart on iproute2 replacement commands.

Ifconfig CommandIP Command
ifconfig -aip addr show
ifconfig eth0 1.2.3.4 netmask 255.255.255.255ip addr add 1.2.3.4 255.255.255.255 dev eth0
netstat -nvrip route
route get 1.2.3.4 (solaris)ip route get 1.2.3.4
route add -net 1.2.3.0 netmask 255.255.255.0 dev eth0ip route add 1.2.3.0/255.255.255.0 dev eth1
ifconfig eth0 mtu 1496ip link set eth0 mtu 1496
ifconfig eth0 downip link set eth0 down
ifconfig eth0 promiscip link set eth0 promisc on

Jul 29

Unix has been able to authenticate against a central server for a long, long time using LDAP and various other technologies, but Microsoft’s Active Directory is the authentication scheme you are most likely to come across in the enterprise.  Using RHEL (well, centos) it’s an easy setup.

From a command line box, run

authconfig-tui

Select “Use Winbind” under User Information and “Use Winbind for Authentication” under Authentication. I also select “Local authorization is sufficient” which we could argue for a long, long time about. That one is up to you.
When you click next, you’ll need to fill in the blanks with your organizations specific information. You do want to use “ads” as your security model if you are on active directory and put a wildcard (*) in the Domain Controllers field. Next hit Join Domain and enter the credentials for an account that has the rights to join this machine to the domain. Next we need to tweak a few files.
in /etc/samba/smb.conf change

“winbind use default domain=no” to “winbind use default domain=”yes”

If you don’t, you will need to enter your domain every time you log a user into the system like AD/User instead of just logging in as User.
Add

idmap backend = rid

into the authconfig section, right under the “idmap gid =” line. This sets up user and group id mappings to use the AD RID. You want this as long as only one domain will be logging into this server. If users from several AD domains will be logging in, you need to hit google.
In /etc/pam.d/system-auth, add

session required pam_mkhomedir.so skel=/etc/skel umask=0077

To the very end of the file. This creates a home directory for each user when they log into the system if they don’t have one already.
Now just issue a

service winbind restart

and you should be on your way!

Jul 27

This is a pretty basic one, but I don’t do it enough (or maybe I’m doing it just enough) to remember sometimes.
This works in RHEL/Centos, should work in just about everything else too.

When grub loads up at boot, hit ESC to stop the countdown timer. Now hit “a” to append a line to the boot string. Last, type ” single”, yes that’s SPACE SINGLE, and hit enter. The box will boot without loading any services and dump you to a shell. When you are done, type exit and it should continue booting.

Jul 22

Jolicloud and ubuntu netbook remix are minimal linux distributions designed to run on netbooks. Netbooks don’t have CDROMs but can boot from USB.  VirtualBox doesn’t support booting from USB, but can boot from CDROM.  I am running Alpha 2 of Jolicloud and wanted to install it in VirtualBox before I put it onto any real silicon, but since VB doesn’t have USB BIOS support, I quickly ran into a hurdle.  I figured the easiest way around this little problem was to simply create a VB disk image (vdi), write the jolicloud boot image to that vdi and just boot it that way.  Fortunately, this turns out to be a simple one liner. Substitute the correct path if you are on a linux host.

“C:\Program Files\Sun\xVM\VirtualBox\vboxmanage” convertfromraw jolicloud-robby-alpha2b-live.img jolly.vdi

When that finishes, you will have a 600MB file called jolly.vdi. Just add that to VBs disk manager as the primary drive in a new VM, add another disk as a secondary drive and install away!

« Previous Entries