On Saturday 05 March 2005 06:18, Brian Foster wrote:
> not exactly an alternative superblock, but close:
> a trick which saved me many times yonks ago back
> the volatile superblocks days was similar to:
>> mkfs /tmp/file original_size
> dd if=/tmp/file of=/dev/dead_fs count=1
> fsck /dev/dead_fs
>> which (re-)constructed the original superblock,
> installed it over the corrupted superblock, and
> then tried to patch things up.
Thanks very much for this suggestion,
which seems intriguing.
But I'm not entirely clear what you are doing..
What exactly is original_size?
What will tmpfile contain? And what size will it be?
"man mkfs" on my system (Fedora-3) only suggested the above usage
when /tmp/file was the mount-point for a file system.
Incidentally, is the superblock the first block?
I looked at the filesystems on my laptop with od,
and they all had 02000 (octal) 0's at the start.
The following block looked as though it might be a superblock.
The version on the bad file-system differed slightly
from the other file-systems, all 10 of which seem OK,
according to fsck.
It looked as though a magic number might be wrong.
e-mail (<80k only): tim /at/ birdsnest.maths.tcd.ie
tel: +353-86-2336090, +353-1-2842366
s-mail: School of Mathematics, Trinity College, Dublin 2, Ireland
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!