Red HatThis forum is for the discussion of Red Hat Linux.
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.
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.
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.
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.
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
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195
Rep:
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!
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.