Enjoy Slackware 15.0!

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). 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. The main sections below explain how to setup various popular boot loaders.


Skip the bootloader (LILO) section during install (LILO works but as of Slackware 14.1, liloconfig doesn't detect GPT partitions). After installation is complete, enter your local Slackware install. From here, customize the example /etc/lilo.conf to put LILO into the protective MBR and add entries for your chosen kernel(s). Finally, 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
MENU TITLE Boot options

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 kernel, adjust as needed.

Accessing the Slackware install, prior to bootloader installation

In all of the examples, 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', assuming /dev/sda1 is your / partition and hugesmp.s your kernel of choice, otherwise adjust accordingly).


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