Subject: Lost target files until reboot
To: None <current-users@NetBSD.ORG>
From: brian <bwildasi@csulb.edu>
List: current-users
Date: 07/01/1997 13:22:43
**PROBLEM: Lost target files until reboot**

Here's a long list of uglies; two netbsd currents were installed, one
after the other (snapshots 970601 then 970402), with the tests repeated.
Then follows a disklabel, dmesg, mkfs for hardware info.

Any help is appreciated!

>> Hi Bill Studenmund...
>> only found netbsd-current 1.2.1 (05-17-97) snapshots w/o kernels. Is
>> there kernels out for june? 
> Look at ftp://ftp.netbsd.org/pub/NetBSD/arch/mac68k/current-970601/
> and you'll find a kernels directory and a snapshot directory.
>
>
> Note: netbsd-current is NOT NetBSD 1.2.1. 1.2.1 is 1.2 with a
> series of bug fixes. But there have been a lot of improvements
> which aren't in 1.2.1. Mainly as they are large-enough a change
> that they are considered a new feature. 1.2.1 only fixes the features
> in 1.2.
> So even though the current-970423 (I think that's the date) snapshot
> is older than the 1.2.1 set, it represents newer technology.
> As we're still making a lot of progress on getting things to work
> with all the different mac models, I'd recomend running with a -current
> snapshot.

-------------netbsd -current 970601 & GENERIC-32 on Q700
# mount -u /
/dev/sd2a on / type ffs (local)
# cd root
#ls -l
-rw-r--r-- 2 0 wheel 721 Jun 7 04:06 .cshrc
-rw------- 1 0 wheel   0 Jun 7 04:06 .klogin
-rw-r--r-- 1 0 wheel  64 Jun 7 04:06 .login
-rw-r--r-- 2 0 wheel 230 Jun 7 04:06 .profile
# cp .profile  .profile_test
# ls -l
# <no files listed!>
# pwd
/root
#ls
#  <no files listed!>
# sync
# reboot
NetBSD kernel security level changed from 0 to 1
NetBSD doesn't trust itself ...<scrolled by too quickly for me to read
it, sorry>
booting...
# cd root
# pwd
/root
# ls -l
-rw-r--r-- 2 0 wheel 721 Jun  7 04:06 .cshrc
-rw------- 1 0 wheel   0 Jun  7 04:06 .klogin
-rw-r--r-- 1 0 wheel  64 Jun  7 04:06 .login
-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
cp: .profile_test2: Read-only file system
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
# sync
# reboot
booting...
-------------This looks like trouble here. See disklabel, dmesg, and
mkfs at very end.
# fsck -fy
** /dev/rsd2a
** Last Mounted on /
** Root file system
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
6901 files, 88196 used, 28499 free (331 frags, 3521 blocks, 0.3%
fragmentation)
MARK FILE SYSTEM CLEAN? yes
CANNOT WRITE: BLK 16
CONTINUE? yes
THE FOLLOWING SECTORS COULD NOT BE WRITTEN:
16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,
CANNOT WRITE: BLK 208
CONTINUE? yes
THE FOLLOWING SECTORS COULD NOT BE WRITTEN: 208,209,
# sync
# reboot
booting...
# mount -u /
# cd root
#ls
.cshrc   .klogin   .login   .profile   .profile_test   .profile_test2
# rm .profile_test2
# ls  .p*
ls:  .p*: No such file or directory
# pwd
/root
# sync
# reboot
---------------Let's try a different Kernel!  GENERICSB-32
booting...
MacOS - side applications:
installer...
SCSI ID6,   IBM,   KZ-C,   [OK]
minishell
> rm netbsd
> install   ->  GENERIC-32
Cmd+q
booting...
#cd root
#pwd
/root
# ls
.cshrc    .klogin    .login    .profile    .profile_test
# cp  .profile    .profile_test2
cp: .profile_test2: Read-only file system
# mount -u /
# cp .profile  .profile_test2
# ls
# <no files show!>
# pwd
/root
#reboot
---------------- Let's try an earlier file system and kernel!
mkfs_1.43
installer...
SCSI  ID6, IBM, KZ-C, [OK]
installed netbsd current 970402 & GENERIC-27
#mount -u /
# /dev/rsd2a: file system not clean; please fsck(8)
#reboot
booting....
# dmesg >  dmesg_bootinfo
# ls
# <no files listed!>
# sync
# reboot
booting...
# ls -l dm*
-rw-r--r-- 1 root wheel  2252 Jun 30 17:54 dmesg_bootinfo

--------------Here's the hardware info for this machine
# disklabel sd2
# /dev/rsd2c:
type: SCSI
disk: SCSI disk
label: fictitious
flags:
bytes/sector: 512
sectors/track: 38
tracks/cylinder: 8
sectors/cylinder: 304
cylinders: 1058
total sectors: 325864
rpm: 3600
interleave: 1
trackskew: 0
head switch: 0
    # milliseconds
track-to-track seek: 0 # milliseconds
drivedata: 0

4 partitions
#    size  offset   fstype   [fsize  bsize  cpg]
a: 242048      64   4.2BSD    0      0      0   #(Cyl.   0*-796*)
b:  83720  242112   swap                        #(Cyl. 796*-1071*)
c: 325864       0   unused    0      0          #(Cyl. 0-1071*)
d:     32    325832   unknown                   #(Cyl. 1071*-1071*)
disklabel: boot block size 0
disklabel: super block size 0

less dmesg_bootinfo
NetBSD 1.2D (GENERICSBC) #27: Tues Apr 8 01:27:24 CDT 1997
    scottr@beech: /a/src/sys/arch/mac68k/compile/GENERIC
Apple Macintosh Quadra 700 (68040)
real mem = 20971520
avail mem = 17068032
using 204 buffers containing 835584 bytes of memory
mrg: macIIci/Q700 ROMs ROM glue, tracing off, debug off, silent traps
mrg: I/O map kludge for ROMs that use harware addresses directly.
adb: bus subsystem
\^H\^Hadb: extended keyboard at 2
adb: relative positioning device (mouse?) (50) at 3
adb: relative positioning device (tablet?) (58) at 4
adb: 100 dpi mouse at 15
adb: 200 dpt mouse at 14
mainbus0 (root)
obio0 at mainbus0
adb0 at obio0 (ADB event device)
asc0 at obio0:  Apple Sound Chip
intvid0 at obio0: DAFB: Monitor Sense 1.
intvid0: 640x480, monochrome
grf0 at intvid0
ite at grf0 not configured
sn0 at obio0 address 08:00:07:54:0f:66
esp0 at obio0: address 0x896000: NCR53C96, 25MHz, SCSI ID7
scsibus0 at esp0: 8 targets
sd0 at scsibus0 targ 0 lun 0: <SEAGATE, ST31230N, 0594> SCSI 0/direct
fixed
sd0: 1010MB, 3992 Cyl, 5 head, 103 sec, 512 bytes/sec
cd0 at scsibus0 targ 2 lun 0: <MEDAVIS, RENO CD-ROMX2A, 2.03> SCSI2
5/cdrom removeable
uk at scsibus0 targ 2 lun 1: < , , > SCSI7 16/unknown fixed offline
uk0: unknown device
uk1 at scsibus0 targ 2 lun 2: < , , > SCSI7 16/unknown fixed offline
uk1: unknown device
uk2 at scsibus0 targ 2 lun 3: < , , > SCSI7 16/unknown fixed offline
uk2: unknown device
uk3 at scsibus0 targ 2 lun 4: < , , > SCSI7 16/unknown fixed offline
uk3: unknown device
uk4 at scsibus0 targ 2 lun 5: < , , > SCSI7 16/unknown fixed offline
uk4: unknown device
uk5 at scsibus0 targ 2 lun 6: < , , > SCSI7 16/unknown fixed offline
uk5: unknown device
uk6 at scsibus0 targ 2 lun 7: < , , > SCSI7 16/unknown fixed offline
uk6: unknown device
sd1 at scsibus0 targ 4 lun 0: <iomega, jaz 1GB, J.83> SCSI2  0/direct
removeable
sd1: drive offline
sd2 at scsibus0 targ 6 lun 0: <IBM, KZ-C, R167> SCSI1 0/direct fixed
sd2: 159MB, 1058 cyl, 8 head, 38 sec, 512 bytes/sec
zsc0 at obio0 chip type 0

[mkfs 1.43 to sd2, SCSI ID6...]
Console Inited

sd0 at scsi ID 0.
       scsi ID 1 - not present.
       scsi ID 2 - *WARNING* no Mode Sense, use with caution!
       scsi ID 3 - not present.
sd1 at scsi ID 4.
       scsi ID 5 - not present.
sd2 at scsi ID 6.
modesense of Current parameters, page 4(6)
get_DeviceInfo: Error on SCSIRead(), # 5, retry 0
Probably just a phase error, ignore the error -- this time.
Num Heads 8
Num Cylinders = 1058
modesense of Current parameters, page 3(6)
Bytes_Sector is 512 
Sectors per Track is 39 
Partition read, SCSIID = 6
nsectors 39, ntracks 8, cylspares 0
optimization space
nsectors 39, ntracks 8, cylspares 0
Disk parameters and geometry is reasonable enough to proceed
formatting.....
Warning: 64 sector(s) in last cylinder unallocated
disk:   242048 sectors in 776 cylinders of 8 tracks, 39 sectors
    123.9MB in 49 cyl groups (16 c/g, 2.56MB/g, 576 i/g)
super-block backups (for fsck -b #) at:
 32, 5072, 10112, 15152, 20192, 25232, 30272, 35312, 39968,
 45008, 50048, 55088, 60128, 65168, 70208, 75248, 79904, 84944,
 89984, 95024, 100064, 105104, 110144, 115184, 119840, 124880, 129920,
 134960, 140000, 145040, 150080, 155120, 159776, 164816, 169856, 174896,
 179936, 184976, 190016, 195056, 199712, 204752, 209792, 214832, 219872,
 224912, 229952, 234992, 239648,
formatting complete
Partition read, SCSIID = 6
I don't remember any errors, but I wasn't counting.


Thanks for your suggestions!

brian
bwildasi@csulb.edu