LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-02-2019, 07:58 AM   #1
CatDog
LQ Newbie
 
Registered: Oct 2018
Posts: 15

Rep: Reputation: Disabled
how do I delete files and folders in rofs


I'm using Linux-Lite.
My aunt installed spyware in firefox.
So I've apt purged firefox and now I am trying to delete the firefox and firefox-addons folders in /rofs/usr/lib/
Opening the lib folder, or the firefox folder therein,as admin, does not allow me to delete.
 
Old 04-02-2019, 09:11 AM   #2
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: FreeBSD/Slackware-14.2+/ Win10
Posts: 9,493

Rep: Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024
on the cli
Code:
sudo rm -rv /rofs/usr/lib/fireFoxsFolder/*
to delete everything within that sub-directory. You have to be very careful when using rm -r it removes everything if you do not do it right. adding the * after the subdir insures it just deletes the contents within it, everything within that directory, and not that dir itself.

I'd use the distros commands to remove firefox first then check to see if there is any leftovers before issuing rm -r to do a manual clean up, then re-install Firefox.

when that dir is empty, you can use rmdir on it. that command only removes empty directories.


be sure you clean out the home for any Firefox files and directories, in .local, and .config.

mozilla is a directory for firefox as well.

this is if you want a completely clean fresh start as if it is the first time being ran.

Last edited by BW-userx; 04-02-2019 at 09:18 AM.
 
Old 04-02-2019, 09:51 AM   #3
CatDog
LQ Newbie
 
Registered: Oct 2018
Posts: 15

Original Poster
Rep: Reputation: Disabled
when you advise that I use the distro's commands to remove firefox first, are you talking about "sudo apt purge firefox"
Because I already done that.
 
Old 04-02-2019, 09:56 AM   #4
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: FreeBSD/Slackware-14.2+/ Win10
Posts: 9,493

Rep: Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024
Quote:
Originally Posted by CatDog View Post
when you advise that I use the distro's commands to remove firefox first, are you talking about "sudo apt purge firefox"
Because I already done that.
then goto the next step.
if you can log in as root user, maybe even do that before going to the next step.

or login root in the terminal,
su
passwd

Last edited by BW-userx; 04-02-2019 at 09:58 AM.
 
Old 04-02-2019, 11:23 AM   #5
CatDog
LQ Newbie
 
Registered: Oct 2018
Posts: 15

Original Poster
Rep: Reputation: Disabled
"su" prompts me to enter a password. I enter "passwd" (since I assume that's what you meant) and it tells me authentication failure. So I do "sudo -i" and that logged me in as root. Normally on terminal, there is a blue banner that says "linux" as my prompt. Now it's red and says "root". So like I said, I am running as root.
However, the command you gave me is telling me I don't have permission. the exact error is:
rm: cannot remove '/rofs/usr/lib/firefox/application.ini': Read-only file system

For every file in that folder.
 
Old 04-02-2019, 11:33 AM   #6
hazel
Senior Member
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware, OpenBSD
Posts: 3,924
Blog Entries: 11

Rep: Reputation: 2173Reputation: 2173Reputation: 2173Reputation: 2173Reputation: 2173Reputation: 2173Reputation: 2173Reputation: 2173Reputation: 2173Reputation: 2173Reputation: 2173
He didn't mean that you should literally enter "passwd"! He meant that you should enter the root password for your system. Only you know what that is.
 
Old 04-02-2019, 11:41 AM   #7
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: FreeBSD/Slackware-14.2+/ Win10
Posts: 9,493

Rep: Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024
how did it get to be read only? is this a usb stick or installed on hdd? if usb stick you could fire up another system then go into it via usb port. or mount that partition then go in and delete it.
 
Old 04-02-2019, 12:22 PM   #8
CatDog
LQ Newbie
 
Registered: Oct 2018
Posts: 15

Original Poster
Rep: Reputation: Disabled
@hazel oh, well, in that case I have no idea what my password is LOL

@BW-userx yes this a USB stick. I'll try loading up a different distro, but I could have sworn that all I would get is the directory called casper.
But I'll go ahead and give that a try.
 
Old 04-02-2019, 12:45 PM   #9
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: FreeBSD/Slackware-14.2+/ Win10
Posts: 9,493

Rep: Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024
let me know. I could download it burn it to a stick then fiddle with it to see what I come up with.

if this is not a persistence usb stick ios, then everything that is written to it gets lost whenever it is shut down.

Last edited by BW-userx; 04-02-2019 at 01:11 PM.
 
Old 04-02-2019, 02:32 PM   #10
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 13,158
Blog Entries: 9

Rep: Reputation: 3604Reputation: 3604Reputation: 3604Reputation: 3604Reputation: 3604Reputation: 3604Reputation: 3604Reputation: 3604Reputation: 3604Reputation: 3604Reputation: 3604
Quote:
Originally Posted by CatDog View Post
rm: cannot remove '/rofs/usr/lib/firefox/application.ini': Read-only file system
output of
Code:
mount
ls -al /
whoami
please.
 
Old 04-02-2019, 03:15 PM   #11
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: FreeBSD/Slackware-14.2+/ Win10
Posts: 9,493

Rep: Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024
ahh yeah I just booted into live linux then seen rofs that is when what that means came to me,

read only filesystem.

as stated and I didn't look into this particular one too much, though I did see something like create a restore point, but if not it then loses whatever is installed or any changes made to it just like every live usb ios without persistence, every-time it shuts down.

that restore point, I have no idea what they did for that. but I'd do a check on yours. just created a blank file reboot and see if it is still there when you boot back into it.

Last edited by BW-userx; 04-02-2019 at 03:16 PM.
 
Old 04-02-2019, 03:24 PM   #12
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 4,329

Rep: Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978
Consider the name "/rofs" and the first letters of the words "Read Only File System". It appears that you are running Linux Lite from a CD ROM or USB stick and not actually installed to a disk. The filesystem mounted on /rofs is actually a compressed squashfs that is inherently read-only. It can be altered only by unpacking it and the repacking it after making the changes. It is extremely unlikely that anything in that image was altered while the system was running.

Persistent changes are kept in a COW (Copy On Write) filesystem mounted on /. The directory where you want to delete things is /usr/lib, not /rofs/usr/lib, which is in the read-only reference image.
 
  


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
[SOLVED] How to search through contents of .csv and .txt files in folders and sub-folders grumpyskeptic Linux - Software 6 03-04-2018 06:57 AM
Shell Script to compare folders,Sub-Folders and Sub-Sub-Folders unix_72427 Programming 8 08-08-2012 03:51 PM
Can I delete files in /mnt/tmp? and Files in the trash can will not delete? M$ISBS Slackware 15 10-03-2009 12:56 AM
find -exec command to recursively delete files and folders in folders with X name Joan Murt Linux - Newbie 2 07-08-2009 05:35 PM
Samba can create new files and folders but access denied in any new folders k.king Linux - Networking 2 01-15-2006 07:14 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:40 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration