Subject: cgd on -current fails to boot
To: None <current-users@netbsd.org>
From: Michael Santos <mike@ethmoid.org>
List: current-users
Date: 07/22/2003 12:33:47
Is anybody booting successfully with cgd partitions on -current?

For me, the last bootable kernel was from July 17 (around the time the
rijndael-api-fst.c changes were checked in).

Booting with the encrypted swap enabled results in a panic:

Tue Jul 22 15:49:54 GMT 2003
Configuring CGD devices.
/dev/wd0f's passphrase:
/dev/wd0g's passphrase:
disklabel: Invalid signature in mbr record 0
disklabel: Invalid signature in mbr record 0
swapctl: /dev/cgd3a: Device not configured
Starting file system checks:
/dev/rwd0a: file system is clean; not checking
/dev/rwd0e: file system is clean; not checking
cgd4: error 22
uvm_fault(0xc043cea0, 0xdb602000, 0, 1) -> 0xe
kernel: page fault trap, code=0
Stopped in pid 48.1 (fsck_ffs) at       netbsd:rijndaelDecrypt+0xc:     movzbl0
(%edx),%edi
db>

Booting with the encrypted swap drops me into single user mode:

Starting file system checks:
/dev/rwd0a: file system is not clean; not checking
/dev/rwd0e: file system is not clean; not checking
CANNOT SEEK: BLK -1760172516
/dev/rcgd0d: UNEXPECTED INCONSISTENCY; RUN fsck_ffs MANUALLY.
CANNOT SEEK: BLK -5357797656
/dev/rcgd4a: UNEXPECTED INCONSISTENCY; RUN fsck_ffs MANUALLY.
THE FOLLOWING FILE SYSTEMS HAD AN UNEXPECTED INCONSISTENCY:
        ffs: /dev/rcgd0d (/home), ffs: /dev/rcgd4a (/var)
Automatic file system check failed; help!
Jul 22 16:12:46 init: /bin/ksh on /etc/rc terminated abnormally, going to single user mode
Enter pathname of shell or RETURN for /bin/sh:

For reference:

(ack-n)/home/ack-n/mike$ swapctl -l
Device      512-blocks     Used    Avail Capacity  Priority
/dev/cgd3a     1048320        0  1048320     0%    0
(ack-n)/home/ack-n/mike$ df -k
Filesystem      1K-blocks     Used     Avail Capacity  Mounted on
/dev/wd0a           99575    40647     53949    42%    /
/dev/cgd4a        2061414    71870   1886472     3%    /var
/dev/wd0e         3048502  2172161    723915    75%    /usr
/dev/cgd0d       40368740 21542398  16807904    56%    /home
procfs                  4        4         0   100%    /proc
mfs:313             99087        7     94125     0%    /tmp
127.0.0.1:/null         0        0         0   100%    /crypt
(sfs)                   0        0         0   100%    /sfs
(sfswait)               0        0         0   100%    .

Thanks,
-- 
Michael Santos
mike@ethmoid.org