Subject: Re: Hard errors in hd (use badsect)
To: None <>
From: Phil Knaack <>
List: port-i386
Date: 08/29/1996 11:42:14
I wrote:
>> >> 	This is a problem because I believe some recent change (can't
>> >> remember if its before or after 1.1) in the kernel disallows simultaneous
>> >> access to a mounted filesystem and the raw device that its mounted from. wrote:
>> >Should be OK in single user mode or with "options INSECURE" in kernel.

I wrote:
>> 	I have INSECURE in all my kernels. True, I do raise securelevel
>> to 2 at boottime, however, even in single-user, securelevel == -1, it
>> won't work. If the filesystem is mounted, no dice. wrote:
>Hmm, what is the error message ?

	/dev/wd1e: device busy

>Aren't you trying to use block device ?

Hey, you're right! I don't know why this didn't occur to me.

This fix below makes it work; I'll send-pr it.

*** /local/disk1/src/sbin/badsect/badsect.c     Fri Oct 13 20:08:15 1995
--- badsect.c   Thu Aug 29 11:37:03 1996
*** 125,130 ****
--- 125,132 ----
+       name[5] = 'r';
+       strcpy(&name[6], dp->d_name);
        if (dp == NULL) {
                printf("Cannot find dev 0%o corresponding to %s\n",

Phillip F Knaack
Database Programmer, Information Development for Extension Audiences (IDEA)
Iowa State University Extension