Monday, January 19, 2009

attempt to access beyond end of device

I ran across this error the other day and couldn't figure out what it meant. For starters, it was talking about a partition that wasn't in use (/dev/hda3). Google has a lot of information, but none of it solved my problem. So I thought I'd share.

First, the error message:

attempt to access beyond end of device
hda3: rw=16, want=8, limit=2
Read-error on swap-device (3:3:0)

Some background: I recently changed my partition table. My old swap partition was /dev/hda3. The new one is /dev/hda5. But /dev/hda3 is mentioned no where in /etc/fstab, so who is telling the kernel anything about the old swap partition?

Oh, that's right, I was. It's in the kernel settings themselves. I don't usually enable the hibernation power controls on linux cause I haven't had good results, but I thought I might try it out someday, so I checked that box in the kernel setup (Power management options - Hibernation). Now we have a new question: what should be the default resume partition? And there was my problem; I hadn't changed /dev/hda3 to /dev/hda5.

A quick recompile and reboot and no more error message.

Tuesday, January 13, 2009

DVDFabHDDecrypter on Linux

It's not too difficult to setup DVDFab under Linux using Wine, but there are a couple caveats. It seems the settings cannot be modified from within Wine. Wine can't interact with the configuration menu. This is a problem because DVDFab automatically starts previewing any DVD it finds, which causes Wine to lockup.

So, we need to disable this automatic preview. First, run the DVDFab setup program with wine (wine DVDFab5230.exe). I disabled the VSO burning engine and the desktop/quick link shortcuts. You will need to start the program once to make sure the registry keys are created. You can do that by typing wine "C:\Program Files\DVDFab 5\DVDFab.exe" into a terminal.

Now you need to edit the registry. Start wine's regedit program via wine regedit.exe. In the HKEY_LOCAL_USER key, open Software, then DVDFab, then V5, and finally Generic. There you will find two options, PreviewAutoPlay and PreviewAutoShow. They are set to 00000001 by default. Change them to 00000000.

Now, before you start DVDFab, you will need to mount the DVD you want to rip. Also, if you haven't configured wine for your drives, you will need to do this. Run winecfg and select Autodetect from the drives tab.

Finally you can run DVDFab (wine "C:\Program Files\DVDFab 5\DVDFab.exe").

P.S. I don't know if Blu-Ray or HD DVD ripping work since I don't have either of those.

edit: DVDFab 6 doesn't seem to work very well for me at all. I suggest keeping version 5. Here is a link to version 5.2.3.2.

Monday, January 12, 2009

ImgBurn on Linux

I've seen this covered in other places, but it never worked for me until today, so I thought I'd share my solution.

First off, why would anyone want to use ImgBurn on Linux? Well, I'm not very fond of the linux disc burning programs (k3b and Brasero for example). Brasero refuses to ackowledge the existence of my dvd burner. k3b will burn, but verification is hit or miss. The discs it says failed to verify have all been verified on windows machines using ImgBurn, and they work when I put them to use. Brasero can verify images using md5 sums, but it gives me the same result as k3b; failure. So I can't trust things I burn with k3b, but when I use ImgBurn on Windows, it always works. If ImgBurn says the disc is bad, the disc is bad; otherwise, it's good.

Everyone says ImgBurn works fine in Wine (I'm using version 1.1.10 btw), but it always failed to find my dvd burner. For some reason, Wine doesn't seem to recognize that I have an optical drive unless there is a disc already mounted in it. If I mount a disc first, then start ImgBurn, we find the dvd burner.

So, in summation, to use ImgBurn on linux, you need Wine and the ImgBurn installer. Install wine and run winecfg. On the drives tab, click Autodetect. I left the OS as Windows XP. I am using alsa for the sound driver. Now you can run wine SetupImgBurn_2.4.2.0.exe (or whatever the current version is when you try this).

Now, to run ImgBurn, just make sure a disc is mounted in your drive and start ImgBurn (wine "C:\Program Files\ImgBurn\ImgBurn.exe"). Eject the disc after ImgBurn starts and you can replace it with a blank one.

A simple fix to get a great program working under Linux. I hope someday k3b and brasero are as nice as ImgBurn.

Friday, January 2, 2009

FileZilla Binary for Mac OS X Tiger

I'm sure many people are aware of FileZilla, the open source (S)FTP client. I switched over to using FileZilla a few years ago and it's been great.

A few days ago however, I decided to install it on a Mac. To my surprise, the official builds claim you need OS X 10.5 (Leopard), the most recent OS X release. I was using a Tiger (10.4) machine. I couldn't believe they didn't have a binary for Tiger.

For those of you not familiar with macs, let me break it down a little. Every couple years, Apple releases a new version of OS X. The difference between Leopard (10.5) and Panther (10.3) is comparable to the difference between Windows Vista and Windows 2000. Most but not all modern programs will still run on Panther. For the purposes of this analogy, we'll equate Tiger (10.4) with Windows XP. In other words, needing Leopard (and not being able to use Tiger) is roughly the same as needing Windows Vista (and not being able to use Windows XP). In other words, this is terrible.

The change was not intentional. The author simply doesn't have access to a build environment that he can use to create binaries for Mac Tiger. Since it's open source, you can always build it yourself. Being somewhat versed in software development, I decided to do just that.

There are several dependencies that FileZilla needs, and even when you have them, it's a bit confusing as to how to build them. Even on the forums, it was clear that several people had trouble building FileZilla on mac. So I decided to share my knowledge on the FileZilla wiki.

However, Mac people, by and large, are more like Windows people than like Unix people. In other words, software shouldn't need to be compiled. It should have a binary that just works. So I have decided to provide unofficial Mac Tiger FileZilla binaries.

http://wiki.filezilla-project.org/Unofficial_Binaries

I don't have access to a PowerPC Mac, so I hope the binary works there. I know the Intel part works cause I've been using it for a couple days. Drop me a line if you have questions.

edit: updated FileZilla Binary to 3.2.0 (2009-Jan-12)
edit: Removed binary and put link to the FileZilla Unofficial Binaries page

dvdauthor frontends

For the past few days I have been wondering what the proper forum was for things I want to publish that don't really fit in with the theme of my other websites. This blog is my answer.

I have three websites, one for teaching people how to program Texas Instruments graphing calculators, one for my emulation related work, and one for programming tutorials. Basically, the theme is, I like to know things, and I like to share my knowledge. I like to be helpful.

So, how am I going to be helpful today? I'm probably not, but the reason for starting this is simple: my growing distaste for dvdauthor frontends.

All I want is a simple frontend to dvdauthor that would do four things. 1) let me add multiple DVD-compliant mpeg files at once, 2) automatically place them into separate titles with default jump points to the next title (i.e. after title 1 goto title 2, then 3, repeat as needed), 3) generate the dvdauthor xml file and run dvdauthor, and 4) build an ISO file with the proper volume label.

DVDAuthorGUI is nearly perfect. It does 2, 3, and 4. It only runs on windows, but for reasons I won't go into, that's not a problem for my needs. But step 1 was really bugging me. I am trying to shove 18 episodes of the simpsons on a single DVD, so adding 18 tracks one-at-a-time gets old after awhile. I contacted the author and he said he didn't feel like adding that feature right now. The source is available, but since I don't know Visual Basic and don't want to learn, it doesn't do me much good.

Since I only needed something really simple, I decided to build my own program. It took about 5 hours to finish the bare minimum of what I needed. It doesn't even do all the things I thought would be necessary (I found a shortcut midway through), and it certainly is not finished, but it works.

What does it do you ask? It lets you add multiple mpeg tracks at once via drag n drop. It has an add button and add menu option, but they aren't implemented. It organizes the tracks alphabetically (though it's case-sensitive which I'm not happy with), which saved me having to implement the rearrange track controls, so those buttons and menu options are also unimplemented. It generates the dvdauthor xml file and runs dvdauthor. Finally, it runs mkisofs to build the ISO file with the proper volume label (specified in the same manner as DVDAuthorGUI, but taking the folder's name you build in). It also makes 7 chapters on each track 3-minutes apart, because my programs are geared towards my simpson dvds.

Obviously, there are many deficiencies. It is not a complete dvdauthor frontend, but all open source projects start out by first solving the authors needs. Other people's needs come later, sometimes even added by other people. I decided to publish it just in case someone else had similar dvdauthor frontend frustration.

Source Code Here 24 KB (.tar.bz2 archive)
Windows 32-bit Binary4.2 MB (.zip archive)

That's all for now. I wonder if anyone will ever read this...