Bob's Notepad

Notes on projects I have done and things I have learned saved for my reference and for the world to share

Wednesday, November 10, 2010

Add files to an ISO using OSX

If you've ever wanted to create a linux CD or DVD with a kickstart file and you're on a Mac you've probably ran into this issue. You can use this method to add/edit/delete files from an ISO image (works as of OSX 10.6.4, despite using PPC binaries).

First, you need to grab a file:

http://homepage.mac.com/machiavel/Executables/cdrtools-OSXbin.tgz (or mirror
Thanks to Greg Nyquist

You'll want to extract the tgz file and then you'll want to copy ./sw/bin/* to /usr/bin/:
  • Open Terminal
  • cd "/cdrtools/cdrtools-2.00.3 (PPC binaries)/sw/bin"
  • sudo cp * /usr/bin
Create a folder for your new ISO compilation and then open the original ISO file by double clicking (it should mount as a disk image). Copy all of the contents on that disk image to the new folder and then add/edit/delete those files as needed. Once you've got the new "image" to your liking, you'll want to go ahead and create the new ISO image. In order to keep your CD/DVD bootable you will need to figure out what the boot image is for your CD. On Linux CDs you will likely find this here: ./isolinux/isolinux.bin
  • Open Terminal if not already
  • cd /newcdimage/
  • rm isolinux/boot.cat
  • mkisofs -b isolinux/isolinux.bin -no-emul-boot -boot-load-size 4 -c isolinux/boot.cat -iso-level 2 -J -joliet-long -v -o /outputdir/NewISO.iso .
  • If you get "Missing pathspec" then you missed the . at the end of the command line
A helpful note: If you're creating a bootable ISO that you want to automatically start installing based on a kickstart file, you can edit ./isolinux/isolinux.cfg on your new CD image folder to have it do so. Something like this should work for centos:
default ks   
prompt 1
timeout 15 
label linux
  kernel vmlinuz
  append initrd=initrd.img
label text
  kernel vmlinuz
  append initrd=initrd.img text
label ks
  kernel vmlinuz
  append ks initrd=initrd.img text

Note that you may have to do a "chmod +w isolinux.cfg" before editing

Labels:

Reference Link


Sunday, June 27, 2010

PVR-150 IR Blaster on MythBuntu 10.04

For some reason I decided that I was going to upgrade my Mythbuntu system to 10.04 and that everything was going to go ok. Everytime I do this I regret it for at least a day because, for whatever reason, Ubuntu is hell-bent on making the Hauppauge PVR-150's IR-Blaster not work. It doesn't make much sense to me considering it is probably the most popular analog tuner card -- but whatever -- after lots of googling, cussing, and typing I have found the solution. I do have to say that aside from the PVR-150 issues the upgrade went pretty smooth with the exception of mythtv-backend not being reinstalled but that was fixed by "apt-get install mythtv-backend mythtv-database".

First of all, please note that this may not be a complete set of instructions if you are starting from scratch. To fill in the blanks please see my previous posts here and here. Secondly, thanks to everyone who did the bulk of the work: mrplow, Jarod, Jimmybondo and Mark as well as anyone I missed.

Ok, so you want your PVR-150 blasting IR codes on your Mythbuntu 10.04 system? First, if you're going to upgrade, back up your /etc/lirc/ directory as you'll likely just want to revert to your old configuration files. Once you do your upgrade, make sure everything is working (besides, of course, your IR blaster).

Here's what you'll want to do (it's virtually identical to 9.10 with a different file):
  • sudo bash
  • apt-get remove lirc-modules-source
  • rm -rf /usr/src/lirc-0.8.6/
  • apt-get install lirc-modules-source
  • cd /usr/src/lirc-0.8.6
  • wget http://bobkmertz.com/blog-files/zilog-for-lucid.diff
  • patch -p0 < zilog-for-lucid.diff
  • dpkg-reconfigure lirc-modules-source
Now you want to adjust your /etc/lirc files and make sure that hardware.conf references only 2 modules: lirc_dev lirc_zilog More information on those files can be found in my previous posts listed above. You'll also need to make sure that you have haup-ir-blaster.bin in your /lib/firmware/ directory (again, information on this can be found in my prior posts)

After you run all of the above commands you may want to go ahead and reboot the machine. For some reason it seems to take lirc_zilog a bit before it actually initializes and loads the firmware file which could result in seeing errors about unknown symbols.

As a side note, I am still running a 32bit kernel because I'm not seeing much of an indication that the PVR-150 will work under a 64 bit kernel (see comments of my prior posts). I haven't attempted it and really don't have much of a desire to even try -- it takes enough to just keep this stuff running with Ubuntu wanting to break the PVR-150 everytime someone sneezes.

Hopefully this post helps someone out and prevents them from missing Dr. Who like I did tonight.

Labels: , , , , , , , ,

Reference Link


Saturday, May 22, 2010

Diaspora

Reference Link


Tuesday, February 02, 2010

Changes

After many MANY years of loyally supporting Blogger despite there being other solutions that may have fit better it seems that Blogger has given up on me. Why? Because I use FTP to publish my blog to my own site without using Google Hosting, etc. Google/Blogger has announced that they will be stopping support for FTP in the near future and this has left me in a position where I need to move... and move quickly it seems.

I am very disappointed that after being a user of Blogger since September of 2003 that Google has decided to leave me no option but to find another solution. I feel that I've grown and changed with Blogger and Google and now am just abandoned by them because they have a user base and no real need for those that have stuck by the product.

In the future I will have to be making changes to both notepad.bobkmertz.com and http://blog.bibleboy.org. It is my hope that I will be able to keep these domains with another solution but that is undecided at this time. I will try to update everyone as soon as I have more information.

UPDATE: I have decided to go ahead and move over to Google's hosting since they are now offering subdomains of domains you have DNS hosted elsewhere. I'm not exactly happy about this scenario but this is the result of the Google overlords I guess. To the end-reader this blog shouldn't change at all, however, there may be broken links on some of my old posts. If you find a broken link in one of my posts, please make a comment on that post and let me know about it so I can try to fix it.

Labels: , , , ,

Reference Link


Sunday, January 10, 2010

Apple Time Machine backups to Ubuntu network drive

Apple's Time Machine is an awesome utility but gets frustrating when you have to use an external drive. An easier was to do these back ups is using a network drive. Fortunately, the netatalk package installed on an Ubuntu server can provide the functionality you want.

I am using Ubuntu 9.10 on my server. As a note, this is actually a MythBuntu server but functionality should be the same on any other Ubuntu 9.10 server/workstation.

First, as of this writing, the netatalk 2.0.5 packages are not available in karmic's repositories so let's add a debian repository by adding the following to /etc/apt/sources.list:
deb http://ftp.de.debian.org/debian sid main

Now let's install the netatalk package:
sudo apt-get install netatalk

Create a directory for time machine backups:
mkdir /home/user/timemachine

Now we need to edit the /etc/netatalk/AppleVolumes.default file and add the following line:
/home/user/timemachine timemachine options:tm

And restart netatalk:
sudo /etc/init.d/netatalk restart

Now on your mac, open finder, select the Go menu and "Connect to Server". Fill in your server's ip address prefixed by afp:// (for example, afp://192.168.1.100) and you should be prompted for a volume to mount. Select "timemachine", of course. Once that volume is mounted, go to time machine preferences and select that disk and you're all set. If you don't see your network drive as an option then open up terminal and issue the following command:
defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1

As a note, you may want to now go and remove the extra line from your /etc/apt/sources.list file so that future apt-get commands don't rely on debian's repository and not it's own

Labels: , , , , , , , ,

Reference Link


Thursday, November 19, 2009

PVR-150 IR Blaster on MythBuntu 9.10 with Dish Network

Upgrading to MythBuntu 9.10 from 9.04 was a challenge on some respects but the biggest of the challenges was getting my PVR-150 IR Blaster working.... again. I don't know why Ubuntu loves to break this thing on every upgrade but they do. Thanks to Jimmybondo for the bulk of this work.



  • sudo apt-get install lirc-modules-source
  • cd /usr/src/lirc-0.8.6
  • wget http://www.skynet.ie/~shabba/zilog.diff
  • sudo patch -p0 < ~/Downloads/zilog.diff
  • sudo dpkg-reconfigure lirc-modules-source


Now edit your /etc/init.d/hardware.conf file and replace lirc_pvr150 with lirc_zilog and you should be set.

If you're not upgrading from MythBuntu 9.04 and/or don't have the rest of your configuration files, you can refer to my prior post for what your lircd.conf file needs to look like. You may also need to add the following to hardware.conf:
TRANSMITTER_DEVICE="/dev/lirc0"

Labels: , , , , , ,

Reference Link


Thursday, March 12, 2009

Using USB devices on Windows under VMware ESXi (Aladdin Hardlock)

VMware is quickly becoming the best way to run servers of all kinds and now that ESXi is free we're going to continue to see more and more functions moved onto a virtualized platform. Recently I've been working on a project for one of my customers which involves installing software for their Trumpf metal working equipment and ran into a small issue that I was able to overcome.

In short, this hardware requires the use of a USB dongle or "Hardware key" in order to run (this is an anti-piracy feature). The problem with ESXi is that you are not able to pass a USB device through to a virtual machine. Thankfully, a handful of companies have created Networked USB Hubs such as the Belkin F5L009. Everything immediately worked by plugging this in.... well, sort of :)

The issue that occurs inside of a VMware server is when you install Windows there is no USB root devices found so Windows does not install the proper USB support files. In this case, it's only a single file, USBD.SYS, that is missing.

1- Connect your USB hub to your network
2- Install the Belkin client software as the instructions explain
3- Ignore any new hardware wizards that occur.
4- Locate a USBD.SYS file. Often times you can find this on the same machine but, if needed, look on another Windows machine or in the i386 folder on your Windows installation CD. Copy this file to C:\windows\system32\drivers\
5- Reboot the virtual machine
6- Once the machine reboots, complete installation of your software, hardlock drivers, or any other USB device that you connect. Everything should function as intended and you have a little box that holds physical USB ports for your virtual machine.

Some notes on my installation.

* If you are using an Aladdin Hardlock USB key, you can most likely find new drivers on Aladdin's Hardlock Page.

* My Belkin Network USB Hub is running firmware version 1.2.0

* I found it's extremely handy to dedicate the USB hub to a single machine and to tell it to auto connect new devices. This literally makes the box just like real USB ports on the virtual machine. There are lots of options to play with as far as sharing devices to other specific machines but I did not play with any of that.

* Auto-connecting Hardlock keys is essential if you are running some type of server. If you tell your key to only connect manually your software may start before you mount the USB device and a pissed off program would likely ensue :)

* There are a few vendors that make an identical product but, from my research, I found that the Belkin is about 1/3 of the cost of most of them and also has some additional features. Digi makes a product that many people are using with VMware since it's marketed as being compatible with VMware but you will spend lots of money for that sentence -- and that's really all it is because this type of a device really has NO interaction with VMware at all since its a physical device communicating directly with your virtual machine on the network.

Labels: , , , , , ,

Reference Link