Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I have a disk that came from an external drive which was dropped and doesn't mount when connected via USB. I removed the drive and connected it to a Windows PC which reports a GPT protected partition that can not be mounted. I therefore assume it was formatted in another OS.
I mounted it on a Linux Mint system and the disk is now readable. Some files/folders can be copied off the disk but most not. Some files can be opened on the original disk but still not copied to another device.
When I open a folder I see a cross in the bottom right corner of the folders I want to copy. I can then right click on and open as administrator and a new windows appears (with a red background). From there I can open a document - to read a .PDF for example, but when I try to drag it to a new location I get the error message "Error while copying. The file <name here> cannot be handled because you do not have permissions to read it".
If I right click on a file and select properties, permissions tab, then try to change 'others' access I get the error message "The permissions could not be changed. Sorry, Could not change the permissions of <file name>: Error setting permissions: read-only file system".
The same thing happens when I try to change ownership: :read-only file system". How can I get to copy files off this disk please ? My knowledge of Linux is very limited.
Click here to see the post LQ members have rated as the most helpful post in this thread.
Thanks for the reply. How do I get to the command line prompt ?
If I want to copy the entire contents of my disk to a folder on the desktop, how would I refer to those locations in the CP command please ?
Good questions. I'm not familiar with the distro of Linux you're using, but to get to the command prompt you need to find the Terminal or Terminal Emulator program. Once there, you need to know the path of your drive - it might be /media/sdb1 or /mnt/sdc1, for example. Once you know that, just
sudo cp -r /device/path/* /destination/folder/
-r tells it to copy recursivley - copying all subfolders - and the asterisk is a wildcard, which means, in this case, all files and folders on that device.
If (as the message you reported in your first post suggested) the whole file system is mounted read only, even root will not be able to make any changes to the permissions. If you are in a terminal window, issue the command mount (with no arguments) to get a list of your currently mounted file systems. Look for the problem drive in the list, and verify the mount settings. If it says RO, then the command su -c 'mount -o remount,defaults /dev/sd[xn] /[place]' (where [xn] is the drive letter and partition number of the file system you're mounting, and [place] is the location at which you're mounting it) should remount the file system with read and write permissions.
Note that your drive may have incurred physical damage when it hit the floor which might make it impossible for you to recover some files. Have you tried running fsck on the (unmounted) drive? Warning: You should probably image the drive (use the ddrecover command) before running fsck so you have a "prior to messing" drive copy. In fact, you might be better off imaging the drive and using the image in your recovery efforts instead of the (damaged?) drive. If the drive has incurred physical damage, the damage may get worse every time you apply power to the drive. (For example, a bent drive head could be scraping the drive platter, filling the drive with magnetic "dust.")
I opened the the File Browser, right clicked the drive then mounted it. Then right clicked again and opened it in Terminal. I then entered the command
sudo cp -r * ~/Desktop
That seemed to work - thanks. I now have a copy on a disk I believe to be working properly.
Unfortunately the protections seem to have been copied also. If I open the folder into which the files were copied, many sub-folders have a cross on them. I right clicked one and opened as Administrator (red background). I was seemingly able to change the owner to me and the Access to read-write, but when I try to drag the file to the desktop I get the error "The file <file name> cannot be handled because you do not have permissions to read it". However, if I double click it (a .PDF file) I get to read it. Confusion.
My ultimate aim here is to copy all the files to a CD where they can be read by anyone on any computer.
PTrenholme, our posts crossed in the ether. I typed Mount and the first line is what I presume relates to the problem disk:
/dev/sda1 on / type ext4 (rw,errors=remount - ro)
When I copied the files there were two that caused errors but I don't care about those two.