Vegas Hotel | Anime Downloads | Facebook Proxy | Cheap Car Insurance | Business Credit Card
New Linux Home Partition [Archive] - PCMech Forums

PDA

View Full Version : New Linux Home Partition


mairving
07-22-2000, 05:12 AM
Okay here is my setup:
- Two Hard Drives (16GB - Master, 3.1GB Slave)
- Linux Installed on the slave device
- 16GB Drive is set up as eight different FAT16 partitions.
- hda1 ( C: ) contains Windows 98 which I don't really use and want to keep for various reasons. The other partitions are empty. Eventually I am going to run out of room on my home directory. I would like to either change the home directory to hda (it doesn't matter if I keep the other partitions). What is the process that I have to go through to do this?

You are probably wondering why I don't just wipe hda out and install Linux there. I have thought about it but my major problem is that I have two other computers connected to this one. I am using IP Masq to connect to my cable internet connection on the other computers. My wife connects to the internet on hers. I don't know how quickly I can reconfigure everything if I migrate to the other drive. I would rather not be down a week or so while I configure everything. Thanks in advance for your help.

[This message has been edited by mairving (edited 07-22-2000).]

Statica
07-22-2000, 05:35 AM
Hi Mairving:
Long time no hear .. hope that all is well at your end.

Moving the /home partition and copying existing files to your new /home is fairly straightforward, but not knowing what your setup is I'll give you two cases:

A: where /home is an existing partition
<OL>
<LI>Create new partition, if needed [fdisk]
<LI>Create filesystem on new partition [recommended you stick with an inode based fs - ext2]
<LI>Create a new directory /mnt/new and then mount the new partn.
<tt>mount /dev/hdaX /mnt/new</tt>
<LI><tt>init 1</tt> [single user]
<LI>copy old /home files..

<tt>cd /home

cp -ax * /mnt/new</tt>
<LI>Unmount old home..

<tt>cd /

umount /home</tt>

Remount new partn. as /home

<tt>umount /mnt/new

mount /dev/hdaX /home</tt>

<LI>reboot and change /etc/fstab's call to /home to the right device/partition
</OL>

B:when /home was previously not a separate partition
simply rename the old home dir. to something else, then create a new /home directory and then mount it using the mnt command, finally edit your /etc/fstab and add the line:
/dev/hdaX /home ext2 defaults 1 2


HTH

mairving
07-31-2000, 04:21 PM
Static,
I sent you a reply a while back but for some reason I don't see it here. Oh well. I finally did get around to changing my home. Everything went fine until I tried copying my files. I kept getting a permission denied error. I was logged in as root so I am not sure what happened there. I did like you said and unmounted and mounted home. I then changed my fstab file. That's when the fun started. Linux doesn't really like mispelling. Instead of /dev/, I used /sev/. That was more than it could stomach. When it booted, it got to a point and went no further. I finally figured out where I was. I was able to get back into fstab and change my spelling. Good experience. I love breaking things. Now when I try booting, I get a bad superblock error.

Coming from Windows, I still think of drives and such. I used fdisk in Linux and deleted two of the later partitions, hda10 & 11. I then made hda10 ext2 and rebooted. Do I need to reformat this new partition like in DOS? Thanks for the help.

Statica
07-31-2000, 09:40 PM
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by mairving:
....I then made hda10 ext2 and rebooted. Do I need to reformat this new partition like in DOS? Thanks for the help.<HR></BLOCKQUOTE>

Nope u dont need to reformat the partn. if u intend it as ext2

Cheers