Subject: Re: disk translation issues, "CANNOT READ: BLK 16386"
To: Jamie Heilman <jamie@audible.transient.net>
From: None <rthille@gte.net>
List: port-cobalt
Date: 06/25/2001 21:21:57
You wrote:
> > Other relevant info: I'm currently bringing this disk to life on a
> > qube2 with the 1.5 generic kernel, I'll transfer it over to the raq1
> > tonight and try some things using the 1.5 generic-dma kernel to see if
> > the problem persists or gets worse (as I suspect it may).
>
> Once the kernel is switched 1.5-generic-nodma (ignore my typo above) and
> placed on my raq1 not only do I get the same CANNOT READ: BLK 16386
> error but when I run fdisk wd0 it panics. This is, if nothing else,
I was having trouble similar to this when I had a screwed up disklabel.
Here's a message I sent earlier that details my troubles and solution:
If that doesn't help, mail me more info about your disklabel -r wd0
output and your fdisk output.
Robert
Begin forwarded message:
Content-Disposition: inline
From: rthille@gte.net
Date: Tue, 22 May 2001 22:36:38 -0700
To: NetBSD-Cobalt <port-cobalt@netbsd.org>
Subject: For the FAQ: Making a new ext2fs filesystem on NetBSD-Cobalt
Reply-To: rthille@gte.net
Sender: port-cobalt-owner@netbsd.org
I found the e2fsprogs package (e2fsprogs-1.19.tar.gz) for linux and
built it (with one change, it was looking for the 'umount' system call,
and I had to change it to 'unmount' in journal.c).
If mke2fs runs pretty much without error, but it warns at the end about
not being able to write 'superblocks.done', that means that your disklabel
isn't setup quite right...
Here's an unsuccessful run:
bsdqube# /usr/local/sbin/mke2fs -L "Linux Root" -v /dev/wd0e
mke2fs 1.19, 13-Jul-2000 for EXT2 FS 0.5b, 95/08/09
Filesystem label=Linux Root
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
16384 inodes, 65519 blocks
3275 blocks (5.00%) reserved for the super user
First data block=1
8 block groups
8192 blocks per group, 8192 fragments per group
2048 inodes per group
Superblock backups stored on blocks:
8193, 24577, 40961, 57345
Writing inode tables: done
Writing superblocks and filesystem accounting information:
Warning, had trouble writing out superblocks.done
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The disk would mount, but the filesystem was bad:
bsdqube# mount_ext2fs /dev/wd0e /mnt
bsdqube# cd mnt
mnt: Not a directory.
bsdqube# cd /mnt
/mnt: Not a directory.
fsck_ext2fs would also complain:
bsdqube# fsck_ext2fs /dev/wd0e
** /dev/rwd0e
** Phase 1 - Check Blocks and Sizes
CANNOT READ: BLK 131084
CONTINUE? [yn] y
Note that the block it cannot read should be outside of the filesystem,
but fsck_ext2fs is still trying to read it, and if you answer 'y' to it's
questions, you'll see it continues to attempt to read blocks outside of
the filesystem.
Here's the disklabel that resulted in that error:
5 partitions:
# size offset fstype [fsize bsize cpg]
a: 33306730 394128 4.2BSD 1024 8192 16 # (Cyl. 391 - 33433*)
b: 263088 131040 swap # (Cyl. 130 - 390)
c: 33700864 0 unused 0 0 # (Cyl. 0 - 33433*)
e: 131039 1 Linux Ext2 0 0 # (Cyl. 0*- 129)
Note that there is no partition 'd' (which corresponds to the whole disk
under NetBSD), and that partition 'c' is the size of the whole disk. I
now believe that partition 'c' should just match the 'a' partition (the
only 4.2BSD partition), and/or partition 'd' must be present (not sure
which, since I changed both at the same time and it started working after
that.
Here's the new, _working_ disklabel:
5 partitions:
# size offset fstype [fsize bsize cpg]
a: 33306730 394128 4.2BSD 1024 8192 16 # (Cyl. 391 - 33433*)
b: 263088 131040 swap # (Cyl. 130 - 390)
c: 33306730 394128 unused 0 0 # (Cyl. 391 - 33433*)
d: 33700864 0 unused 0 0 # (Cyl. 0 - 33433*)
e: 131039 1 Linux Ext2 0 0 # (Cyl. 0*- 129)
The successful run of mke2fs:
bsdqube# /usr/local/sbin/mke2fs -L "linux boot" -v /dev/wd0e
mke2fs 1.19, 13-Jul-2000 for EXT2 FS 0.5b, 95/08/09
Filesystem label=linux boot
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
16384 inodes, 65519 blocks
3275 blocks (5.00%) reserved for the super user
First data block=1
8 block groups
8192 blocks per group, 8192 fragments per group
2048 inodes per group
Superblock backups stored on blocks:
8193, 24577, 40961, 57345
Writing inode tables: done
Writing superblocks and filesystem accounting information: done
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
A successful fsck_ext2fs:
bsdqube# fsck_ext2fs /dev/wd0e
** /dev/rwd0e
** File system is clean; not checking
And a successful mount and cd into the directory:
bsdqube# mount -t ext2fs /dev/wd0e /mnt
bsdqube# cd /mnt
Robert
--
Robert Thille N-34*26.064' W-119*48.352' Santa Barbara CA 93111-2533
rthille@earthling.net <http://home1.gte.net/rthille/HomePage.htmld
Cyclist, Mtn. Biker, Diver, Kayaker, Climber, Hiker, Programmer, Geek