Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!snorkelwacker!bloom-beacon!athena.mit.edu!jik From: jik@athena.mit.edu (Jonathan I. Kamens) Newsgroups: comp.unix.wizards Subject: Re: Super Block Message-ID: <1990Jul27.145023.17424@athena.mit.edu> Date: 27 Jul 90 14:50:23 GMT References: <6911@helios.TAMU.EDU> Sender: daemon@athena.mit.edu (Mr Background) Reply-To: jik@athena.mit.edu (Jonathan I. Kamens) Distribution: usa Organization: Massachusetts Institute of Technology Lines: 34 In article <6911@helios.TAMU.EDU>, peram@cs.tamu.edu (Suresh B Peram) writes: |> I want to know where I can find the Super Block. |> Is the super block present on the disk ? If yes, |> where does it start from ? It depends on the filesystem. On Berkeley filesystems, I believe that the first super block is in block eight of the disk, and, to quote from the fsck(8) man page, "Block 32 is always an alternate super block." Also, you should be able to use "newfs -N filesystem-name" to find out where newfs would place the super blocks when creating the filesystem again; if you created the filesystem originally with newfs in a reasonably standard manner, that should tell where other super blocks are. For example: % /etc/newfs -N hd0a Warning: inode blocks/cyl group (27) >= data blocks (15) in last cylinder group. This implies 244 sector(s) cannot be allocated. /dev/rhd0a: 15680 sectors in 64 cylinders of 7 tracks, 35 sectors 8.0Mb in 4 cyl groups (16 c/g, 2.01Mb/g, 704 i/g) super-block backups (for fsck -b#) at: 32, 4000, 7968, 11936, If you're concerned about doing something bad accidentally with newfs and screwing up the disk, then temporarily make newfs setgid to whatever group owns your disks, and make the disks group-readable but not group-writeable, and then run the newfs commands as someone other than root. If newfs doesn't have the access, it can't clobber the disks.... Jonathan Kamens USnail: MIT Project Athena 11 Ashford Terrace jik@Athena.MIT.EDU Allston, MA 02134 Office: 617-253-8495 Home: 617-782-0710