I ran mkfs.ext4
on an usbstick, so that i can use it in linux.
$sudo parted -l
Model: SanDisk Cruzer Slice (scsi)
Disk /dev/sdd: 32,0GB
Sector size (logical/physical): 512B/512B
Partition Table: loop
Disk Flags:
Number Start End Size File system Flags
1 0,00B 32,0GB 32,0GB ext4
It displayed this usb stick as ext4 … why then i can’t even run
$touch newfile.txt
nor create a new folder in it ?
It is mounted.
dalto
October 25, 2020, 9:53pm
2
Did you give yourself rights to it?
You might need to chown the directory where you mounted it.
It is worth noting that there isn’t even vaguely enough information here to help you. For example:
ls -l /path/to/mountpoint
How again ?
$ lsblk -f
NAME FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINT
sdd ext4 1.0 7daa2a65-491f-470b-9ce1-458ab86c90b6 27,7G 0% /run/media/enos-andrew/7daa2a65-491f-470b-9ce1-458ab86c90b6
$ ls -l /run/media/enos-andrew/7daa2a65-491f-470b-9ce1-458ab86c90b6
total 16
drwx------ 2 root root 16384 Oct 23 15:46 lost+found
dalto
October 25, 2020, 10:05pm
4
It is owned by root and only root has access to it.
Try this:
sudo chown -R username /run/media/enos-andrew/7daa2a65-491f-470b-9ce1-458ab86c90b6
Replace username with your actual username
Thanks. That works.
Is it everytime after i run format command:
$mkfs.ext4 ...
that device or partition will become root own? if yes, then it is always the 2nd action after formating is to change ownership, right ?
Is there way to make the path of the usb stick more user friendly ?
Root
October 26, 2020, 5:29am
6
yep - every time you format using a Linux filesystem
Yes, you can label the device - the mount will then be /run/media/$USER/label
You can create the folder /media and use udisks2 to mount as a subfolder of /media. - https://wiki.archlinux.org/index.php/Udisks
Will read into it now.
Thanks for short tips
I guess there is no way to do formating of usbdisk and do “user friendly” mount point all at one convinience gui … apart from gparted (which do formating only).