[Techtalk] Bad Superblocks
Conor Daly
conor.daly at oceanfree.net
Tue Dec 3 11:45:32 EST 2002
Sent this on Sunday last. Somehow it didn't make it...
Conor
----- Forwarded message from Conor Daly <cdaly at Hobbiton.cod.ie> -----
Date: Sun, 1 Dec 2002 11:38:10 +0000
From: Conor Daly <cdaly at Hobbiton.cod.ie>
To: techtalk at linuxchix.com
Subject: Re: [Techtalk] Bad Superblocks
On Sat, Nov 30, 2002 at 02:13:06PM -0600 or so it is rumoured hereabouts,
Judith Elaine Bush thought:
> On Sat, Nov 30, 2002 at 01:36:37PM +0000, Conor Daly wrote:
> >
> > Can you loop mount the _files_? Though, if you're having trouble mounting
> > the partitions, it's not very likely you'll be able to mount the files
> > either.
> >
> > > is corrupt, and you might try running e2fsck with an alternate superblock:
> > > e2fsck -b 8193
> > ^^^^^^^^^^^^^^
>
> Same error. Are there other positions i might try for a superblock?
>
> I followed the example in the losetup man page; it didn't seem successful.
>
> Thanks for the pointers,
>
> judith
>
>
>
> =====================================================
> # losetup /dev/loop0 /User/blondie/TIA3/roar
> [root at TIA4:/]
> # mkfs -t ext2 /dev/loop0 100
> mke2fs 1.27 (8-Mar-2002)
> Filesystem label=
> OS type: Linux
> Block size=1024 (log=0)
> Fragment size=1024 (log=0)
> 16 inodes, 100 blocks
> 5 blocks (5.00%) reserved for the super user
> First data block=1
> 1 block group
> 8192 blocks per group, 8192 fragments per group
> 16 inodes per group
>
> Writing inode tables: done
> Writing superblocks and filesystem accounting information: done
>
> This filesystem will be automatically checked every 29 mounts or
> 180 days, whichever comes first. Use tune2fs -c or -i to override.
> # ls -l /TIA3-B/part2/
> total 0
>
> # mount -t ext2 /dev/loop0 /TIA3-B/part2/
>
> # df
> Filesystem 1k-blocks Used Available Use% Mounted on
> /dev/hda1 3937220 469992 3267224 13% /
> /dev/hda3 3937252 1723768 2013476 47% /usr
> /dev/hda5 19686804 5917716 12769044 32% /User/cowboy
> /dev/hda6 19686804 5860452 12826308 32% /User/blondie
> /dev/hda7 10879208 677988 9648588 7% /User/share
> /dev/hdd1 1999776 1120960 878816 57% /TIA3-D/part1
> /dev/hdd5 2028098 1370864 552412 72% /TIA3-D/part5
> /dev/hdd6 2028129 984918 938387 52% /TIA3-D/part6
> /dev/loop0 93 13 75 15% /TIA3-B/part2
>
> # ls -l /TIA3-B/part2/
> total 12
> drwx------ 2 root root 12288 Nov 30 11:56 lost+found/
> # ls -l /TIA3-B/part2/lost+found/
> total 0
ARRGGHHH! NOO!
I didn't mean that! I guess I should have detailed it...
What you've done here has wiped the image file by putting a new filesystem
on it. That is correct for the situation where you want to make a _new_
filesystem in a file. Here, however, you already _have_ such an "fs in
file" so you simply want to loop mount _that_. That's just a one-liner:
mount -o loop -t ext2 /User/blondie/TIA3/roar /TIA3-B/part2
should do it. Unfortunately, your image file is now wiped but you _can_
get it back:
dd if=/dev/hdc2 of=/User/blondie/TIA3/roar
was that what you used to create the image file in the first place? I'm
not that confident that you'll be able to loop mount the file if you
weren't able to mount the original partition but it's worth a try.
Sorry I didn't detail the command earlier but I've been using
"mount -o loop" for years now and I'd just assumed people would know...
Conor
--
Conor Daly <conor.daly at oceanfree.net>
Domestic Sysadmin :-)
---------------------
Faenor.cod.ie
11:14am up 25 days, 19:58, 0 users, load average: 0.00, 0.00, 0.00
Hobbiton.cod.ie
11:12am up 25 days, 19:49, 2 users, load average: 0.01, 0.02, 0.00
----- End forwarded message -----
--
Conor Daly <conor.daly at oceanfree.net>
Domestic Sysadmin :-)
---------------------
Faenor.cod.ie
10:46am up 27 days, 19:31, 0 users, load average: 0.16, 0.06, 0.05
Hobbiton.cod.ie
10:44am up 27 days, 19:22, 2 users, load average: 0.04, 0.10, 0.08
More information about the Techtalk
mailing list