SlackwareThis Forum is for the discussion of Slackware Linux.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I have a system with a 30gig hard disk partitioned into two partitions. I have /home mounted on one partition and I dump all of my files in my home directory. I just recently bought a 160gig hard disk and would like to remount /home on the new hard disk. Is this just a process of copying files into the new hard disk, and then mounting it as /home ... or do I have to follow any specific steps?
Not really - I've moved root-level directories with 'cp -a' with no adverse effects. There shouldn't be much in /home that's specific to the locations - most stuff should be '~' or '/home' rather than 'hd?N'. So all you should really have to do is copy them and edit fstab and you can even umount and re-mount without rebooting.
I've moved whole systems around and stuff like /var and /tmp but not /home, though, so there may be gotchas I'm unaware of.
Why not just mount a subdirectory on the new drive under /home and keep /home on its current disk?
Thanks for your reply. I think you answered my question very well.
As for mounting a new partition under /home, the system has a lot of users and I would like them to be able to take advantage of the new hard disk space, so mouting /home on the new disk would probably be the best way.
Distribution: SlackWare 10.1+, FreeBSD 4.4-5.2, Amiga 1.3,2.1,3.1, Windors XP Pro (makes a fair answering machine)
There is a step missing here!!!! It is listed in the HOWTOs for migrating across disk so I assume it is REQUIRED....
You should first install the disk on your box and then run fdisk/cfdisk to define the partition, type and write the MBR.
Next you should mke2fs the disk or use your file system type and format it.
Once this is complete THEN you mount it to a tmp location and copy your directories/files to it.
Suggested for the cp command is `cp -Rap` as this will copy the directories and file verbatium (xcopy style).
Since you plan to mount this as /home you should have all users logout and then you should logout to root (not su for a user). mv /home /home.old, mkdir /home
/dev/"harddrive" /home ext2 defaults 1 2
Then you can mount it. Remember to unmount it from it's tmp location!!!
Other notes on this;
you can do this with any part you wish to divide off of /. Using the steps above you can have mount points across various harddrives and partitions such as /usr, /usr/local, /var, /tmp, /spool, /usr/src, etc etc... Also root (/) is easy to migrate this way for making clone hardrive images (one note here, if lilo has been put in the MBR this will not work as you will only be coping the file system and not the MBR of the disk.)
My first test slack install was on a single drive which was then "broken" down across two drives w/4 parts.
Now on my "daily driver" box slack is divided across 3 harddrives, 9 partitions (2 bootables).
The Dragon on the other hand has 8 drives w/27 partitions (it is the frontend of the wulf and contains multi-bootable parts as well as the node roots.)
It pays to have an install across various disk as a failure of one can be easily "fixed" with new disk and backups without losin' the whole cookie...
lol, more the fact that / was mounted at boot, then the kernel looked in /etc/ and then put its finger in its mouth, tapped its foot and said "er" while staring at nothing.
the symlinks didn't even get the chance to say "what the...."!
Distribution: Slackware 9.1 but FUBAR with packages I compile myself, and OpenBSD (not exactly a distro) on QEMU
I think you need to adjust your view about the new harddisk a bit... I assume you have partitioned it and put a new filesystem on it, ... right?
Then the disk is just a storage medium, on which you can put data. Simply install the disk (I mean, turn the computer off, slide the harddisk in, connect the cables, turn it on again, or maybe different steps for an external harddisk, which is not likely the case here...) and mount it. Then copy the data in /home to the mounted fs, and then unmount it.
Then edit your fstab to reflect the changes (the device name for the /home mount point), and mount your /home partition (this time it is on the new disk, not the old one).
See? The new disk is nothing but a storage medium.