LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Puppy
User Name
Password
Puppy This forum is for the discussion of Puppy Linux.

Notices


Reply
  Search this Thread
Old 12-03-2014, 01:16 PM   #1
Fixit7
Senior Member
 
Registered: Mar 2014
Location: El Lago, Texas
Distribution: Ubuntu_Mate 16.04
Posts: 1,374

Rep: Reputation: 169Reputation: 169
Read only file system


When I run this script...

Code:
cd /root/.mozilla/firefox/rf295epb.default/
cp bookmarks.html /root/Storage
cp bookmarks.html /mnt/sdb1/Linux_Files/Tahr_6.0_bookmarks.html
I get this. ??

Code:
# ./test.sh
cp: cannot create regular file ‘/mnt/sdb1/Linux_Files/Tahr_6.0_bookmarks.html’: Read-only file system
#
I am trying to copy to an external drive.

The script works when run from Puppy 5.9.3 ?

Last edited by Fixit7; 12-03-2014 at 01:44 PM.
 
Old 12-03-2014, 02:09 PM   #2
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,882
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
I don't recommend you run things as root, which is what it appears you're doing. Weird though then that it doesn't also have write privileges to that drive, unless that drive happens to be mounted as read-only. A simple issue of the mount command will show you what's mounted and what mode the media is mounted as, ro or rw.
 
Old 12-03-2014, 07:43 PM   #3
Fixit7
Senior Member
 
Registered: Mar 2014
Location: El Lago, Texas
Distribution: Ubuntu_Mate 16.04
Posts: 1,374

Original Poster
Rep: Reputation: 169Reputation: 169
Puppy Linux is designed for root use.

I use many security protocols.

All the drives are showing rw.
 
Old 12-03-2014, 08:54 PM   #4
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,982

Rep: Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626
The place you want to put it seems to have an issue as far as I can tell.

Last edited by jefro; 12-03-2014 at 08:56 PM.
 
Old 12-03-2014, 09:09 PM   #5
Fixit7
Senior Member
 
Registered: Mar 2014
Location: El Lago, Texas
Distribution: Ubuntu_Mate 16.04
Posts: 1,374

Original Poster
Rep: Reputation: 169Reputation: 169
Quote:
Originally Posted by jefro View Post
The place you want to put it seems to have an issue as far as I can tell.
What do you mean by issue ?
 
Old 12-04-2014, 01:37 AM   #6
Head_on_a_Stick
Senior Member
 
Registered: Dec 2014
Location: London, England
Distribution: Debian stable (and OpenBSD-current)
Posts: 1,187

Rep: Reputation: 285Reputation: 285Reputation: 285
How have you mounted /dev/sdb1?

I would use:
Code:
# mount /dev/sdb1 /mnt
And then copy the files to /mnt/Linux_Files/etc

I don't think sdb1 will appear in the filesystem -- it is a block device.
 
Old 12-04-2014, 01:52 AM   #7
Fixit7
Senior Member
 
Registered: Mar 2014
Location: El Lago, Texas
Distribution: Ubuntu_Mate 16.04
Posts: 1,374

Original Poster
Rep: Reputation: 169Reputation: 169
On my system, sdb1 is a NTFS external hard drive.

# mount /dev/sdb1 /mnt
Mount is denied because the NTFS volume is already exclusively opened.
The volume may be already mounted, or another software may use it which
could be identified for example by the help of the 'fuser' command.
 
Old 12-04-2014, 07:37 AM   #8
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,882
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
Quote:
Originally Posted by Head_on_a_Stick View Post
How have you mounted /dev/sdb1?

I would use:
Code:
# mount /dev/sdb1 /mnt
And then copy the files to /mnt/Linux_Files/etc

I don't think sdb1 will appear in the filesystem -- it is a block device.
Having a directory named sdb1 under the /mnt tree is not a problem, it can have the same name as the device, the system can tell the difference. In fact I do this same sort of convention, myself.

Quote:
Originally Posted by Fixit7 View Post
On my system, sdb1 is a NTFS external hard drive.

# mount /dev/sdb1 /mnt
Mount is denied because the NTFS volume is already exclusively opened.
The volume may be already mounted, or another software may use it which
could be identified for example by the help of the 'fuser' command.
A few things to try. Unmount it and then re-mount it. Verify that it is mounted where you believe it to be, i.e. what is the actual output of the mount command with respect to this particular external drive? When you do have it mounted, can you cd to a directory on there and create a file, like can you do something like:
Code:
echo 1 > test.txt
And then perform an ls -l to see what the attributes of that file are. Something is wrong with how you can access that drive, however right now it's not apparent.

Here's an example of a mounted read-only thumb drive added to my system as well as a two partition compact flash which is RW:
Code:
/dev/sdf1 on /media/Live_Distro type iso9660 (ro,nosuid,nodev,uid=1000,gid=1001,iocharset=utf8,mode=0400,dmode=0500,uhelper=udisks)
/dev/sdb1 on /media/3e0f0916-712c-49a4-baa0-71c903e8fa44 type ext2 (rw,nosuid,nodev,uhelper=udisks)
/dev/sdb2 on /media/18d85447-a529-465e-b621-7e70f6744c2d type xfs (rw,nosuid,nodev,uhelper=udisks)
I can't write to /media/Live_Distro because it is RO

I however can write to either of /media/3e0f0916-712c-49a4-baa0-71c903e8fa44 or /media/18d85447-a529-465e-b621-7e70f6744c2d because those are both RW. When I perform an ls -l on my /media directory, those mounted directories are owned by root and when I try to write data to them, I do have to be root.

This is all, already resolved supposedly by what you've said. The only other point is that as root I also have RWX permissions for those directories so make sure the directories allow root that access.

Further, make sure that the Linux_Files directory exists on your external disk. A copy will fail if the target directory is not present, even though the error says something totally different, I've seen misleading errors before. There are also other flags for cp, such as -v and -f.
 
Old 12-04-2014, 03:06 PM   #9
Fixit7
Senior Member
 
Registered: Mar 2014
Location: El Lago, Texas
Distribution: Ubuntu_Mate 16.04
Posts: 1,374

Original Poster
Rep: Reputation: 169Reputation: 169
total 397
-rwxrwxrwx 1 root root 336132 Dec 3 13:39 BACKUP
drwxrwxrwx 1 root root 12288 Dec 3 13:39 Linux_Files
drwxrwxrwx 1 root root 0 Nov 22 12:12 Linux_Image_Backups
drwxrwxrwx 1 root root 4096 Nov 13 23:45 Linux_ISOS
drwxrwxrwx 1 root root 4096 Dec 3 23:32 Macrium_Images
-rwxrwxrwx 1 root root 0 Dec 4 15:05 prob.txt
drwxrwxrwx 1 root root 0 Dec 2 10:29 RECYCLER
drwxrwxrwx 1 root root 0 Dec 3 22:39 System Volume Information
-rwxrwxrwx 1 root root 2 Dec 4 15:05 test.txt
-rwxrwxrwx 1 root root 12 Dec 1 08:33 TOSHIBA SDD1
drwxrwxrwx 1 root root 45056 Dec 3 23:32 Windows_Files
 
Old 12-04-2014, 03:13 PM   #10
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,882
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
OK fine. It's somewhat helpful in that it shows that the subdirectory is RWX and owned by root.

Can you cd to that directory and create a file?
Code:
echo 1 > test.txt
Can you copy a file to there using the command line?
Code:
cd $HOME
echo 2 > test2.txt
cp test2.txt /mnt/sdb1/Linux_Files/.
If you can do these things, I have no real explanation, the cp in your script should work. You could put "set -xv" after the #!/bin/sh or #!/bin/bash line in your script to enable some verbose output, but not sure what it will tell you any more than what you're getting.

If you can't do those test things, then you need to figure out why. Right now I don't see any reason why those tests shouldn't work.
 
Old 12-04-2014, 03:24 PM   #11
Fixit7
Senior Member
 
Registered: Mar 2014
Location: El Lago, Texas
Distribution: Ubuntu_Mate 16.04
Posts: 1,374

Original Poster
Rep: Reputation: 169Reputation: 169
It will be one of those mysteries for now. :-)

I was able to create a file, but got a read-only file system message


# cp bookmarks.html /mnt/sdb1/Linux_Files/Tahr_6.0_bookmarks.html
cp: cannot create regular file ‘/mnt/sdb1/Linux_Files/Tahr_6.0_bookmarks.html’: Read-only file system
 
Old 12-05-2014, 06:35 AM   #12
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,882
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
The only other thoughts that I have are that the file already exists where you want to copy it and it is locked, owned by another user, and/or the privileges do not allow even root to erase or modify it. I'd be curious if you could copy a totally different file to that same directory. Or if the file Tahr_6.0_bookmarks.html already exists.
Code:
cd $HOME
echo 1 > test.txt
cp test.txt /mnt/sdb1/Linux_Files/.
ls -l /mnt/sdb1/Linux_Files
rm -f /mnt/sdb1/Linux_Files/Tahr_6.0_bookmarks.html
cp -vf bookmarks.html /mnt/sdb1/Linux_Files/Tahr_6.0_bookmarks.html
I keep coming back to "your root" you should be able to do this, and especially if you can create a file in the /mnt/sdb1/Linux_Files directory. So it would seem that either the source file bookmarks.html is locked somehow (very unlikely, especially for reading) or the target location/file is locked.
 
Old 12-05-2014, 02:43 PM   #13
Fixit7
Senior Member
 
Registered: Mar 2014
Location: El Lago, Texas
Distribution: Ubuntu_Mate 16.04
Posts: 1,374

Original Poster
Rep: Reputation: 169Reputation: 169
Thanks for all your help.

Puppy 5.9.3 is my main O.S., so this script works to backup up both of my Puppy distros.

Maybe Thunar or Tahr Puppy 6.0 has a bug ?

Quote:
#!/bin/bash
# 12.05.2014 14:39:23
# Linux Puppy 5.9.3
# Backup_Impt_Files.sh BACKUP SCRIPT FOR PUPPY 5.9.3 AND Puppy Tahr 6.0
clear
cd /
touch -am /mnt/sdb1/Linux_Files/TOSHIBA_SDB1
touch -am PUPPY_SLACKO_5.9.3_SDA5
cd mnt/sda2
touch -am /mnt/sda2/TAHR_PUPPY_6.0
#
cd /
cd/
rm -rf 'system volume information'
rm -rf 'Recycled'
rm -rf 'RECYCLER'
rm -rf '/mnt/sda2/Recycled'
cd /root/.mozilla/firefox/cavkygim.default
cp bookmarks.html /mnt/sdb1/Linux_Files/Puppy_5.9.3_bookmarks.html
if [ ! -d /mnt/sdc1 ]; then
cp bookmarks.html /mnt/sdc1/Linux_Files/Puppy_5.9.3_bookmarks.html
fi
#
cd /root/Scripts
zip -u Puppy_5.9.3_Bash_Scripts.zip *.sh
cp Puppy_5.9.3_Bash_Scripts.zip /mnt/sdb1/Linux_Files
if [ ! -d /mnt/sdc1 ]; then
cp Puppy_5.9.3_Bash_Scripts.zip /mnt/sdcb1/Linux_Files
fi
#
cd /root/Icons
zip -u Puppy_5.9.3_Linux_Icons.zip *.png
cp Puppy_5.9.3_Linux_Icons.zip /mnt/sdb1/Linux_Files
if [ ! -d /mnt/sdc1 ]; then
cp Puppy_5.9.3_Linux_Icons.zip /mnt/sdc1/Linux_Files
fi
#
cd /usr/share/backgrounds
zip -u Puppy_5.9.3_Linux_Backgrounds.zip *.png
cp Puppy_5.9.3_Linux_Backgrounds.zip /mnt/sdb1/Linux_Files
if [ ! -d /mnt/sdc1 ]; then
cp Puppy_5.9.3_Linux_Backgrounds.zip /mnt/sdc1/Linux_Files
fi
#
cd /root/Documents
zip -u Puppy_5.9.3_Linux_Documents.zip *.txt *.doc *.rtf *.html *.htm
cp Puppy_5.9.3_Linux_Documents.zip /mnt/sdb1/Linux_Files
if [ ! -d /mnt/sdc1 ]; then
cp Puppy_5.9.3_Linux_Documents.zip /mnt/sdc1/Linux_Files
fi

cd /mnt/sda2/root/.mozilla/firefox/rf295epb.default/
cp bookmarks.html /root/Storage
cp bookmarks.html /mnt/sdb1/Linux_Files/Tahr_6.0_bookmarks.html
cp bookmarks.html /mnt/sdc1/Linux_Files/Tahr_6.0_bookmarks.html
cp bookmarks.html /root/Storage
cp bookmarks.html /mnt/sdb1/BACKUP
#
cd /mnt/sda2/root/Tahr_Scripts
zip -u Tahr_6.0_Bash_Scripts.zip *.sh
cp Tahr_6.0_Bash_Scripts.zip /mnt/sdb1/Linux_Files
cp Tahr_6.0_Bash_Scripts.zip /mnt/sdc/root/Storage1/Linux_Files
cp Tahr_6.0_Bash_Scripts.zip /root/Storage
cp Tahr_6.0_Bash_Scripts.zip /mnt/sdb1/BACKUP
#
cd /mnt/sda2/root/Icons
zip -u Tahr_6.0_Linux_Icons.zip *.png
cp Tahr_6.0_Linux_Icons.zip /mnt/sdb1/Linux_Files
cp Tahr_6.0_Linux_Icons.zip /root/Storage
cp Tahr_6.0_Linux_Icons.zip /mnt/sdb1/BACKUP
#
cd /mnt/sda2/usr/share/backgrounds
zip -u Tahr_6.0_Linux_Backgrounds.zip
cp Tahr_6.0_Linux_Backgrounds.zip /mnt/sdb1/Linux_Files
cp Tahr_6.0_Linux_Backgrounds.zip /mnt/sdc1/Linux_Files
cp Tahr_6.0_Linux_Backgrounds.zip /root/Storage
cp Tahr_6.0_Linux_Backgrounds.zip /mnt/sdb1/BACKUP
#
# Backup Tahr 6.0 files !!
#
cd /mnt/sda2/root/Documents
zip -u Tahr_6.0_Linux_Documents.zip *.txt *.doc *.rtf *.html *.pdf
cp Tahr_6.0_Linux_Documents.zip /mnt/sdb1/Linux_Files
cp Tahr_6.0_Linux_Documents.zip /mnt/sdbc/Linux_Files
cp Tahr_6.0_Linux_Documents.zip /root/Storage
cp Tahr_6.0_Linux_Documents.zip /mnt/sdb1/BACKUP
#
gxmessage -center -timeout 3 BACKUP FROM PUPPY 5.9.3 and Tahr Puppy 6.0 TO TOSHIBA DRIVE COMPLETE.
#

 
Old 12-05-2014, 03:43 PM   #14
Teufel
Member
 
Registered: Apr 2012
Distribution: Gentoo
Posts: 616

Rep: Reputation: 142Reputation: 142
Why wouldn't you check how your drive was mounted actually? What is the "mount" command output?
 
Old 12-05-2014, 05:29 PM   #15
Fixit7
Senior Member
 
Registered: Mar 2014
Location: El Lago, Texas
Distribution: Ubuntu_Mate 16.04
Posts: 1,374

Original Poster
Rep: Reputation: 169Reputation: 169
# mount /dev/sdb1 /mnt

Mount is denied because the NTFS volume is already exclusively opened.
The volume may be already mounted, or another software may use it which
could be identified for example by the help of the 'fuser' command
 
  


Reply



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
chmod: changing permissions of `/usr../bin': Read-only file File System Issue cdhar Linux - Newbie 3 12-31-2012 06:17 AM
Read Only File System? Can't read superblock! haughjd Linux - Software 4 01-15-2008 08:27 AM
web server (fedora core 5) became read-only file system after i upload a file nggs8411 Linux - Server 1 03-26-2007 09:23 AM
How to read .chm file in fedora, can't mount ntfs file system ishti_du Linux - Newbie 12 03-06-2007 03:27 AM
Change from Read only to Read Write File System? justiceisblind Linux - Newbie 3 03-03-2002 07:23 PM

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

All times are GMT -5. The time now is 04:37 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