View previous topic :: View next topic |
Author |
Message |
TheButcher n00b
Joined: 22 Nov 2003 Posts: 63 Location: Vienna / Austria / Europe
|
Posted: Mon Aug 02, 2004 9:16 am Post subject: Introduction to Partitions / Comparison Windows-Linux |
|
|
I wrote this tutorial, because i saw that many poeple, trying gentoo for their first time, get stuck at editing their fstab or grub/lilo-config. Any comments and feedback is appreciated.
I assume, that u are an ordinary windows user, so i'd like to explain you fs-basics and a bit device/partition-handling under linux.
1. How are Partitions organized on the harddisk?
Basically, there are 3 different types of partitions.
a) Primary Partitions:
This is the plain old "data-partition" you just create a primary partition and thats it. You can now write data into the partition (format, write, read, ...).
b) Extended Partitions:
As harddisks got bigger, people realized, that the maximum number of 4 Primary Partitions isn't enough (This is due to the limited size of the MBR - the Master Boot Record, which contains the bootloader and the Partitiontable... and is only 512 Byte in size). People didn't want to change the layout of the MBR, so a workaround was needed.
If you create an extended partition, you can't write data to it (data means FILES here). Instead, you can create [see c)]
c) Logical Volumes:
At the beginning of an Extended Partition, you've got something similar to the MBR. The first sector of the Extended Partition contains data, which points to the first Logical Volume. Each logical volume points to the next logical volume, resulting in a chain of logical volumes, in which you can store data.
2. How are these 3 types accessible from your OS?
a) Windows:
Windows enumerates your partitions alphabetically, starting with primary partitions. After that, logical volumes are associated to drive letters. Extended partitions are ignored in this process, as you cannot write data to them and therefore are useless for users.
Say our partition table looks like the following:
Code: | MBR:
1: Primary Partition, NTFS
2: Extended Partition
3: Primary Partition, NTFS
4: no partition
Extended Partition:
1: Logical Volume, EXT2 (our boot)
2: Logical Volume, ReiserFS (our root)
3: Logical Volume, EXT3 (our home)
4: Logical Volume, SWAP
|
Windows would create the following letters:
C: MBR 1
D: MBR 3
why? because it cant read the filesystems of our logical volumes! if it could read them, it would look like the following:
Windows would create the following letters:
C: MBR 1
D: MBR 3
E: Logical 1
F: Logical 2
G: Logical 3
H: Logical 4
b) Linux:
As you surely know, linux doesn't use drive letters. It just associates the partitions with device-nodes. If we take the example from above, assuming that the disk drive is the primary master in our system, they would look like this:
Code: | MBR1: /dev/hda1
MBR2: /dev/hda2
MBR3: /dev/hda3
Logical 1: /dev/hda5
Logical 2: /dev/hda6
Logical 3: /dev/hda7
Logical 4: /dev/hda8 |
Basically, it takes the MBR-Entries and associates them with the numbers 1-4. Any following logical volumes start at number 5.
NOTE: Unix/Linux doesn't care whether it can read/write to the partition or not. It just creates the device-node.
3. What would my /etc/fstab look like?
Code: | /dev/hda5 /boot ext2 noauto,noatime 1 2
/dev/hda6 / reiserfs noatime 0 1
/dev/hda7 /home ext3 noatime 0 0
/dev/hda8 none swap sw 0 0 |
For more information about /etc/fstab look at the Gentoo handbook (currently at this location: http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=1&chap=8) or ask me |
|
Back to top |
|
|
w00tie n00b
Joined: 27 Jul 2004 Posts: 23 Location: /dev/null
|
Posted: Mon Aug 02, 2004 10:49 am Post subject: |
|
|
W00t! It works! Thanks for the tutorial!
Umm I hate to be a pain..but I can't boot into windows now!! Grub complains about an Error 13, Chainloader +1.
The handbook should have a more detailed handbook about dual boot systems _________________ Penguin keepers of the world unite! |
|
Back to top |
|
|
pjp Administrator
Joined: 16 Apr 2002 Posts: 20067
|
Posted: Mon Aug 02, 2004 4:28 pm Post subject: |
|
|
Moved from Installing Gentoo. _________________ Quis separabit? Quo animo? |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|