Creating Dual Boot System with Windows 8 and Slackware64 on UEFI-based Machine

Home / Creating Dual Boot System with Windows 8 and Slackware64 on UEFI-based Machine

This is short notes on how I create a dual boot machine with Windows 8 and Slackware64. Both are 64-bit operating system and will be installed on UEFI-based computer with GPT disk layout.

Actually I do this around in earlier year 2013, so this article might not up to date. However it should work because we use general method.

In this article, i use:

  1. Microsoft Windows 8 64-bit, installation disc
  2. Slackware64 14.0, installation disc
  3. Lenovo Ideapad Z480
  4. USB disk

Note that I do the scenario (would be) mentioned because my machine is fresh and I will do it from scratch.

About Machine

Lenovo Ideapad Z480 has following specification (main):

  1. Intel Core i7-3632QM
  2. RAM 4 GB
  3. HDD 1TB
  4. Video RAM NVidia GeForce GT640

However, I also give addition to RAM so in result I have 8GB RAM.

At default, it is not using UEFI so I activated UEFI capability.

I also convert the disk format from MBR to GPT, however I do this later.

General Overview

The problem arise before me is the fact that the Windows 8 installation DVD not support UEFI yet. Therefore I cannot boot the DVD in UEFI.And also, Windows 8 cannot be installed on GPT disk, yet. At that time Slackware also does not support UEFI, yet. But, it can be installed in GPT partition, good thing to know. Therefore I need a bootable USB disk to boot Slackware then create everything I need for installing Linux.

The scenario in this article:

  1. Create partition
  2. Install Windows 8 while the disk still use MBR layout.
  3. Install Slackware64 14.0 with GPT disk
  4. Finalizing, installing and configuring bootloader


I use a companion Linux in bootable USB stick. I create a USB stick with UEFI capable. You can download it from here.

Make a partition for USB stick with FAT32 partition and boot flag enabled. You can use either gparted or gdisk (in Linux) to accomplish it.

Just extract what inside the archive to USB stick. Make sure there are two folders: EFI and Slackware64.

Step 1: Create Partition

Boot the machine using Windows installer DVD. I need to create a partition for MBR disk. In my case I create these primary partitions:

  1. boot partition, located on partition 1 with FAT32 file system, takes about 100MB.
  2. Reserved partition, used by Windows, create it for 350MB capacity.
  3. Windows partition, NTFS, I use 100GB
  4. Linux Partition, unallocated, I use 100GB

Those are the partition I need at the moment. The rest will be create at finalizing stage.

Here, once the Windows 8 installation DVD is booted, do normal installation routine. Once we got on media selection (where we install Windows), press [Shift] + F10. This will bring command prompt. Invoke following command:


Now we will do partitioning. I’m using only one disk, so the disk should be recognized as disk 0. Also, I don’t use GPT at this section, it would be after installation of Windows 8.

select disk 0

create partition primary size=100
format quick fs=fat32 label="System"

create partition msr size=350
format quick fs=ntfs

create partition primary size=100000
format quick fs=ntfs

create partition primary size=100000

Step 2: Installing Windows 8

Still using Windows 8 installation DVD, exit the command prompt. Now I’m refreshing the list so we will know all of the partition available.

I continue installing Windows like usual on partition 3.

Once the installation finish, go to step 3.

Step 3: Installing Slackware64

I need to do some preparation first. Therefore, there would be some subsections for this.

Convert MBR to GPT

Boot the USB stick.

Conversion is inherently risky. For safety, I backup the original configuration before converting the disk. The MBR itself is stored on the first sector of the disk and can be backed up with dd by:

dd if=/dev/sda of=backup.mbr bs=512 count=1

Then I run gdisk for disk on /dev/sda

gdisk /dev/sda

Follow the option menu for conversion MBR to GPT, and I done.

Prepare the Installation Environment

Mount the USB stick. I accomplish this by invoking following command:

mkdir /src
mount /dev/sdb1 /src

Invoke setup and adjust the setting like normal installation until you reach installation media stage.

Press ALT+F2 to switch to another screen (or another tty).

Install temporary system using USB stick. Invoke these commands:

cd /src/slackware64
installpkg -root /mnt [az]*/* cd


Now, back to our main setup and choose install from CD/DVD. Also, I won’t use LILO, instead I use ELILO. So I don’t install LILO.

After installation is finished, I don’t restart the machine immediately. Instead, I go to last step: Finalizing.

Step 4: Finalizing

First, make sure we are still boot the machine using USB stick, then load following command:

modprobe efivars

Also, I need to mount the boot partition

mount /dev/sda1 /mnt/boot/efi

Add Bootstrap to Slackware

I invoke following command. Note that these commands should be invoked as is, even a dot matters. If you remember, the Slackware is installed on 4th partition.

mount /dev/sda4 /mnt/root
cd /mnt/boot/efi
cp -rvf /src/EFI /mnt/boot/efi
cd /mnt/boot/efi/EFI
mv BOOT Slackware
cd Slackware
mv bootx64.efi elilo.efi
cp /mnt/root/boot/vmlinuz-huge-3.2.29 .
vi elilo.conf

And I configure the elilo.conf:

image = vmlinuz-huge-3.2.29
label = Slackware
root = /dev/sda4

And register boot so that machine can boot Slackware.

cd /mnt
usr/bin/efibootmgr -c -L "XathryaSlackBoot" -l "\\EFI\\Slackware\\elilo.efi"

Add Bootstrap to Windows

Eject the Slackware installation disc and insert Windows 8 installation disc. I need to copy all files needed to boot EFI from Windows 8 disc.

cd /mnt/boot/efi
mkdir /mnt/disc
mount /dev/sd1 /mnt/disc
cp -R /mnt/disc/efi/microsoft /mnt/boot/efi

That will copy “microsoft” folder and whole of it’s content to /mnt/boot/efi (which is my mounted efi boot partition).

Now, to create a bootstrap we first need to restart the machine and boot with Windows 8 installation DVD. What we will do is repair the Windows 8 EFI bootloader.

I do normal installation sequence method until I was prompted with list of volumes / partitions. Now press [Shift] + F10. A new command prompt appear.

Now invoke following command, which will bring me to diskpart (disk partition) program:


My disk is only one, so I will use disk 0.

sel disk 0

Because the EFI partition is the very first partition (/dev/sda1), it should be registered as earlier volume. However, it doesn’t have drive letter, so I will give it one.


sel vol 1
assign letter b:

The attempt is successful and I’m prompted by a message which tell me that the volume has been assign to letter B. Now leave the diskpart with exit command. Go to the EFI partition and add the EFI bootstrap.

cd /d b:\EFI\Microsoft\Boot\
bootrec /fixboot
ren BCD BCD.bak
bcdboot C:\Windows /l en-us /s B: /f ALL

bootrec (boot recover) will fix the UEFI bootloader.

bcdboot will be used to recreate BCD store. The C:\Windows is path where Windows is installed and B: is drive of my EFI partition. The “/f ALL” parameter updates the BIOS settings including UEFI firmware/NVRAM while /l en-us is to localize for US locale (US English).

Add More Partitions

I need more partitions so I create them. I use gdisk for this.

, , ,

About Author

about author


A man who is obsessed to low level technology.

1 Comment
  1. Deploying Windows Server 2012 without Running Installer - Xathrya.ID

    […] My system is based on my guide for dual boot Windows 8 and Slackware64. […]

Leave a Reply

Your email address will not be published. Required fields are marked *

Social Share Buttons and Icons powered by Ultimatelysocial