All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Niels Böhm" <bitbucket@arcor.de>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: Writing to superblock?
Date: Sat, 21 Feb 2009 06:31:25 +0100	[thread overview]
Message-ID: <200902210631.26175.bitbucket@arcor.de> (raw)
In-Reply-To: <499F04F2.7040302@earthlink.net>

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



  reply	other threads:[~2009-02-21  5:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-20 19:30 Writing to superblock? BandiPat
2009-02-21  5:31 ` Niels Böhm [this message]
2009-02-21 14:02 ` Robert Millan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200902210631.26175.bitbucket@arcor.de \
    --to=bitbucket@arcor.de \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.