LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   GPT + LILO: limitations? (https://www.linuxquestions.org/questions/slackware-14/gpt-lilo-limitations-4175560467/)

kikinovak 12-02-2015 04:33 PM

GPT + LILO: limitations?
 
Hi,

My current build server is a multiboot machine with quite many different installations on it. Here's what the hard disk looks like:

Code:

# fdisk -l /dev/sda
...
  Device Boot      Start        End      Blocks  Id  System
/dev/sda1              63    8000369    4000153+  82  Linux swap
/dev/sda2        8000370    82140344    37069987+  83  Linux
/dev/sda3        82140345  105579179    11719417+  83  Linux
/dev/sda4      105579180  488392064  191406442+  5  Extended
/dev/sda5      105579243  129018014    11719386  83  Linux
/dev/sda6      129018078  152456849    11719386  83  Linux
/dev/sda7      152456913  175895684    11719386  83  Linux
/dev/sda8      175895748  199334519    11719386  83  Linux
/dev/sda9      199334583  222773354    11719386  83  Linux
/dev/sda10      222773418  246212189    11719386  83  Linux
/dev/sda11      246212253  269651024    11719386  83  Linux
/dev/sda12      269651088  324336284    27342598+  83  Linux
/dev/sda13      324336348  379021544    27342598+  83  Linux
/dev/sda14      379021608  433706804    27342598+  83  Linux
/dev/sda15      433706868  488392064    27342598+  83  Linux

/dev/sda1 is the common swap partition for each system. /dev/sda2 is the "control system", running Slackware 14.1 64-bit. /dev/sda3 is running Slackware 14.0 32-bit, /dev/sda5 Slackware 14.0 64-bit. /dev/sda6 has Slackware 14.1 32-bit, /dev/sda7 Slackware 14.1 64-bit. The other partitions are for different combinations of version (14.0, 14.1, 14.2), architecture (32-bit, 64-bit) and scenarios (server install without GUI vs. desktop). LILO is configured via the installation on /dev/sda2.

Today I got a new build server, and I would like to copy that setup to my new machine. I'd also prefer to add four extra partitions. As far as I remember, I've reached fdisk's possible limit of logical partitions (correct me if I'm wrong). Normally, GPT partitioning allows me to go beyond this limitation (up until 64 partitions, IIRC).

I just tried the gdisk (GPT) partitioning scheme + LILO combination, and it works on this machine.

So now I'd like to know the eventual limitations of LILO with this kind of thing. Can I configure something like twenty partitions and then access them via LILO?

Cheers,

Niki

pzognar 12-03-2015 07:23 AM

If I remember from reading the various docs that come with Slackware, lilo doesn't always work with a GPT system, so it looks like you got lucky. I've read that elilo is a version of lilo that is intended to work better with GPT.

Note: I use MBR so anything I'm saying in the preceding paragraph is theoretical, not actually tried by myself.

If you don't mind the (slight amount of) added work of making a initrd for each OS, you could stick with MBR and use LVM to get any number of partitions. I've got two Slackware installs running off the same LVM which is in turn in a LUKS partition, so I confirm that LVM works. :) Note: the boot partition can't be within an LVM, but with care, it is possible to have one boot partition that is used by multiple Linuxes: you make sure the kernel and initrd for each OS has a unique name and update lilo accordingly.

edit: adding a second hard drive is another way to get more partitions. ;)

kikinovak 12-03-2015 08:06 AM

Quote:

Originally Posted by pzognar (Post 5459120)
If I remember from reading the various docs that come with Slackware, lilo doesn't always work with a GPT system, so it looks like you got lucky. I've read that elilo is a version of lilo that is intended to work better with GPT.

Note: I use MBR so anything I'm saying in the preceding paragraph is theoretical, not actually tried by myself.

If you don't mind the (slight amount of) added work of making a initrd for each OS, you could stick with MBR and use LVM to get any number of partitions. I've got two Slackware installs running off the same LVM which is in turn in a LUKS partition, so I confirm that LVM works. :) Note: the boot partition can't be within an LVM, but with care, it is possible to have one boot partition that is used by multiple Linuxes: you make sure the kernel and initrd for each OS has a unique name and update lilo accordingly.

edit: adding a second hard drive is another way to get more partitions. ;)

Looks like this setup is working. I partitioned the 500 GB hard disk using gdisk (GPT) with no less than 18 partitions. I thought about LVM for a moment, but since I have some clearly defined needs - in terms of partition size - from the start, no need for an additional layer of abstraction, the more so since LILO seems to play nice with the current partitioning scheme.

My doubts mainly concerned the number of different systems LILO can address. I guess such extreme multiboot setups are quite rare. Well, for the time being everything seems to work OK.

Cheers,

Niki

MarcT 12-03-2015 08:07 AM

Quote:

Originally Posted by pzognar (Post 5459120)
Note: the boot partition can't be within an LVM, but with care, it is possible to have one boot partition that is used by multiple Linuxes: you make sure the kernel and initrd for each OS has a unique name and update lilo accordingly.

You can boot from LVM if you wish - I do it here. Have a look at the README_LVM.TXT in the top level directory.

brobr 12-03-2015 08:24 AM

Niki,

I don't think on a GPT disk you need extended partitions, but maybe that is needed to be able to boot from a MBR with lilo. Did you do without that partition (/dev/sda4)?

I am asking as, a while ago I changed my setup from MBR+LILO to GPT+elilo/refind (i.e. eufi). Before the 'bios' eventually went into eufi-mode I found that the old MBR was still used, at least the system was still booting, but this was done by lilo instead of elilo. For elilo you'll need a separate fat partition, so I wouldn't try GPT+elilo if you do not want to go to eufi-like booting.

kikinovak 12-03-2015 09:03 AM

Quote:

Originally Posted by brobr (Post 5459139)
Niki,

I don't think on a GPT disk you need extended partitions, but maybe that is needed to be able to boot from a MBR with lilo. Did you do without that partition (/dev/sda4)?

No extended partitions here. GPT doesn't suffer from all these braindead DOS limitations. I'm currently busy reinstalling all the systems, partition by partition. So far, everything from /dev/sda2 to /dev/sda6 included boots fine. Things look good.

kikinovak 12-03-2015 04:01 PM

And here's the end result. Partitioning:

Code:

[root@leanore:~] # gdisk -l /dev/sda
...
Number  Start (sector)    End (sector)  Size      Code  Name
  1            2048        12085247  5.8 GiB    8200  Linux swap
  2        12085248      137914367  60.0 GiB    8300  Linux filesystem
  3      137914368      169371647  15.0 GiB    8300  Linux filesystem
  4      169371648      200828927  15.0 GiB    8300  Linux filesystem
  5      200828928      232286207  15.0 GiB    8300  Linux filesystem
  6      232286208      263743487  15.0 GiB    8300  Linux filesystem
  7      263743488      295200767  15.0 GiB    8300  Linux filesystem
  8      295200768      326658047  15.0 GiB    8300  Linux filesystem
  9      326658048      358115327  15.0 GiB    8300  Linux filesystem
  10      358115328      389572607  15.0 GiB    8300  Linux filesystem
  11      389572608      462972927  35.0 GiB    8300  Linux filesystem
  12      462972928      536373247  35.0 GiB    8300  Linux filesystem
  13      536373248      609773567  35.0 GiB    8300  Linux filesystem
  14      609773568      683173887  35.0 GiB    8300  Linux filesystem
  15      683173888      756574207  35.0 GiB    8300  Linux filesystem
  16      756574208      829974527  35.0 GiB    8300  Linux filesystem
  17      829974528      903374847  35.0 GiB    8300  Linux filesystem
  18      903374848      976773134  35.0 GiB    8300  Linux filesystem

Bootloader:

Code:

[root@leanore:~] # lilo
Added Slack64-14.1  +  *
Added MLES-14.0-32bit
Added MLES-14.0-64bit
Added MLES-14.1-32bit
Added MLES-14.1-64bit
Added MLES-14.2-32bit
Added MLES-14.2-64bit
Added MLED-14.1-32bit
Added MLED-14.1-64bit
Added MLED-14.2-32bit
Added MLED-14.2-64bit

Cheers,

Niki

ReaperX7 12-03-2015 04:15 PM

Wait... Kiki, did you use an EF02 BIOS Boot Partition at all or direct boot from a /(root)?

kikinovak 12-03-2015 11:31 PM

Quote:

Originally Posted by ReaperX7 (Post 5459378)
Wait... Kiki, did you use an EF02 BIOS Boot Partition at all or direct boot from a /(root)?

No EFI here. On some motherboards you can use GPT partitioning and install LILO like you would do on "classic" (e. g. fdisk) partitioning. I don't know exactly how or why, but as long as it works, I don't care.

Cheers,

Niki

jheengut 12-04-2015 12:39 AM

Quote:

Originally Posted by kikinovak (Post 5458788)
As far as I remember, I've reached fdisk's possible limit of logical partitions (correct me if I'm wrong). Normally, GPT partitioning allows me to go beyond this limitation (up until 64 partitions, IIRC).

HI, whats-the-difference-between-gpt-and-mbr-when-partitioning-a-drive/ gives an overview that GPT under GNU/Linux systems should have no problem creating unlilmited partition but it is only windows which is limited to 128 partitions.

jheengut 12-04-2015 12:43 AM

Quote:

Originally Posted by kikinovak (Post 5458788)
So now I'd like to know the eventual limitations of LILO with this kind of thing. Can I configure something like twenty partitions and then access them via LILO?

Cheers,

Niki

The development of LILO ends at December 2015 lilo alioth.

Unless, a team from slackware can maintain it.

lilo just works.

jheengut 12-04-2015 12:49 AM

Quote:

Originally Posted by pzognar (Post 5459120)
If you don't mind the (slight amount of) added work of making a initrd for each OS, you could stick with MBR and use LVM to get any number of partitions. I've got two Slackware installs running off the same LVM which is in turn in a LUKS partition, so I confirm that LVM works. :) ;)

I normally have 20 or more logical unit per lvm per hard disk, even tested snapshot lvm with slackware. LVM works with Slackware GNU/Linux since 12.0.

jheengut 12-04-2015 12:58 AM

Quote:

Originally Posted by ReaperX7 (Post 5459378)
Wait... Kiki, did you use an EF02 BIOS Boot Partition at all or direct boot from a /(root)?

with lilo you need no EF02 BIOS Boot Partitio.

jheengut 12-04-2015 05:20 AM

Quote:

Originally Posted by kikinovak (Post 5459529)
No EFI here. On some motherboards you can use GPT partitioning and install LILO like you would do on "classic" (e. g. fdisk) partitioning. I don't know exactly how or why, but as long as it works, I don't care.

Cheers,

Niki

Code:

gdisk /dev/sda
GPT fdisk (gdisk) version 0.8.7

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

As long as MBR: protective is present, lilo should work fine

volkerdi 12-04-2015 02:50 PM

Quote:

Originally Posted by jheengut (Post 5459550)
The development of LILO ends at December 2015 lilo alioth.

Unless, a team from slackware can maintain it.

lilo just works.

I fail to see why anyone is concerned about this. OEMs aren't making any more non-UEFI machines, and I suspect LILO will continue to work for the existing BIOS ones without much (or even any) ongoing maintenance. There have been several fairly long periods of time where there weren't any new LILO versions and it continued to "just work", as you say. Plus, the last official release was just a couple of weeks ago! I don't consider code to be dead simply because a maintainer (not even the original one) is warning that they're going to quit working on it. But maybe I'm more pragmatic... I also don't consider a project to have started when there's just a manifesto and no code (even if it's coming soon!) ;)

Since LILO is not going to need any work (and I won't just ticker with it for no good reason), I volunteer to take over. Consider it maintained.


All times are GMT -5. The time now is 02:48 PM.