LinArcX / kindd

A kindful dd, written in qt-quick.
GNU General Public License v3.0
126 stars 11 forks source link

An option to hide non-removable media? #3

Closed R8s6 closed 5 years ago

R8s6 commented 5 years ago

Hi,

One of the disadvantages of using dd is that when occasionally being careless to have chosen a wrong output, one can unintentionally erased a lot of stuff.

So, is it possible to make it an option to hide HDD/SDD from the output, leaving only the removable media (USB drives, etc) available, just like what etcher is doing?

Of course, all is needed is just an option (checkbox), so when other people do want to output to a local disk, they also have a desired option available.

Thanks!

LinArcX commented 5 years ago

Hi and thank you for suggestion. in version 2.0.0 only removable devices will show up to user. So there is no concern anymore for accidental damage partitions informations.

R8s6 commented 5 years ago

Thanks for the update! Sorry to re-open this case.

It appears that kindd is still showing some non-removable drives, in my case here,

/dev/sdf /dev/sdd /dev/sdc

, which don't seem to be active:

$ lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
loop0    7:0    0  79.5M  1 loop /var/lib/snapd/snap/core/1689
loop1    7:1    0  83.8M  1 loop /var/lib/snapd/snap/core/3604
sda      8:0    0 931.5G  0 disk 
└─sda1   8:1    0 931.5G  0 part /mnt/aaaaaaa/backup
sdb      8:16   0 111.8G  0 disk 
├─sdb1   8:17   0     4G  0 part [SWAP]
└─sdb3   8:19   0 107.8G  0 part /
sde      8:64   1 238.5G  0 disk 
└─sde1   8:65   1 238.5G  0 part /run/media/xxx/717D-F3F6
sdg      8:96   1  29.5G  0 disk 
└─sdg1   8:97   1  29.4G  0 part /run/media/xxx/USB STICK
sr0     11:0    1  1024M  0 rom 

Please see the screenshot:

image

Also, to further prevent human errors, instead of /dev/sde, is it possible to grab the "name" and size of the removable disks, something similar to what etcher is doing (shown on the left in the screenshot).

Thank you very much!

LinArcX commented 5 years ago

@R8s6 What's the output of: ls /dev/disk/by-id/

R8s6 commented 5 years ago

Sorry about the late reply, here it is:

$  ls /dev/disk/by-id/
ata-HL-DT-ST_DVDROM_DH50N_K3KE2SF1429             usb-ADATA_USB_Flash_Drive_0000000000000966-0:0-part1
ata-INTEL_SSDSC2BW120A4_CVDA418000BE1207GN        wwn-0x5001480000000000
ata-INTEL_SSDSC2BW120A4_CVDA418000BE1207GN-part1  wwn-0x50014ee101debdde
ata-INTEL_SSDSC2BW120A4_CVDA418000BE1207GN-part3  wwn-0x50014ee101debdde-part1
ata-WDC_WD10EADS-00L5B1_WD-WCAU4C632344           wwn-0x55cd2e404bc3f035
ata-WDC_WD10EADS-00L5B1_WD-WCAU4C632344-part1     wwn-0x55cd2e404bc3f035-part1
usb-ADATA_USB_Flash_Drive_0000000000000966-0:0    wwn-0x55cd2e404bc3f035-part3