NetBSD corrupting SD card #252
speakers-k64
started this conversation in
General
Replies: 1 comment 2 replies
-
Writing beyond the boundaries of the single drive image shouldn't be possible, but indeed some systems are quite particular about the geometry information reported. If you can get a zululog.txt with debug messages enabled of when the corruption occurs, I can see if there is some problem with the write range checking. (With USB cable connected, there is a virtual serial port that outputs the log. This can be helpful if the SD card gets fully corrupted.) I agree that 32 sectors / 64 heads would divide better for many image sizes. The current default values 63 x 255 are what SCSI2SD defaults to (AFAIK). |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I use ZuluSCSI-RP2040 cards on Mac Iici and LC III to support multi-booting of macOS, AU/X, Linux and NetBSD. Each OS is a distinct 2GB drive/device. I also have a BlueSCSI on an SE30 and a SCSI2SD on Iici doing the same thing. All's good except that booting NetBSD from ZuluSCSI-RP2040 with default configuration is unstable and usually ends with the entire SD card being corrupted.
Looking at the log, I see warnings of the form:
[868684ms] WARNING: Host used command 0x1A which is affected by drive geometry. Current settings are 63 sectors x 255 heads = 16065 but image size of 4194304 sectors is not divisible. This can cause error messages in diagnostics tools.
And at boot the NetBSD kernel reports the disk geometry is 261(cylinders) x 255(heads) x 63(sectors):
Jan 9 06:46:01 Max /netbsd: scsibus0: waiting 2 seconds for devices to settle...
Jan 9 06:46:01 Max /netbsd: sd0 at scsibus0 target 0 lun 0: <CDC, ZuluSCSI HDD, 2.0> disk fixed
Jan 9 06:46:01 Max /netbsd: sd0: 2048 MB, 261 cyl, 255 head, 63 sec, 512 bytes/sect x 4194304 sectors
Jan 9 06:46:01 Max /netbsd: sd0: async, 8-bit transfers
Jan 9 06:46:01 Max /netbsd: sd1 at scsibus0 target 1 lun 0: <CDC, ZuluSCSI HDD, 2.0> disk fixed
Jan 9 06:46:01 Max /netbsd: sd1: 2048 MB, 261 cyl, 255 head, 63 sec, 512 bytes/sect x 4194304 sectors
Jan 9 06:46:01 Max /netbsd: sd1: async, 8-bit transfers
Jan 9 06:46:01 Max /netbsd: sd2 at scsibus0 target 2 lun 0: <CDC, ZuluSCSI HDD, 2.0> disk fixed
Jan 9 06:46:01 Max /netbsd: sd2: 2048 MB, 261 cyl, 255 head, 63 sec, 512 bytes/sect x 4194304 sectors
Jan 9 06:46:01 Max /netbsd: sd2: async, 8-bit transfers
Jan 9 06:46:01 Max /netbsd: sd3 at scsibus0 target 3 lun 0: <CDC, ZuluSCSI HDD, 2.0> disk fixed
Jan 9 06:46:01 Max /netbsd: sd3: 2048 MB, 261 cyl, 255 head, 63 sec, 512 bytes/sect x 4194304 sectors
Jan 9 06:46:01 Max /netbsd: sd3: async, 8-bit transfers
Jan 9 06:46:01 Max /netbsd: boot device: sd2
This geometry appears to result in the firmware performing write outside the limits of the sd2 (unit 2) disk image.
But when I override the drive geometry in zuluscsi.ini:
SectorsPerTrack = 32
HeadsPerCylinder = 64
I no longer see SD card corruption. These are the values I see BlueSCSI using.
Beta Was this translation helpful? Give feedback.
All reactions