-
Notifications
You must be signed in to change notification settings - Fork 58
Description
Just got a BlueSCSI, and formatted an SD card as exFAT. It works great and I love it! I did run into the following.
I used it for a few days, and was cruising right along.
However, very concerningly, the disk image on the SD card is 100% empty. It can still boot, I can write files on the vintage mac, but these changes are not "visible" to a linux client.
I discovered this after trying to copy the image off of the original SD card to 3 different SD cards, all of which were unbootable. The original image looks like an empty file on linux, but my bootable hard drive to BlueSCSI.
I dug a little more. If I create the disk with truncate -s 1024M on the SD card, it's more likely to exhibit the above behavior. If I create it with dd if=/dev/zero it's very likely to be considered "fragmented" by bluescsi, and will retain data but not be bootable.
The only thing that worked for me was to dd from /dev/urandom to create the disk.
I am quite certain there are continuing issues from #258
Here's an easy repro for me, on various SD cards from various brands:
cfdisk /dev/sdb # One partition, DOS label, primary
mkfs.exfat /dev/sdb1
mount /dev/sdb1 /mnt
dd if=/dev/zero of=/mnt/HD01_disk.hda bs=4M count=1024 oflag=direct status=progress # or whatever
sync
umount /mnt
eject /dev/sdb1
eject /dev/sdb # extra caution
# Boot machine from Mac OS 7.6.1 install CD
# Initialize disk with Apple HDSC setup
# Update driver, reboot
The new drive will be detected as fragmented, and will not be bootable later on my particular machine and board. Non-"fragmented" drives are bootable.
The truncate -s 1024M case is probably the worst case, where the file will remain "empty" to Linux. I haven't tried to reproduce this one again, I made a backup to a drive initialized with /dev/urandom instead of /dev/zero. I don't think exfat has sparse files. Something weird is happening in both of the above cases.