Linux Lite Forums
Legacy Mode Installation Using GPT Partitions - Printable Version

+- Linux Lite Forums (https://www.freecinema2022.gq/forums)
+-- Forum: Software - Support (https://www.freecinema2022.gq/forums/forumdisplay.php?fid=5)
+--- Forum: Tutorials (https://www.freecinema2022.gq/forums/forumdisplay.php?fid=21)
+--- Thread: Legacy Mode Installation Using GPT Partitions (/showthread.php?tid=1302)

Pages: 1 2


Legacy Mode Installation Using GPT Partitions - gold_finger - 12-20-2014

GPT Partitioning for Legacy/CSM mode Linux Installations

Why use GPT partitions?
• Ability to properly access drives with capacities greater than 2TiB in size.
• Ability to make up to 128 primary partitions without needing extended and logical partitions.

WARNING:  If Windows is currently installed on your computer and you plan to set-up a dual-boot with Linux, please do not use this tutorial.  Doing such an install may not be possible due to Windows-specific restrictions as to UEFI vs. Legacy mode installations and the partition types that must be used by the respective install modes.  Please, post a help request on the Linux Lite forums before any such attempt, or you risk inadvertently wiping out your Windows installation.

In a nutshell, this tutorial is only geared toward those wishing to install Linux to the drive by itself and are converting a drive from MBR to GPT partitions.  One can also use this for setting up a multi-boot system with more than one Linux distribution.  In that case, make space on the drive for your new installation instead of deleting all current partitions in the steps below.

EDIT (added after original posting):
Just to clear up any potential confusion -- GPT partitions are not "required" for multiple OS booting.  That can be done easily with a traditional MBR partitioned drive as well.  In fact, using GPT partitions is much less common, though it's usage has increased in recent years.  This tutorial is for informational purposes in case someone wants to use GPT partitions.



OTHER NOTES:
Most newer computer (from around 2011-2012 on) use UEFI firmware instead of the older BIOS firmware to handle the initial boot process of the computer after pressing the power button -- referred to as POST (Power On Self Test).  BIOS-based computers only boot in what we're calling "Legacy mode" here.  Most UEFI-based computers can boot in either "UEFI mode", or Legacy/CSM/BIOS mode.  (CSM = Compatibility Support Module.)

Older BIOS-based computers typically have drives using MBR partition tables to store information on the drive's partitions.  MBR partitioned drives have two main drawbacks:  they are limited to using only 4 "primary" partitions and they can only handle addressing disks up to 2TiB in size.  One can get around the 4 partition limit by making one of the primary partitions into an "extended" partition, inside of which several "logical" partitions can be created.

GPT partitioned disks do not need extended and logical partitions because they can handle up to 128 primary partitions.  Also, addressable disk space is significantly larger (up to 8ZiB), so the larger hard drives available today can be easily accomodated.



INSTRUCTIONS:

• Boot live Linux DVD/USB
• Open GParted (found in Menu under System -> Partition Drives).
• Delete any existing partitions on the drive (eg. from prior OS installations that were on the drive).
  • If a Swap partition exists, right-click (rt-clk) it and choose "Swapoff" first, then you can delete it.
  • Rt-clk each remaining partition and choose "Delete".
  • Click "Apply" button along top of interface, or choose Edit -> Apply All Operations to finalize deletions.
  • Make GPT partition table by going to Device -> Create Partition Table -> gpt -> Apply.
• Make your new partitions.
• For each one, rt-clk the free space and choose "New" to bring up the new partition dialog box.
• Following is an example showing necessary partitions along with an optional partition for Home.  If you do not want a separate Home partition, then make the Root partition bigger.
• Descriptions in parenthesis tell you what the partitions will be used for when you run the installer and need to set the mount points.  You won't be setting mount points right now while in GParted.
  • Size=1-16MB;  leave it unformatted; flagged as "bios_grub".  (Note:  set the flag after hitting "Apply" to create all of your partitions.  Right-click this partition, choose "Manage flags" and pick "bios_grub".)
  • Size=10-30GB;  format Ext4  (Root partition)
  • Size=1-2 times RAM; format "linux-swap"  (Swap partition)
  • Size=rest of disk space;  format Ext4  (Home partition)
  • Click "Apply" button along top of interface, or choose Edit -> Apply All Operations to finalize creations.
  • Go back to small, unformatted partition and set the "bios_grub" flag.
• To install, run installer program and choose "Something else" installation option.
• On following partitioning page, one-by-one select your pre-made partitions, click "Change" button and fill-in with appropriate information.  (Note:  since you already formatted the partitions with GParted, it doesn't matter whether or not you check the box to format the partitions.)
  • bios_grub partition -- no need to do anything with this.  Installer will automatically see and use it.  Just leave it as-is.
  • Root partition -- keep size as is -- Use as = Ext4 file system -- Mount point = "/"
  • Swap partition -- keep size as is -- Use as = linux-swap -- no mount point needed
  • Home partition -- keep size as is -- Use as = Ext 4 file system -- Mount point = "/home"
  • Device for boot loader installation = /dev/sdX (Substitute correct drive letter that you're installing to in place of "X" without any partition number after it.  Eg. "/dev/sda", not "/dev/sda1".)
• When done creating partitions, click "Finish" installation.


Re: Legacy Mode Installation Using GPT Partitions - Valtam - 12-20-2014

Another amazing contribution, thank you gold_finger Smile


Re: Legacy Mode Installation Using GPT Partitions - Wirezfree - 12-20-2014

Really excellent How To...

Good time for a question/clarification.?

I have read, but not tried it...
If you multi boot, and you don't need to Hibernate(to swap)
You can just use the same swap partition across the installs.?
(may save a little disk space/config time)

Dave


Re: Legacy Mode Installation Using GPT Partitions - gold_finger - 12-21-2014

Your welcome Jerry.


(12-20-2014, 10:52 PM)Wirezfree link Wrote: Really excellent How To...

Good time for a question/clarification.?

I have read, but not tried it...
If you multi boot, and you don't need to Hibernate(to swap)
You can just use the same swap partition across the installs.?
(may save a little disk space/config time)

Dave

Thanks Wirezfree.

Re: Hibernation & Swap -- whether hibernating of not, only one Swap partition is needed.  Each Linux distro installed will use it.  Size of Swap needs to be at least equal to amount of RAM on computer for hibernation to work right.  If you don't use hibernation, then can safely make Swap smaller than that.


Re: Legacy Mode Installation Using GPT Partitions - Wirezfree - 12-21-2014

Hi gold_finger,

Thanks & noted...
Just wanted to be sure.

Dave


Re: Legacy Mode Installation Using GPT Partitions - gold_finger - 12-21-2014

Just a quick note for anyone who may have already read through the tutorial.

It occurred to me that the following sentence in red might cause a bit of confusion:
Quote:In a nutshell, this tutorial is only geared toward those wishing to install Linux to the drive by itself and are converting a drive from MBR to GPT partitions.  One can also use this for setting up a multi-boot system with more than one Linux distribution.  In that case, make space on the drive for your new installation instead of deleting all current partitions in the steps below.

Two qualifications on that sentence:

1.  I limited it to just Linux distributions because Windows can not be installed in Legacy mode to a GPT disk -- Linux can be.

2.  I went back and added an "EDIT" to the tutorial to explain that this does not mean GPT partitions must be used for multi-boot systems.  As many already know, multi-booting on traditional MBR partitioned drives -- using extended and logical partitions -- has been and continues to be the more commonly used approach.

So this tutorial is geared toward anyone who wants to use GPT, or who must because they use large capacity drives not handled by MBR.  Since the partitioning and install procedure is slightly different than most people are used to, I thought it would be good to have instructions handy on the forum if needed even though it's not likely to be a popular install method.


Re: Legacy Mode Installation Using GPT Partitions - AustinTexas - 05-05-2016

Just to add a tip on creating GPT partitions - when you make the final partition, leave 1 MB free (unallocated) at the end of the drive. This area is used by GPT partitioning to store a backup copy of the partition table.


Re: Legacy Mode Installation Using GPT Partitions - m654321 - 05-06-2016

I am very interested in this tutorial, by Goldfinger, as I was hoping to install several Ubuntu-based distros (64-bit) as root (~ 20 distros) on a Dell Latitude D630, for demonstration purposes, for those interested in having a go with Linux but who would like to see the choice available. Of course, I think LL is the best out of them all!

However I'm having problems installing past the first distro.
I'd be very grateful for any help, particularly from those of you who may have already successfully set up a multiple-boot system (linux only), which has more than 4 distros installed. From my understanding of Goldfinger's tutorial, this should work.

To put you in the picture: my set-up so far is a 1TB HDD, with GPT partition table, with the following partitions created using Gparted, prior to distro installation:
- 1 x 16MB Bios grub
- 1 x 8GB Swap
- 20 x 20GB primary partitions, ext 4 formatted
- remainder unformatted

I started with installation of distro1 (Ubuntu 16.04) - everything proceeded normally & updates installed successfully.
Then followed with distro2 (Bodhi 3.2.0), but the laptop boots straight into distro1, despite having set PC to boot first from the  CD/DVD drive (location of each distro iso file), though the PC does start reading from the disk until it finally arrives at the Ubuntu 16.04 screen.

As far as I know I'm in Legacy mode - I think the Dell Latitude D630 is too old to support UEFI or EFI - at least I didn't see this in PC Settings screen (using F2 key).

Many thanks in advance for any help
Mike


Re: Legacy Mode Installation Using GPT Partitions - AustinTexas - 05-06-2016

I have had up to 6 different linux OS's installed at one time. There is really nothing to be concerned about, except for the bootloader location.
My first recommendation is that you download the SuperGrub2 .iso  and burn it to a CD. That way you will always have a way to repair your Grub, or boot any of your operating systems.
You have 2 choices for installing the bootloader (Grub).
1) Install Distro1's Grub to the device (/dev/sda), and then install all subsequent bootloaders to the partition where that OS is installed. That will preserve Distro1's control of the Grub menu. You would refresh the Grub menu (to add new OS's) by booting into Distro1 and running sudo update-grub.
2) Install each OS's Grub to the device (/dev/sda) during installation. When you do that each new OS will then control the Grub menu. If you want Distro1 to always control the Grub menu, you would boot into Distro1 and run both commands, sudo update-grub, and sudo grub-install /dev/sda (to re-install Distro1's Grub)
This is my preferred method. I am not a fan of installing Grub to a partition.

If Distro1 is Ubuntu or Linux Lite, both use Grub2. If you install PCLinuxOS, which uses the old Grub, (not Grub2), you will have a Grub menu which will not automatically detect your other OS's which use Grub2. So you will end up with a Grub menu which lists only PCLinuxOS.
This is where your SuperGrub2 CD becomes invaluable. When you boot that, and chose the "Detect any Operating System" menu item, the program will search your drives for your installed operating systems and create a menu for you that will allow you to boot any one of them. It will be a slow process to search your drives and create that menu, so be patient and let it complete.
Then after you use that menu to boot into your Distro1, run the following commands in a terminal:
Code:
sudo update-grub
Code:
sudo grub-install /dev/sda
Then Distro1 will be back in control of the Grub menu, and all other OS's should be listed (including PCLinuxOS).

Tutorial and Troubleshooting with SuperGRUB2:
http://www.supergrubdisk.org/wiki/SuperGRUB2Disk
http://www.supergrubdisk.org/wiki/Boot_Problems


Re: Legacy Mode Installation Using GPT Partitions - f23948 - 05-08-2016

thanks for the tutorial!