Here's a patch for aboot-0.9b_3 to add support for XFS. Files are adapted from GRUB, so carry the GPL license.
It should be possible to port Reiserfs or JFS in the same way, I just happen to prefer XFS for my own systems.
There's no equivalent for e2writeboot, you'll have to keep the first MB or so of disk unpartitioned and use swriteboot.

I've used essentially the same diff against aboot-0.9b_2 for at least 6 months without any problems.
I had hoped that support would be merged upstream and appear in Debian automatically.
Here's the last I heard from the upstream maintainer:

On Jul 22, 2004, at 11:18 AM, Jan-Jaap van der Heijden wrote:

Here's my patch to add XFS support to aboot.

I have tested it on Debian "testing" with kernel 2.4.26

The patch contains the xfs.[c|h] files that do the actual work, and some minor changes to disk.c to teach aboot about xfs and to make fs_mount() try *all* fs's for which the partition ID matches instead of failing if the first one doesn't work. This makes it possible to put XFS on partitions marked "ext2" in fdisk.

Very cool! You said you adapted this code from GRUB, correct? I tried to do that briefly a couple of years ago but had problems with the memory layout... If this is what you did, would it be possible to port the other GRUB filesystem modules as well?

There's some warnings in the code like these:

fs/xfs.c: In function `next_dentry':
fs/xfs.c:439: warning: dereferencing type-punned pointer will break strict-aliasing rules
fs/xfs.c:439: warning: dereferencing type-punned pointer will break strict-aliasing rules
fs/xfs.c:439: warning: dereferencing type-punned pointer will break strict-aliasing rules
fs/xfs.c:439: warning: dereferencing type-punned pointer will break strict-aliasing rules
[...]

They are because a single buffer is being reused for reading and I changed it to long* from char* to prevent unaligned access errors. Do you have an idea how to get rid of these warnings, short of rewriting the whole code?

off the top of my head, no, but I'll definitely tinker with it and see if I can fix them.

I'll test this out when I get a chance and send it around to some other folks to look at and play with. This is really cool stuff, thanks very much!

-will

--

Jan-Jaap van der Heijden, Software Engineer

PO Box 545, 7500 AM, Enschede, The Netherlands
TEL +31 53 4836460, http://www.phoenixbv.com/


Attachment: aboot-xfs.diff.gz
Description: application/gzip

Reply via email to