[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Writing to superblock?
From: |
Niels Böhm |
Subject: |
Re: Writing to superblock? |
Date: |
Sat, 21 Feb 2009 06:31:25 +0100 |
User-agent: |
KMail/1.9.9 |
On Friday 20 February 2009, BandiPat wrote:
>
> Anyway, the writer of the script ask me a question I have not been able
> to find anything about, so I thought I would come straight to you guys!
> I already know that Grub2 will work with XFS and will write to the
> MBR, but he is asking about Superblocks also when using XFS. Will it?
If I understand you correctly, you talk about writing GRUB to a root sector of
a partition that contains a XFS filesystem (which happens to coincide with
the start of the superblock of XFS' first allocation group), right?
I mean the traditional way to execute raw boot code from a partition is to
chainload its first sector and jump to its first byte, which means there has
to be boot code at this place or at the very least a jump instruction that
points to the real boot code.
But I don't think this is possible with XFS since it has its magic number in
the first 4 bytes. It looks like this:
00000000 58 46 53 42 00 00 10 00 00 00 00 00 00 20 00 00 |XFSB......... ..|
00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000020 19 c5 80 51 80 34 4a c9 b6 aa c5 44 0b 16 c7 7b |...Q.4J....D...{|
etc.
For this, also have a peek at
http://xfs.org/index.php/XFS_FAQ#Q:_Does_LILO_work_with_XFS.3F
The alternative would be to find another unused cave with stable location in
XFS' metadata, although I doubt there is one. But you may want to check more
deeply at http://oss.sgi.com/projects/xfs/papers/xfs_filesystem_structure.pdf
Regards,
Niels Böhm