getting loopback to work on newer builds of dd-wrt

Wednesday, August 10, 2011 at 2:22 pm

i’ve come across this problem a number of times when looking at newer firmware for my router running dd-wrt. the upgrade works flawlessly but loopback doesn’t work. i finally decided to see if there was a solution out there and lucky for me, there is. a google search brought me to this bug report. there is also a dd-wrt forum topic on this as well but the solution is pretty simple. just in case the bug report and forum post both disappear, here is the solution:

Save the following commands to the Firewall Script on the Administration -> Commands page to fix loopback.

insmod ipt_mark
insmod xt_mark

iptables -t mangle -A PREROUTING -i ! `get_wanface` -d `nvram get wan_ipaddr` -j MARK --set-mark 0xd001
iptables -t nat -A POSTROUTING -m mark --mark 0xd001 -j MASQUERADE

once you have added these commands to the ‘Firewall’ command list, you will need to perform a reboot and that should make the fix active.

a huge thanks to phuzi0n for providing this workaround! from the number of people who have commented, i can definitely see that i am not alone in wanting loopback to work properly but at least this workaround does the job.

Categories: computers, internet, technology

overclockix

Wednesday, March 23, 2011 at 8:17 pm

i probably won’t be posting on here for some time as i am planning on dedicating my time working on overclockix in my free time. in case you do not know what overclockix is, it is a customized linux live distro (based on debian) which i am helping to revive. if you would like to contribute to the project in any way, let me know in the project thread @ overclockers.com.

Categories: computers, linux, technology

installing sun-java6-jre on ubuntu 10.10

Monday, January 31, 2011 at 12:51 pm

there have been a number of people who are trying to get minecraft working on ubuntu 10.10 and running into java related issues because they install openjdk or another open source java replacement. by default, the repository required to install the ‘sun-java6-jre’ package is disabled. this will walk you through how to enable it and install the latest JRE.

sudo nano /etc/apt/sources.list

search for ‘partner’ (ctrl + w, type in ‘partner’, hit enter)

this should get you close to the correct lines you need to uncomment. uncomment the following two lines:

# deb http://archive.canonical.com/ubuntu maverick partner
# deb-src http://archive.canonical.com/ubuntu maverick partner

should look like this:

deb http://archive.canonical.com/ubuntu maverick partner
deb-src http://archive.canonical.com/ubuntu maverick partner

exit and save changes (ctrl + x, Y, enter to confirm filename)

run the following commands to make the changes you just made to your repositories active and to install the sun JRE:

sudo aptitude update
sudo aptitude install sun-java6-jre
sudo update-alternatives --config java

choose the version that has ‘/usr/lib/jvm/java-6-sun/jre/bin/java’ (it may auto-select it if you do not have another version of java installed)

verify it is installed correctly using ‘java -version’ (should look like the following:)

java version "1.6.0_22"
Java(TM) SE Runtime Environment (build 1.6.0_22-b04)
Java HotSpot(TM) 64-Bit Server VM (build 17.1-b03, mixed mode)

Categories: computers, linux, minecraft, technology

creating a raid 5 array in linux with mdadm

Thursday, November 4, 2010 at 9:05 am

i recently had a hard drive fail in my server. luckily i was running it in a raid 1 array so all of my data was kept safe. i decided that while i had a hard drive out of service that i might as well take some time to do some upgrading of my storage space. i had been just running two basic raid 1 arrays (each with two 1 TB drives) using mdadm with ext3 for my virtual machines and other assorted storage. while ext3 is a very stable file system, it isn’t know for its speed. while i certainly wasn’t running out of storage space by any means, i thought it to be smarter to upgrade while i had enough space to rearrange things.

while i already owned four 1 TB hard drives, two of them are western digital green drives which means they have variable RPMs; not exactly the best choice for a raid array. my main goals are speed, redundancy, and increasing my total storage space. with that being said, it seemed to me that the best choice was to buy more drives identical to my two 7200 rpm drives (hitachi deskstar 7K1000B HDT721010SLA360 to be exact). i was able to find some for a decent price ($50) from an online retailer so i picked up three. when i received my other drive back from RMA to hitachi, that would give me a total of five 1 TB drives to make a nice raid 5 array.

next, i just had to choose what file system i was going to include. different file systems provide different features and abilities. some are able to perform online resizing, some are optimized for read performance, others write, etc. overall, i was looking for something fairly reliable, as close to ‘ext3 reliable’ as possible while getting that extra boost of speed but i also wanting to pick something mainstream that i knew would be supported for years to come. to begin with, i started looking at ext4 and xfs. after doing some quick research, i realized that my server, which is running debian lenny (stable) does not include a stable ext4 driver. it only comes with ext4dev. while i could upgrade my kernel and use packages from backports, i really didn’t want to have to make that many changes to my stable, working server. so after speaking with a few colleagues and people online, i decided that xfs would be my best bet for my specific situation.

while digging further into xfs, i stumbled upon a useful mythtv wiki article regarding xfs (thanks to MRD for the link). this provided some very useful information as to how to create an optimized xfs file system for your devices. now that i had all of my information together, it was time to do a little bit of testing in a virtual environment just to familiarize myself with the process. when doing what i consider major operations, i like to test things out first. i just created a basic debian VM with multiple virtual disks, practiced creating, assembling, expanding, etc to see how well it worked.

earlier this week, my three new drives arrived. since raid 5 can run in a degraded 5 drive array with only four drives, i figured that i would go ahead and get started while still waiting for my last drive from RMA. i arranged my drives so that my raid 5 array would consist of the drives on /dev/sda to /dev/sde. many of the commands that i am using for this were found on Useful Mdadm Commands @ excaliburtech.net which is a great resource for example usage of mdadm commands. first, i created a single partition layout using fdisk on /dev/sda, set the type to ‘fd’ which is ‘Linux raid autodetect’. the layout should look like this:

root@athena:~# fdisk -l /dev/sda

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x68714c34

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1      121601   976760001   fd  Linux raid autodetect

i could use fdisk to create the same partition layout on the other three drives but there is an easy way to copy the layout. ‘/dev/sda’ is the source disk, and the last parameter is the destination disk. this just copies the partition table layout to ensure they are identical:

sfdisk -d /dev/sda | sfdisk /dev/sdb
sfdisk -d /dev/sda | sfdisk /dev/sdc
sfdisk -d /dev/sda | sfdisk /dev/sdd

next, i opted to clean the superblocks to ensure that any existing superblock data (where mdadm stores array information for each drive) would be cleared.

mdadm --zero-superblock /dev/sd[abcd]
mdadm --zero-superblock /dev/sd[abcd]1

now we are ready to create the raid array. i already have a md0 and md1 so my next available is md2. this will create a raid 5 array using 5 devices but with one drive missing.

mdadm --create /dev/md2 --level=5 --raid-devices=5 /dev/sd[abcd]1 missing

be default, arrays are shows as read only. you can now mark the array as read-write:

mdadm --readwrite /dev/md2

you can now see the degraded array using ‘cat /proc/mdstat’:

root@athena:~# cat /proc/mdstat
Personalities : [raid1] [raid6] [raid5] [raid4]
md2 : active raid5 sda1[0] sdd1[3] sdc1[2] sdb1[1]
      3907039744 blocks level 5, 64k chunk, algorithm 2 [5/4] [UUUU_]

next, i am ready to prepare the new array with new xfs file system. using the myth wiki link above, i calculated the optimal values for my array and inserted them into the mkfs.xfs command:

mkfs.xfs -b size=4096 -d sunit=128,swidth=512 /dev/md2

now that the xfs file system has been created, i can do a test mount:

mkdir /media/md2
mount -o sunit=128,swidth=512 /dev/md2 /media/md2

my test mount was successful so i wanted to automatically mount my new array at boot so i just needed to add the following to /etc/fstab:

/dev/md2        /media/md2      xfs             sunit=128,swidth=512,noatime,nodiratime 0       0

now i also want to add the new raid 5 array’s information to /etc/mdadm/mdadm.conf

mdadm --examine --scan
ARRAY /dev/md2 level=raid5 num-devices=5 UUID=512145fc:e9a0cb9e:affa4567:83059fad

so i add it to the last line and the contents of the entire file look like:

# mdadm.conf
#
# Please refer to mdadm.conf(5) for information about this file.
#

# by default, scan all partitions (/proc/partitions) for MD superblocks.
# alternatively, specify devices to scan, using wildcards if desired.
DEVICE partitions

# auto-create devices with Debian standard permissions
CREATE owner=root group=disk mode=0660 auto=yes

# automatically tag new arrays as belonging to the local system
HOMEHOST 

# instruct the monitoring daemon where to send mail alerts
MAILADDR root

# definitions of existing MD arrays
ARRAY /dev/md0 level=raid1 num-devices=2 metadata=0.90 UUID=ad56dba9:a587a6ce:63b74a7d:37f4f41d
ARRAY /dev/md1 level=raid1 num-devices=2 metadata=0.90 UUID=9ee58430:486e6421:6e7df9ee:51ed0ff2
ARRAY /dev/md2 level=raid5 num-devices=5 metadata=0.90 UUID=512145fc:e9a0cb9e:affa4567:83059fad

i then went ahead and copied my data to the new array and two days later, my new drive arrived. after installing it in my system, i needed to create the partition information from an existing drive, clean the superblock, and add the drive to the array using the following commands:

copy partition information from an existing disk:

sfdisk -d /dev/sda | sfdisk /dev/sde

clean the superblock:

mdadm --zero-superblock /dev/sd[e]
mdadm --zero-superblock /dev/sd[e]1

add the new drive to the existing raid 5 array:

mdadm --add /dev/md2 /dev/sd[e]1

check drive synchronization status:

root@athena:~# cat /proc/mdstat
Personalities : [raid1] [raid6] [raid5] [raid4]
md2 : active raid5 sde1[5] sda1[0] sdd1[3] sdc1[2] sdb1[1]
      3907039744 blocks level 5, 64k chunk, algorithm 2 [5/4] [UUUU_]
      [============>........]  recovery = 60.4% (590546092/976759936) finish=100.7min speed=63877K/sec

now my raid 5 array is completely synchronized and is fully redundant:

root@athena:~# cat /proc/mdstat
Personalities : [raid1] [raid6] [raid5] [raid4]
md2 : active raid5 sde1[4] sda1[0] sdd1[3] sdc1[2] sdb1[1]
      3907039744 blocks level 5, 64k chunk, algorithm 2 [5/5] [UUUUU]

Categories: computers, linux, technology

upgrading to adobe flash player 10.2.161.22 (64 bit) on debian

Friday, September 17, 2010 at 9:02 am

as i mentioned in my previous blog article, adobe temporarily pulled 64 bit support for the 64 bit plugin. a few days ago (september 15) they released preview 1 of flash player 10.2. if you have followed the instructions in my previous article, upgrading is quite simple. if not, don’t worry, there are only a few extra steps! please remember that this is a beta version so it may not be 100% stable. the method i am using will add a new option to update-alternatives which will allow you to switch between a stable and testing plugin of flash player. this makes it quite simple to change between versions.

  1. if you haven’t yet, i would suggest removing the official adobe flash package which is likely to be out of date:
    sudo aptitude remove --purge flashplugin-nonfree
  2. download the latest 64 bit plugin from here, make sure to select ‘Download plug-in for 64-bit Linux’ (backup mirror). i would suggest saving the file to /tmp.
  3. open a command line window and navigate to /tmp:
    cd /tmp
  4. untar the archive:
    tar zxvf flashplayer_square_p1_64bit_linux_091510.tar.gz
  5. if you haven’t followed my previous article, you will need to create the destination directory first:
    sudo mkdir /usr/lib/adobe-flash

    next, copy the newly extracted ‘libflashplayer.so’ to the plugin installation location:

    sudo cp libflashplayer.so /usr/lib/adobe-flash/libflashplayer_testing.so

    it might be a good idea to verify that you have moved the file properly:

    mbentley@athena:/tmp$ ls -l /usr/lib/adobe-flash/
    total 19736
    -rwxr-xr-x 1 root root  9570824 2010-09-17 09:18 libflashplayer.so
    -rw-r--r-- 1 root root 10601968 2010-09-17 10:01 libflashplayer_testing.so
  6. next we are going to need to add a new entry to update-alternatives for the testing version:
    sudo update-alternatives --install /usr/lib/mozilla/plugins/flash-mozilla.so \
    flash-mozilla.so /usr/lib/adobe-flash/libflashplayer_testing.so 15

    ‘–install’ indicates that we are adding an entry, ‘/usr/lib/mozilla/plugins/flash-mozilla.so’ indicates the symlink we want to add an option to, ‘flash-mozilla.so’ indicates the update-alternatives name, ‘/usr/lib/adobe-flash/libflashplayer_testing.so’ indicates the file which you are adding, ’15′ indicates the priority (higher the number, the higher the priority).

  7. now we need to set the new testing version of flash player to be current active version:
    sudo update-alternatives --config flash-mozilla.so

    make sure to choose the option for the newly created ‘/usr/lib/adobe-flash/libflashplayer_testing.so’:

    There are 2 alternatives which provide `flash-mozilla.so'.
    
      Selection    Alternative
    -----------------------------------------------
    *+        1    /usr/lib/adobe-flash/libflashplayer.so
              2    /usr/lib/adobe-flash/libflashplayer_testing.so
    
    Press enter to keep the default[*], or type selection number: 2
    Using '/usr/lib/adobe-flash/libflashplayer_testing.so' to provide 'flash-mozilla.so'.
  8. we should now clean up our temporary files as we do not need them anymore:
    rm /tmp/flashplayer_square_p1_64bit_linux_091510.tar.gz /tmp/libflashplayer.so
  9. after you have done that, you will need to restart your web browser and then you should have version 10.2.161.22 installed. you can verify this by going to adobe’s flash test page and looking in the ‘version information’ section.

in the future, you will simply need to execute steps 2-5 to upgrade to newer versions. if you want to install a new ‘stable’ plugin, you will just need to change step 5 to copy to ‘/usr/lib/adobe-flash/libflashplayer.so’. if you do so, you will also want to verify that update-alternatives is pointing to the correct version that you would like to use.

if you have any questions or problems, feel free to post in the comments and i will try to reply to them as soon as possible.

Categories: computers, internet, linux, technology

installing adobe flash player 64 bit on debian

Wednesday, July 14, 2010 at 8:45 am

somewhat recently, adobe has pulled all support for 64 bit flash player on linux. debian has also remove the support from it’s non-free archives so the ‘flashplugin-nonfree’ package no longer works properly. i find that gnash and swfdec are pretty lacking and are not compatible with all websites which is a major problem for me. after searching online, i found a 64 bit copy of libflashplayer.so and wanted to install it the debian way using ‘update-alternatives’. here are the steps to install it properly:

  • first we want to remove the official ‘flashplugin-nonfree’ package:

    sudo aptitude remove --purge flashplugin-nonfree
  • download libflashplayer.so from here.
  • extract the file to a temporary location using:
    tar zxvf libflashplayer-10.0.45.2.linux-x86_64.so_.tar.gz

    you should now see ‘libflashplayer.so’

  • from the same temporary location, execute the following commands to make a common location for the file to be stored and then to copy the file there:
    sudo mkdir /usr/lib/adobe-flash
    sudo cp libflashplayer.so /usr/lib/adobe-flash/
  • next, you will need to create an update-alternatives entry using the following command (copy and paste both lines and insert it on the command line as a single command:
    sudo update-alternatives --install /usr/lib/mozilla/plugins/flash-mozilla.so \
    flash-mozilla.so /usr/lib/adobe-flash/libflashplayer.so 20

    ‘–install’ indicates that we are adding an entry, ‘/usr/lib/mozilla/plugins/flash-mozilla.so’ indicates the symlink we want to add an option to, ‘flash-mozilla.so’ indicates the update-alternatives name, ‘/usr/lib/adobe-flash/libflashplayer.so’ indicates the file which you are adding, ’20′ indicates the priority.

  • now we just need to set the new flash player to be the default:
    sudo update-alternatives --config flash-mozilla.so

    make sure to choose the option for the newly created ‘/usr/lib/adobe-flash/libflashplayer.so’:

    There are 2 alternatives which provide `flash-mozilla.so'.
    
      Selection    Alternative
    -----------------------------------------------
              1    /usr/lib/gnash/libgnashplugin.so
    *+        2    /usr/lib/adobe-flash/libflashplayer.so
    
    Press enter to keep the default[*], or type selection number: 2
    Using '/usr/lib/adobe-flash/libflashplayer.so' to provide 'flash-mozilla.so'.
  • now open up iceweasel (firefox) and navigate to ‘http://kb2.adobe.com/cps/155/tn_15507.html‘ and it should show the version of flash as ‘LNX 10,0,45,2′.

and that should be it! if you want to navigate to any flash based site or adobe’s flash test page you should see the plugin working. this has currently been tested on debian lenny (stable) and debian squeeze (testing).

Categories: computers, internet, linux, technology

how to make free ringtones for the iPhone using iTunes

Thursday, June 24, 2010 at 7:25 am

so you already have some songs in your itunes library and you want to make custom ringtones from them but don’t want to pay for them from the itunes store or the ringtone doesn’t have the part of the song you want. if you are looking to do just that, then you’re in luck and all you need to create your own ringtones is itunes itself. the steps are fairly simple. they may work similarly on osx, but i have only tested this on windows.

  1. open itunes and find song you want to make a ringtone
  2. each ringtone should be 30 seconds long. play the song and look at what point in the song you want it to start and remember the minutes and seconds to start. add 30 seconds for the end time and remember that as well
  3. right click on the song, choose ‘get info’ then go to the ‘options’ tab (see figure 1)
  4. change start time to beginning time and change the stop time to the ending time (remember: should be 30 seconds after start time). choose OK. (see figure 2)
  5. right click on the song again, choose ‘create aac version’. it should only take a few seconds to process
  6. a new song will appear in your itunes library (it will be a 30 second song); right click on the new 30 second version and choose ‘show in windows explorer’ (see figure 3)
  7. this should take you to the location of the new file. change file extension from ‘.m4a’ to ‘.m4r’
  8. i would suggest moving the file to a common location for ringtones only. you will also want to make sure to remove old 30 second clip from itunes as it now points to an invalid file location
  9. to import the new ringtone, go to the ‘file’ menu then ‘add file to library’. navigate to the new ringtone and add it to the library. it should now appear in the ‘ringtones’ section on the left (see figure 4)
  10. make sure to undo your changes to the start/stop time of the original song (right click the original song, choose ‘get info’, goto the ‘options’ tab, clear start/stop time checkboxes
  11. sync your iphone and now the ringtone is available on your phone!
figure 1 – get info, options tab figure 2 – set start/stop time
   
   
figure 3 – new 30 second song figure 4 – new ringtone in itunes

post a comment if you have any issues.

Categories: apple, computers, iphone, technology

iPhone iOS 4 & 5 upgrade – restore lost pictures in camera roll

Wednesday, June 23, 2010 at 6:30 pm

update 10/21/2011 – it appears that this bug has come up again with a number of people who have updated to iOS 5. luckily, the solution is the same as before. i have updated the instructions to help with any changes that iOS 5 added.

before you start – this will only work if your photos actually exist on your device but do not show up in in the camera roll. you can verify that photos exist on your device by looking graph at the bottom of iTunes and by checking your device for the actual picture files. if you post comments about having problems but don’t mention that you haven’t verified that your photos are still available on your device, i’m sorry but i won’t be able to help you.


so i decided to upgrade to the new iOS 4 on my iphone 3gs to see what it is all about. everything went smoothly. i installed itunes 9.2, downloaded the new firmware, asked my phone to do a restore using the new firmware and then had it restore my latest backup of info. everything seemed perfect after syncing with itunes but then i went into my camera roll and noticed i had no pictures! in itunes, it showed over 1 GB worth of pictures so why were they not showing up? i searched online for a little while i didn’t really come up with much at first. many different solutions: do a backup, sync, reboot, etc but nothing worked. then i came across this discussion on the apple forums. i have slightly modified the steps. if you use windows or osx, you can download iphone explorer and follow these steps:

these steps are out of date.  see below for updated steps.
1.) connect your iphone using the usb cable
2.) launch iphone explorer
3.) backup and then delete the following files (backup instructions):
     /DCIM/.MISC/Info.plist
     /PhotoData/Photos.sqlite
     /PhotoData/PhotosAux.sqlite
4.) reboot your iphone

a recent update to iphone explorer may have changed the folder paths. if you don’t see the folders mentioned, try the following:

1.) connect your iphone using the usb cable
2.) launch iphone explorer
3.) backup and then delete the following files (backup instructions):
     /Media/DCIM/.MISC/Info.plist
     /Media/PhotoData/MISC/DCIM_APPLE.plist
     /Media/PhotoData/Photos.sqlite (or /PhotoData/Photos.sqlite)
     /Media/PhotoData/PhotosAux.sqlite (or /PhotoData/PhotosAux.sqlite)
4.) reboot your iphone

note: if you don’t have the file PhotosAux.sqlite, that’s not a problem. It is a database of the location of where photos were taken which is extracted from the EXIF data of the pictures. i would guess that it is uses by the Places feature in the camera roll.

if your phone is jailbroken and you are in ‘root’ view in iphone explorer, these instructions & file locations should work:

1.) connect your iphone using the usb cable
2.) launch iphone explorer
3.) backup and then delete the following files:
     /private/var/mobile/Media/PhotoData/.MISC/Info.plist
     /private/var/mobile/Media/PhotoData/MISC/DCIM_APPLE.plist
     /private/var/mobile/Media/PhotoData/Photos.sqlite
     /private/var/mobile/Media/PhotoData/PhotosAux.sqlite
4.) reboot your iphone

if you have linux, you shouldn’t need anything as long as you can mount your iphone as a device and delete the files listed above. i used debian (squeeze) to access the files as it automatically mounts my iphone when i plug it in. i just enabled ‘view hidden files’ and i could access the files to delete.

once you have done that, just open your camera roll and it should re-index all of your photos!

*edit: as Phil has pointed out in the comments, if the file ‘/DCIM/.MISC/Info.plist’ does not exist or if you can’t find the folder ‘/DCIM/.MISC’, just skip past that file and follow the rest of the directions and it should still restore your photos in the camera roll.

*edit: has anyone had this happen with the latest update to iOS 5? i am curious whether or not it is happening again with the latest iOS. if it is, please let me know in the comments. thanks!

Categories: apple, computers, iphone, technology

reusing an old ipod hard drive

Tuesday, April 6, 2010 at 8:26 am

so what happens when your ipod dies? what if you get a new one and simply have no use for your old one? if you don’t have a use for your ipod or it is broken and you have determined that it’s a model with a hard drive and it is still in working condition, you can simply turn it into an external hard drive. i had a 5th gen video ipod that had a circuit board go bad and it already had a battery that wouldn’t hold a charge. instead of buying parts to repair it, it just went ahead and bought a new one.

that left my old one for parts and pretty much the only thing of any value to me was the hard drive. mine has a zif/lif connector which i hadn’t ran into before but after doing a little looking around, i found that you could find fairly inexpensive enclosures on ebay (search for ’1.8 ZIF LIF external usb’). from what i understand, some ipod hard drives are zif and others are ide. just make sure you know which one you own before ordering. the person i bought mine from on ebay had both types available.

1.8″ ide drive 1.8″ zif drive

the case that i bought is a hitachi mobile disk case. there really isn’t anything special about it as it is simply a plastic case with a circuit board which converts the connector to mini usb. i purchased it solely based on the plain look and small size. it is only about the size of a credit card (just slightly bigger) which is about 1/2 to 2/3 the size of a standard 2.5″ laptop hard drive in an external enclosure.

the plastic seems to be much more sturdy than that of my 2.5″ laptop enclosure which needs replacing badly. that is how the whole idea of looking for an 1.8″ enclosure came to mind. if you can help it, i would try to keep the screwing and unscrew of the case to a minimum to prevent stripping out the plastic threads in the hole as they tend to easily break on enclosures. also do not over tighten them as that will definitely cause damage to the holes.

the case doesn’t come with instructions but installation was a easy and took about 2 minutes. if you have the ability to disassemble an ipod, you will easily be able to figure out how a zif connector works. if you don’t know how to disassemble your dead ipod, just do a quick google search and you’ll find plenty of assistance. the only reason the installation took 2 minutes was because the screws were so small, they were difficult to handle. once it was all buttoned up, i just plugged it in, reformatted the drive and it worked like a charm.

Categories: computers, new gadgets, repairs, technology

backing up all of your itunes settings

Thursday, March 25, 2010 at 11:16 am

i’ve seen tons of posts around the internet regarding backing up itunes. most of them seem to focus on backing up your itunes library. while this is great, it doesn’t cover everything you probably want to back up when doing something like a complete reinstall of windows. if you only back up your library, you will lose your settings as well as your playlists. if you are like me, you have your music stored on a central server somewhere so backing up your music on your local computer is pointless anyway.

with that being said, there are a couple folders that you should back up if you want to keep your itunes settings intact when doing a full reinstall or migration to a new computer. before you do a backup, i would suggest deauthorizing your computer from the itunes store. this will prevent you from running out of the max of 5 authorizations and having to call apple support to have to clear one for you. once you have deauthorized, make sure you close itunes. next, you will need to find three folders:

Windows XP:

%HOMEPATH%\My Documents\My Music\iTunes
%HOMEPATH%\Application Data\Apple Computer
%HOMEPATH%\Local Settings\Application Data\Apple Computer

Windows Vista/7:

%HOMEPATH%\Music\iTunes
%HOMEPATH%\Application Data\Apple Computer
%HOMEPATH%\Local Settings\Application Data\Apple Computer

note: %HOMEPATH% is equivilant to ‘c:\Documents and Settings\<username>’ (WinXP) or ‘c:\Users\<username>’ (Vista/7)


first folder (winxp)

second folder (winxp)
   

third folder (winxp)

simply store those folders somewhere safe such as an external hard drive or usb thumb drive. when you install itunes, make sure to start it up for a first time then close it. this will create the directories which you will want to restore the files to. simply copy the folders back to their proper locations, overwriting the existing contents that were created when you started itunes for the first time. next, open itunes and it should appear just as it was before. reauthorize your computer and you are ready to go.

Categories: apple, computers, iphone, technology