Subject: Lost targert files until reboot
To: None <tech-kern@NetBSD.ORG>
From: brian <bwildasi@csulb.edu>
List: tech-kern
Date: 07/02/1997 21:15:21
Hi!
it was suggested to me to recompile a kernel to solve this problem. is
that the way to go?

>Lost target files until reboot
>build a new kernel?
> 
> i've just been using precompiled binaries of netbsd kernels. A while
> back fsck thrashed an internal gig and zip drive, so an old 160MB IBM
> harddrive's been the home for the netbsd os. my original post [port-
> mac68k@netbsd.org] included partition info (mkfs.out), disklabel, and
> dmesg to show context for the lost files (actually the whole target
> directory gets lost) until reboot.
[have now low-level formatted it using FWB, APS, & now HDSCSetup]
> Is it really necessary to recompile the kernel? can that be done given
> the current bugginess of my os? Would it be easier with a mac-side
> compiler? (Codewarrier9 and Think C7 live somewhere on my harddrive). On
> the other hand i've got two O'Reilly books: "porting with gcc" and
> "imake". would those help me do a recomile? Machine: Q700, 20MB RAM.
[snip]
> > The problem you're seeing is similar to something I experienced
> > about a year ago. Some scsi drives don't handle residual data
> > pointers correctly (I don't fully understand the problem, just
> > know of a potential fix). On my drive, I would create a file
> > on the drive and the partition would no longer be accessable like
> > you describe. The solution was to add an entry into the quirk
> > table to force the "SDEV_AUTOSAVE" then build a new kernel with
> > the change.
> > 
> > Here's an example entry in src/sys/scsi/scsiconf.c:
> > 
> >         {{T_DIRECT, T_FIXED,
> >          "DEC     ", "RZ55     (C) DEC", ""},     SDEV_AUTOSAVE},
> >
> [from original post--showing the lost file problem]
> > 
> > > mount -u /
> > > # ls -l .p*
> > > -rw-r--r-- 2 0 wheel 230 Jun 7 04:06 .profile
> > > -rw-r--r-- 1 0 wheel 230 Jun 29 11:02 .profile_test
> > > # cp .profile_test  .profile_test2
> > > # ls -l .p*
> > > ls: .p*: No such file or directory
> > > # ls -l
> > > # <no files listed; boo hiss!>
> > > # sync
> > > # reboot
> > > booting....
> > > #cd root
> > > # ls -l .p*
> > > -rw-r--r-- 2 0 wheel 230 Jun  7 04:06 .profile
> > > -rw-r--r-- 1 0 wheel 230 Jun 29 11:02 .profile_test
> > > -rw-r--r-- 1 0 wheel 230 Jun 29 11:32 .profile_test2

any help is appreciated!
 
brian w.
bwildasi@csulb.edu