LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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!

Notices


Reply
  Search this Thread
Old 04-26-2017, 04:23 AM   #1
andrew262
LQ Newbie
 
Registered: May 2014
Posts: 10

Rep: Reputation: Disabled
External hard drive to copy the undeleted files using Testdisk


Hello everybody,

I use Testdisk from the System Rescue Cd to undelete files.

I need to use an external hard drive to copy the undeleted files found by Testdisk.

How could I mount the external hard drive and such Testdisk could copy the files on it? I prefer to use the graphical interface for this not the command line.

Thanks in advance,

Andrew262
 
Old 04-26-2017, 04:37 AM   #2
notKlaatu
Senior Member
 
Registered: Sep 2010
Location: Lawrence, New Zealand
Distribution: Slackware
Posts: 1,077

Rep: Reputation: 732Reputation: 732Reputation: 732Reputation: 732Reputation: 732Reputation: 732Reputation: 732
Hi Andrew262. If you prefer to get instructions on the GUI, you have to tell us which GUI you want to use That's the nice thing about a Posix shell; easy to provide instructions for in plain text, and for most common system tasks, it's pretty much the same no matter what.

I'll take a stab at it, but if you let us know what desktop GUI you're running, that will probably help. You can mount an external drive in almost any graphical file manager, such as Nautilus, Caja, Thunar, Dolphin, and so on. As long as you have one of those loaded, open a window, plug your hard drive in, and then click on it in the side pane of the file manager to mount it. That ought to work.

Here's a screenshot. Notice the little drive icon in the lower left of the dolphin window. I clicked that, and the drive mounted. https://www.unixporn.pro/i/bM7uLVC.jpg

Try that. If it doesn't work, report back.

If it does work, kindly report back.

Edit: in spite of you preferring the GUI, here's how to do it in a shell:

1. Look at the drives currently attached to your computer:

Code:
$ lsblk
2. Plug in your external hard drive.

3. Look at the drives again:

Code:
$ lsblk
The new entry there is the drive you just pligged in. Let's call it sdx (it will probably be sdb or sdc, but I don't know your setup).

4. Mount your drive:

Code:
$ sudo mkdir /storage
$ sudo mount /dev/sdx /storage
5. That's all. Your drive is now located at /storage

You can open a file manager to that location in your GUI by typing in the name of the file manager you use, plus the path. For example:

Code:
$ thunar /storage &

Last edited by notKlaatu; 04-26-2017 at 04:43 AM. Reason: gave instructions via the shell in spite of GUI request, because it's just too efficient to not do.
 
Old 04-26-2017, 04:46 AM   #3
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
Just to add to notKlaatu's reply, often the file manager will automatically mount any devices that are connected. In that case you don't need to do anything, although you may need to make a note of the actual mount point so that you can point Testdisk at the device.

This is the case, for example, in my Linux Mint 18.1 system using the Caja file manager.
 
Old 04-26-2017, 04:57 PM   #4
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,772

Rep: Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599
Almost any big name distro can be booted live and use testdisk if you want to use a gui.

http://www.cgsecurity.org/wiki/TestDisk_Livecd

See this for clues to use as installed rescue or from live media with package manager while live.
 
Old 04-28-2017, 06:12 AM   #5
andrew262
LQ Newbie
 
Registered: May 2014
Posts: 10

Original Poster
Rep: Reputation: Disabled
Hello everybody,

thanks for your replies.

NotKlaatu thanks for your tutorial. I've tried it and got this message: " you must specify the filesystem type".

I am using System Rescue Cd to launch Testdisk to undelete the files.

Years ago I've been able to mount the external hard drive by typing "startx" from System Rescue Cd and once I entered in the GUI I've clicked on something like "System", ???, then "File Manager" and I've been able to access the external drive and to create directories on it. Then I quit startx, I launched Testdisk and then Testdisk copied the deleted files directly in the directories I've created in the GUI.

Could you please help me how to do it again from System Rescue Cd's GUI.

Thanks in advance,

Andrew.


'
 
Old 04-28-2017, 07:10 AM   #6
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware, Ubuntu
Posts: 10,094

Rep: Reputation: 2369Reputation: 2369Reputation: 2369Reputation: 2369Reputation: 2369Reputation: 2369Reputation: 2369Reputation: 2369Reputation: 2369Reputation: 2369Reputation: 2369
The "startx" command gets you into a graphical user interface and you can then navigate in the file manager to where the device/partition is mounted. If you got an error message " you must specify the filesystem type" then what you need to do is specify the filesystem. Since we don't know what partition on your disk you are referring to and we don't know what filesystem is on the partition, we can't do more than give an example below of a simple mount command with and without filesystem type:

Quote:
mount /dev/sda1 /mnt/data
mount -t ext4 /dev/sda1 /mnt/data
You would obviously need to create the 'data' directory first (explained in post above) and do this as root which is probably the default on a Rescue disk. The "ext4" is the filesystem so if yours is different you will obviously need to change that.

I don't have System Rescue available but, most newer Linux systems will have disk partitions available under the /media directory by UUID so if you can find the file manager and navigate to the /media directory, check to see if your external drive partition is there. You should be able to determine which it is with the lsblk command explained above. If not, you should be able to create a directory and mount the partition there.
 
  


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] I Installed an external Hard drive using Gparted. I cannot move files to the external Liz99 Linux - Newbie 15 04-20-2015 05:40 PM
how to copy files from red hat linux to external hard drive Dystu Linux - Newbie 6 01-04-2015 03:10 AM
can copy to but not write to external hard drive houndhen Linux - Hardware 8 12-20-2009 09:11 AM
Unable to Copy Files To External Hard Drive rvijay Linux - General 17 07-18-2009 10:42 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:55 AM.

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