Flashing multiple sd card - determining which one fails

Hello, I’m flashing multiple sd cards at once, and often times one will fail and it’s been quite difficult determining which failed. I have gotten the logs and I can tell which one will fail by the drive name that etcher uses when selecting drives to flash, but I an having trouble determining which one of the sd cards that name correlates to. For reference, I am on a Windows 11 machine running etcher v1.5.122. Any help is appreciated!

1 Like

Hi,

thanks for the insight.
balenaEtcher uses drivelist to list the devices.
On the link you can see what information it can get about a drive. I also added an output below.
Do you think displaying any of those properties would help?
As I tried with some cards around

drive: {
    enumerator: 'PCISTOR',
    busType: 'SCSI',
    busVersion: '2.0',
    device: '\\\\.\\PhysicalDrive1',
    devicePath: null,
    raw: '\\\\.\\PhysicalDrive1',
    description: 'SDHC Card',
    partitionTableType: 'mbr',
    error: null,
    size: 31914983424,
    blockSize: 512,
    logicalBlockSize: 512,
    mountpoints: [ [Object] ],
    isReadOnly: false,
    isSystem: false,
    isVirtual: false,
    isRemovable: true,
    isCard: false,
    isSCSI: true,
    isUSB: false,
    isUAS: false,
    displayName: 'D:\\'
  }

I haven’t found any reliable property for it. Mostly the name changes by manufacturer and type between “SD Card” and “SDHC Card”.
If you can find a way to change the displayname (description in the list above) of the device, I think you already won. But it does not look possible on the first glance.
You may run drivelist, separately to see the info who is who. For example like the scanner example in etcher-sdk

git clone https://github.com/balena-io-modules/etcher-sdk
cd etcher-sdk
npm i
npm i -g ts-node
ts-node ./examples/scanner.ts

it should output the device to the console when you attach or detach one. So you know which device gets the ‘\\.\PhysicalDrive1’ …2…etc paths.
But this does not feel like less strugle.
I hope this ideation can lead to a working solution, tell me if I can help more.