File system question...
If I were to install a hard drive in my machine that had been partitioned and formatted using a totally unrecognizable file system, how would linux react to that? Would the drive still be recognized as /dev/hdx or /dev/sdx? Or would it simply ignore it?
If the system sees a new drive on boot, and the drive has a partition, does it attempt to automatically mount the partition? Or does it leave that for the user? Do all filesystems use the same framework for partitioning? What I mean is if I take an ext3 drive and plug it in a machine running windows, will windows know there is a partition on that drive, or will it not recognize it because cannot natively use the ext3 filesystem? I guess the question really is, are the partitions the same and the formats different, or are the partitioning methods themselves different? I know this may seem like a bunch of totally off-the-wall rambling questions. Sorry. ;) |
Quote:
Quote:
Quote:
|
Quote:
How the drives and partitions will be called will only depend on the driver that is handling the device. Devices handled trough the scsi layer, including sata, usb and pata drives will be named as sd*, scsi cdroms will be named as scd*, drives handled through the ide/ata/mfm/rll stuff will be named as hd*. Partitions are numbered from 1-4 for the four possible primary ones on each disk, and from 5 and up for the logical drives that you can possibly have inside an extended partition. This stuff is done *before* the fs drivers come into scene, so it really doesn't matter what kind of fs's are there inside the drive. Quote:
Quote:
There are other partitioning schemes, and in fact linux can run without a partition (you could format sda just like you format sda1, and you can even format a regular file and use it as a loopback filesystem). |
In some cases, (e.g. when the fstab entry specifies autofs), Linux may be able to determine what filesystem format has been used on a drive by inspection of the data.
This is described at great length in man mount, which very aptly concludes, "if you data is valuable, don't ask mount to guess." :) It is worthy to note that both OS/X and Microsoft Windows provide a similar capability. All of them support installable filesystems, and provide many vendor and third-party drivers. |
|
Quote:
Quote:
Quote:
i think partitions across the board are the same. the first sector of a drive contains a partition table that details the type, size, location and geometry of each partition on the drive. Quote:
|
Quote:
|
Quote:
The MBR holds a number of things, depending on the system. Amongst them, the partition table. This starts at 1be hex, or the 446th byte in decimal, and it takes up to 510 (64 bytes). This table defines the *primary* partitions, and where do they start and end. Each primary partition takes 16 bytes on this table, and that's why you can only have four of them. One of this partitions can be an extended partition, and in this case, there will be a secondary boot record in front of the extended partition inlined in the disk format. It's a standard as well, and it doesn't matter at all what's inside the partition(s). The fs driver will worry about that at a later stage. At the current stage, our OS is just counting partitions. You need to understand that fs's live *inside* the partitions, just like files really. In fact, you could consider a fs like a file with a very specific internal format, that can contain other files inside of it. Partitions do not know anything about fs's, and they don't need either. The OS needs to be able to identify and attack the partitions to a device node *before* looking for an fs. Otherwise, you wouldn't even be able to format the partition in first place, think about it... You should check these: http://en.wikipedia.org/wiki/Partition_table http://en.wikipedia.org/wiki/Master_boot_record http://en.wikipedia.org/wiki/Extended_partition For a starter. ;) |
All times are GMT -5. The time now is 09:34 AM. |