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.
Hi,
I have some questions on partitions.
1.I have both fc5 and fc6 installed on my computer. Do I need 2 swap partitions, or is one enough.
2. What is the purpose of a /boot partition, and how big should it be? If I have fc5 and fc6 installed, do i need 2 /boot partitons?
3. I have both fc5 and fc6 installed, how do I find out what swap partion what is using?
4. My fc5 / partition is on /dev/sda8, and my fc6 / partition in on /dev/sda12. I have a /boot partition /dev/sda10
When I run cat /proc/partitions, i get :
major minor #blocks name
sda1 is a windows partition. sda2 seems to be some sort of a partition table. sda5, 6 and 7 are fat32 partitions. sda8 is a / partition for fc5. sda9 is a swap partiton for fc5. sda10 is a /boot partition. sda11 is a swap partition for fc6. sda12 is the / partition for fc6.
a) What does major and minor mean?
b)This is bothering me a little:
This is the output of df: (in fc6)
/dev/sda8 14534476 7267800 6516444 53% /
tmpfs 253140 0 253140 0% /dev/shm
/dev/sda5 25587024 24448000 1139024 96% /mnt/temp1
/dev/sda6 25587024 24639888 947136 97% /mnt/temp2
/dev/sda7 25587024 24966688 620336 98% /mnt/temp3
/dev/sda8 15592716 13914588 873276 95% /mnt/temp4
/dev/sda10 4956284 158784 4541668 4% /boot
->What is tmpfs?
->Why does the first line say /dev/sda8, when in reality it should be sda12?
To prove this, I mount the /dev/sda12 partition, an run df, this is what I get:
Seeing this, one can say that the first line should be /dev/sda12. Why is the output of this command wrong?
It seems that this is causing some problems. I updated a kernel using yum in fc6. And when I try to boot into the new kernel, it boots into fc5!
What's more, if /dev/sda8 (the one in line 6) is not mounted when such an installation takes place, I get kernel panic while booting into the new kernel.
So it seems to boil down to the first line of the output of the df.
A1:
You can share the same swap between as many Linux distributions as you want. In days gone past, some people would create many swap partitions when physical memory was minimal, nowadays computers have allot of physical memory, so a single swap partition double the size of the physical memory is normally more than what is needed.
A2:
You do not really need to have any more than three (or two) partitions per distribution, namely: /, /home, & swap, the boot sector would be the first sector of the / partition. The only time you need to have one distribution consisting of many more partitions would be for a server that needs extra protection, in which case /var should be separate at the least. Some people like to split things up into many partitions to make it easier to back up the OS, having /var on it's own will protect the rest of the system from being filled up by mail spam and causing a crash.
There are many backup utilities that can easily back up the entire system in one partition --> "/", which can have the whole filesystem tree except swap. When you have a multi-boot with a Windows OS, you do not need a separate /home partition for the Linux distributions as every system can access your data stored on a shared Fat32 partition. If all you have in your multi-boot is Linux systems, you can share a separate /home partition between them but not share the same user unless they are the same Linux releases from the same installation using imaging technology--> ( FC6 & FC6).
A3:
If you have KDE desktop environment, go to main menu/system/kinfocenter/partitions to see which "/dev/" is being used as the swap partition for both FC5 & FC6. In Gnome, it would probably be in a similar area.
A4: sda2 is probably not a partition table unless you have an elaborate boot manager, the partition table is normally in the MBR which is the first sector of the hard drive, and is not normally a partition. In a traditional partitioning scheme, sda1, sda2, and sda3 would be primary partitions. Sda4 would be an extended partition containing nothing. sda5 and all past that are logical partitions which are part of sda4. Some of the fat32 partitions may be dos or other Windows systems.
You must have inherited this computer to not know what the partitions contain, here is a useful thread put together by a member here at LQ that may help you figure things out:
The /mnt/temp partitions are probably just that, temporary working areas similar to a swap partition, not sure why one would do something like this as one large /mnt/temp partition would do. Check in your Linux distributions in the /mnt directories to see if these are present.
Example: when editing a 4GB DVD movie, you need a temporary working area equal in size, a single layer DVD can be 4.37GB in size, a fat32 partition can only have a max. of 4GB file size, a Linux native fs. or Windows NTFS filesystem have unlimited file size. These /mnt/temp partitions can be used by a DVD editing application for edititng movies if the OS's partition does not have enough "free" space.
There is definately something funny here.
Last edited by Junior Hacker; 02-24-2007 at 04:37 AM.
sda2 is an extended partition. In a nutshell it lets one create more then 4 partitions on a hard drive (1-4 primary partitions, anything >=5 is a logical partition). A SATA hard drive is limited to 15 total partitions.
Post the output of your /etc/fstab and the grub.conf files from both FC5 and FC6. Typically Fedora uses partition labels. If you had FC6 and FC% partitions mounted when you did the update yum appeared to have saved the files to the wrong directory.
In a nutshell tmpfs is a virtual filesystem i.e. it exists in RAM but it can also use swap space.
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,9)
# kernel /vmlinuz-version ro root=/dev/sda12
# initrd /initrd-version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,9)/grub/splash.xpm.gz
hiddenmenu
title Fedora Core (2.6.19-1.2911.fc6)
root (hd0,9)
kernel /vmlinuz-2.6.19-1.2911.fc6 ro root=LABEL=/12 rhgb quiet
initrd /initrd-2.6.19-1.2911.fc6.img
title Fedora Core (2.6.19-prep)
root (hd0,9)
kernel /vmlinuz-2.6.19-prep ro root=LABEL=/12 rhgb quiet
initrd /initrd-2.6.19-prep.img
title Fedora Core (2.6.19)
root (hd0,9)
kernel /vmlinuz-2.6.19 ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.19.img
title Fedora Core (2.6.18-1.2798.fc6)
root (hd0,9)
kernel /vmlinuz-2.6.18-1.2798.fc6 ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.18-1.2798.fc6.img
title Other
rootnoverify (hd0,0)
chainloader +1
Here, Other refers to Windows, and that works fine. The Fedora Core (2.6.18-1.2798.fc6) also works fine. The three above it dont. FC6 works fine in most cases, so I dont need to boot into fc5 at all.
However, when I run e2label on /dev/sda11 I get:
e2label: Bad magic number in super-block while trying to open /dev/sda11
Couldn't find valid filesystem superblock.
Same for /dev/sda9
So it seem that /dev/sd8 partition is labeled 12 and so this is why FC6 is using it as its / partition instead of sda12.
sda11 is a swap and I assume that sda9 is too. The output of the fdisk command should show swap to confirm.
fdisk -l /dev/sda (A small L and you must be root)
Thanks, everything is working now, but I still havent figured why df shows a wrong output and when I compile a kernel it puts /12 by default in /etc/grub.conf.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.