LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux Mint
User Name
Password
Linux Mint This forum is for the discussion of Linux Mint.

Notices


Reply
  Search this Thread
Old 11-15-2018, 05:06 AM   #1
bscho
Member
 
Registered: Nov 2012
Location: London
Distribution: Mint 20, Kali, Peppermint, Ubuntu, MakuluFlash, Fedora 32, Windows 12 Lite, MakuluLinux
Posts: 821

Rep: Reputation: 28
Talking How do I make a usb writeable in Linux Mint?


Using Linux Mint 19 Tara.

Have tried the solution for ubuntu but had no success using this:

$ sudo hdparm -r0 /dev/sdb1

/dev/sdb1:
setting readonly to 0 (off)
readonly = 0 (off)

I cannot delete files using Nemo with elevated priviliges as it says read only?
 
Old 11-15-2018, 05:49 AM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,592

Rep: Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880
What filesystem is sdb1?

Typically a flash drive is automatically mounted as your user for NTFS or FAT32 so need more information. Have you checked the output of dmesg command for errors?

Have you tried deleting the files from the command line?

It is possible the drive has started to fail. Copy any important files off the drive before it becomes unreadable.
 
Old 11-15-2018, 06:07 AM   #3
bscho
Member
 
Registered: Nov 2012
Location: London
Distribution: Mint 20, Kali, Peppermint, Ubuntu, MakuluFlash, Fedora 32, Windows 12 Lite, MakuluLinux
Posts: 821

Original Poster
Rep: Reputation: 28
Question

Quote:
Originally Posted by michaelk View Post
What filesystem is sdb1?

Typically a flash drive is automatically mounted as your user for NTFS or FAT32 so need more information. Have you checked the output of dmesg command for errors?

Have you tried deleting the files from the command line?

It is possible the drive has started to fail. Copy any important files off the drive before it becomes unreadable.
It is a new sd card 1 terrabyte so don't know why it went into read only.

Don't know how to do the dmesg command.

How do I do it from the command line please.
 
Old 11-15-2018, 06:19 AM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,592

Rep: Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880
Are you using the same SD card reader when the device used to work? It is possible if using another reader that it can not access cards of that capacity.

Does the SD card have a mechanical read/write switch?

Just type dmesg in a terminal window. The sd card errors are probably at the bottom but you can also try
dmesg | grep sdb1

In a terminal window use the cd command to go to the sd card mount point, use the rm command to delete the desired file.

cd /media/path_to_sd_card
sudo rm my_file
 
Old 11-15-2018, 06:23 AM   #5
satinet
Senior Member
 
Registered: Feb 2004
Location: England
Distribution: Slackware 14.2
Posts: 1,491

Rep: Reputation: 50
you type `dmesg` on the command line and hit return. Maybe `sudo dmesg` if it's debian/ubuntu/mint.

1) Is it a real 1tb card? There are fakes
2) what happens if you try to delete files from the command line
3) it could be that you need to install the exfat-fuse and exfat-utils packages (search your package manager in mint). On my slackware these weren't installed by default and it didn't like a 128gb card because it was formatted in EXfat, which it didn't understand. EXfat is used for very large files systems (large by FAT32 standards at least).
4) what's the output of `sudo lsblk` when it's plugged in.
5) if it's a new sd card what are the files that are on it???

EDIT - yes and as the post above says non micro SD cards have a write protect tab on them, which is a physical switch.
 
1 members found this post helpful.
Old 11-15-2018, 06:26 AM   #6
bscho
Member
 
Registered: Nov 2012
Location: London
Distribution: Mint 20, Kali, Peppermint, Ubuntu, MakuluFlash, Fedora 32, Windows 12 Lite, MakuluLinux
Posts: 821

Original Poster
Rep: Reputation: 28
Talking

Quote:
Originally Posted by michaelk View Post
Are you using the same SD card reader when the device used to work? It is possible if using another reader that it can not access cards of that capacity.

Does the SD card have a mechanical read/write switch?

Just type dmesg in a terminal window. The sd card errors are probably at the bottom but you can also try
dmesg | grep sdb1

In a terminal window use the cd command to go to the sd card mount point, use the rm command to delete the desired file.

cd /media/path_to_sd_card
sudo rm my_file
The sd card is mounted in a usb Mobile phone backup device so has no switch.

How do I find mount point of the usb?

Thanks for your help
 
Old 11-15-2018, 06:27 AM   #7
satinet
Senior Member
 
Registered: Feb 2004
Location: England
Distribution: Slackware 14.2
Posts: 1,491

Rep: Reputation: 50
sudo lsblk
mount

check the things in my post above. Check the exfat-fuse and exfat-utils packages are install etc.

i didn't know a 1tb card even existed.

Last edited by satinet; 11-15-2018 at 06:30 AM.
 
1 members found this post helpful.
Old 11-15-2018, 06:30 AM   #8
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,592

Rep: Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880
Like pulling teeth...

Depends on the phone and how it connects i.e communication protocol to the operating system. There are basically two ways i.e. as a mass storage device and as MTP. Android uses MTP unless you own a really old phone and not sure about IPhones. MTP is a virtual filesystem so if there is a "real mount point" I am not sure where it is located.

A mass storage device would look like a regular flash drive so I would guess it is MTP which can be problematic.

Last edited by michaelk; 11-15-2018 at 06:40 AM.
 
Old 11-15-2018, 06:43 AM   #9
bscho
Member
 
Registered: Nov 2012
Location: London
Distribution: Mint 20, Kali, Peppermint, Ubuntu, MakuluFlash, Fedora 32, Windows 12 Lite, MakuluLinux
Posts: 821

Original Poster
Rep: Reputation: 28
Talking

Quote:
Originally Posted by satinet View Post
sudo lsblk
mount

check the things in my post above. Check the exfat-fuse and exfat-utils packages are install etc.

i didn't know a 1tb card even existed.
Have almost got there have this

Lenovo-ideapad-310-15ISK:/media/barry/MULTIBOOT$ rm "Files in Here"
rm: cannot remove 'Files in Here': Is a directory

Thanks
 
Old 11-15-2018, 07:32 AM   #10
bscho
Member
 
Registered: Nov 2012
Location: London
Distribution: Mint 20, Kali, Peppermint, Ubuntu, MakuluFlash, Fedora 32, Windows 12 Lite, MakuluLinux
Posts: 821

Original Poster
Rep: Reputation: 28
Tried this but did not change file systems

/media/barry/MULTIBOOT$ sudo chmod 777 "Files in Here"
[sudo] password for barry:
chmod: changing permissions of 'Files in Here': Read-only file system
barry@barry-Lenovo-ideapad-310-15ISK:/media/barry/MULTIBOOT$ ls -l
total 256
drwxr-xr-x 2 barry barry 32768 Nov 14 17:26 activate
drwxr-xr-x 2 barry barry 32768 Nov 14 14:31 boot
drwxr-xr-x 3 barry barry 32768 Nov 14 14:31 efi
drwxr-xr-x 6 barry barry 32768 Nov 14 23:16 'FILES HERE'
drwxr-xr-x 8 barry barry 32768 Nov 14 16:53 'Files in Here'
drwxr-xr-x 13 barry barry 32768 Nov 14 14:12 multiboot
drwxr-xr-x 2 barry barry 32768 Nov 14 17:10 'System Volume Information'
drwxr-xr-x 3 barry barry 32768 Nov 14 16:48 'Word 19'

Cannot understand why there is no change?

Any ideas?
 
Old 11-15-2018, 07:48 AM   #11
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,692

Rep: Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274
you need to understand the message: Read-only file system. There is no problem with the files, the filesystem is locked no changes allowed at all. It is completely irrelevand if you are using regular user or root, if you [try to] change permissions, because you are not allowed to modify the filesystem at all (that means chmod will fail too).

You need to remount the filesystem in read/write mode, that may help you. But there is a reason to make it readonly, especially when there is a problem with that filesystem and most probably you need to fix that issue before trying to modify it.
Usually you can find some logs in /var/log about it.
 
1 members found this post helpful.
Old 11-15-2018, 08:08 AM   #12
bscho
Member
 
Registered: Nov 2012
Location: London
Distribution: Mint 20, Kali, Peppermint, Ubuntu, MakuluFlash, Fedora 32, Windows 12 Lite, MakuluLinux
Posts: 821

Original Poster
Rep: Reputation: 28
Talking

Quote:
Originally Posted by pan64 View Post
you need to understand the message: Read-only file system. There is no problem with the files, the filesystem is locked no changes allowed at all. It is completely irrelevand if you are using regular user or root, if you [try to] change permissions, because you are not allowed to modify the filesystem at all (that means chmod will fail too).

You need to remount the filesystem in read/write mode, that may help you. But there is a reason to make it readonly, especially when there is a problem with that filesystem and most probably you need to fix that issue before trying to modify it.
Usually you can find some logs in /var/log about it.
Don't think I can fix this I tried to move it and this happened:

barry@barry-Lenovo-ideapad-310-15ISK:/media/barry/MULTIBOOT$ mv "Files in Here" /home/barry
mv: cannot stat 'Files in Here/Videos': Input/output error
mv: cannot stat 'Files in Here/.x': Input/output error

This fetches back the original problem with the input/output error in this folder. That is the reason I hid this folder and made another thinking I could delete the bad folder later.

I guess it is because of the 1 terrabyte card I am using. It did not allow me to make partitions either so I left it as a single partition.

Have ordered more Terrabyte cards so I hope I will be able to partition properly and have better look when they come.
 
Old 11-15-2018, 08:24 AM   #13
satinet
Senior Member
 
Registered: Feb 2004
Location: England
Distribution: Slackware 14.2
Posts: 1,491

Rep: Reputation: 50
guess you don't care for the lsblk command........
I dunno I'm bowing out of this one. I don't understand what the system is - PC with a 1tb SD card with no write tab, connected via a phone or something? I don't even know what we are talking about here. Also skeptical about it really being a 1tb card (did it come from wish.com..........?).

You need to run the mount command as well as lsblk and post it on here. There isn't much point asking for help then ignoring it. Also the output of this command `sudo grep "\sro[\s,]" /proc/mounts`

Thing is root can delete files regardless of the file permissions so as I said in the other thread the issue likely to be something else. It wouldn't get mounted read only for no reason.

N.b - rm doesn't work on directories. If you just want to remove a directory you use the rmdir command (if it's empty). Otherwise you use the command rm -rf <thedirectory> (this also deletes all the sub folders etc).

non micro SD cards all have a write protect tab that i've ever seen.

Also per my previous comment it may be that you need to install the exfat-fuse and exfat-utils packages to work with very large SD cards. I did on my system. Although I don't understand how the card is connected to the machine at this point.

Last edited by satinet; 11-15-2018 at 08:26 AM.
 
1 members found this post helpful.
Old 11-15-2018, 08:43 AM   #14
bscho
Member
 
Registered: Nov 2012
Location: London
Distribution: Mint 20, Kali, Peppermint, Ubuntu, MakuluFlash, Fedora 32, Windows 12 Lite, MakuluLinux
Posts: 821

Original Poster
Rep: Reputation: 28
Talking

Quote:
Originally Posted by satinet View Post
guess you don't care for the lsblk command........
I dunno I'm bowing out of this one. I don't understand what the system is - PC with a 1tb SD card with no write tab, connected via a phone or something? I don't even know what we are talking about here. Also skeptical about it really being a 1tb card (did it come from wish.com..........?).

You need to run the mount command as well as lsblk and post it on here. There isn't much point asking for help then ignoring it. Also the output of this command `sudo grep "\sro[\s,]" /proc/mounts`

Thing is root can delete files regardless of the file permissions so as I said in the other thread the issue likely to be something else. It wouldn't get mounted read only for no reason.

N.b - rm doesn't work on directories. If you just want to remove a directory you use the rmdir command (if it's empty). Otherwise you use the command rm -rf <thedirectory> (this also deletes all the sub folders etc).

non micro SD cards all have a write protect tab that i've ever seen.

Also per my previous comment it may be that you need to install the exfat-fuse and exfat-utils packages to work with very large SD cards. I did on my system. Although I don't understand how the card is connected to the machine at this point.
The card is in a usb card reader that can also read mobile phones. Not the large card with the switch. unless the card has another switch I do not know about?

Thanks for that command rm -rf not in my Linux book

Got this:

barry@barry-Lenovo-ideapad-310-15ISK:/media/barry/MULTIBOOT$ rm -rf "Files in Here"
rm: cannot remove 'Files in Here/Pictures/May.JPG': Read-only file system
rm: cannot remove 'Files in Here/Pictures/Rose.JPG': Read-only file system
rm: cannot remove 'Files in Here/Pictures/Sekina.PNG': Read-only file system
rm: cannot remove 'Files in Here/Pictures/Liberty.JPG': Read-only file system
rm: cannot remove 'Files in Here/Documents': Read-only file system
rm: cannot remove 'Files in Here/Everything Else/IMG_0100.PNG': Read-only file system
rm: cannot remove 'Files in Here/Downloads': Read-only file system


Cannot figure out how turn off read only?
 
Old 11-15-2018, 09:15 AM   #15
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,592

Rep: Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880
The SDXC specification supports cards up to 2TB and SanDisk first revealed a 1 TB SDXC card back in 2016 so it appears to be technically possible. However, it isn't listed on their website for purchase and any 1TB card listed on Amazon appears to be a fake. I would imagine the cost to be US $800+ each. Where did you find these 1TB cards?

While you can access the phones memory card connected to a computer lower level functions like partitioning and the hdparm command will probably not work. I assume you originally formatted the card on the phone itself?

Do you have a smaller card you can try?

Last edited by michaelk; 11-15-2018 at 09:17 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Ubuntu 16.04 LTS USB Stick - make writeable Keruskerfuerst Ubuntu 5 10-23-2016 02:06 AM
[SOLVED] Make floppy writeable during Linux boot? Jerrold Linux - Newbie 5 08-20-2015 08:31 PM
[SOLVED] ufw status world writeable group writeable masuch Linux - Security 2 02-28-2012 10:31 AM
world writeable files will not stay world writeable antken Mandriva 1 03-02-2004 05:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux Mint

All times are GMT -5. The time now is 08:17 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration