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'm trying to work out what is the best way to rejig the way my 10.0 partitions are being used.
Initially I installed as follows:
/hdb2 - / This is a tiny physical partition that I intended to just use to boot the system - I was at the time confused about the 1024th cylinder limit and/or whether I could boot Linux from a logical / partition.
/hdb5 = /user This is a more substantial logical partition which is essentially empty since everything I install seems to go into /var or /opt under /
So my question: Can I move /var and /opt from under / to the partition holding /user?
Reading around here I get the impression that moving say /home to a NEW partition is easy enough but moving /home to a pre-existing partition already holding another directory isn't easy or maybe even possible...
I would suggest using the Linux Logical Volume Manager (LVM). It allows you to assign a disk or one or more partitions to a volume group. Within this volume group you can create logical partitions for each file system. The best part about it is you can add and remove space from these paritions on the fly.
In your case I'd move /usr back to the root partition by doing something like cp -a /usr /usr2 and then boot off of the CD and move /usr2 to /usr and remove the mount of /usr in the fstab. Once that is done use cfdisk to mark the old /usr partition for use with the LVM and boot and setup the LVM on that parition. You can then move any parition you wish off of root onto the LVM in its own logical partition.
I've been using the LVM for years and years and never setup a machine w/o it.
There are procedures for moving a / (root) partition to the LVM, in my experience it's not worth the effort. I always keep a small root for the the basics, and move most of the biggies off to their own partition. (/usr, /opt, /home, /var, others...)
The procedures that you stated in your second post will not work. They will copy the contents of /opt into your /usr partition, and once mounted as /opt your /usr will go away. Did you have plans to copy off /usr onto / first?
Here is the basic approach I have used in the past:
1. If lacking sufficient drive space for the new partition, then make new space with a partitioning tool.
2. Create the new partition.
3. Mount the new partition to a temporary mount point (e.g., /mnt/opt).
4. Format and install the file system on the new partition (e.g., e2fsck).
5. Copy the contents of /opt to /mnt/opt.
6. Do not delete the /opt directory point in the root file system, but delete the contents.
7. Edit fstab to mount the new partition as /opt.
8. Reboot to test fstab.
9. Delete temporary mount point /mnt/opt.
Revise as necessary if you are using separate mount points for subdirectories in /opt.
Crabboy: No I hadn't thought of moving the contents of /usr - I was kind of working on the assumption that if you can share a partition amongst several trees when you're installing linux, that you could then manually do the same at a later time. I'm supposing that this isn't the case! I'm going to implement LVM when I have some time - looks interesting
ppoisson: I like the look of what you're suggesting here- it's simple enough for me to do and makes some sense for the time being - merci!
Woodsman - I had thought of going this way, so thanks for putting the details in - if the other ways fail I guess I'll come back and do it like this.
Besides, right now I need to figure out what the heck's happened to lilo.conf - its empty and KDE reports that its a PCX file?!?!