Hi Chris, On Wed, 6 Mar 2019, Chris Jones wrote:
> Hello Debian-m68k fans. I'm new here and have run in to a strange > problem installing Debian on my Mac SE/30. Apologies for the long post > but I've got a lot to report! > > Executive summary: I can boot a kernel and run debootstrap > --second-stage. It starts to unpack packages, but after a few hours > subprocesses start to fail with segfaults and illegal instructions. > I'd say the crashes are caused by filesystem corruption, and the corruption is caused by an intermittent driver bug. I don't think this is a Debian bug. > The setup: Mac SE/30, standard but with 80MB of RAM and a 2GB CF card in > an Adtron SCSI-to-PCMCIA adapter. Appears to work flawlessly as a Mac > under System 7.1, hasn't given any hint of trouble. > > Me: I'm very used to dealing with embedded Linux systems on armel and > armhf architectures. Cross-compiling kernels and using debootstrap to > create root fs is reasonably familiar territory for me. > > Install process: CF card partitioned on mac with LIDO, then removed and > put in to card reader on i386 machine to have files copied on to it > (kernel on to HFS partition for Penguin, rootfs in to ext3 partition). > > Kernel: 4.20.13 crossbuilt from source on kernel.org,with default mac > config. Earlier kernels all had unusable 5380 SCSI drivers. Well, there were no relevant changes to the mac_scsi driver since about v4.9. Therefore, it seems likely that v4.20 has the same driver bug, albeit an intermittent one. > Root filesystem set up from image at > https://cdimage.debian.org/cdimage/ports/9.0/m68k/iso-cd/debian-9.0-m68k-NETINST-1.iso > > using debootstrap --arch m68k --foreign --no-check-gpg sid ... a few > tweaks to /dev and /etc to get a shell prompt > > Boots OK, rootfs mounts OK, kernel finds /bin/sh and I can remount / rw > and run debootstrap --second-stage. It starts to work, glacially slowly > of course, but after a few hours (and unpacking a dozen or so packages) > things start to fail with segfaults and illegal instructions. > > After this, the filesystem is hopelessly corrupted, with thousands of > errors and in one case was unrecoverable by fsck. > > My first suspect is bad RAM. For the last 12 hours or so the mac has > been running memtest 64M (from Woody, I think) under the above kernel. > It has revealed no errors but hasn't completed a full cycle yet (!). > That's possible too, but it probably doesn't explain the "unusable 5380 SCSI drivers" that you observed. Anyway, I've been working on 5380 driver patches lately so I can easily send you a new kernel to test if you like. BTW, you can get a slow but stable 5380 SCSI driver by passing 'mac_scsi.setup_use_pdma=0' in the kernel parameters. > Why am I using debootstrap? Partly for the sport of it, it's a path I > know, and I had little luck with the Debian 4.0/etch m68k installer > which didn't seem to know about Apple Partition Maps so I couldn't > assign partitions to swap/root and so on. > Did you have 'suite=etch-m68k' in the kernel parameters? > Thank you for any thoughts or experiences, > Chris > HTH --