以前にiPod miniを256GBにしたのだがSDXCを他のiPodに載せ替えたのでiPod miniは使わなくなってしまった。iPod ClassicにRockboxを入れてFLACを聴くと元のiPodの音には戻れなくなってしまった。そしてiPod miniにもRockboxをインストールしてFLACなどのビットデプス,ビットレートがCD以上のものが再生出来るかを試してみたくなった。
しかしiPod miniが生産終了してから,ずいぶん時間が経っているのでRockboxを簡単にインストールする事ができない。Windows機は持ってないしVMでWindowsを実行してもUSB周りをOS間で取り合いになるし重くなるので他の方法を考えた。
Rockboxインストーラーはデバイスを認識しない(マウントポイントが変更不可)しインストール用のファイルはPPC用で現在のMacでは実行できない。
ソースからコンパイルしてもコンパイル出来る保証もないので,スピーカーを繋いで音楽を聴いているiMac G4を利用することにした。
ここを参考にしながらrockboxのインストールをするのだが最後のrockboot.binを書き込んでもリンゴループで起動しない。
$ ./diskdump -w /dev/disk2 rockboot.bin
diskdump v0.1 - (C) Dave Chapman 2005
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] Reading partition table...
Part Type Start Sector End Sector Size (MB)
0 0x00 63 80324 39
1 0x0b 80325 7984304 3859
[INFO] Seeking to sector 63
[WARN] Seek error - reading 63 sectors instead
[INFO] Writing input file to device
[INFO] Wrote 3470604 bytes.
そこでマスターブートレコードを書き込みFAT32(MSDOS)でパーティションを切ったあとで
$ ./ipodpatcher
ipodpatcher 5.0 with v4.0 bootloaders (v1.0 for 2nd Gen Nano)
(C) Dave Chapman 2006-2009
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] Read XML info (2454 bytes)
[INFO] Ipod found - 2nd Generation Mini ("winpod") - /dev/disk2
[INFO] Reading partition table from /dev/disk2
[INFO] Sector size is 512 bytes
[INFO] Part Start Sector End Sector Size (MB) Type
[INFO] 0 63 80324 39.2 Empty (0x00)
[INFO] 1 80325 7984304 3859.4 W95 FAT32 (0x0b)
[INFO] Read XML info (2454 bytes)
[INFO] Ipod model: 2nd Generation Mini ("winpod")
Enter i to install the Rockbox bootloader, u to uninstall
or c to cancel and do nothing (i/u/c) :i
[INFO] [INFO] Using internal bootloader - 49412 bytes
[INFO] Moving images to create room for new firmware...
[INFO] Reading original firmware...
[INFO] Wrote 3452928 bytes to firmware partition
[INFO] Bootloader installed successfully.
Press ENTER to exit ipodpatcher :
これでブートローダーがインストール出来るが4GBのファームウエアなので64GBのSDXCを入れていても4GBしか使えない。これは困るがMacOSではpartedが使えないのでDebianで..
$parted
GNU Parted 3.2
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
Model: Apple iPod (scsi)
Disk /dev/sda: 64.1GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
2 41.1MB 4088MB 4047MB primary fat32
(parted) unit s
(parted) print
Model: Apple iPod (scsi)
Disk /dev/sda: 125171711s
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
2 80325s 7984304s 7903980s primary fat32
(parted) resizepart 2 100%
(parted) print
Model: Apple iPod (scsi)
Disk /dev/sda: 125171711s
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
2 80325s 125171710s 125091386s primary fat32
(parted) quit
Information: You may need to update /etc/fstab.
$parted
GNU Parted 3.2
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) p
Model: Apple iPod (scsi)
Disk /dev/sda: 64.1GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
2 41.1MB 64.1GB 64.0GB primary fat32
(parted) q
パーティションが広がったようだ,続いてファイルシステムをFAT32へ変更する。
$fdisk /dev/sda
Welcome to fdisk (util-linux 2.29.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Command (m for help): p
Disk /dev/sda: 59.7 GiB, 64087916032 bytes, 125171711 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x20202020
Device Boot Start End Sectors Size Id Type
/dev/sda1 63 80324 80262 39.2M 0 Empty
/dev/sda2 80325 125171710 125091386 59.7G b W95 FAT32
Command (m for help): d
Partition number (1,2, default 2): 2
Partition 2 has been deleted.
Command (m for help): n
Partition type
p primary (1 primary, 0 extended, 3 free)
e extended (container for logical partitions)
Select (default p):
Using default response p.
Partition number (2-4, default 2):
First sector (80325-125171710, default 81920):
Last sector, +sectors or +size{K,M,G,T,P} (81920-125171710, default 125171710):
Created a new partition 2 of type 'Linux' and of size 59.7 GiB.
Command (m for help): p
Disk /dev/sda: 59.7 GiB, 64087916032 bytes, 125171711 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x20202020
Device Boot Start End Sectors Size Id Type
/dev/sda1 63 80324 80262 39.2M 0 Empty
/dev/sda2 81920 125171710 125089791 59.7G 83 Linux
Command (m for help): l
0 Empty 24 NEC DOS 81 Minix / old Lin bf Solaris
1 FAT12 27 Hidden NTFS Win 82 Linux swap / So c1 DRDOS/sec (FAT-
2 XENIX root 39 Plan 9 83 Linux c4 DRDOS/sec (FAT-
3 XENIX usr 3c PartitionMagic 84 OS/2 hidden or c6 DRDOS/sec (FAT-
4 FAT16 <32M 40 Venix 80286 85 Linux extended c7 Syrinx
5 Extended 41 PPC PReP Boot 86 NTFS volume set da Non-FS data
6 FAT16 42 SFS 87 NTFS volume set db CP/M / CTOS / .
7 HPFS/NTFS/exFAT 4d QNX4.x 88 Linux plaintext de Dell Utility
8 AIX 4e QNX4.x 2nd part 8e Linux LVM df BootIt
9 AIX bootable 4f QNX4.x 3rd part 93 Amoeba e1 DOS access
a OS/2 Boot Manag 50 OnTrack DM 94 Amoeba BBT e3 DOS R/O
b W95 FAT32 51 OnTrack DM6 Aux 9f BSD/OS e4 SpeedStor
c W95 FAT32 (LBA) 52 CP/M a0 IBM Thinkpad hi ea Rufus alignment
e W95 FAT16 (LBA) 53 OnTrack DM6 Aux a5 FreeBSD eb BeOS fs
f W95 Ext'd (LBA) 54 OnTrackDM6 a6 OpenBSD ee GPT
10 OPUS 55 EZ-Drive a7 NeXTSTEP ef EFI (FAT-12/16/
11 Hidden FAT12 56 Golden Bow a8 Darwin UFS f0 Linux/PA-RISC b
12 Compaq diagnost 5c Priam Edisk a9 NetBSD f1 SpeedStor
14 Hidden FAT16 <3 61 SpeedStor ab Darwin boot f4 SpeedStor
16 Hidden FAT16 63 GNU HURD or Sys af HFS / HFS+ f2 DOS secondary
17 Hidden HPFS/NTF 64 Novell Netware b7 BSDI fs fb VMware VMFS
18 AST SmartSleep 65 Novell Netware b8 BSDI swap fc VMware VMKCORE
1b Hidden W95 FAT3 70 DiskSecure Mult bb Boot Wizard hid fd Linux raid auto
1c Hidden W95 FAT3 75 PC/IX bc Acronis FAT32 L fe LANstep
1e Hidden W95 FAT1 80 Old Minix be Solaris boot ff BBT
Command (m for help): t
Partition number (1,2, default 2):
Partition type (type L to list all types): b
Changed type of partition 'Linux' to 'W95 FAT32'.
Command (m for help): p
Disk /dev/sda: 59.7 GiB, 64087916032 bytes, 125171711 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x20202020
Device Boot Start End Sectors Size Id Type
/dev/sda1 63 80324 80262 39.2M 0 Empty
/dev/sda2 81920 125171710 125089791 59.7G b W95 FAT32
Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.
$fsck -f /dev/sda2
fsck from util-linux 2.29.2
fsck.fat 4.1 (2017-01-24)
/dev/sda2: 36 files, 6058/986067 clusters
しかし
resize2fs /dev/sda2 size
resize2fs 1.43.4 (31-Jan-2017)
resize2fs: Bad magic number in super-block while trying to open /dev/sda2
Couldn't find valid filesystem superblock.
なので
$mkfs.msdos /dev/sda2
mkfs.fat 4.1 (2017-01-24)
iMac G4はOSXを入れてすごく重いので,ターミナルを開いても遅いしレインボーカーソルが回って作業が進まない。しかしこんな思いをするのであればWindows機でサクッとインストールしたほうがいい。
あとで検索したらYouTubeで似たようなことをしていた。
ディスクモード(DFU)への入り方は起動してリンゴマークが出たらセレクトと再生/一時停止ボタンを軽く何回か押す。