rhel8 VM parted command

Latest response

I have an older HP g5 dl 360 sever running ubuntu server 1604.
On top of it I am running KVM and two red hat 8 virtual machines.
When I use parted after a few commands it says if I continue all data will be destroyed.
Would this be because of my server doesn't use UEFI or because I need to
change to gpt table partition and if so, how.
Thanks Guys


Hi Larry,

parted will always warn you before doing something that is potentially dangerous, unless the command is one of those that is inherently dangerous (viz., rm, mklabel and mkpart). Please refer to Using parted.

Thank you Sam for responding to my post. I have used parted many times on Ubuntu server 14.04 and 16.04 server and for the last 2yrs sometimes on rhel7 and it has always been reliable unless I made a mistake. Then I would get that warning. I cant find any settings on KVM prior to install to create a gpt , so it installs as msdos. When I create a partition it shows that it will be gpt and that's where the problem starts LOL

Are you running parted on the host hypervisor system (ubuntu 16.04) or one of the KVM guests? Each guest will see its own logical disk, in a typical situation. The host will see the actual physical disk; the guests disks are actually files, usually under /var/lib/libvirt/images/. In either case, using parted to deleting partitions or relabel the disk (hypervisor physical or guest virtual) will tend to destroy either the host OS or guest OS, yes. This is desirable if you are doing a from scratch OS re-install and catastrophic if you are not.

Hi James , Thank you for responding I appreciate it. If you mean do I have parted on 16.04 the answer is yes, but in KVM prior to rhel8 install I cant find any way in the settings set it up as gpt so it installs as a msdos partition table. I have also used parted on rhel7 without a problem although I prefer gdisk and fdisk. For some reason rhel8 is different.

Larry, did you need anything else from the community?



Mr Hinton I got my answer. At this time I don't need anything else.

Thanks Lot !!!

I see what you mean about the mdsos disk partition label; I threw up an rhel8 test box VM yesterday (VMware ESX hypervisor) and that's what anaconda gave it by default. I'm not sure I care; it has a boot partition and an LVM partition, and I don't really need any more than those two (three if it were booting UEFI/gpt, we'd add an EFI partition then). It probably did that because I let VMware have its default way and present a BIOS emulation rather than an UEFI emulation.

Pretty much all the installers I've dealt with in recent years have an option to drop into a root shell, or are installing from a live desktop distribution you can just open a terminal and use sudo to get a root shell. If you are willing to do the disk partitioning by hand, using tools like {parted, pvcreate, vgcreate, lvcreate, mkfs}, you can generally browbeat the virtual disks into what ever shape you want. If you do this before you click into the installers GUI disk partitioning phase, it's usually pretty easy to get the installer to use a pre-existing disk layout you built behind its back. Alternatively, with Redhat you can feed it a kickstart file, and use that to script pretty much whatever disk layout you want.

For example, one of my researchers wanted an ubuntu 18.04 desktop on ZFS, which Canonical's ubiquity installer won't really support until 20.04 or so. But I could do the disk layout and disk mounts by hand, and get the installer to just use them.

The point at which I start caring about GPT disk partition labels is when the system is multiboot, or has large (>2TB) disks. Those two scenarios go a lot better on GPT than on MSDOS.

Further note: you can mix hand stuff and the anaconda installer stuff, e.g. pre-label the disk as GPT and then let anaconda do the partitions.

Thank you James, your a genius. I am going to use kickstart to install and set it up. I should of thought it myself. All of you guys have been very helpful. I am very proud to be a member of this community.

Thank you James, you gave me the right answer. I am going to use kickstart to set it up. I should have thought of that myself. Sir you are a genius, Thanks a lot.