Crazy DIY! Install Linux on iPod

Source: Internet
Author: User
Tags gz file hex code

Linux shadows can be seen on smartphones, handheld computers, portable devices, Apple computers, and mainframe/giant computers. iPod has the computer elements-storage devices, central processors, can she install Linux? The answer is yes.

So why install Linux on the iPod? -- DIY spirit! Do it yourself! Isn't it true that if you like DIY, you don't want to try a distinctive personality?

The iPod Video used in this article is iPod Video 30 GB.

IPod is an MP3 brand of Apple. Just like SONY's Walkman. Currently, MP4 generally refers to a portable video player. The current iPod product line is dominated by MP3. Although the fifth-generation iPod Video that can play MP4 is known as iPod 5G Video in foreign countries, 5G refers to the fifth generation, although Apple does not explicitly specify it as the fifth generation), there are two iPod Video models: 30G and 60G. This article takes iPod Video 30G as an example, and does not guarantee that other models can be successfully implemented as described in this article. The magazine and the author will not be responsible for the problem. Think twice.

◆ IPod Linux Introduction

Linux running on iPod uses the improved ucLinux, which is a LINUX system running on single chip microcomputer, but its functions are still very complete.

For how to install iPod Linux, iPod Linux does not delete the original IPOD firmware, nor does it delete the hardware and materials on your IPOD. It is also a dual-system IPOD firmware and ipod linux boot, very safe. It is generally impossible to cause any hard damage to your IPOD. In addition, podzilla is the official GUI shell program on ipod linux, that is, the graphic operation interface of non-command lines ).

Podzilla has a lot of HACK versions, that is, non-official versions, such as podzilla-ti2 can type and save text files), viPodzilla games a lot), and mikPodzilla can play some lossless compression formats of music) and so on.

IPod Linux may cause the IPOD to stop responding, that is, a crash. You can restart the IPOD in different ways. For more information, see the IPOD documentation ).

The software used in this article is iPod Linux and Podzilla to install Linux on iPod Video 30G.

◆ Preparations before installation

We performed this operation on the Ubuntu 5.01 system platform. Because Ubuntu does not allow root permissions by default, you must switch the sudo su root permission to the root permission for the operation. Otherwise, a message indicating insufficient permissions may appear. For details, refer to the Linux version description.

Because I have already formatted my iPod in Windows when I set it to disk mode. In this way, the default iPod partition looks like this:

Disk/dev/sda: 30.0 GB, 30005821440 bytes
255 heads, 63 sectors/track, 3648 cylinders
Units = cylinders of 16065*512 = 8225280 bytes
Device Boot Start End Blocks Id System
/Dev/sda1 1 10 80293 + 0 Empty
/Dev/sda2 11 3648 29222235 B W95 FAT32

A total of 3648 cylinder hard drives of 30 GB are divided into two partitions:

1. The first 10 cylinder partitions are used to store boot information and Apple ipod OS, which are invisible in Windows.

2. The next partition is the "portable disk ipod to be set in disk mode)" You see in the Window, In the FAT32 format.

In order to maintain coexistence with the original iPod system, similar to the dual-system, the following workflow is required:

Reduce the size of the second partition and create a new partition in ext2 format later as a Linux partition. Rewrite the first partition, before Apple's OS Boot Code, add a Linux loader similar to lilo or grub). Finally, create a linux operating system on our third partition.

◆ After our ideas are clear, we will start our work.

In order to open a new ext2 partition from the second partition, We need to copy all the files in the second partition to other places. Note that in Windows, you must display hidden files to see the hidden folder. Delete the second partition, re-open the second and third partitions, format the second partition to fat32, and copy the copies of the files previously copied to other places. The third partition is formatted as ext2.

The procedure is as follows:

Plug the iPod in USB, ubuntu will automatically mount the second partition to/media/ipod, We Need To uninstall it to continue working:

Umount/dev/sdX2

IPod in Linux, the device name is displayed as: first partition --/dev/sdX1, second partition --/dev/sdX2, X is a, B, c ......, The numbers behind X may not be the same, depending on your situation)

Now, let's firstBack up data in the first partition:

Dd if =/dev/sdX1 of = ipod_boot_sector_backup bs = 512 count = 1

If you want to restore the data, run the following command:

Dd if = ipod_boot_sector_backup of =/dev/sd

◆ Re-partitioning

We need to use the Linux partition tool fdisk to manage iPod partitions:

/Sbin/fdisk/dev/sdX

Use of the fdisk tool:

P is used to view the partition list, d is used to delete partitions, and n is used to create partitions. It will ask you where the new partition starts and ends, my second partition is from 11th cylinder to 3,000th cylinder, 11 is required because 11 = 10 + 1. 3000 can be adjusted based on the size of the third partition you need. The size of the third partition must be at least mb .), T is to set the partition type B is FAT32, you do not need to set the third partition type, the default is ext2), use the command to set the second partition to bootable. Finally, use the w command to write these settings to the partition table. Note that we have not moved the first partition-to keep the original system co-existent)

The number of cylinders for this disk is set to 3648.
There is nothing wrong with that, but this is larger than 1024, and cocould in certain setups cause problems:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(E.g., dos fdisk, OS/2 FDISK)
Command (m for help): p
Disk/dev/sdb: 30.0 GB, 30005821440 bytes
255 heads, 63 sectors/track, 3648 cylinders
Units = cylinders of 16065*512 = 8225280 bytes
Device Boot Start End Blocks Id System
/Dev/sda1 1 10 80293 + 0 Empty
/Dev/sda2 11 3648 29222235 B W95 FAT32

Command (m for help ):
Command (m for help): d
Partition number (1-4): 2
Command (m for help): n
Command action
E extended
P primary partition (1-4)
P
Partition number (1-4): 3
First cylinder (1-3648, default 1): 11
Last cylinder or + size or + sizeM or + sizeK (11-3648, default 3648): 180

Command (m for help): p

Disk/dev/sda: 30.0 GB, 30005821440 bytes
255 heads, 63 sectors/track, 3648 cylinders
Units = cylinders of 16065*512 = 8225280 bytes

Device Boot Start End Blocks Id System
/Dev/sda1 1 10 80293 + 0 Empty
/Dev/sda3 11 180 1365525 83 Linux

Command (m for help): n
Command action
E extended
P primary partition (1-4)
P
Partition number (1-4): 2
First cylinder (1-3648, default 1): 181
Last cylinder or + size or + sizeM or + sizeK (181-3648, default 3648 ):
Using default value 3648

Command (m for help): p

Disk/dev/sda: 30.0 GB, 30005821440 bytes
255 heads, 63 sectors/track, 3648 cylinders
Units = cylinders of 16065*512 = 8225280 bytes

Device Boot Start End Blocks Id System
/Dev/sda1 1 10 80293 + 0 Empty
/Dev/sda2 181 3648 27856710 83 Linux
/Dev/sda3 11 180 1365525 83 Linux

Partition table entries are not in disk order

Command (m for help): t
Partition number (1-4): 2
Hex code (type L to list codes): B
Changed system type of partition 2 to B (W95 FAT32)

Command (m for help): p

Disk/dev/sda: 30.0 GB, 30005821440 bytes
255 heads, 63 sectors/track, 3648 cylinders
Units = cylinders of 16065*512 = 8225280 bytes

Device Boot Start End Blocks Id System
/Dev/sda1 1 10 80293 + 0 Empty
/Dev/sda2 181 3648 27856710 83 Linux
/Dev/sda3 11 180 1365525 B W95 FAT32

Partition table entries are not in disk order

Command (m for help): w
The partition table has been altered!

Calling ioctl () to re-read partition table.

WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table.
The new table will be used at the next reboot.

WARNING: If you have created or modified any DOS 6.x
Partitions, please see the fdisk manual page for additional
Information.
Syncing disks.

Next we will format the second partition as fat32:

Mkdosfs-F 32/dev/sdX2

Format the third partition to ext2:

Mke2fs/dev/sdX3

Set the self-check count of the third partition to infinite:

Tune2fs-c 0/dev/sdX3

If this is not done, I remember it was 30 times each time I started a certain number of times), I will perform self-check once.

The partition table I obtained is as follows:

Disk/dev/sda: 30.0 GB, 30005821440 bytes
255 heads, 63 sectors/track, 3648 cylinders
Units = cylinders of 16065*512 = 8225280 bytes
Device Boot Start End Blocks Id System
/Dev/sda1 1 10 80293 + 0 Empty
/Dev/sda2*11 3000 24017175 B W95 FAT32
/Dev/sda3 3001 3648 5205060 83 Linux

Finally, copy the data in the second partition you backed up to the new second partition.

At this point, if we disconnect the iPod from the computer, we can restart it to the apple OS, because we have not modified the information of the first partition.

◆ Install Loader2

To coexist with the original operating system, we must modify the pilot information of the first partition-install Loader2. Introduction to multiple system boot programs-lilo, Grub, NT Loader ......)

◆ Preparations before installation

Loader2's: http://ipodlinux.org/images/3/31/Loader-2.3.zip

Make-fw: http://ipodlinux.org/images/6/66/Make_fw-linux-i386.tgz Program

Expand loader-2.3.zip to get the loader. binfile.

Obtain apple's original firmware from the first partition:

Dd if =/dev/sdX1 of = orig_firmware.bin

Extract apple OS from firmware:

./Make_fw-o apple_ OS .bin-e 0 orig_firmware.bin

./Make_fw-o apple_sw_5g_rcsc.bin-e 1 orig_firmware.bin

After the extraction is successful, you will find the apple_ OS .bin and apple_sw_5g_rcsc.bin in files in the current directory.

Add loader. bin to the front of apple OS to generate a new boot program:

./Make_fw-g 5g-v-o my_sw.bin-I apple_ OS .bin loader. bin

Write the new boot program to the first partition:

Dd if = my_sw.bin of =/dev/sdX1

At this point, you can see the following menu when you restart the iPod (there is no iPodLinux option at this time ):

◆ Install Linux

Select disk mode. Mount the third partition to a directory such as/media/ipod-1. If you use ubuntu, the disk mode will be automatically mounted.

% Mount/dev/sda3/media/ipod-1

Download the core kernel of the basic system, you can download the version of the cut-off in the http://ipodlinux.org/builds/: 2006-05-30-kernel.bin.gz, gunzip decompressed on/media/ipod-1/below:

% Gunzip 2006-05-30-kernel.bin.gz

% Cp kernel.bin/media/ipod-1/vmlinux

Decompress xvzf to generate directories such as bin, etc, and var:

% Tar xvzf/media/ipod-1/ipod_fs_240206.tar.gz

If there is a problem with the timestamp of some files, just touch it:

Files with incorrect touch-r reference file Timestamp

Now, the basic Linux System of iPod has been installed and uninstalled:

Umount/dev/sda2

After restarting, you can see the iPodLinux option in loader. Then you can see the following Kernel progress bar and startup string.

However, you also need to install podzilla 2 for the graphic interface. Of course, because the iPod hardware is really not flattering, you should not expect it to have a gorgeous X-window interface.

◆ Install Podzila 2

Go to http://www.josh.sys-techs.com/svnbuilds/download the latest podzila2:

Appearance-1262.tar.gz?podzilla2-1261.gz=pzmodules-1261.tar.gz.

Decompress these three files.

The podzilla2-1261.gz file is decompressed and renamed to podzilla, setting executable properties to copy under the/media/ipod-1/bin/directory.

Pzmodules-1261.tar.gz decompress and generate a bunch of folders, put in the/media/ipod-1/usr/lib/directory, I do not know why, my iPod cannot correctly load the MPDc subfolders, I deleted this sub-folder, but it does not seem to have any impact.

Decompress the appearance-1262.tar.gz and generate two folders under the/media/ipod-1/usr/share/directory.

Make sure that the last line of your/media/ipod-1/etc/rc file is podzilla.

Uninstall the iPod, and restart the iPod. You should be able to access podzilla normally. The Settings menu of the initialization process entry and runtime when podzilla2 is started is displayed:

◆ Summary

Now the basic Linux system has been installed. However, there are still many shortcomings: the current version of IPODLINUX is relatively low, and more advanced versions are not available; currently there are few applicable software, although there are many games in IPODLINUX, compared with the original game, the screen and playability are too far different. There is no Chinese software suitable for this model. It is not practical for the time being.

Related Articles]

  • Use uClinux on Windows
  • Kernel structure and development environment of embedded uClinux
  • Mainstream ARM Embedded System Design Technology and instance refinement

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.