Installation: Winpod without datacorruption

From iPodLinux

Jump to: navigation, search

This page is about a new method for installing iPL on WinPods. This does NOT work on MacPods without modification. However, MacPods already use a method like the one described on this page, so this guide is only useful to WinPod owners. MacPod owners may continue, if they know what they are doing.

Contents


Preface

This is experimental software. While it's eventually targeted at the less computer-proficient user, this guide is not yet. This software hasn't been tested thorougly, so it is very unsupported. This guide assumes that basic Linux knowledge is present.

With the newer generation iPods, Apple has decided that they should sometimes hibernate, storing the contents of the RAM on the disk, in the firmware partition. Older iPods did not do this, so iPL could be safely installed inside an unused portion of the firmware image. On the newer models, iPL installation is no longer possible in the firmware partition, because the hibernation image will overwrite iPL. This requires Winpod users to resize their FAT32 partition or repartition their iPod harddrive, in most cases at the cost of data (and preferences) loss. This method is not very friendly to beginning users, so an alternate method was developed. This method should greatly simplify the manual installation process, without the need for repartitioning the harddrive, so no data will be lost.

For this guide, a slightly modified version of the Linux kernel was used, which does not work on a MacPod.


Important note

You cannot use another kernel than the one supplied in the installer if you want to use this installation method. This is because there are certain tweaks in this kernel which are incompatible with the normal kernel and vice versa. Don't ask for help if you are experiencing problems with a non-default kernel.


Target audience

At first, this guide will be for Linux users only. Everyone should be able to use this guide, but at this moment, having some more advanced Linux knowledge is preferred. Also, this guide targets WinPod users. MacPods don't suffer from this problem, so this guide is, for MacPods, only useful for testing purposes. It won't work on a MacPod without the proper kernel knowledge.


News and planning

This is just the initial version. Future versions will (after sufficient testing) be easier to maintain by several automated scripts.

2007-03-09: First revision of the automatic installation script. For instructions, go to the automatic installer section

2007-03-11: Updated the userland and installer. Changes:

  • All podzilla2 modules are now included
  • Modules can easily be enabled and disabled
  • Fonts can easily be added and removed
  • Schemes can easily be added
  • Added the possibility to update the userland without needing a full download

2007-09-29: Updated to the newest kernel

  • A new build is automatically compiled every night, based on the official kernel
  • Nano and volume issues fixed
  • No more lite installer
  • Not tested!. This version is assumed to work, on normal iPods AND on Nanos.
  • Still no improvement on the module handling


Requirements

  • A WinPod with at least 46MB free space
  • Access to a Linux system

Manual installation

Automatic installation

Upgrade


Manual installation

WARNING

Important.pngThe instructions in this guide are not to be used literally. The used commands are based on various assumptions, their actual arguments needed may vary from system to system. If you don't know what this is about, you might even cause data corruption on your PC's harddrive. If you are unsure about the needed settings, interpret this guide and doublecheck everything with your hardware configuration, in order to get a set of commands with the proper arguments. If you still don't know what I'm talking about, please stop reading now.


Setting up the installation environment

Note: This guide will assume the following:

/tmp/ipl/ is the location of all necessary installation files
/dev/sda is the iPod
/mnt/ipod is the location of the iPod FAT32 partition.
You're using an untouched partiontable, or at least one which uses /dev/sda2 for FAT32.


Since the lite installers are discontinued, the instructions are slightly modified. You can continue using the manual installation method with the old lite installer files (still available), but you won't have Nano support or the volume problems fixed on newer iPods. These instructions can still be used with the new, nightly installer, the userland image can be easily extracted from the whole image. This image also comes with the necessary tools (ipodpatcher, loader) as well as the installer itself, ofcourse. This guide assumes enough knowledge is present to 'translate' this.


Make sure you are in the temporary installation directory

cd /tmp/ipl/

Download the proper ipodpatcher binary or compile one from source, if you prefer. Make sure that it's executable.

Download the latest Loader2 binary and extract the .tar.gz file. The only file needed from it is 'loader.bin'.

Download the modified userland.


If you're unsure about the iPod's location, you can use ipodpatcher to determine that.

./ipodpatcher --scan

You will get output which looks like this:

ipodpatcher v0.7 - (C) Dave Chapman 2006-2007
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[INFO] Scanning disk devices...
[INFO] Ipod found - Video (aka 5th Generation) - /dev/sda

In this case, the iPod is located at /dev/sda.


If you haven't already done so, mount the iPod

mount /dev/sda2 /mnt/ipod


Backing up

You can back up the firmware partition so it can be restored without having to use iTunes, in case something goes wrong. This step is optional. Remember that iTunes will trash any data which was on the FAT32 partition. Backing up can be done in two ways, with ipodpatcher or with dd. Use the method that suits your needs.

dd if=/dev/sda1 of=dd-ipod-firmware.bin bs=1M

or

./ipodpatcher /dev/sda -r patcher-ipod-firmware.bin


Installing the base files

Now it's time to extract the base files for iPL. Unpack the modified userland on your iPod:

cd /mnt/ipod
tar -jxf /tmp/ipl/ipl-nopartitioning-1.1-20070311.tar.bz2


Installing the bootloader

First, change back to your installation folder

cd /tmp/ipl

Now, install the loader to your iPod

./ipodpatcher /dev/sda -ab loader.bin


Finishing the installation

Sync (just to be sure), umount and eject your iPod

sync
umount /mnt/ipod
sync
eject /dev/sda

You'll notice that your iPod reboots. When this happens, you'll be presented with a boot menu. If everything worked correctly, you should have the option to boot into the AppleOS and into Linux. Select Linux and watch podzilla boot on your iPod, without data loss!


Restoring

In case something went wrong, you can use the backup to restore the firmware partition. Use the same method (dd or ipodpatcher) you used when backing up.

dd if=dd-ipod-firmware.bin of=/dev/sda1 bs=1M

or

./ipodpatcher /dev/sda -w patcher-ipod-firmware.bin


Automatic installation

An automatic installation script is available. This script has only been tested on one machine and one iPod. It may contain errors. This script will only run on Linux-based systems.

The easiest way to use this script is to use the full installer. If you have already downloaded the userland tarball, you can just download the lite installer.

For best results, execute the script as root. The chances of it working as a normal user vary from system to system.

Warning: It's currently not 100% certain what will happen if an existing installation is 'upgraded' using an installer.

Installation:

Extract the installer into an EMPTY directory. If you are using the lite installer, copy the userland tarball to that folder.

mkdir /directory/somewhere
cd /directory/somewhere
tar -jxf /path/to/dg-linux-installer-current.tar.bz2

Make sure your iPod is plugged in and run

./installer.sh

Please read the instructions on the screen. The installation could take up a few minutes, depending on your system. After it's done, your iPod will (in most cases) automatically reboot.


Restoring

If anything bad happens during or after the installation, or if you just want to get rid of iPL, run

./installer.sh restore

This will restore your firmware partition and partitiontable. If you made any changes to either of those after the installation, those will be lost.


Upgrading

If you want to upgrade a current installation, get a kernel from here and upload it to your iPod's FAT32 partition as linux.bin. The file should exist already, so just overwrite it.

Warning: It's currently not 100% certain what will happen if an existing installation is 'upgraded' using an installer.

Known issues

MPD will give you an error the first time you try iPL. Also, you won't see a Music entry. This is because MPD needs to build an index of your music. If you have a harddrive-based player, you can hold it to your ear in order to determine whether it's still busy or not. When it's done, reboot your iPod from podzilla and after that, it should work without errors.

Windows-style line endings are unsupported.

Making adjustments

Configurations options are available through

  • X:\iplconfig\ (Windows)
  • /iPod/iplconfig/ (Linux)

The most common userland changes can be performed through

  • X:\userland\ (Windows)
  • /iPod/userland/ (Linux)

To modify the actual userland, the filesystem image (etc/linux.ext3) can be loop-mounted. This is usually not necessary.

When using Windows to modify the text files to enable/disable modules, make sure you are using an editor which can handle UNIX-style line separators. If you do not know what this means, or if you are experiencing problems with the module enabling/disabling, you probably don't have such an editor. In that case, it should still work for one module at a time, by entering just the module name and NO OTHER CHARACTERS such as spaces, line breaks (enters) or anything.


Support

If you find any bugs, please post them to the discussion page, including a decent bugreport. "It doesn't work" is useless information.


Automatic Installers

The automated installer used in this guide is for Linux only. An installer for Windows is available at iPodLinux Manager. As of 2007-09-29, it is still based on the older kernel, which does not support the iPod Nano. An alternate, more up-to-date installer under Project ZeroSlackr can be found here.