I came across something curious last week that failed the question:
Can I find a quick answer for this in Google?
I had purchased a new SanDisk USB stick to boot Linux. The script I was using to configure it had a check to make sure the disk target (e.g./dev/sdb) I was installing Linux onto was removable media. The script kept complaining that my new USB stick was not! I found an older SanDisk USB stick and with that one, my script ran without error.
Had I bought a bad USB stick? It formatted without issue and I could write to it and read from it without any errors.
I then compared the dmesg output for the two sticks:
Newer USB stick:
[833126.592645] scsi 10:0:0:0: Direct-Access SanDisk Cruzer Switch 1.26 PQ: 0 ANSI: 6 [833126.592794] sd 10:0:0:0: Attached scsi generic sg2 type 0 [833126.593499] usb-storage: device scan complete [833126.596965] sd 10:0:0:0: [sdb] 15633408 512-byte logical blocks: (8.00 GB/7.45 GiB) [833126.601274] sd 10:0:0:0: [sdb] Write Protect is off [833126.601276] sd 10:0:0:0: [sdb] Mode Sense: 43 00 00 00 [833126.601278] sd 10:0:0:0: [sdb] Assuming drive cache: write through [833126.609031] sd 10:0:0:0: [sdb] Assuming drive cache: write through [833126.609042] sdb: sdb1 [833126.634951] sd 10:0:0:0: [sdb] Assuming drive cache: write through [833126.634954] sd 10:0:0:0: [sdb] Attached SCSI disk
Older USB stick:
[151567.256075] scsi 2:0:0:0: Direct-Access SanDisk Cruzer Switch 1.20 PQ: 0 ANSI: 5 [151567.256497] sd 2:0:0:0: Attached scsi generic sg2 type 0 [151567.257279] usb-storage: device scan complete [151567.261777] sd 2:0:0:0: [sdb] 7821312 512-byte logical blocks: (4.00 GB/3.72 GiB) [151567.265883] sd 2:0:0:0: [sdb] Write Protect is off [151567.265888] sd 2:0:0:0: [sdb] Mode Sense: 43 00 00 00 [151567.265897] sd 2:0:0:0: [sdb] Assuming drive cache: write through [151567.278033] sd 2:0:0:0: [sdb] Assuming drive cache: write through [151567.278041] sdb: sdb1 [151567.287932] sd 2:0:0:0: [sdb] Assuming drive cache: write through [151567.287935] sd 2:0:0:0: [sdb] Attached SCSI removable disk
I noticed the difference between the newer SanDisk USB stick and the older USB stick was the killer line at the end. The old stick was identified as a ‘removable disk’ while the new stick was identified as a ‘disk’.
The other difference was simpler to spot. The ‘removable’ variable was ‘1’ on the old stick and ‘0’ on the new stick.
# cat /sys/block/sdb/removable 0
I then found this on the SanDisk web site which explained what I was seeing and confirmed that there was nothing wrong with this new USB stick:
Where it told me:
NOTE: SanDisk is beginning production of flash drives configured as fixed disk in 2012 to meet new requirements for Windows 8 Certification.
Historically, flash drives have been configured as removable disks and Windows Explorer displays them as ‘Removable Media’. Windows 8 Certification requires flash drive manufacturers to configure flash drives as fixed disks. Flash drives configured as fixed disk will show up in Windows Explorer as ‘Hard Disk Drives’. Flash drives configured as fixed disks still function the same as those configured as removable disks.
NOTE: SanDisk does NOT support configuring flash drives as bootable device for running an OS.
This change (regardless of what SanDisk says) does not stop you using these new sticks as USB boot media. But it does mean my Linux install script can no longer programmatically identify SanDisk USB sticks as removable media… and its all because of Microsoft.
I can only imagine Steve Ballmers reaction on learning this: