View Full Version : Linux partitions???
Audioaficionado
01-17-03, 01:49 AM
I've seen recommendations from a simple two partition / /swap to a several partition layed hiarchy.
I'm sure it looks more complicated than it really is but I'd like to get it right the first time. (if possible)
I've got 8Gb to play with and I'll most likely be the only user. I'd like to make the kernal and system files secure from damage by the packages. Data overflow (large video & music files) can be stored on either of two FAT32 25Gb logical partitions.
The first three 8Gb partitions of 80Gb will be 98lite/Linux/w2k. Linux will be just inside my 8.4Gb BIOS limit.
Do I make the partitions primary, logical or extended?
Recommendations needed.
Thanx,
_______________________
/dev/hda6 /
/dev/hda5 /boot
/dev/hda7 /home
/dev/hda8 /var
/dev/hda9 swap
/dev/hda10 /usr
/dev/hda11 /data
_______________________
Very simple
http://www.freenet.org.nz/misc/knoppix-install.html
Simple
/ (root) -- 1.7 GB to 6 GB
swap -- 256 MB
/home -- 300 MB to 1 GB per user
With /usr
/ (root) -- 600 MB to 1.1 GB
swap -- 256 MB
/usr -- 1.1 GB to 4.9 GB
/home -- 300 MB to 1 GB per user
With /usr and /var
/ (root) -- 525 MB to 800 MB
/var -- 75 MB to 300 MB
swap -- 256 MB
/usr -- 1.1 GB to 4.9 GB
/home -- 300 MB to 1 GB per user
/ (root) -- 450 MB to 600 MB
/boot -- 25 MB to 50 MB
/var -- 75 MB to 300 MB
/tmp -- 50 MB to 150 MB
/home -- 300 MB to 1 GB per user
/usr -- 1 GB to 4.5 GB
/usr/local -- 100 MB to 400MB
_______________________
/bin/ ---- system binaries
/boot/ --- system kernel, etc.
/data/ --- a user defined directory
/dev/ ---- system device tree
/etc/ ---- system configuration
/home/ --- users' subdirectories
/initrd/ - system initialization
/lib/ ---- system libraries
/mnt/ ---- system mount points
/opt/ ---- optional software
/proc/ --- system data
/root/ --- system root-user
/sbin/ --- system scripts
/tmp/ ---- system temporary
/user/ --- system user security
/usr/ ---- applications software
/var/ ---- system variables
moorcito
01-17-03, 10:24 AM
A hard disk can only have 4 primary partitions, so you want to use those sparingly. Linux can support up to 64 logical partitions, and I'm sure Windows is about the same. And extened partition is just the space allocated to hold the logical partitions, they don't story any data but are containers to store logical partitions.
hd*1 - hd*4 specify the primary partitions
hd*5 - hd*63 specify the logical partitions
If I were you, I'd create 3 primary partitions for the 3 different OSes, and then break those 3 up into logical partitions. Something like this might be what you're looking for:
/ (root) -- 450 MB to 600 MB
/boot -- 25 MB to 50 MB
/var -- 75 MB to 300 MB
/tmp -- 50 MB to 150 MB
/home -- 300 MB to 1 GB per user
/usr -- 1 GB to 4.5 GB
/usr/local -- 100 MB to 400MB (Some programs want to be installed here, so you might want to make this bigger. I usually put shared programs in this directory)
/opt -- (This is usually where Gnome & KDE install, so if you don't use them, you might not need it)
swap -- 256MB
Just make sure root is big enough for /bin, /sbin, /etc, /dev, etc..
But, all of this gets really complicated. You might want to go a little simpler but doing something like this:
/ (root) -- 600 MB to 1.1 GB
swap -- 256 MB
/usr -- 1.1 GB to 4.9 GB
/home -- 300 MB to 1 GB per use
I prefer to go the simple route, and I make a swap and have the rest of the drive be a root partition. That way I don't have to worry about running out of space, and trying to reallocate more space to a partition. I know that others would advise against this way of partitioning beacuse of the security issue and system damage, but for me it's easier and faster to do. Plus, I'm the only one who used the computer, and I know what I'm doing.
Hope some of this helps.
Audioaficionado
01-17-03, 12:23 PM
Right now I have the first three 8Gb OS partitions as primary. The last two 25Gb partitions as logical.
I'm deciding how to allocate the 8Gb linux patition.
I understand file system trees as defined in windows, but when you create differant logical or extended partitons as directories in linux, it gets confusing. Directories are easy to move after the fact, but not partitions.
The Knoppix hd install will create the the two partition root/swap setup. I don't see any provisions to create more in the instructions given at the Knoppix site.
http://www.freenet.org.nz/misc/knoppix-install.html
This one looks the best to me and is compliant with my K.I.S.S. philosophy but still gives me a good margin of safety.
/ (root) -- 600 MB to 1.1 GB
swap -- 256 MB
/usr -- 1.1 GB to 4.9 GB
/home -- 300 MB to 1 GB per use
Can I trick Knoppix and install it into the root like it wants and then move all the applications over to /usr after the install?
Also since the boot will be just inside the BIOS limit, linux is smart enough not to move it outside later. I know DOS based windows can screw itself durring defrag and render itself unbootable.
moorcito
01-17-03, 12:52 PM
It's not that complicated, if you remember that you dictate in fstab what partition gets mounted as what.
Let's say that setup your main partition /dev/hda1 to be mounted as the root directory, so your fstab gets setup as something like this: "/dev/hda1 / etx3 defaults 1 1". Then if you want to move your root over to a bigger partition, that you just allocated, let's call it /dev/hda7, you then just point fstab to /dev/hda7 and it will mount that partition, if all of the root filesystem files are on that new partition.
Another way to do this would be to create simlink of the directory that you want and point it to another partition. Example, create a /usr simlink and point it to /dev/hda5, which contains all of your user files.
Either way you need to have all of your old files on the newly allocated/partitioned space. Either tar, cp, or dd would be ways of acomplishing that.
As far as moving the partiton goes, it would just be a matter of deleting it and creating another one. Pointing fstab to it and making it a mount point.
So, you should be able to trick Knoppix into installing, and then be able to move everything later it you want, following some of the methods mentioned.
I hope all of this wasn't too confusing. If so, I could try to explain it better.
moorcito
01-17-03, 12:54 PM
You might also want to check out this link, as it explains pretty well the whats and hows of fsatb.
http://www.faculty.uaf.edu/fnibg/class3/fstab_newsgroup_post.html
Audioaficionado
01-18-03, 02:48 AM
Thanx for the info. I'll eventually get the idea. Unlike windows, you have to understand what Linux does to get it to do what you want.
I understand the /fstab concept, but I don't know how to implement it. Like if I install Knoppix as it defaults into / & swap, I don't know how to move those knoppix /usr & /home directories and dependancies in knoppix / into the extra /usr & /home partitions I'd created.
moorcito
01-20-03, 04:56 PM
You'd just create two extra partitions that were big enough to hold all of the data from the /usr & /home directories. Make sure that you format them with what ever you're using for a file system. We'll call them /dev/hda5 & /dev/hda6. Then, you'd then copy everything from /usr to /dev/hda5, and copy everything from /home to /dev/hda6. You'd have to then edit you fstab and create two entries one for /usr and one for /home.
They'll look something like this:
"/dev/hda5 /usr ext3 defaults 0 0"
"/dev/hda6 /home ext3 defaults 0 0"
The next step will be to reboot the system, but just to be safe don't delete you're old /usr & /home directories just yet. After the reboot, Linux will mount the new partitions, /dev/hda5 & /dev/hda6, as /usr & /home and the whole conversion should be tranparent to Linux.
Audioaficionado
01-20-03, 05:40 PM
And after you're sure Linux is using the new locations correctly, you can then safely delete the old files after awhile.
So I create /usr & /home partitions
copy directories/files over
edit /etc/fstab
reboot
if all is good, delete old files after awhile
BTW what is /etc?
vBulletin® v3.8.7, Copyright ©2000-2013, vBulletin Solutions, Inc.