LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 05-30-2010, 06:27 PM   #16
jamescondron
Member
 
Registered: Jul 2007
Location: Scunthorpe, UK
Distribution: Ubuntu 8.10; Gentoo; Debian Lenny
Posts: 961

Rep: Reputation: 70

Directories need to be empty to mount on them; either make this so or set your ntfs partition to mount elsewhere
 
Old 05-30-2010, 06:29 PM   #17
alunduil
Member
 
Registered: Feb 2005
Location: San Antonio, TX
Distribution: Gentoo
Posts: 684

Rep: Reputation: 62
So if I understand you correctly, you are trying to use an NTFS partition as your home directory? This seems like it should be possible but you'll need the files from your old home directory.

1. Unmount the NTFS volume.
2. As root mv /home/barth{,.bak}
3. As root again mkdir /home/barth.
4. Chown /home/barth to match /home/barth.bak
5. Remount the NTFS volume.
6. cp -pr /home/barth.bak/* /home/barth.bak/.[^.]* /home/barth

Be careful, if you screw up at some point there is the possibility you can lose your data completely.

Regards,

Alunduil
 
Old 05-30-2010, 06:35 PM   #18
alunduil
Member
 
Registered: Feb 2005
Location: San Antonio, TX
Distribution: Gentoo
Posts: 684

Rep: Reputation: 62
Just for informational purposes: directories do _not_ have to be empty to mount a device on them but if you do mount a device on a nonempty directory all files that were in that directory will be *unavailable*. They will not be deleted or removed but they will not be accessible from that mount point anymore.

Just to continue the fun with mounting devices, you can mount one device in several mount points including underneath of itself (why you would do that I don't know). Thus mounting over other mountpoints or directory locations can give a diverse and easy to manipulate runtime experience. Especially, when you couple this idea with pam_mount.so.

Regards,

Alunduil
 
Old 05-30-2010, 06:38 PM   #19
jamescondron
Member
 
Registered: Jul 2007
Location: Scunthorpe, UK
Distribution: Ubuntu 8.10; Gentoo; Debian Lenny
Posts: 961

Rep: Reputation: 70
Quite, but it makes a certain amount of sense to assume this

And also be wary of cyclical mountpoints. I lost a hard drive because of these, chroot, rm -rf and idiocy once.
 
Old 05-30-2010, 08:28 PM   #20
bluegospel
Member
 
Registered: Jan 2010
Distribution: centOS
Posts: 404

Original Poster
Rep: Reputation: 53
mv /home/barth{,.bak}

Could you break this down for me? What's the {,.bak}?
 
Old 05-30-2010, 09:03 PM   #21
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
I have a bad feeling about this - NTFS is still proprietary. That means the folks that provide us with Linux support do a fantastic job, but can't guarantee anything. We still don't have a fsck last I looked.
What I would suggest (and do) is to keep /home as a Linux f/s, and use NTFS for a common data partition to share stuff. Just mount that somewhere convenient.
That way if something happens to the NTFS you can still login and play (on Linux). And yes I do (also) keep a root user handy ...
 
Old 05-30-2010, 10:55 PM   #22
alunduil
Member
 
Registered: Feb 2005
Location: San Antonio, TX
Distribution: Gentoo
Posts: 684

Rep: Reputation: 62
The {,.bak} is a BASH argument vector (shorthand) that means /home/barth /home/barth.bak. Just easier than writing out the entire path twice.

I agree with syg00's concerns but if that's how you want to setup your machine I'm more than willing to tell you how to do it with a big fat warning label of CAUTION. I think if you're using ntfs-3g you'll be fine as I've never heard (although I don't really listen to anything Windowsish) of NTFS being a problem FS with it.

Regards,

Alunduil
 
Old 05-31-2010, 03:22 PM   #23
bluegospel
Member
 
Registered: Jan 2010
Distribution: centOS
Posts: 404

Original Poster
Rep: Reputation: 53
Okay, I'm running slackware. I followed the six steps suggested. Now I've got a folder in my /home directory highlighted in green as follows:

System\ Volume\ Information

owned by root.

In my /home directory in X (as root) I've got the folder, "System Volume Information" containing "MountPointManagerRemoteDatabase" and ""tracking.log".

When I run chown -R barth /home/barth I "cannot access /home/barth" (no such file or directory). I've already run userdel, useradd and passwd for the user barth.

Data loss isn't a concern since I'm really just experimenting with Linux for now. I anticipate reinstalling slackware several more times before I'm comfortable with it. But to save time, is there an easy way to reset my home directory to an empty directory that still serves as my de facto "home directory."
 
Old 05-31-2010, 03:33 PM   #24
alunduil
Member
 
Registered: Feb 2005
Location: San Antonio, TX
Distribution: Gentoo
Posts: 684

Rep: Reputation: 62
Just copy and modify the permissions of /etc/skel. That's an empty home directory template.

Regards,

Alunduil
 
1 members found this post helpful.
Old 05-31-2010, 03:36 PM   #25
bluegospel
Member
 
Registered: Jan 2010
Distribution: centOS
Posts: 404

Original Poster
Rep: Reputation: 53
Cool, thanks!
 
Old 05-31-2010, 03:43 PM   #26
bluegospel
Member
 
Registered: Jan 2010
Distribution: centOS
Posts: 404

Original Poster
Rep: Reputation: 53
Would that just be "cp /etc/skel /home" or do I need certain options?
 
Old 05-31-2010, 07:25 PM   #27
alunduil
Member
 
Registered: Feb 2005
Location: San Antonio, TX
Distribution: Gentoo
Posts: 684

Rep: Reputation: 62
You would need -r for recursion but other than that you should be fine.

Regards,

Alunduil
 
  


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
changed distro's, having trouble with mounting old partition icepack Linux - Newbie 3 10-12-2005 04:33 AM
Trouble mounting ntfs partition. tin can Linux - General 4 12-16-2004 10:05 PM
Trouble mounting an ext2fs partition tseven *BSD 2 12-13-2004 05:12 PM
trouble mounting fat32 partition miner Linux - Newbie 7 04-19-2004 10:23 PM
Having a bit of trouble mounting a NTFS partition... Can anyone help? drumlinuxuser Linux - Hardware 1 10-22-2003 09:01 PM

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

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