20210628 - Upgrade of php fixed the page rendering issue.

Welcome to the Slackware Documentation Project

This is an old revision of the document!


Installing Slackware Using GPT with a BIOS motherboard

It is possible to install Slackware to a disk that uses a GUID Partition Table (GPT), even on a machine that uses BIOS (i.e. you do not need a UEFI-based machine). Using GPT allows you to install Slackware onto very large disk drives (the theoretical maximum addressable disk size is 2 ZiB). As always, partitioning should be done prior to starting the 'install' script, however you must use a GPT aware partitioning tool, e.g. gdisk, cgdisk or parted (all of which are included with Slackware). The main sections below explain how to setup various popular boot loaders.

LILO

Skip the bootloader (LILO) section during install (LILO works but as of Slackware 14.1, liloconfig won't detect GPT partitions). After installation is complete, enter your local Slackware install. From here, customize /etc/lilo.conf_example and save it as /etc/lilo.conf. You will need to set LILO to install to the protective MBR and add entries for your chosen kernel(s) at a minimum, in addition to any other changes you see fit. Once you have done this, issue the 'lilo' command.

Grub 2

If you want to use Grub 2, make sure you have a 'BIOS boot partition' (partition type EF02 in gdisk or cgdisk) somewhere on disk (at the start seems sensible). It should be at least 1MiB. Skip the bootloader (LILO) section during install. After installation is complete, enter your local Slackware install. Finally, issue the following to actually install Grub 2 as your bootloader:

# grub-install --modules=part_gpt /dev/sda
# grub-mkconfig -o /boot/grub/grub.cfg
This assumes you are using the disk /dev/sda, adjust if this is not the case.

Extlinux (Syslinux)

The final alternative is to use Extlinux (part of the Syslinux package included with Slackware). It is also capable of booting a system with GPT and like LILO, it doesn't need a 'BIOS boot partition'. To use Extlinux, the partition containing /boot must be formatted to ext2, ext3, ext4, or btrfs.

Before you begin Slackware installation, set one of the partitions as the boot partition. For example, presuming that /boot was on /dev/sda, you could issue the following from the shell prompt of the install media, after partitioning is complete:

# sgdisk /dev/sda --attributes=1:set:2

You can also use sgdisk to confirm it was indeed set correctly:

# sgdisk /dev/sda --attributes=1:show
1:2:1 (legacy BIOS bootable)

During actual Slackware installation, skip the bootloader (LILO) section. After installation is complete, enter your local Slackware install. You can then install Extlinux as your bootloader as follows:

# mkdir -p /boot/extlinux
# extlinux --install /boot/extlinux
# cat /usr/share/syslinux/gptmbr.bin > /dev/sda
All of the above assumes you are using the disk /dev/sda, adjust if this is not the case.

Assuming you wanted a simple boot menu, copy menu.c32 over into /boot/extlinux/ as well:

# cp /usr/share/syslinux/menu.c32 /boot/extlinux/

Finally create a /boot/extlinux/extlinux.conf file along the following lines:

UI menu.c32
PROMPT 0
MENU TITLE Boot options
TIMEOUT 50
DEFAULT huge

LABEL huge
      MENU LABEL Slackware (Huge) 
      KERNEL /boot/vmlinuz-huge-smp-3.10.17-smp
      APPEND root=/dev/sda1 ro

LABEL generic
      MENU LABEL Slackware (Generic)
      KERNEL /boot/vmlinuz-generic-smp-3.10.17-smp
      APPEND root=/dev/sda1 ro
      INITRD /boot/initrd.gz
This assumes you are using the disk /dev/sda and the 3.10.17-smp kernels, adjust as needed.

Accessing the Slackware install, prior to bootloader installation

In all of the bootloader installation examples above, final installation of the bootloader is done from within the installed Slackware system. There are two ways to get into your Slackware install, prior to the installation of the bootloader. You can use chroot ('chroot /mnt') from the shell prompt provided by the install media, after you have finished the basic installation, i.e. after the message “Installation of Slackware Linux is complete”. Alternatively Slackware's install media 'boot: ' prompt includes help text explaining how to boot the installed Slackware system, rather than the install environment (i.e. at the boot prompt type something like 'hugesmp.s root=/dev/sda1 rdinit= ro').

The final example assumes Slackware is installed on your /dev/sda1 partition and you wish to boot with the hugesmp.s kernel, adjust as needed.

Sources


In Other Languages
Translations of this page?:
QR Code
QR Code howtos:slackware_admin:installing_with_gpt_without_uefi (generated for current page)