@madpilot rants

Creating a bootable USB stick to install VMware ESXi

I had to install VMware ESXi on a machine that didn’t have a CDROM or DVD player. For extra difficulty, I also didn’t have a Linux box with a USB drive handy – but after a bit of hair pulling, I managed to create a bootable USB stick image in Linux (In my case Gentoo). Hat tip to http://communities.vmware.com/thread/75792

  1. Create a fake filesystem. I created a 1Gb, but 512Mb should be enough
    dd if=/dev/zero of=/mnt/vmware.img bs=1024 count=1048576
    
  2. Associate it with a loopback device
    losetup /dev/loop0 vmware.img
    
  3. Create a FAT filesystem on the image
    mkfs.vfat /dev/loop0
    
  4. Mount the VMware CD ISO to a temporary directory
    mkdir -p /mnt/vmware
    mkdir -p /mnt/vmware-usb
    mount -t iso9660 -o loop /path/to/vmware.iso /mnt/vmware
    mount -t vfat -o loop /mnt/vmware.img /mnt/vmware-usb
    
  5. Copy the contents across
    cp -r /mnt/vmware/* /mnt/vmware-usb
    
  6. Delete the isolinux.bin and rename isolinux.cfg file on the USB flash disk to syslinux.cfg in /mnt/vmware-usb
  7. Add usb to the end of the append line in syslinux.cfg
  8. Run syslinux to write a bootloader
    syslinux -s /dev/loop0
    
  9. Unmount everything
    cd /mnt
    unmount /mnt/vmware
    unmount /mnt/vmware-usb
    losetup -d /dev/loop0
    

vmware.img should now be a bootable USB image. You will need to write it to your USB stick now. In linux you can use dd (assuming your USB stick is at sdb):

dd if=/mnt/vmware.img of=/dev/sdb

In windows, use Image Writer for Windows.Or, an easier solution might be to buy a DVD Drive :)

How-to tunnel the VMware Intrastructure Web Access control panel

If you have some sort of *nix (Linux, OSX, cygwin), then simply run the following in a shell:

ssh -L 8222:localhost:8222 -L 902:localhost:902 -L 8333:localhost:8333 your.vmserver.com

replacing your.vmserver.com with your ACTUAL VMware server.

Then point your browser at http://localhost:8222 (This is the unencrypted URL – which isn’t a problem, because you are tunneling over SSH)

Note, that this trick really only works if you have an SSH server running on your VMware host.

MythTV on an Intel Atom

I’ve been using MythTV for about 4 or 5 years now, first as just a DVD player, video and music player and more recently as an actual television replacement.

Unsuprisingly, my old VIA M10000 was starting to get a bit long in the tooth (it IS a 4 year old motherboard that was underpowered when it was new), so when the D945GCLF was released by and Intel a few months ago, I decided to give it a go.

Just like all the netbooks out there at the moment, it’s a Atom 1.6Ghz, so it’s still underpowered, but it surely has to beat the old 1Ghz Nemehiah…

Since the board was so cheap – it was about $AU90, compared to around $AU300 I paid for the M10000, so the extra dollars I had to fork out for new RAM, a HDD (I needed a SATA one), power suppy and extra heatsink didn’t hurt as much as it could have.

The last two items were required because the Travla case I have only had a 60W PSU which turns out wasn’t quite gutsy enough (more on this in a moment) and because of the large factory heatsink (for the Southbridge or Northbridge or whichever one ISN’T the CPU) stopped the DVD player from fitting – thankfully an after-market low-profile heatsink seems up for the job.

Problem 1: The Realtek 8165 network card wasn’t recognised by the Gentoo 2008.1 live CD, since the kernel was too old. Throwing in a spare PCI network card allowed me to bootstrap it, and kernel 2.6.27+ seem to support the card. Thankfully the rest of the base install was realitely painless – well as much as a Gentoo install can be… As of that kernel, there isn’t yet a kernel optimisation options specifically for the Atom, so I picked the Dual Core defaults which seems fine.

Problem 2: I spend WEEKS trying to fix this until I gave up. As usual XvMC, the interface that makes DVD and digital TV playback less CPU intensive would segfault on Xine, mplayer and MythTV (From memory I spent two years trying to get the M10000 working – I’m obviously less persistent now). I tried different gcc flags, getting the latest version from the relevent repositories, but nothing seemed to work. However, since the CPU would happily decode SD over-the-air broadcasts and DVDs I was tempted to cut my losses and forget about it. The fact that XvMC wouldn’t have helped out HD content either (It theoretically maxes out for anything bigger than 1024×768 I think. Oh, and it doesn’t do MPEG4) the decision was made.

Interestingly, Xine would happily decode a Channel 10 “Full HD” ATSC recording, but MythTV seems a little more CPU hungry, so live tv is too choppy to watch. I wonder whether the dual-core version might have enough headroom – I might try that in the new year (Although I have a feeling the larger CPU heatsink will stop it fitting in my case).

Problem 3: The board would randomly (or not so randomly as it turns out) reboot itself. You would have thought after spending so much time in class during electronics units at Uni, I would have worked out that the 60W wall adapter I was using couldn’t supply enough juice. If the second USB tv tuner and the DVD player were in use at the same time, the picoPSU 120 would shutdown. Thankfully ebay came to the rescue, and an 80w adapter is sitting on a delivery dock somewhere in Hong Kong. Hopefully it will find it’s way to my house.

Problem 4: The volume from the Intel HD chipset is REALLY low. Normal listening has the volume at ~80-90, rather than the 30-40 of the old board. I can probably fix that, but it’s tolerable, so I’m not to worried…

Problem 5: The GPU fan IS LOUD. It’s ok when there is something on the TV at a decent volume, but when it’s off, it sounds like a really small 747 in there. Mind you, if we are in the lounge room, the telly is probably one, so again, no biggie.

Problem 6: The latest version of Gentoo has trouble compiling mjpegtools-1.8 which is required by mytharchive. I had to compile it by hand, after applying some patches.

Problem 7: There is a bug in the network card driver, where sometimes, if the system performs a warm boot, the network card will stop working, which can only be fixed by a cold reboot (sometimes multiple times).

Problem 8: Clutch – the web interface to Transmission has remove the ability to have transmission download .torrent files for you. Now you have to download them to the desktop, then upload them. Dumb. The developers said something about not wanting AJAX calls to have to wait, which sounds like a dubious excuse to me – file uploads aren’t AJAX calls, they have to make a full round trip to the server.

So after all that (Oh, come one – 8 issues is a walk in the park for installing Linux! :P), the system is up and running. Overall, it’s not bad.

Advantage 1: The menus are much, MUCH snappier than the old machine. I can press a button on the remote, and I no longer have enough time to make a cup of coffee before the menu item changes.

Advantage 2: The standard transitions inĀ  mythphotos now work. OpenGL doesn’t though.

Advantage 3: One of the plus sides of not having to use XvMC means the OSD is in colour and not distorted (Because the overlaygot mixed in before the scaling is done, the font rendering always looks weird).

So if this a good buy? If you aren’t afraid of a compiler, and aren’t going to miss HD OTA (Blueray WILL NOT WORK), then sure – it’s cheap and mostly easy to get working. It would be nice if there was a DVI output on the board – Intel could have easily replaced the serial port or parallel port with one. It also would have been nice it they had put a better GPU – either a low powered one, or a better spec’d one, I’d be happy with either.

But all in all, for a cheap, interium board it’s quite nice. 3 stars.