grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Reserved first sector for UFS


From: Grégoire Sutre
Subject: Re: Reserved first sector for UFS
Date: Fri, 07 Jan 2011 15:18:52 +0100
User-agent: Mozilla/5.0 (X11; U; NetBSD i386; en-US; rv:1.9.2.11) Gecko/20101130 Lightning/1.0b3pre Lanikai/3.1.5

On 01/07/2011 13:20, Vladimir 'φ-coder/phcoder' Serbinenko wrote:

Do you know of any OS that would put the superblock in sector 0?
I  googled a bit, but I couldn't find examples where UFS would
not start with a boot sector (afaics, it usually starts with a
bootblock area of at least 8KiB -- with OS-specific data in it,
e.g. a disklabel).

According to *BSD http://fxr.watson.org/fxr/source/ufs/ffs/fs.h:

*/"* Depending on the architecture and the media, the superblock may/*
*/* reside in any one of four places. For tiny media where every block /*
*/* counts, it is placed at the very front of the partition. Historically,/*
*/* UFS1 placed it 8K from the front to leave room for the disk label and/*
*/* a small bootstrap. For UFS2 it got moved to 64K from the front to leave/*
*/* room for the disk label and a bigger bootstrap, and for really piggy/*
*/* systems we check at 256K from the front if the first three fail/*"

Interesting.  So, when searching for a UFS superblock, sector 0 is a
candidate (after sectors 128 and 16).  It seems to me that this use of
sector 0 for tiny media does not apply to (recent) NetBSD newfs(8),
though.

If we want to improve the situation, we could let the filesystem driver
dynamically decide whether the first sector is reserved or not.  But
I'm not sure that it's worth it (the first sector of a partition
containing a filesystem is only used for blocklist embedding, right?).

Grégoire



reply via email to

[Prev in Thread] Current Thread [Next in Thread]