LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-20-2009, 01:00 PM   #1
Cyberman
Member
 
Registered: Aug 2005
Distribution: Debian Stable
Posts: 218

Rep: Reputation: 17
/usr move to new partition was unsuccessful


I only had 24 MB left on my root partition. I created a new partition with GParted. I attempted to move /usr to /media/usr2 with this command:

Code:
tar cfp - . | ( cd /mnt/new_part ; tar xpf - )
I think it moved things completely.

I inserted a listing into /etc/fstab for the new partition to be /usr.
I deleted /usr from the computer. I recreated the folder.
Afterwards, I rebooted.

I have an abnormal startup session.
The computer is unable to automatically start GDM, and it throws me into the terminal.

If I

$ gdm

I am able to load gdm and login to a gnome desktop. The programs seem to be in accordance, but I am aware something went wrong with the transfer of /usr to a new partition. I am seeing a few new errors messages. I don't think they really tip me off as to how to fix this issue.

Is there something I am missing here?
I don't have the old /usr, so I can't tell if there are differences.
Was the command I used to move things bad?

Last edited by Cyberman; 03-20-2009 at 01:13 PM.
 
Old 03-20-2009, 01:29 PM   #2
omes
Member
 
Registered: Jan 2003
Distribution: debian, FreeBSD
Posts: 120

Rep: Reputation: 15
What is the error messages on boot and elsewhere?
 
Old 03-20-2009, 09:34 PM   #3
nflenz
Member
 
Registered: Feb 2006
Distribution: CRUX 2.4
Posts: 96

Rep: Reputation: 18
I don't see anything wrong with the command, though it would have been simpler to use "cp -rp". What errors are you getting?
 
Old 03-21-2009, 02:17 PM   #4
lumak
Member
 
Registered: Aug 2008
Location: Phoenix
Distribution: Arch
Posts: 799
Blog Entries: 32

Rep: Reputation: 111Reputation: 111
When moving partitions that may have a current running process, you should boot with a rescue CD that doesn't actually boot from your hard drive. You then move it to the partition and edit the /etc/fstab on your / partition.

E.G.
Boot from CD

Code:
mount /dev/sda1 /mnt/root
mount /dev/sda2 /mnt/newusr
mv /mnt/root/usr/* /mnt/newusr
vim /mnt/root/etc/fstab
Add:
Code:
# new user partition /dev/sda2 should be updated to what the partition is!!
/dev/sda2   /usr   ext3   defaults   1   2
Save and exit vim
Reboot


I offer no warranty. Understand each action before performing it.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I move files from desktop to /usr/java LinuxNewbie420 Linux - Newbie 6 01-09-2009 05:17 PM
can I move the /usr directory to another partition? walterbyrd Linux - Newbie 4 07-10-2005 07:24 PM
Can't move program files to /usr/local/bin/ asburyguy Linux - Newbie 4 04-03-2004 11:53 AM
deleting old /usr directory after a move... jimieee Linux - General 2 12-26-2003 05:15 PM
How to move /usr???? billkris Linux - Hardware 5 02-02-2003 01:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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