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!
Notices
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I just installed cent0s 5 text and no gui. I'm still new to linux and am trying to learn. I want to create the following partition "/usr /home /tmp" but am having a hard time.
When I type $fdisk -l i get the following:
[root@localhost ~]# fdisk -l
Disk /dev/sda: 80.0 GB, 80000000000 bytes
255 heads, 63 sectors/track, 9726 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 9726 78019672+ 8e Linux LVM
[root@localhost ~]#
And my $df -h is below:
[root@localhost ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
71G 1.3G 66G 2% /
/dev/sda1 99M 13M 81M 14% /boot
tmpfs 467M 0 467M 0% /dev/shm
[root@localhost ~]#
Then when I type $fdisk /dev/sda2 to create new partition and press "p" i get the following:
Command (m for help): p
Disk /dev/sda2: 79.8 GB, 79892144640 bytes
255 heads, 63 sectors/track, 9713 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda2p1 1 2433 19543041 83 Linux
Command (m for help): w
However when i try to mount it i get the following:
[root@localhost ~]# mkfs -t ext3 /dev/sda2p1
mke2fs 1.39 (29-May-2006)
Could not stat /dev/sda2p1 --- No such file or directory
The device apparently does not exist; did you specify it correctly?
[root@localhost ~]#
chances are if you have allready got this far the partitioning is allready done....
im not sure what the default arrangement is but if you post the output of mount it will tell you
the ones not on seperate partitians will allready exist as folders
i'm still unable to mkfs, i have edit the /etc/fstab
[root@localhost ~]# mkfs -t ext3 /dev/sda2p1
mke2fs 1.39 (29-May-2006)
Could not stat /dev/sda2p1 --- No such file or directory
The device apparently does not exist; did you specify it correctly?
[root@localhost ~]# mount
/dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/sda1 on /boot type ext3 (rw)
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
nfsd on /proc/fs/nfsd type nfsd (rw)
Serious question - do you have any idea what you are doing?
The LVM on sda2 has your installation, so modifying it is a potentially dangerous option.
Where did you get the notation sda2p1 from?
If you really want these as separate partitions (and note the plural, since I assume you actually want each on it's own partition - but since you haven't said why you are doing this, I can't really say), it would be simplest to reinstall an either partition the disk before or during installation.
Another option would be to copy everything off the LVM (you need to do this properly, so ask if you don't know what to do), either shrink the LVM, or probably better, simply delete it and its partition, split the available space into the partitions you want and format them accordingly (probably ext3), and copy the system back onto the "/" (again, you need to do this properly), set up mount points for the new partitions /usr, /local and /home, copy the relevant files back to those directories (again, needs to be done correctly). The you should be right.
Unless you need to, I wouldn't bother if I were you - chances are you will break your system and be reinstalling.
Yes, i want each to be on their own partition if possible.
I like the option to delete the LVM and split the space and format it accordingly. It was a clean install so I do not have anything to backup. Can you show me how to do this?
You should be able to simply do a custom partitioning scheme when you get to that stage in the installation process. Make some notes of how much space you want for each ahead of time.
In fact, I don't think it's possible to have a separate /etc partition, since init needs /etc/fstab very early on so it knows what other partitions to mount.
There's no hard and fast rule for how partitions should be allocated -- it's dependent on the intended use for the machine. For a general desktop, I tend to think that /, /boot, /home, and swap are sufficient (and with modern BIOSes, even /boot is becoming unnecessary, though I still like to have it).
Last edited by btmiller; 01-17-2009 at 02:03 AM.
Reason: typo fix
/var (where the log files go) can be handy if you get a runaway or overloaded process. The system will still boot and be fixable because '/' isn't full...
/var (where the log files go) can be handy if you get a runaway or overloaded process. The system will still boot and be fixable because '/' isn't full...
Is that true with ext3 and similar? Doesn't the reserved space still allow for booting?
Actually I am about to perform an up-gradation from F9 to F10. Therefore I was thinking to have individual partitions for /home /var. I a desktop user. Is this a good idea or should I keep everything under / ?
If you want separate physical volumes for /usr, /home, and /tmp, you might want to install without lvm. Fedora and Red Hat default to using lvm2. The physical lvm volume can be composed of different physical volumes (drives or partitions). You can have /usr, /home and /tmp in logical volumes. They will have their own filesystems then.
The installer has a graphical lvm manager to help you.
If you won't be adding drives later, you might want to forgo the use of lvm altogether. It can be hard to fix problems. If this is a fresh install, it will probably be easiest and quickest to start over.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.