[SOLVED] Changing default filesystem type in Red Hat
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.
First of all i would like to say sorry if it might sound a silly question. What i need to know is in which file redhat defines which filesystem type it would use as default. For exaample in rhel5 ext3 is used as default and rhel6 ext4 is default. What if i want to use ext3 or some other filesystem type as default. I am sure there would be some file but i am not sure which. I looked at /etc/filesystems but looking at its contents i think it shows the filesystems that are supported but no setting for default.
So anyone here can let me know about, there is no urgency for this but i am just curious to know about it.
I don't know if there is a way to change the file system within the operating system itself after install, a file doesn't define what kind of filesystem you have. If you want a different file system than the default you should set it during the install during the partition setup. Or else create a new directory on your hard drive with the filesystem that you want.
Changing the filesystem type means you are going to format it. For formatting you have to unmount the filesystem but you can't unmount primary filesystem (/dev/sda1 - in most cases). It does not allow to unmount the primary filesystem.
Just like you can't take the complete picture of earth if you are inside it, you have to go outside to take complete picture of earth.
You can choose filesystem type while installing linux.
Use Gparted for maintaining and editing your partitions but you can't change primary filesystem there.
The application is good to learn about partitions and filesystem types.
But use carefully, you can damage your drive data if you have formatted any drive accidentally.
Thanks guys, but my question is little different; not sure if you understood it correctly. As in rhel6 ext4 is the DEFAULT FS, it must be defined somewhere right that while creating a filsystem the default fs (if i do not mention any option with mkfs command) would be ext4. I want to know about that file.
I know and understand exactly what Nbiser and Eklavya said, actually i was not asking that.
Thanks guys, but my question is little different; not sure if you understood it correctly. As in rhel6 ext4 is the DEFAULT FS, it must be defined somewhere right that while creating a filsystem the default fs (if i do not mention any option with mkfs command) would be ext4. I want to know about that file.
I know and understand exactly what Nbiser and Eklavya said, actually i was not asking that.
We understood the question you FIRST asked, but your second post then CHANGED the question. Hard to give accurate answers when the questions keep changing.
There is no 'file' that contains that...it's in the Red Hat installation program as a default. THEY have the source code for it, so if you want it call them and ask. You are PAYING for your RHEL, right??? If you want to specify a different filesystem type for kickstart installations, that's part of what you can do when you build your kickstart file(s).
Distribution: OpenSUSE 13.2 64bit-Gnome on ASUS U52F
Posts: 1,444
Rep:
I have never had the chance to install Red Hat nor any Red Hat derived OS. But the one I have installed you choose the file system type you want to use during installation.
I dont think there is possible to changed once the OS is installed. Unless you could make and image of your current installation, copy it in an external device, then format your partition with desired file system and download back the image from the external device into the freshly formatted partition, probably need to change your fstab and other files.
The default filesystem type used during installation is built into the installer. You really can't change that, but you have ample opportunity to select other filesystem types if you use custom partitioning rather than automatic storage allocation, or if you use a kickstart file to automate your installation.
If you are asking about the type you get with you run "mkfs" without a "-t" option, that is compiled into the mkfs binary. mkfs is simply a front-end to the various mkfs.{fstype} filesystem builders. I have long been in the habit of bypassing the front-end and directly invoking the one I want, mkfs.ext4, mkfs.vfat, etc.
The /etc/fstab file defines the filesystem of the boot partition and other devices, or at least what it should try to use to access them. You can change the filesystem (after installation) and the fstab to match it (and the bootloader). But you're effectively cloning the system to do that since you can't do that afaik to a live system. Some distros let you select the destination filesystem at the time of installation. Although you may need to pre-partition and pre-mkfs that destination before starting the installer.
Thanks guys, but my question is little different; not sure if you understood it correctly. As in rhel6 ext4 is the DEFAULT FS, it must be defined somewhere right that while creating a filsystem the default fs (if i do not mention any option with mkfs command) would be ext4. I want to know about that file.
I know and understand exactly what Nbiser and Eklavya said, actually i was not asking that.
If you are thinking there is a file in /etc in which current filesystem is ext3 and you will edit it and make it ext4 and now your file system will be ext4. It is NOT like that.
File system selection is a proper process, it can't be changed like this.
If you want to change the filesystem type, read this
During install, you can use Custom and choose, or you can accept what's hard-coded into the install program.
When creating your own, choose a type either by
Code:
mkfs -t <type>
# or
mkfs.<type>
There may be a hard coded fall back value in mkfs, but its NOT a good idea to rely on it.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.