Default file system when mounting a partition












0















When I attach an SD card with multiple partitions to a Debian computer for example and use the mount command to mount a partition to the file system without specifying the file system type, which file system is used by default?



Take the below command for example :



mount /dev/sdb1 /media/mycardpart


How will the partition be accessed? I'm guessing by using EXT4 format by default because the rest of the file system uses this , but what if that partition has a different file system?










share|improve this question























  • mount will automatically detect the filesystem. So there's no default filesystem. If it's not an ext4 filesystem, you can't mount it as ext4. EXT4 is the type of a filesystem. It's the already exist filesystem is of a certain type, not you can choose to access it using some type.

    – 炸鱼薯条德里克
    Feb 25 at 12:48
















0















When I attach an SD card with multiple partitions to a Debian computer for example and use the mount command to mount a partition to the file system without specifying the file system type, which file system is used by default?



Take the below command for example :



mount /dev/sdb1 /media/mycardpart


How will the partition be accessed? I'm guessing by using EXT4 format by default because the rest of the file system uses this , but what if that partition has a different file system?










share|improve this question























  • mount will automatically detect the filesystem. So there's no default filesystem. If it's not an ext4 filesystem, you can't mount it as ext4. EXT4 is the type of a filesystem. It's the already exist filesystem is of a certain type, not you can choose to access it using some type.

    – 炸鱼薯条德里克
    Feb 25 at 12:48














0












0








0








When I attach an SD card with multiple partitions to a Debian computer for example and use the mount command to mount a partition to the file system without specifying the file system type, which file system is used by default?



Take the below command for example :



mount /dev/sdb1 /media/mycardpart


How will the partition be accessed? I'm guessing by using EXT4 format by default because the rest of the file system uses this , but what if that partition has a different file system?










share|improve this question














When I attach an SD card with multiple partitions to a Debian computer for example and use the mount command to mount a partition to the file system without specifying the file system type, which file system is used by default?



Take the below command for example :



mount /dev/sdb1 /media/mycardpart


How will the partition be accessed? I'm guessing by using EXT4 format by default because the rest of the file system uses this , but what if that partition has a different file system?







linux debian filesystems mount sd-card






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Feb 25 at 11:10









Engineer999Engineer999

31319




31319













  • mount will automatically detect the filesystem. So there's no default filesystem. If it's not an ext4 filesystem, you can't mount it as ext4. EXT4 is the type of a filesystem. It's the already exist filesystem is of a certain type, not you can choose to access it using some type.

    – 炸鱼薯条德里克
    Feb 25 at 12:48



















  • mount will automatically detect the filesystem. So there's no default filesystem. If it's not an ext4 filesystem, you can't mount it as ext4. EXT4 is the type of a filesystem. It's the already exist filesystem is of a certain type, not you can choose to access it using some type.

    – 炸鱼薯条德里克
    Feb 25 at 12:48

















mount will automatically detect the filesystem. So there's no default filesystem. If it's not an ext4 filesystem, you can't mount it as ext4. EXT4 is the type of a filesystem. It's the already exist filesystem is of a certain type, not you can choose to access it using some type.

– 炸鱼薯条德里克
Feb 25 at 12:48





mount will automatically detect the filesystem. So there's no default filesystem. If it's not an ext4 filesystem, you can't mount it as ext4. EXT4 is the type of a filesystem. It's the already exist filesystem is of a certain type, not you can choose to access it using some type.

– 炸鱼薯条德里克
Feb 25 at 12:48










1 Answer
1






active

oldest

votes


















2














The default filesystem used will be the filesystem of the respective partition which you're mounting.



In your example case /dev/sdb1.



Irrespective of the system's default filesystem ext4 (since you mentioned) Linux systems (Debian included) will find the partition's filesystem and mount it. However, some filesystem support need to have been compiled in the kernel. But for most commonly used filesystems such as FAT16, FAT32, NTFS ..... kernel support is on by default.



Follow-up



As to your first question:



It finds the filesystem type from the partition table. Partition table is something like contents of a book where you'll have headings, sub-headings, figures etc., listed at the beginning. partition table will have information such as number of partitions, size of each partition, beginning and end point information for each partition and type of each partition along with the file-system of each partition. mount reads the file-system information from this partition table. There are quite a few partition table formats MBR, GUID, APT etc., Ability to read and understand the partition table formats has to be enabled in the kernel (by default ext filesystems and few of MS filesystems are enabled in the kernel). Ability to mount, read and write special filesystems such as Amiga Fast File Systems require ability to read amiga partition table format which has to be either compiled in or to be loaded as module in to the kernel.



For the second question:



If a partition doesn't have a filesystem because it was not formatted, it will be shown as non-formatted free-space which can be formatted to any file-system of interest.






share|improve this answer


























  • Ok thanks. How does it find the file system information of the partition tho? Also, what happens if the partition actually doesn't have a file system?

    – Engineer999
    Feb 25 at 13:40











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f502842%2fdefault-file-system-when-mounting-a-partition%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









2














The default filesystem used will be the filesystem of the respective partition which you're mounting.



In your example case /dev/sdb1.



Irrespective of the system's default filesystem ext4 (since you mentioned) Linux systems (Debian included) will find the partition's filesystem and mount it. However, some filesystem support need to have been compiled in the kernel. But for most commonly used filesystems such as FAT16, FAT32, NTFS ..... kernel support is on by default.



Follow-up



As to your first question:



It finds the filesystem type from the partition table. Partition table is something like contents of a book where you'll have headings, sub-headings, figures etc., listed at the beginning. partition table will have information such as number of partitions, size of each partition, beginning and end point information for each partition and type of each partition along with the file-system of each partition. mount reads the file-system information from this partition table. There are quite a few partition table formats MBR, GUID, APT etc., Ability to read and understand the partition table formats has to be enabled in the kernel (by default ext filesystems and few of MS filesystems are enabled in the kernel). Ability to mount, read and write special filesystems such as Amiga Fast File Systems require ability to read amiga partition table format which has to be either compiled in or to be loaded as module in to the kernel.



For the second question:



If a partition doesn't have a filesystem because it was not formatted, it will be shown as non-formatted free-space which can be formatted to any file-system of interest.






share|improve this answer


























  • Ok thanks. How does it find the file system information of the partition tho? Also, what happens if the partition actually doesn't have a file system?

    – Engineer999
    Feb 25 at 13:40
















2














The default filesystem used will be the filesystem of the respective partition which you're mounting.



In your example case /dev/sdb1.



Irrespective of the system's default filesystem ext4 (since you mentioned) Linux systems (Debian included) will find the partition's filesystem and mount it. However, some filesystem support need to have been compiled in the kernel. But for most commonly used filesystems such as FAT16, FAT32, NTFS ..... kernel support is on by default.



Follow-up



As to your first question:



It finds the filesystem type from the partition table. Partition table is something like contents of a book where you'll have headings, sub-headings, figures etc., listed at the beginning. partition table will have information such as number of partitions, size of each partition, beginning and end point information for each partition and type of each partition along with the file-system of each partition. mount reads the file-system information from this partition table. There are quite a few partition table formats MBR, GUID, APT etc., Ability to read and understand the partition table formats has to be enabled in the kernel (by default ext filesystems and few of MS filesystems are enabled in the kernel). Ability to mount, read and write special filesystems such as Amiga Fast File Systems require ability to read amiga partition table format which has to be either compiled in or to be loaded as module in to the kernel.



For the second question:



If a partition doesn't have a filesystem because it was not formatted, it will be shown as non-formatted free-space which can be formatted to any file-system of interest.






share|improve this answer


























  • Ok thanks. How does it find the file system information of the partition tho? Also, what happens if the partition actually doesn't have a file system?

    – Engineer999
    Feb 25 at 13:40














2












2








2







The default filesystem used will be the filesystem of the respective partition which you're mounting.



In your example case /dev/sdb1.



Irrespective of the system's default filesystem ext4 (since you mentioned) Linux systems (Debian included) will find the partition's filesystem and mount it. However, some filesystem support need to have been compiled in the kernel. But for most commonly used filesystems such as FAT16, FAT32, NTFS ..... kernel support is on by default.



Follow-up



As to your first question:



It finds the filesystem type from the partition table. Partition table is something like contents of a book where you'll have headings, sub-headings, figures etc., listed at the beginning. partition table will have information such as number of partitions, size of each partition, beginning and end point information for each partition and type of each partition along with the file-system of each partition. mount reads the file-system information from this partition table. There are quite a few partition table formats MBR, GUID, APT etc., Ability to read and understand the partition table formats has to be enabled in the kernel (by default ext filesystems and few of MS filesystems are enabled in the kernel). Ability to mount, read and write special filesystems such as Amiga Fast File Systems require ability to read amiga partition table format which has to be either compiled in or to be loaded as module in to the kernel.



For the second question:



If a partition doesn't have a filesystem because it was not formatted, it will be shown as non-formatted free-space which can be formatted to any file-system of interest.






share|improve this answer















The default filesystem used will be the filesystem of the respective partition which you're mounting.



In your example case /dev/sdb1.



Irrespective of the system's default filesystem ext4 (since you mentioned) Linux systems (Debian included) will find the partition's filesystem and mount it. However, some filesystem support need to have been compiled in the kernel. But for most commonly used filesystems such as FAT16, FAT32, NTFS ..... kernel support is on by default.



Follow-up



As to your first question:



It finds the filesystem type from the partition table. Partition table is something like contents of a book where you'll have headings, sub-headings, figures etc., listed at the beginning. partition table will have information such as number of partitions, size of each partition, beginning and end point information for each partition and type of each partition along with the file-system of each partition. mount reads the file-system information from this partition table. There are quite a few partition table formats MBR, GUID, APT etc., Ability to read and understand the partition table formats has to be enabled in the kernel (by default ext filesystems and few of MS filesystems are enabled in the kernel). Ability to mount, read and write special filesystems such as Amiga Fast File Systems require ability to read amiga partition table format which has to be either compiled in or to be loaded as module in to the kernel.



For the second question:



If a partition doesn't have a filesystem because it was not formatted, it will be shown as non-formatted free-space which can be formatted to any file-system of interest.







share|improve this answer














share|improve this answer



share|improve this answer








edited Mar 4 at 14:44









Jeff Schaller

43.4k1160140




43.4k1160140










answered Feb 25 at 12:05









RussellBRussellB

286211




286211













  • Ok thanks. How does it find the file system information of the partition tho? Also, what happens if the partition actually doesn't have a file system?

    – Engineer999
    Feb 25 at 13:40



















  • Ok thanks. How does it find the file system information of the partition tho? Also, what happens if the partition actually doesn't have a file system?

    – Engineer999
    Feb 25 at 13:40

















Ok thanks. How does it find the file system information of the partition tho? Also, what happens if the partition actually doesn't have a file system?

– Engineer999
Feb 25 at 13:40





Ok thanks. How does it find the file system information of the partition tho? Also, what happens if the partition actually doesn't have a file system?

– Engineer999
Feb 25 at 13:40


















draft saved

draft discarded




















































Thanks for contributing an answer to Unix & Linux Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f502842%2fdefault-file-system-when-mounting-a-partition%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

How to reconfigure Docker Trusted Registry 2.x.x to use CEPH FS mount instead of NFS and other traditional...

is 'sed' thread safe

How to make a Squid Proxy server?