LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 06-25-2006, 06:44 AM   #1
anindyanuri
Member
 
Registered: Jan 2005
Location: India
Distribution: Kubuntu Gutsy
Posts: 450

Rep: Reputation: 30
Unhappy how to unmount a drive where my '/home' is mounted


I have Debian Sarge 3.1 (kernel 2.6) installed at my computer. The / is installed at /dev/hda5 but /home is installed on /dev/hda6.

Now I want to free /dev/hda6 for other purpose. How do I transfer /dev/hda6 (i.e. /home) to /dev/hda5 (where rest of my debian is installed) and unmount /dev/hda6 permanently.

Please help. Thanks in advance.

regards
anindya
 
Old 06-25-2006, 07:22 AM   #2
cconstantine
Member
 
Registered: Dec 2005
Distribution: RedHat, Ubuntu
Posts: 101

Rep: Reputation: 15
make sure you not within /home.
$ cd /
$ cp -Rp /home /home2
(you must have enough space on the / volume..)
$ umount /home
$ rmdir /home
$ mv /home2 /home
comment out the line in /etc/fstab that describe the mount point for /home.

-c
 
Old 06-25-2006, 07:24 AM   #3
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Since /dev/hda5 is your root directory, you can't create a /home directory since it already exists. So make a /home-new directory and copy everything from /home to /home-new. Do this logged in as root without starting x windows. You might want to also enter init level 1 also. "init 1". This will put you into single user mode.

Then cd to the "/" directory and copy the files over.
cd /
cp -aR /home /home-new

The -a option is for "archive". This preserves the user:group and protection settings. I'm not certain which option you need to use to copy the links. I believe that the -a bit takes care of that.

After everything has copied, you can umount /dev/hda6. Then edit your /etc/fstab file to remove the line with the /home entry.

Lastly, "rmdir /home" and "mv /home-new /home". You should be set.

Last edited by jschiwal; 06-25-2006 at 07:26 AM.
 
Old 06-25-2006, 08:46 AM   #4
anindyanuri
Member
 
Registered: Jan 2005
Location: India
Distribution: Kubuntu Gutsy
Posts: 450

Original Poster
Rep: Reputation: 30
cconstantine and jschiwal,

my sincere regards to both you all for giving attention to my thread. i am successful to empty my drive following your instructions.

i was really in deep trouble and you show me the light. thanks a lot.

anindya
 
  


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
Adding a SATA drive to be mounted as /home stefholod Linux - Hardware 5 03-25-2006 07:59 PM
cannot unmount dvd drive lefty.crupps Linux - Software 5 10-27-2005 06:00 PM
Unmount USB Drive stevsom Linux - General 2 05-15-2005 12:21 AM
flash drive won't unmount MiniMe001 Linux - Software 3 11-12-2004 08:36 PM
Can't unmount CD-ROM drive WorldBuilder Linux - General 9 08-29-2004 12:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

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