LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 04-23-2013, 09:28 AM   #1
Rohit_4739
Member
 
Registered: Oct 2010
Distribution: Red Hat
Posts: 228

Rep: Reputation: 9
Changing default filesystem type in Red Hat


Hi All,

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.
 
Old 04-23-2013, 10:24 AM   #2
Nbiser
Member
 
Registered: Oct 2012
Location: Maryland
Distribution: Fedora, Slackware, Debian, Ubuntu, Knoppix, Helix,
Posts: 302
Blog Entries: 7

Rep: Reputation: 44
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.
 
Old 04-23-2013, 10:39 AM   #3
eklavya
Member
 
Registered: Mar 2013
Posts: 619

Rep: Reputation: 136Reputation: 136
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.

Last edited by eklavya; 04-23-2013 at 10:41 AM.
 
Old 04-23-2013, 10:53 AM   #4
Rohit_4739
Member
 
Registered: Oct 2010
Distribution: Red Hat
Posts: 228

Original Poster
Rep: Reputation: 9
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.
 
Old 04-23-2013, 11:21 AM   #5
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 17,945

Rep: Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693
Quote:
Originally Posted by Rohit_4739 View Post
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).
 
1 members found this post helpful.
Old 04-23-2013, 11:56 AM   #6
TroN-0074
Senior Member
 
Registered: Dec 2011
Location: Michigan USA
Distribution: OpenSUSE 13.2 64bit-Gnome on ASUS U52F
Posts: 1,444

Rep: Reputation: 340Reputation: 340Reputation: 340Reputation: 340
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.

Although here is a wiki that says you could migrated from ext3 to ext4 in Arch Linux, check it out https://wiki.archlinux.org/index.php/Ext4

one more https://ext4.wiki.kernel.org/index.php/Ext4_Howto

Good luck to you

Last edited by TroN-0074; 04-23-2013 at 12:17 PM.
 
Old 04-23-2013, 03:56 PM   #7
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 2,962

Rep: Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268
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.
 
Old 04-23-2013, 07:15 PM   #8
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 2,324
Blog Entries: 1

Rep: Reputation: 447Reputation: 447Reputation: 447Reputation: 447Reputation: 447
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.
 
Old 04-24-2013, 01:48 AM   #9
eklavya
Member
 
Registered: Mar 2013
Posts: 619

Rep: Reputation: 136Reputation: 136
Quote:
Originally Posted by Rohit_4739 View Post
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
 
Old 04-24-2013, 01:59 AM   #10
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,241

Rep: Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325
rknichols has nailed it.

Basically, there's no default cfg.

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.

Like him, I always(!) specify.

You know what they say about 'assume'
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
changing file system type to another filesystem type,does it effect on data? janakiramulu Ubuntu 1 02-04-2011 02:58 AM
changing default processor type radiodee1 Debian 9 10-11-2007 11:08 PM
Changing Default file type Icons... IndyGunFreak Ubuntu 3 12-19-2006 02:40 PM
Changing the default file type icons in gnome on fedora C3 Sm1ler Linux - General 3 04-22-2005 11:43 AM
LILO and updating after changing Filesystem type psychoholic Linux - Hardware 4 03-08-2003 03:51 PM


All times are GMT -5. The time now is 04:29 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration