LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 06-12-2013, 10:57 AM   #1
walterbyrd
Member
 
Registered: Apr 2004
Posts: 734

Rep: Reputation: 46
Can not switch off DOS compatible mode.


I just installed CentOS 6.4 (64 bit) and I am new to LVM. I am trying to figure out how to make the LVM partitions usable.

When I do an fdisk /dev/sda I get this message:


----------------
# fdisk /dev/sda

WARNING: DOS-compatible mode is deprecated. It's strongly recommended to switch off the mode (command 'c') and change display units to sectors (command 'u').

----------------

I follow the instructions, including reboot, but the next time I do an fdisk, I get the same thing.

I do not really understand why the latest version of CentOS would install a deprecated mode. Or why CentOS would install unusable partitions.

Any help appreciated, thanks in advance.
 
Old 06-12-2013, 12:38 PM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,149

Rep: Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264
fdisk is probably useful for floppy drives and USB sticks. Current large drives don't use DOS format, they use GPT, so you must use the horrible parted program. If you are ambitious get GPT Fdisk from Sourceforge.
 
Old 06-12-2013, 12:55 PM   #3
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
This has nothing to do with LVM or GPT at all, it is a display mode of fdisk . This is what the manpage for fdisk (util-linux 2.21.2) says about that:
Quote:
fdisk does not use DOS-compatible mode and cylinders as display units by default. The old deprecated DOS behavior
can be enabled with the '-c=dos -u=cylinders' command-line options.
So you should check if some reason you have an alias for fdisk with that options, otherwise just press the keys fdisk recommends and continue your work with fdisk.
By the way, fdisk has nothing at all to do with LVM and won't help you to work with or learn about LVM.
 
Old 06-12-2013, 01:21 PM   #4
jlinkels
LQ Guru
 
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195

Rep: Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043
You could follow the directions of what fdisk proposes.

You could also try cfdisk which is a more friendly interface. Not sure if cfdisk is a layer around fdisk.

But I do agree that this is not fdisk default behaviour and you could be calling a script instead of fdisk.

jlinkels
 
Old 06-13-2013, 12:18 AM   #5
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,362

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Actually , at least on Centos6.4 it does seem to be hardcoded
Code:
 which fdisk
/sbin/fdisk
[root@boole log]# fdisk /dev/sdb

WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
         switch off the mode (command 'c') and change display units to
         sectors (command 'u').

Command (m for help): q

[root@boole log]# file /sbin/fdisk
/sbin/fdisk: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.18, stripped

# double check - specify full cmd path
/sbin/fdisk /dev/sdb

WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
         switch off the mode (command 'c') and change display units to
         sectors (command 'u').

Command (m for help): q
 
Old 06-13-2013, 07:34 AM   #6
jlinkels
LQ Guru
 
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195

Rep: Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043
Yuk, look what Debian Squeeze says:

Code:
sudo fdisk /dev/sdb

WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
         switch off the mode (command 'c') and change display units to
         sectors (command 'u').

Command (m for help):
Although I used this command the day before yesterday I was sure this message had not appeared. How wrong can someone be!

jlinkels
 
Old 06-13-2013, 07:41 AM   #7
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Seems that Slackware is more progressive here:
Code:
root ~ ☺ # fdisk /dev/sdb
Welcome to fdisk (util-linux 2.21.2).

Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help):
In Debian Wheezy I don't get that message. Since both, Squeeze and the latest CentOS, use util-linux 2.17, but Wheezy has 2.20 and Slackware -current 2.21 it may be that this default behavior switched between the versions or DOS mode simply was removed in later versions.
 
Old 06-13-2013, 08:18 AM   #8
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,362

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
At the end of the day, its just a display mode, so it still works just fine.
@jlinkels; you probably got so used to it you don't remember seeing it.
I'd forgotten until I got into this thread.
Centos/RHEL are long term products and the upstream probably hasn't made it down yet.
 
Old 06-13-2013, 09:01 PM   #9
jefro
Moderator
 
Registered: Mar 2008
Posts: 22,001

Rep: Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629
https://code.google.com/p/fusecompress/
 
Old 06-13-2013, 10:58 PM   #10
walterbyrd
Member
 
Registered: Apr 2004
Posts: 734

Original Poster
Rep: Reputation: 46
Quote:
Originally Posted by jlinkels View Post
You could follow the directions of what fdisk proposes.
As I said, I did. That did not work. That is the problem.


Quote:
Originally Posted by jlinkels View Post
You could also try cfdisk which is a more friendly interface. Not sure if cfdisk is a layer around fdisk.

I am not sure what good that would do.


Quote:
Originally Posted by jlinkels View Post
But I do agree that this is not fdisk default behaviour and you could be calling a script instead of fdisk.
As I said, this is a fresh install. I am using what redhat setup.
 
Old 06-13-2013, 11:23 PM   #11
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,783

Rep: Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214
The mode in which fdisk starts up is independent of how your disk is currently partitioned. The version of fdisk that you have (2.17.2) will, unless you include the "-c" option in the command line, always start up in DOS compatible mode and give you that warning. Older versions of fdisk always started up in DOS compatible mode (there was no "-c" command line option) and did not give that deprecation warning. Newer versions start up with DOS compatible mode turned off by default. Your version is somewhere in between. You can either live with it or keep venting about it, but it is extremely unlikely that Red Hat will change that behavior within the current OS major release.
 
Old 06-14-2013, 12:58 AM   #12
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,362

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
As above post & see my example; its baked in but nothing to worry about.
If you really can't stand it, try parted.
 
  


Reply

Tags
centos6, fdisk, lvm



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
unable to switch from console mode to desktop mode kapil Linux - Newbie 4 10-17-2011 01:16 AM
Increase The Font Size when We switch from GUI mode to Console mode. subramani Linux - Desktop 4 09-20-2011 12:57 PM
unable to switch frm console mode to desktop mode kapil Linux - Newbie 18 09-15-2011 12:55 AM
How to switch from text mode to graphical mode in solaris 10 linuxjamil Solaris / OpenSolaris 3 07-19-2009 03:55 PM
Does dsl come with a dos compatible boot manager? siliconpie DamnSmallLinux 4 04-11-2006 05:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 10:27 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
Open Source Consulting | Domain Registration