On 21/02/2020 16.25, Peter Suetterlin wrote:
jdd@dodin.org wrote:
Le 21/02/2020 à 15:00, Carlos E. R. a écrit :
On 21/02/2020 11.49, zb4ng wrote:
I just remembered that I tried to format the stick with YAST and then forgot about it and removed it.
That was your original problem, yast adds such a line. It is a convenience, but with usb sticks it causes a problem.
I don't think it's default, but yast ask "do you want it mounted" but don't add "permanently" - may be an enhancement possible :-)
I'd even call that a bug. As a user, if I format a USB stick, I want to use it, and for that I need to mount it. So it is straightforward to check this option. It's therefore (IMHO) YaSTs task to make sure nothing bad happens. Just adding such a line without making the user aware of the consequences is quite careless.
if you tell YaST "I want to mount it" you are telling it "I want to mount it by using an fstab entry, so create it for me, please". It has been this way for decades.
Such an entry may be usefull for fixed disks, but for removable devices that are anyhow handled separately from fstab this should (again, IMO) not be done.
It is not that easy to know it is a removable drive. Sometimes it works: Telcontar:~ # lsblk --help | grep -i removable RM removable device HOTPLUG removable or hotplug device (usb, pcmcia, ...) Telcontar:~ # I put a stick: Telcontar:~ # lsblk --output NAME,KNAME,SIZE,TYPE,RM,HOTPLUG,LABEL /dev/sdf NAME KNAME SIZE TYPE RM HOTPLUG LABEL sdf sdf 7.2G disk 1 1 openSUSE_Leap_15.0_Rescue_CD ├─sdf1 sdf1 613M part 1 1 openSUSE_Leap_15.0_Rescue_CD ├─sdf2 sdf2 15M part 1 1 BOOT └─sdf3 sdf3 6.6G part 1 1 cow Telcontar:~ # Some people use removable drives as permanent. I do. Isengard:~ # lsblk --output NAME,KNAME,SIZE,TYPE,RM,HOTPLUG,LABEL NAME KNAME SIZE TYPE RM HOTPLUG LABEL ... sdd sdd 7.3T disk 0 1 └─sdd1 sdd1 7.3T part 0 1 Telcontar_1 └─cr_my_book_tlcntr dm-4 7.3T crypt 0 0 ANameUnseen That machine has 4 external hard disks via usb3, permanently mounted. You are the root, the admin, you have a job :-D -- Cheers / Saludos, Carlos E. R. (from 15.1 x86_64 at Telcontar)