You are not logged in.

#1 2007-02-16 12:06:17

jofa
Member
Registered: 2006-10-27
Posts: 32

iPod with HFS+ filesystem

I have an Mac formatted iPod (HFS+ filesystem). When I first installed Arch linux, I got the iPod working after switching to the the Beyond kernel. But now, a few month later it doesn't work anymore. This is the output of dmesg after connecting the iPod:

scsi 3:0:0:0: Direct-Access-RBC Apple    iPod             1.53 PQ: 0 ANSI: 2
SCSI device sdb: 78126048 512-byte hdwr sectors (40001 MB)
sdb: test WP failed, assume Write Enabled
SCSI device sdb: write cache: disabled, read cache: enabled, doesn't support DPO or FUA
SCSI device sdb: 78126048 512-byte hdwr sectors (40001 MB)
sdb: test WP failed, assume Write Enabled
SCSI device sdb: write cache: disabled, read cache: enabled, doesn't support DPO or FUA
 sdb: unknown partition table
sd 3:0:0:0: Attached scsi removable disk sdb

As I understand it the kernel can't read the partition table on the iPod, and therefore I cannot mount any of the partitions on it. I can see the hfsplus module loaded with the lsmod command. If there is a configuration in the linux kernel for mac style partitions, why has that option been disabled?

I have tried switching between kernel26 and kernel26-beyond several times after upgrades availiable via pacman, but still no go. I guess I could learn to compile my own kernel, but as I don't understand the ABS-howtos on the Arch Wiki, I'd rather not. Please help me...

Edit: Added solved to the topic as I have gotten my iPod to mount again (see below), but I still would like to know if I understand how to work with a custom kernel config and ABS.

Edit: removed Solved from topic as I do not yet understand how this should be done.

Last edited by jofa (2007-02-23 16:23:16)

Offline

#2 2007-02-16 23:01:30

mutlu_inek
Member
From: all over the place
Registered: 2006-11-18
Posts: 683

Re: iPod with HFS+ filesystem

You need HFS+ and mac style partitions activated in your kernel.

$ less .config | grep -i -n hpf
3080:# CONFIG_HPFS_FS is not set
$ less .config | grep -i -n config_partition
3134:# CONFIG_PARTITION_ADVANCED is not set

As you see, this is not the case. You need to change the settings and recompile your kernel.

Offline

#3 2007-02-17 10:11:58

jofa
Member
Registered: 2006-10-27
Posts: 32

Re: iPod with HFS+ filesystem

Thanks mutlu_inek,

but as I don't understand the ABS-howtos on the Arch Wiki, I'd rather not. Please help me...

Could you please tell me the easy way ( or at least a few steps to help me get started) to reconfigure and compile the the kernel with these options enabled? I'm sorry, but if you redirect me to the ABS HowTo on the Arch Wiki, i'll go hide under my bed until Ubuntu has finished installing... yikes

Offline

#4 2007-02-17 17:11:42

mutlu_inek
Member
From: all over the place
Registered: 2006-11-18
Posts: 683

Re: iPod with HFS+ filesystem

Well, the ABS way is preferred, because pacman will manage the kernels like any other packages. I.e. upgrading, removing, etc. will work flawlessly and you will not have crap floating around on your harddisk. It seems (and maybe is?) a quite huge task if you do not even know how PKGBUILDs work.

You can, of course, also use the standard makeconfig way of compiling kernels like used in most other distributions. It way seem much easier for you if you did that before, meybe even if it is your first time. The only downside is that you will have to replace/delete the kernels by hand (which is rather easy). See this wiki: http://wiki.archlinux.org/index.php/Ker … rom_Source

If you do not feel fit to compile a kernel, well, you should do it anyway. Learning how to compile a kernel is one of those things that seem quite difficult in the beginning, but are not. This is especially true if you alredy have a working config as is the case. This means that you only change some values.

However, an alternative could be to format you iPod to FAT instead of HPFS. There are several guides online. I have done it myself and I can say it works. However, here, too you should read the instructions carefully and of course noone will take responsibility if you mess up you iPod.
See e.g. http://pag.csail.mit.edu/~adonovan/hacks/ipod.html

Good luck.

Offline

#5 2007-02-19 01:25:23

jofa
Member
Registered: 2006-10-27
Posts: 32

Re: iPod with HFS+ filesystem

I've given the ABS way a try, and are actually compiling a new kernel as i write. Just need to know if the way I did it is somewhat close to a correct approach:

1. Type "abs" as root to download a copy of the "ABS Tree"

2. Copy /var/abs/kernels/kernel26 to /var/abs/local/kernel26

3. Modify /var/abs/local/kernel26/config:

CONFIG_PARTITION_ADVANCED=y
CONFIG_MAC_PARTITION=y

4. Run makepkg -g and enter the resulting MD5-sums in /var/abs/local/kernel26/PKGBUILD

5. makepkg (watch a compile for half an hour) and  pacman -U kernel26-2.6.20-4.pkg.tar.gz

6. big_smile

Does this mean I will get updated kernels automagically from pacman -Syu in the future with these config options enabled?

Offline

#6 2007-02-22 19:44:55

jofa
Member
Registered: 2006-10-27
Posts: 32

Re: iPod with HFS+ filesystem

Back to square one, almost. I guess pacman has replaced my custom kernel with the standard one, so i get "unknown partition table" again when plugging in the iPod. hmm

Should I add something to the PKGBUILD so that my custom kernel gets different filenames after install, so that it won't be overwritten after a few "pacman -Syu"s, or should I uninstall the standard kernel with pacman, and then install my custom kernel?

Please help me. The PKGBUILD examples for custom kernels in the Arch Wiki are totally different from the /var/abs/kernels/kernel26/PKGBUILD i get from ABS. What do EXTRAVERSION, LOCALVERSION etc. mean and how do I use them?

Offline

#7 2007-02-22 23:20:55

mutlu_inek
Member
From: all over the place
Registered: 2006-11-18
Posts: 683

Re: iPod with HFS+ filesystem

jofa wrote:

Should I add something to the PKGBUILD so that my custom kernel gets different filenames after install, so that it won't be overwritten after a few "pacman -Syu"s

That is the correct way.

If you take a look at the wiki page on building kernels with the ABS, you will read this:

_cfgname:

This optional field will be part of the package name. It should briefly indicate what type of choices were made in the kernel config. Examples would be "sn45g" to indicate the config is customized for a particular kind of computer, or "test" to indicate you are testing a different configuration, or "nofb" if you disabled the framebuffer. It is strongly recommended that you leave this blank ("") to indicate a stock Arch kernel config. You could also use this filed to indicate architechure restrictions of the kernel from makepkg.conf compile options - "athlon" perhaps for an athlon specific build.

And

Results

Package Name:
The name of this package will be a combination of the pkgbase, patchset, and _cfgname separated by hyphens.

Package Version:
The version of this package will be a combination of the kerver, extraver separated by underscores and the pkgbuil will be appended on the end separated by a hyphen.

Package File:
The package filename will be: kernel-$patchset-$cfgname-$kerver$_extraver-$pkgrel.pkg.tar.gz

/boot Files:
vmlinuz-$kerver-$extraver-$patchset-$cfgname
System.map-$kerver-$extraver-$patchset-$cfgname
kconfig-$kerver-$extraver-$patchset-$cfgname

Modules:
Modules will be placed in /lib/modules/$kerver-$extraver-$patchset-$cfgname

Source:
The kernel source directory will be copied to /usr/src/linux-$kerver-$extraver-$patchset-$cfgname Note: /usr/src/linux will be mapped to this directory upon installation.

http://wiki.archlinux.org/index.php/Ker … n_with_ABS

Last edited by mutlu_inek (2007-02-22 23:22:54)

Offline

#8 2007-02-23 15:33:36

jofa
Member
Registered: 2006-10-27
Posts: 32

Re: iPod with HFS+ filesystem

All I would like is a stock Arch kernel + the option CONFIG_MAC_PARTITION=y. It would really help a slow nub like me to have a numbered list (a "tank" method) with all the steps needed to perform this "easy" task, or would that list be too long? I know the gentoo wiki has a step by step tutorial I could follow to complete a similar task, but I can't figure out where to start by reading the Arch Wiki. Here are a few questions that would help if I got answered:

Should I

a) run the command abs and then copy the /var/abs/kernels/kernel26 directory to /var/abs/local/kernel26 and modify the PKGBUILD file already found there and add my custom _cfgname (that would keep the stock Arch kernel config and patches, but would the script recognize the _cfgname variable?),

or

b) should I create my own directory in /var/abs/local/kernelX and copy the Kernel Prototype PKGBUILD from the Arch wiki and modify it to my liking. But that wouldn't keep the stock kernel config and patches, would it?

I'm sorry for being such a pain hmm

Offline

#9 2007-02-25 09:07:55

jofa
Member
Registered: 2006-10-27
Posts: 32

Re: iPod with HFS+ filesystem

Nobody knows or am I too off track to be helped back? yikes

Offline

#10 2007-02-25 19:12:18

mutlu_inek
Member
From: all over the place
Registered: 2006-11-18
Posts: 683

Re: iPod with HFS+ filesystem

The ABS script will not read you /var/abs/local. A kernel PKGBUILD put into /var/abs/local/kernelX will not be compiled automatically when a new kernel version is available. If you follow what I advised above, you will have a custom kernel calles something like kernel26-ipod that you add (I assume as the default kernel) to your /boot/grub/menu.lst (or something similar if you use lilo). This means it will be a different kernel that exists parallelly to the Arch vanilla kernel. An update of the Arch vanilla kernel will have no effect on your custom kernel. What you will have to do is to update the version number (or possibly more) in your custom kernel's PKGBUILD and recompile it to get up to date.

Copying the PKGBUILD from /var/abs/kernels/kernel26 to /var/abs/local/kernel26-ipod (or whatever) will obviously have the advantage that you get all the patches you might want to have.

I would recommend that you write a short command using the command sed (or something similar you might prefer) that searches for the variables you would like to modify in your kernel config and replaces the value assigned to them. For example:

sed -i 's|CONFIG_PARTITION_ADVANCED=n|CONFIG_PARTITION_ADVANCED=y|' /var/abs/local/kernel26-ipod/config
sed -i 's|CONFIG_MAC_PARTITION=n|CONFIG_MAC_PARTITION=y|' /var/abs/local/kernel26-ipod/config

This (you may have to modify this, it was from the top of my head) you add to the appropriate place (before the make commands) to your freshly copied PKGBUILD.
Whenever a new kernel version comes through with pacman -Sy, just copy the abs directory to abs/local, put those lines into the PKGBUILD, and compile.

Last edited by mutlu_inek (2007-02-25 19:16:21)

Offline

Board footer

Powered by FluxBB