LinuxQuestions.org
Help answer threads with 0 replies.
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 08-14-2004, 04:02 PM   #1
Dasc
Member
 
Registered: Jul 2004
Posts: 47

Rep: Reputation: 15
remounting home


hi all
during the installation of debian I choosed to ignore a 5GB ext3 partition
now I'd like to mount it on /home
is it possible/safe to do so? what should I do exactly to do it in teh best way possible (assuming it can be done)?
 
Old 08-14-2004, 04:30 PM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,348

Rep: Reputation: 552Reputation: 552Reputation: 552Reputation: 552Reputation: 552Reputation: 552
"during the installation of debian I choosed to ignore a 5GB ext3 partition
now I'd like to mount it on /home
is it possible/safe to do so? what should I do exactly to do it in teh best way possible (assuming it can be done)?"

First back up /home to a tarball.

tar -czf /root/home.tar.gz /home

Assuming that the 5GB partition is called /dev/hda4 then do the following as root:

mkfs -t ext3 /dev/hda4
mkdir /hamster
mount -t ext3 /dev/hda4 /hamster
cp -pR /home/* /hamster -R
chmod username:groupname /hamster/* -R
edit /etc/fstab and add this entry:
/dev/hda4 /home ext3 defaults 1 2
rm /home/* -R
boot
rmdir /hamster


--------------------------
Steve Stites

Last edited by jailbait; 08-14-2004 at 04:39 PM.
 
Old 08-14-2004, 04:32 PM   #3
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Re: remounting home

Quote:
Originally posted by Dasc
hi all
during the installation of debian I choosed to ignore a 5GB ext3 partition
now I'd like to mount it on /home
is it possible/safe to do so? what should I do exactly to do it in teh best way possible (assuming it can be done)?
Depends on what
Quote:
choosed to ignore a 5GB ext3
means in this context, and whether it previously was
/home, or empty, or something different all together.


Assuming it's empty you could mount it to a temporary
mount-point (e.g. /tmp/new_home) and copy /home
to there. When copying done and verfied, you can
edit /etc/fstab and add
/dev/hd<x><N> /home ext3 defaults 1 2

Then unmount the temp mount-point. Delete everything
under home (reclaiming disk-space) using
rm -rf /home/*
Then do
mount /home

Eh voila.


Cheers,
Tink
 
Old 08-14-2004, 04:51 PM   #4
Dasc
Member
 
Registered: Jul 2004
Posts: 47

Original Poster
Rep: Reputation: 15
yup it was just an empty partition
thanks both, it worked well =)
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Remounting root filesystem? scouture Linux - Software 1 03-12-2005 01:58 AM
remounting hda? KenHorse Linux - Software 2 12-31-2004 09:35 AM
Samba: Remounting after reboot miyagi Linux - Networking 2 11-21-2004 01:28 PM
remounting a lvm partitioned disk on new box seastar Linux - Software 5 01-21-2004 11:21 PM
SuSe 8.2 - remounting CD drive James_N Linux - Newbie 1 08-30-2003 11:25 PM

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

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