SUMMARY[3]: Unable to boot from a Ultrix CD

From: Dr. Otto Titze, Kernphysik TUD, +49 6151 162916 <titze_at_ikp.tu-darmstadt.de>
Date: Tue, 09 Feb 1999 17:03:14 +0100 (CET)

Part of my summary[2] was:

>Afterwards I tried to find out more about the Superblock, Magic number
>etc. just to learn what I did but was not yet successful. Also I liked
>to find out reasons why in a running system only the superblock get
>bad(update?). May be in the rest of my life I will find out how to learn
>fast more internal things about Unix. Maybe from my VMS background I am
>too demanding.

I want to thank for additional information afterwards
alan_at_nabeth.cxo.dec.com (Alan Rollow)
Dr. Tom Blinn <tpb_at_doctor.zk3.dec.com>
Reg Beardsley rhb_at_acm.org

Thanks to everybody

Regards

Otto


Because I find the information quite helpful I include it here
if someone else is interested too.


From: MX%"alan_at_nabeth.cxo.dec.com" 9-FEB-1999 09:11:53.99

The original UNIX file system had a very simple structure:

1. A few blocks at the beginning of the disk that contained
    static data structures and the disk address of where the
    data structures started. This was the superblock.

2. A set of blocks that contained the inodes (file headers).

3. Free space.

When Berkeley developed the Fast File System, they expanded
this simple structure by replicating across the disk. Some
number of disks cylinders were setup as mini file system.
This set of cylinder was called a cylinder group and had a
copy of the superblock, which now was nearly all static,
a cylinder group block for dynamic information (bit maps,
etc), inodes and free space.

When a new file was created the cylinder group with more than
the average amount of space was selected. Files would prefer
to be created in the cylinder group of their parent directory.
Space used by large files was limited so that a single file
wouldn't dominate all the space in the group. For an inter-
active work-load this worked very well.

The first cylinder group was slightly different having an
extra superblock and the boot blocks in case it held a
root file system. All the remaining superblocks were backup
copies, with the standard first backup being a LBN 32.
The placement of the superblocks was staggered to prevent
them from being all on a single surface.

An UNIX internals book that is particular to Berkeley UNIX
will probably have a chapter on the file system organization.
I know the 4.3BSD book does.


From: MX%"tpb_at_doctor.zk3.dec.com" 9-FEB-1999 14:24:06.79

To learn more about magic numbers, start with the "magic" reference page.

Certain files have known patterns of data embedded in them, which can be used
to provide a "sanity check" on the file contents. The "file" command (which
also has a reference page) uses a file called "/etc/magic" to identify certain
files on the system as being of certain formats.

The "fsck" utility knows that in a valid UFS file system (which is all that it
can manipulate), there is a special pattern of data in the special disk block
called the "superblock" which can be used as part of the check to make sure
the disk partition contains a valid file system. Your disk failed the test.

If the disk label gets corrupted, then you might not be able to find the start
of a file system. That would lead to a failed superblock check, in most cases
but it isn't the only thing that gets checked.

There are backup copies of most of the file system metadata for a UFS file
system in other places on the disk, and as long as they don't all wind up in a
corrupted state, you can usually recover the file system by copying a valid
set of data to replace the invalid data. But it's not something people have
to do every day (at least, not since disks became much more reliable, with ECC
checking and self-correcting redundant data storage).

Tom
 
 Dr. Thomas P. Blinn + UNIX Software Group + Compaq Computer Corporation
  110 Spit Brook Road, MS ZKO3-2/U20 Nashua, New Hampshire 03062-2698
   Technology Partnership Engineering Phone: (603) 884-0646
    Internet: tpb_at_zk3.dec.com Digital's Easynet: alpha::tpb
     ACM Member: tpblinn_at_acm.org PC_at_Home: tom_at_felines.mv.net




From: MX%"esci_at_fastlane.net" 9-FEB-1999 15:08:19.01

If you want to learn more about Unix internals, read one or more
of the following:

The Design & Implementation of the 4.3 BSD Operating System
Lefler, McKusick et al

The Design & Implementation of the 4.4 BSD Operating System
McKusick, Bostic et al

The Design of the Unix Oeprating System
Bach

Operating Systems: Design & Implementation
Tannenbaum

The Magic Garden Explained
Goodheart & Cox

There are others as well, but I'm getting tired ;-) Ultrix is a 4.3
derivative and DU uses the 4.2 BSD filesystem. Tannenbaum is the
best overall presentation, especially if you've not read much on
OS internals lately, as it's a CS textbook. The others are more in the
vein of the VMS internals book, really intended as professional
references and presume you already know everything and merely want to
look up some detail.

Have fun!


Reg Beardsley
rhb_at_acm.org

 -------------------------------------------------------------------------
| Dr. Otto Titze, Kernphysik TU, Schlossgartenstr. 9, D-64289 Darmstadt |
| titze_at_ikp.tu-darmstadt.de Tel: +49(6151)16-2916,FAX:16-4321|
 -------------------------------------------------------------------------
Received on Tue Feb 09 1999 - 16:05:13 NZDT

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:39 NZDT