Convert FAT32 to NTFS without losing data

I had a USB-stick formatted with FAT32, and when I tried transferring a file over 4GB to it, I suddenly got the error:

The file ‘example.iso’ is too large for the destination file system.

The file system FAT32 only supports file sizes of up to 4GB, thus this error. Luckily there’s an easy way to fix this – convert the file system from FAT32 to NTFS. This can be done easily with the command convert, and should not cause you to lose data on the device you’re converting, or have to format it. However, backup is always adviced.

So, the conversion itself:

1. Click on the Start-menu
2. Type cmd in the search bar
3. Check the disk for errors with the command:

Where e: is the letter of the drive of the USB-stick.

4. Execute the conversion with:

The conversion-process will take a few minutes, and in the end the program will inform you when the conversion was successful.

That’s all there is to it. :)

Problems with wicd-curses on Fedora 20

If you’re on Fedora 20, are trying to run wicd-curses, and keep getting errors like the one below:

..then the fix is simple. Open up the file /usr/share/wicd/curses/curses_misc.py, go to line 360, and paste the following below:

wicd-curses should be working again. This is currently a bug on Bugzilla (https://bugzilla.redhat.com/show_bug.cgi?id=894646).

Problems with XBMC-audio on Apple TV 2

I have an Apple TV 2 that I’ve installed XBMC on. For a while it was working great, but out of the blue suddenly the sound got choppy. I guess there was an update that changed something. The best description I have for it is that the audio sounded like a machine gun – very annoying! And made movies unwatchable. Luckily, there’s a way to fix this. You simply need to change some of the XBMC-settings.

Go to:

  • System
  • System
  • Audio output
  • Check/uncheck Dolby Digital AC3 and DTS as capable receivers

This should do the trick! It certainly worked for me, so sure hope it works for you.

Continue enjoying your movies and series!

Introduction to strace

There will come a time when you will find yourself asking “What the heck is that process doing?”. To uncover the mysteries behind the behaviour of a process, we have a tool called strace.

The program strace is very handy when you want to debug the execution of a program, as it intercepts and records the system calls which are called by a process and the signals which are received by a process.

Let’s dive into some examples.

Trace the execution

..is the simple straight-forward way to use it. The output might look something like:

The output looks a bit messy, but it can provide very useful information.

Attach to an existing process

You can run strace on a process that’s already running. Use -p, and provide the Process ID (PID):

The output presented to you is similar to the example above.

Trace child processes

Use -f to trace child processes as they are created by currently traced processes. Most of the time when a program launches, it forks, and the fork does the actual work.

Trace specific system calls

The e-flag, along with the call open, displays only open system calls of the ls command, which outputs something along these lines:

With the above example, close to the end, you can see two things – ghost and ghost.zip, a folder and file, which is the actual output of the command ls.

A few of the options available after -e trace= are:

  • open
  • close
  • read
  • write

Trace multiple system calls

What if you want to trace multiple system calls in one command though? Use the option -e trace=:

Which outputs:

Write output to file

If you’d like to write the output of strace to a file, add a -o:

When you print the contents of ls.txt, you’ll see that it contains only the output from strace, and not from the command ls:

Add a timestamp

If you add a -t to the command, you’ll be able to add a timestamp to each printed line. You can add up to 3 -t‘s. The more you add, the more verbose and detailed the timestamp will be.

One -t shows you seconds:

Adding a second -t will display microseconds:

A third -t will include the microseconds and the leading portion will be printed as the number of seconds since the epoch.

Print relative timestamp

If you’d like to find out the execution time of each call, -r will certainly do the trick:

A summary of system calls

Would you like to have a summary of calls, time, and errors for each system call? -c does this:

These are a few of the things you are able to do with strace. For more detailed information about this tool, I suggest you study the output of the command man strace.

Have fun. :)