Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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 couple of questions regarding partition sizes and mount points.
First, reading other posts someone recommended devoting the entire disk to the root partition. I was under the impression that this was bad for several reasons, and all of my linux friends from back in the day told me to keep the root partition as small as is possible. Even the linux install HOWTO says keep it at 80meg... but when I went to go and install the latest slack it told me it requires a minimum of 2.5 gig for the root partition. What's up with that?
Following in the the train of thought that the root partition must be kept to minimum of size, then you would need other partitions as well (excluding swap) which is how I thought it was done. In my install I created /dev/hda1 as root, hda2 as swap, and hda3 and 4 for everything else. My question is, how exactly to you mount these? Or rather, where do you mount them to? I did a df command and noticed that only /dev/hda1 was mounted. It's already 83% full and 2/3 of my hard disk is going unused. Where do I put /dev/hda3 and 4? I tried putting them on directories, as well as /mnt/hda3 and /mnt/hda4 through fstab, but that doesn't seem to work?
Anyway, sorry for the long post. I didn't mean to write a book.
I have 4 partitions, hda1 for root, 2 for swap, 3 and 4 for other stuff. I created two so I could have like a /usr partition and a /home partition or something like that. I thought that was common. I don't know how to mount them though.
Yeah, I created directories in /mnt, as /mnt/hda3 and /mnt/hda4, but when I add them to fstab I get that mount error, something like "bad filesystem, too many filesystems" something like that.
Not this way...What you need to do is to edit /etc/fstab. It should look like this:
/dev/hda1 / reiserfs defaults 1 1
/dev/hda3 /usr ext3 defaults 1 2
/dev/hda4 /home ext3 defaults 1 3
(change the partition types if you have different)
But don't make the modifications before you don't copy old contents of /usr and /home!
To mount hda3 use
mount -t ext3 /dev/hda3 /mnt/hda3
then copy, do the same with /dev/hda4
The devices are /dev/hda3, not /mnt/hda3. You can use /mnt/hda3 as a temporary mount point (to have access to old /home, for example), but your fstab should look like above when you finish.
I think I understand. So if I edit my fstab to look like that then can I do a mount -a to execute it?
Also, just curious, what does the "reiserfs" portion mean?
Also, is that a normal way to go about distributing disk space? I mean with separate partitions for /usr and /home? I like the idea of what michaelk said about having separate partitions for all those separate directories, but I don't think I am advanced enough to do that yet. That entails creating extended and logical drives, right?
Actually, I think the real problem I'm having is is that I can't designate the FS type of my partitions. When selecting the bootable partition(s) in the slack install, it automatically makes that partition type ext3. Swap obviously it makes swap. But how in cfdisk, sfdisk, or fdisk can you designate the FS type. This is the reason I can't mount my partitions. What is the default?
pretty sure that cfdisk will define the partitions (default type 83- linux, need to define swap, type 82), write the partition info to partition table-then progress to the next phase, and set up the file system, and mount points. ext3 might be default. there might be a selection question, or an expert mode selection that will allow you to define the file system, and other???
i have a question as to flagging a partition bootable in cfdisk- should this be the /boot partition? or skip flagging partition bootable, and let the formatting process, and boot loader define what gets booted to?
[basically stated, cfdisk is to define partitions only (and partition type). the next phase defines file system, and mount points]
Yeah, but selection 83 in cfdisk is native linux, not ext3. There is no ext3 selection. And the slack installer didn't give me that option, or the option to set mount points. Which is fine, I'll do it myself, but the type for like 4 of my partitions isn't set. I tried to do mkfs but there is no mkfs.ext3 builder in my slack, w/ kernel 2.4.20. Is this odd?
For your question, I just make the first partition of the first drive bootable and yeah set it to /boot. But you're talking to someone who hasn't completed a successful partition of a drive yet so, maybe you don't want my advice... heh.
you basically divide your hdd space (or multiple hard drives) into spaces that will accept the format later on as the mount points, and file system that you define.
a hard drive is divided up in cfdisk to 120meg, 4,000meg, and 2xmemory w/ 1024meg max for swap. the 120meg, and 4000meg partitions will be type 83, and the swap will be type82. the 120meg, and 4000meg partitions will be primary- some suggest swap as primary, but i'm not certain, esp. from what i've seen w/ auto partition progs in redhat, and mandrake. you then must write this info to disk (select write, ect...), then quit- reboot if it is suggested.
now you will bypass cfdisk, and set up your file system, and mount points. 120meg will be defined as the "/boot" mount point which will hold the linux kernel, and then 4000meg space will be defined as the "/ "(called root), which will hold everything else. swap is pretty much the space used when memory becomes full (hdd swap is a compliment to system ram- used when system ram is insufficient). also from what i've seen in slackware, the swap is id'd and verified first, then the other mount points are defined. . this is considered the basic mount point arrangement. i've set up only a "/", and swap space for a peanut 9.4 install, so that appears to be the absolute minimum (not sure about not having a swap space).
think of it as phases. define spaces for phase 1, phase 2 is to define those spaces as mount points w/ a desired file system, and phase 3 is the install (be certain to make a boot floppy).
I still had to do mkfs to set the FS type to ext3. And I couldn't do that without the latest version of E2fsprogs. For some reason ext3 wasn't supported in my version, even after I recompiled the kernel with ext3 support (that should have made it, right?). Once the type was set to ext3 I was able to mount my partitions through fstab.... if anyone has had the same problem and is wondering how to fix it.