LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 01-15-2021, 04:27 PM   #1
scramasax
LQ Newbie
 
Registered: Jan 2021
Posts: 3

Rep: Reputation: Disabled
mounting old system drive in Documents


I had an Ubuntu system that was working well since 4 years but after some recent update I slowly lost part of the system where the video lower its resolution, booting to new version was not working and sound was lost. I tried to solve the problem but after some days the system was not booting anymore. I bought a new SSD drive and install a new version of Fedora on it. The old hard disk is still on the system.

What is the best way to make that drive available as a data drive mounted in Documents? I want to keep the home directory and settings of software I installed to copy those settings to the new system and delete things I won't use like /var and reorganize things slowly. Right now I only succeed to mount it as read only

-It is 4 TB with 3 partition where only the LVM2 partition interest me to mount. It was a one disk lvm
-SMART indicate the disk is fine
-FSCK indicate there is not problem on it
-A lot of the files are owned by root so I will need to replace all the permission to delete those files
 
Old 01-15-2021, 08:00 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,324
Blog Entries: 28

Rep: Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142
It is not a good idea to mount it directly to your /home/Documents folder. This would be preferable:

Add the drive to your /etc/fstab, with a mount point in /media (or /mnt if you prefer; I use /media for drives that I add to the system), then make a symlink to it under Documents.
 
Old 01-15-2021, 09:37 PM   #3
scramasax
LQ Newbie
 
Registered: Jan 2021
Posts: 3

Original Poster
Rep: Reputation: Disabled
The mount was different in /media I could write to it.
 
Old 01-15-2021, 09:45 PM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,128

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
Quote:
Originally Posted by scramasax View Post
I want to keep the home directory and settings of software I installed to copy those settings to the new system and delete things I won't use like /var and reorganize things slowly.
This may not necessarily be a good idea - it's likely the versions will be different from Ubuntu to Fedora, not to mention the configurations. Might work, or might cause unusual quirks.
Quote:
Right now I only succeed to mount it as read only
Maybe a good thing - that way you always have the old data to refer to/copy. Later when all is done, simply run mkfs on the filesystem and use it for whatever you want.
 
Old 01-16-2021, 05:36 AM   #5
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,510

Rep: Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491
I don't know how familiar you are with the mount command but, if you currently have directories/files in your /home/user/Documents directory and mount another drive partition there the original directories/files which were in Documents will be unavailable to you until you unmount the new drive/partition.

Quote:
The mount was different in /media I could write to it.
No, it is the owner and permissions that allow that on Linux filesystems not the location of the mount point.
 
Old 01-16-2021, 09:26 AM   #6
computersavvy
Senior Member
 
Registered: Aug 2016
Posts: 3,345

Rep: Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484
To find out if it is a file ownership or permissions issue a simple "ls -l" command in the root directory where that disk is mounted (and another as "ls -l ../" in the same location. The output should show that.
 
Old 01-16-2021, 09:46 AM   #7
Soadyheid
Senior Member
 
Registered: Aug 2010
Location: Near Edinburgh, Scotland
Distribution: Cinnamon Mint 20.1 (Laptop) and 20.2 (Desktop)
Posts: 1,672

Rep: Reputation: 486Reputation: 486Reputation: 486Reputation: 486Reputation: 486
Note that if you did mount it to the documents folder, anything within the original documents folder on your main disk would no longer be accessible till you unmounted it again. Quite a good way to hide sensitive stuff to prevent your wife/girlfriend/husband/boyfriend/brother/sister/partner, etc, from rummaging through your computer files when you forgot to log out though!

Play Bonny!

 
Old 01-16-2021, 12:35 PM   #8
fatmac
LQ Guru
 
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Distribution: Mainly Devuan, antiX, & Void, with Tiny Core, Fatdog, & BSD thrown in.
Posts: 5,493

Rep: Reputation: Disabled
I'd create a new mount point /Data, then put it into /etc/fstab, then link it into your /home directory, change permissions & ownership, (if necessary).
 
  


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
Documents saved as MS Word documents Raggety Linux - Software 2 01-14-2009 02:16 PM
partitioning drive and mounting old home on new drive Peter Shepard Ubuntu 3 10-22-2007 04:10 PM
how can I view and edit "Documents to Go" documents in Linux? izquierdista Linux - Software 7 08-30-2007 07:58 AM
New install on new hard drive messed up old install of old hard drive. AbsoluteMonkey Linux - General 26 01-10-2007 12:21 PM
big plans for old old old laptop vdogvictor Linux - Laptop and Netbook 0 05-26-2004 07:33 PM

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

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