seeking howto use GPT partition drives to install linux
Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with 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.
seeking howto use GPT partition drives to install linux
I'm stumped! I know the details are out there, but I can't find them. I hope I'm not asking the right questions or using the right words to search. I hope, too, that someone here can show me the yellow brick road. I want to partition my drives using GPT instead of MBR and then install linux onto those drives.
For years, I would take a drive, make an MBR table, create a /boot,a / (root), and a swap primary partition. Then I'd create an extended partitions for /home and what I call /wrk. During install, I'd point to these partitions and let it run. Things would boot into GRUB and run selections just fine and work as expected.
When I tried this with a GPT partition table, I got the GRUB boot menu as expected, but when I make a selection, the screen blinks and the GRUB menu re-appears. When I say "tried this" I mean: created a GPT table then created the partitions as described above.
I also tried to create an empty GPT table and let the install do whatever it wanted with the space. At startup, all I got was a black screen and the system stalled.
AARRGGHH !?!?!?
I'm not interested in secure boot. I only want to use GPT partitions instead of MBR partitions. Once I have this working I want to enable boot &c with the SDD.
My workstation details:
Lenovo ThinkPad X220-tablet
UEFI BIOS version 8DET70WW(1.40)
UEFI BIOS date 2015-05-14
Settings: Follow-up:
This system does not have a setting to set "secure boot" on/off. There is a setting
that affects a "Security Chip". Active, the chip is visible and operative. Inactive, the chip is visible but not used. Disabled, the chip is not visible and not used.
Security Chip ==> Inactive
UEFI/Legacy boot ==> BOTH
UEFI/Legacy priority ==> Legacy First
Reserve Memory for UEFI Boot Mgr ==> Enabled
Drives:
internal HDD ==> 1TB WD
internal SDD ==> 256GB Samsung (installed instead of the cell adapter)
external HDD ==> 1TB WD (working MBR install of Mint 18.3)
Thanks in advance,
~~~ 0;-Dan
Last edited by SaintDanBert; 12-08-2018 at 12:30 PM.
Get in in a console mode somehow and use gdisk instead of fdisk. Commands are pretty similar. No extended partition - just partition away. I wouldn't do this myself, btw. If my bios smells GPT partitions, it defaults to UEFI mode. It has to be fdisk for me, or a gargantuan struggle with uefi. Likewise I wouldn't enable BOTH UEFI and Legacy - that's allowing UEFI. I would disable it's Memory also. You're really asking for trouble there.
Or just delete all disk partitions, and boot an install dvd. They all spoon feed you through partitioning.
Through another forum, I learned of the utility [b]efibootmgr[b] ... and tried it.
Code:
prompt$ sudo efibootmgr
[sudo] password ***********
efibootmgr: EFI variables are not supported on this system.
I can see more than one interpretation for this message:
the running configuration did not involve EFI and so those are not parts of the active system
this hardware does not support EFI in spite of the settings available through CMOS
Can anyone shed light onto this situation?
Follow-up:
I found this article: EFI Bootmgr, and offer the following extract.
In order to successfully use efibootmgr the EFI variables filesystem must be accessible. This requires that the system has been booted in EFI mode (and not through the firmware's MBR mode) as otherwise the EFI variables themselves cannot be accessed.
If the system is in MBR mode, reboot and do what is necessary in order to tell the system firmware to boot in EFI mode. Usually this involved either changing an option in the firmware's settings or selecting an EFI boot entry in the system's boot menu.
This seems to clearly explain the situation with efibootmgr, and suggests that my GPT boot troubles might be caused by a similar conflict between the workstation boot mode -- MBR vs. EFI -- and the target partitions.
Hmmm ???
Thanks in advance,
~~~ 0;-Dan
Last edited by SaintDanBert; 12-08-2018 at 01:02 PM.
Get in in a console mode somehow and use gdisk instead of fdisk. Commands are pretty similar. No extended partition - just partition away. I wouldn't do this myself, btw. If my bios smells GPT partitions, it defaults to UEFI mode. It has to be fdisk for me, or a gargantuan struggle with uefi. Likewise I wouldn't enable BOTH UEFI and Legacy - that's allowing UEFI. I would disable it's Memory also. You're really asking for trouble there.
Or just delete all disk partitions, and boot an install dvd. They all spoon feed you through partitioning.
Thank you for taking time to reply.
I'm quite comfortable with linux installation onto MBR partition table HDD workstations.
As you suggest, "beyond here lie beasties" when I enter the world of EFI boot.
While I'm not interested in so-called "secure boot," I have need to install to GPT partitions table HDD hardware.
One reason involves the fact that so many new{er} workstations are UEFI boot and I'd like to future-proof my
efforts to support those environments.
Using a Legacy install with GPT partitions requires an unformatted BIOS_grub partition. The process is explained in detail at the link below. Have you done that during/before the instll?
Using a Legacy install with GPT partitions requires an unformatted BIOS_grub partition. The process is explained in detail at the link below. Have you done that during/before the install?
The link explanation didn't work for me. No one could help me out in 2013, no dvd booted with a gpt disk, etc. I have installed 2 ssds in turn, and DARE not format GPT. I think nearly every other bios discussed is kinder, but I suspect M$ wrote this one :-/. UEFI is just a base attempt to modernize partitioning (Yet again) and to cut out M$ boot viruses
If you use gpt, you must provide a partition for the boot code. And it must be flagged appropriately.
- for UEFI, an EFI partition formatted as FAT
- for BIOS a boot_BIOS partition as mentioned above.
Modern (as in last 18 months) fdisk is fine with gpt, but I have always used gdisk (or parted) out of habit.
IMHO, if UEFI is available, use it, it will save angst as you move forward. Re BIOS and gpt, this thread from the last couple of days is interesting; not sure if it also applies to CSM (UEFI pretending to be BIOS).
I'm not interested in secure boot. I only want to use GPT partitions instead of MBR partitions. Once I have this working I want to enable boot &c with the SDD.
Do you know the difference between UEFI and secure boot ? For machines you build yourself you don't have to enable secure boot in the UEFI firmware. UEFI and secure boot are different things. Virtually every distro supports UEFI itself as grub2-efi supports EFI booting.
With Linux you can easily use either legacy BIOS or UEFI with GPT partitions. I have a BIOS/GPT system myself. If partitioning manually it is important to create 1 MiB BIOS Boot partitions as others have said. This is for the grub second stage.
{soapbox} Why isn't there a recipe that just works ???
GPT and UEFI have been around forever in "internet time." Linux has been around longer. I find it pitiful
and very frustrating that there is not a step-by-step recipe to:
take a new HDD and create a GPT partition table
make a "boot" partition, format as xxx file system with size yyy
... repeat for "root", "var", "home", "...", "whatever"
run your favorite 64-bit linux installer
point installer to the partitions created
reboot and enjoy your new workstation
The recipe might also include some other things.
I'm not interested in dual-boot as win-doze complicates things in several ways.
Rather, I'm wanted to boot from multiple Linux editions, distros, or deployments.
the workstation has both an SDD and an HDD
configuration includes boot from SDD with boot from HDD as alternate
steps to add 2nd and following linux boot target -- alt. kernel, distro, desktop, etc
... I could go on.
{/soapbox}
Last edited by SaintDanBert; 12-14-2018 at 12:41 PM.
In your last post, you indicate what you want to do and the partitions you want to create. You left out an important option if you want a GPT drive with a Legacy boot of boot code in the MBR. You must have a bios_grub partition. That is in addition to your boot partition if you insist on having a separate boot. Without an unformatted (1MB+)bios_grub partition it won't boot. The instructions at the link I posted earlier seem pretty simple but the link below is a little more detailed.
That's a good thing because you cannot do a Legacy install of windows on a GPT partition, it MUST be UEFI.
Are you sure? If you have an at least 1MB partition of type EF02 at the beginning of the drive for legacy BIOS dual boot, and another of type EF00 for GPT, there's no reason an install like that can't work. I use a GPT-formatted USB boot stick to boot systems with both UEFI and with only BIOS, and haven't ever had any problems. Am I reading you wrong because I really feel like I am.
Last edited by RickDeckard; 12-14-2018 at 05:45 PM.
Am I reading you wrong because I really feel like I am.
No, you are not. I got this information from the microsoft site at the link below, the first paragraph under Drive Partition Rules. It does state that microsoft does not "support" this which of course, doesn't mean it can't be done.
I use a GPT-formatted USB boot stick to boot systems with both UEFI and with only BIOS, and haven't ever had any problems.
I'm not really clear on what you are saying. Do you have a partition EF02 and EF00 on a drive with only windows and also a drive with only Linux or is it one drive with both partitions with windows and Linux? What file(s) do you have on the EF02 partition of the windows drive if it is a separate drive? In Linux, that partition would be bios_grub and I believe it contains the core.img file.
I guess we're getting off topic here and I don't have multiple installs of windows so have no way to test.
I haven't found a way to use GPT without invoking UEFI, but just about everyone else can. I've kept an eye on this since my ignominious defeat on this subject in 2013. But that was a bad time for me to buy; UEFI was little known, software was poor, information scarce, etc. Later versions of this box don't have that problem. Windows 8.0 also puked trying to update to windows 8.1, and screwed things up,so I converted to ssd, formatted with fdisk, and haven't looked back.
Imho, gpt is technically neater, but if your disk isn't over 2 TB, either will do.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.