LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Unable to delete read only files in USB (https://www.linuxquestions.org/questions/linux-newbie-8/unable-to-delete-read-only-files-in-usb-4175580358/)

Belikewater 05-21-2016 10:57 AM

Unable to delete read only files in USB
 
I have looked through the forums and have seen this issue however none of the fixes are helping me. What happened is I created an ISO image on USB yesterday for Chakra, somehow it messed up my entire computer. It wiped out my Bodhi OS. I had to run gparted to fix itt. Anyways, I am trying to delete the files on this usb and I get the error

chakra: Error removing file: Read-only file system
EFI: Error removing file: Read-only file system
isolinux: Error removing file: Read-only file system

Here is outputs from my terminal when i tried doing some of the suggestions on the forum:
Quote:

lucifer@lucifer-Satellite-C655:~$ umount /dev/sdba1
umount: /dev/sdba1 is not mounted (according to mtab)
lucifer@lucifer-Satellite-C655:~$ umount /dev/sdba2
umount: /dev/sdba2 is not mounted (according to mtab)
lucifer@lucifer-Satellite-C655:~$ sudo mount -t vfat //dev/sdb1 /media/external -o uid=1000,gid=1000,utf8,dmask=027,fmask=137
[sudo] password for lucifer:
mount: /dev/sdb1 already mounted or /media/external busy
mount: according to mtab, /dev/sdb1 is mounted on /media/lucifer/CHAKRA_2016-02-25
lucifer@lucifer-Satellite-C655:~$ umount /media/lucifer/CHAKRA_2016-02-25
lucifer@lucifer-Satellite-C655:~$ sudo mount -t vfat //dev/sdb1 /media/external -o uid=1000,gid=1000,utf8,dmask=027,fmask=137
mount: /dev/sdb1 already mounted or /media/external busy
mount: according to mtab, /dev/sdb1 is mounted on /media/lucifer/CHAKRA_2016-02-25
lucifer@lucifer-Satellite-C655:~$ mount
/dev/sda1 on / type ext4 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/cgroup type tmpfs (rw)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
udev on /dev type devtmpfs (rw,mode=0755)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
none on /run/shm type tmpfs (rw,nosuid,nodev)
none on /run/user type tmpfs (rw,noexec,nosuid,nodev,size=104857600,mode=0755)
none on /sys/fs/pstore type pstore (rw)
systemd on /sys/fs/cgroup/systemd type cgroup (rw,noexec,nosuid,nodev,none,name=systemd)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,user=lucifer)
/dev/sdb1 on /media/lucifer/CHAKRA_2016-02-25 type iso9660 (ro,nosuid,nodev,uid=1000,gid=1000,iocharset=utf8,mode=0400,dmode=0500,uhelper=udisks2)

I am frustrated dealing two days of this :( Perhaps ill forever be an idiot when it comes to Linux

Any suggestions?

pan64 05-21-2016 11:17 AM

in the first two commands you use /dev/sdba1 and /dev/sdba2 and they do not exist at all. (either sdb1 or sda1, but no sdba)

Belikewater 05-21-2016 11:35 AM

Thanks pan, I tried both and this is what I get

Quote:

lucifer@lucifer-Satellite-C655:~$ umount /dev/sbd1
umount: /dev/sbd1 is not mounted (according to mtab)
lucifer@lucifer-Satellite-C655:~$ umount /dev/sdb2
umount: /dev/sdb2 is not mounted (according to mtab)
lucifer@lucifer-Satellite-C655:~$ umount /dev/sda1
umount: only root can unmount UUID=4b6be06f-879e-4f48-ae1a-1088e8f34a93 from /
lucifer@lucifer-Satellite-C655:~$ sudo su
[sudo] password for lucifer:
root@lucifer-Satellite-C655:/home/lucifer# umount /dev/sda1
umount: /: device is busy.
(In some cases useful info about processes that use
the device is found by lsof(8) or fuser(1))
root@lucifer-Satellite-C655:/home/lucifer# umount /dev/sda2
umount: /dev/sda2: not mounted

pan64 05-21-2016 12:44 PM

you are not allowed to umount the actual /, that is normal. (that is /dev/sda1 now)
try to umount /media/lucifer/CHAKRA__2016-02-25

rknichols 05-21-2016 12:52 PM

Quote:

Originally Posted by Belikewater (Post 5548751)
Thanks pan, I tried both and this is what I get
Code:

lucifer@lucifer-Satellite-C655:~$ umount /dev/sbd1
umount: /dev/sbd1 is not mounted (according to mtab)


You simply mistyped "sdb1".

Please do not use QUOTE tags except for quoting from other postings. It makes it hard to include that material in a reply. Use CODE tags instead.

Belikewater 05-21-2016 01:24 PM

I am still unable to delete the files :(

root@lucifer-Satellite-C655:/home/lucifer# umount /media/lucifer/CHAKRA_2016-02-25
root@lucifer-Satellite-C655:/home/lucifer# umount /dev/sdb1
umount: /dev/sdb1: not mounted


not sure if my USB just got screwed yesterday

rknichols 05-21-2016 01:32 PM

Quote:

Originally Posted by Belikewater (Post 5548811)
I am still unable to delete the files :(

root@lucifer-Satellite-C655:/home/lucifer# umount /media/lucifer/CHAKRA_2016-02-25
root@lucifer-Satellite-C655:/home/lucifer# umount /dev/sdb1
umount: /dev/sdb1: not mounted


not sure if my USB just got screwed yesterday

You unmounted it twice. Of course the second try will fail. Either way would suffice.

ISO9660 is inherently a read-only filesystem. The only way to make changes is to extract all the files, then rebuild it with just the files you want to keep..

Belikewater 05-21-2016 01:33 PM

Gotcha, but i want to clear them all so I can write another ISO on it

rknichols 05-21-2016 02:19 PM

Quote:

Originally Posted by Belikewater (Post 5548813)
Gotcha, but i want to clear them all so I can write another ISO on it

Simply create or copy another ISO file on/to /dev/sdb1, just as you did originally. It will overwrite whatever is currently in that partition.

Note that if you're trying to create a bootable USB drive with that ISO, you should probably be putting it on /dev/sdb, not /dev/sdb1. ISOs need to be on the device, not in a partition, in order to boot.

Belikewater 05-21-2016 02:37 PM

thanks rknichols,

I tried it, got error that it needs me to mount usb. Tried mounting no luck. I am just going to give up and just stay on my current OS. I have burnt myself out troubleshooting linux the past month.

Thanks for the help

rknichols 05-21-2016 03:08 PM

Quote:

Originally Posted by Belikewater (Post 5548843)
thanks rknichols,

I tried it, got error that it needs me to mount usb.

If you could be a lot more specific about what the "it" was that you tried, you could get better help. Otherwise, only someone looking over your shoulder can help you.

astrogeek 05-21-2016 03:31 PM

Quote:

Originally Posted by Belikewater (Post 5548843)
I have burnt myself out troubleshooting linux the past month.

I mean this as constructive and helpful, but while you may have tried a few random things, you have not actually done any troubleshooting, at least in this thread.

As rknichols says, you need to be much more precise in the actions you are taking, the conclusions that result and the information you share with those trying to help.

I know how it feels to reach burnout on a problem, too. Usually taking a break and making a fresh start later is the best way out of it - worth a try.

Based on reading this thread, a single complete set of parameters (i.e. the precise device names and state of the system) should produce a single set of actions which, if implemented precisely, will produce the desired end - the new state. So far I think neither of those has been attained.

It just isn't this difficult.

Belikewater 05-21-2016 10:45 PM

Hi Rnichols and astrogeek, I appreciate your feedback and do find it constructive.

I ran mount in terminal
lucifer@lucifer-Satellite-C655:/media/lucifer$ mount CHAKRA_2016-02-25
mount: according to mtab, /dev/sdb1 is already mounted on /media/lucifer/CHAKRA_2016-02-25
mount failed

However when I use Unetbootin it tells me I must mount an USB first.

Belikewater 05-21-2016 11:47 PM

I figured it out. I had to create mount point and then mount it. Thanks rnichols about overwriting the files with the new iso image. That worked.

Belikewater 05-22-2016 12:14 AM

Nevermind still unable to overwrite the files. It keeps on saying I have to mount the USB ugh.... I have no idea what im doing wrong
I did command blkid and got output showing chakra on sdb1 and sdb2 not sure why. Ill keep researching.

root@lucifer-Satellite-C655:/home/lucifer# blkid
/dev/sdb1: LABEL="CHAKRA_2016-02-25" TYPE="iso9660"
/dev/sdb2: SEC_TYPE="msdos" LABEL="CHAKRAISO_E" UUID="AAFD-A2E6" TYPE="vfat"
/dev/sda1: UUID="4b6be06f-879e-4f48-ae1a-1088e8f34a93" TYPE="ext4"
/dev/sda5: UUID="449a8a4a-6cf7-40af-b854-a8ba3357f375" TYPE="swap"


All times are GMT -5. The time now is 11:59 PM.