Sunday 21 September 2014

Azure Self-Signed Cert

I've been messing around with some of the Azure services, and am about to try some of the desktop utilities such as the Hyper-V converter to try publishing services.  One thing you'll come across if you're trying to do this is the need to create a self-signed management certificate to allow these apps to authenticate, and you'll see all the technet articles mention the makecert.exe tool.

The problem is that makecert is bundled into the Windows 8.1 SDK and Visual Studio 2013 Express downloads, both of which are several hundred megabytes - overkill for what we need.

Well, the easy way to get makecert and only use about 9mb of storage space - download the 8.1 SDK installer from http://go.microsoft.com/fwlink/p/?linkid=84091  and run the installer.  When prompted to select the tools, you only need to install the MSI Tools.  This gives you makecert (as well as a few other bits and bobs) but in a much more compact format than having all of the developer tools installed.


Friday 22 August 2014

Wierd goings on with a Live CD and libdvdcss.so.2

I've been messing around trying to make a live-CD with some transcoding/ripping utilities built in to utilize some of the spare hardware I've got lying around. More on this later, but I've been reworking the guide @ http://willhaley.com/blog/create-a-custom-debian-live-environment/ with my own utilities and tools.

One problem I've been challenged with over the last couple of days is HandBrake-Cli bombing out with the message:

root@av3-build2108141:/mnt/Videos/Movies/dvdrip/91# HandBrakeCLI -i BHD.iso -o BHD.mkv --preset="High Profile"
[20:41:41] hb_init: starting libhb thread
HandBrake 0.9.9 (2014070200) - Linux x86_64 - http://handbrake.fr
4 CPUs detected
Opening BHD.iso...
[20:41:41] hb_scan: path=BHD.iso, title_index=1
index_parse.c:191: indx_parse(): error opening BHD.iso/BDMV/index.bdmv
index_parse.c:191: indx_parse(): error opening BHD.iso/BDMV/BACKUP/index.bdmv
bluray.c:2341: nav_get_title_list(BHD.iso) failed
[20:41:42] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 4.1.3
libdvdread: Missing symbols in libdvdcss.so.2, this shouldn't happen !
libdvdread: Using libdvdcss version  for DVD access
Segmentation fault

This has been bugging me, as it worked before I converted the image to a livecd.  I wondered if it was some kind of problem with the lack of 'real' disk space, or a lack of memory or something like that, but nothing I could find would identify it.

Finally, I started looking into libdvdcss rather than HandBrake itself.  I think what confused me is the symbols error looks like a warning, especially given that there is a follow-on message which looks like libdvdcss is continuing.  Anyway, eventually!   I ran an md5sum on the libdvdcss.so.2 file to see if it matched a non-live machine (to a virtually identical build).

root@av3-build2108141:/# md5sum /usr/lib/x86_64-linux-gnu/libdvdcss.so.2
4702028ab20843fd5cb1e9ca4b720a72  /usr/lib/x86_64-linux-gnu/libdvdcss.so.2

N.b. libdvdcss.so.2 is symlinked to libdvdcss.so.2.1.0 in my current Debian sid based build.

On the donor machine
root@mediasvr:/usr/lib# md5sum x86_64-linux-gnu/libdvdcss.so.2
c9b314d9ed2688223c427bc5e5a39e6f  x86_64-linux-gnu/libdvdcss.so.2

So I've SCPd the source file into the live machine, checked the md5sum matched the donor machine (it did), and repeated the HandBrake job.  Lo and behold it worked!  So I've restreamed the two files into the filesystem and success, it just works.

So I don't know if something funky happens when the image is created using the link, but actually its quite easy to fix once you understand the problem.

Hope this helps someone,  and I'll be back soon with more details about building a live image, then booting it using iPXE.