[2024-feb-29] Sad news: Eric Layton aka Nocturnal Slacker aka vtel57 passed away on Feb 26th, shortly after hospitalization. He was one of our Wiki's most prominent admins. He will be missed.

Welcome to the Slackware Documentation Project

This is an old revision of the document!


Booting Installation Environment from HDD

This article shows how to boot Slackware installation environment from hard drive (don't ask me why).

Slackware installation environment is a small live Linux system with bysybox, partitioning and another useful utilities, and setup program. It starts automatically when you boot your system from Slackware install media: CD, DVD, USB stick or PXE.

To boot Slackware installation environment by hands without creating install media you need image of environment, suitable Linux kernel, and boot loader.

Image of Environment

All software you can use after booting Slackware installation media resides in initial ramdisk image. You can found it as /isolinux/initrd.img on installation media or at the same path at one of Slackware mirrors.

Linux Kernel

Slackware uses (at least now) one of it's huge kernels to run installation environment. You can found kernel bzImages in sub-directories of /kernel directory on installation media or at the same path at one of Slackware mirrors.

Getting The Files

If you already have iso image of Slackware install media you can mount image with loop option and copy the files, for ex. to /boot/swsetup directory.

Slackware 14.0 64-bit:

# mkdir -p /mnt/tmp /boot/swsetup
# mount -o loop /tmp/slackware64-14.0-install-dvd.iso /mnt/tmp
# cp /mnt/tmp/isolinux/initrd.img /mnt/tmp/kernel/huge.s/bzImage /boot/swsetup/
# umount /mnt/tmp

Slackware 14.0 32-bit:

# mkdir -p /mnt/tmp /boot/swsetup
# mount -o loop /tmp/slackware-14.0-install-dvd.iso /mnt/tmp
# cp /mnt/tmp/isolinux/initrd.img /mnt/tmp/kernel/hugesmp.s/bzImage /boot/swsetup/
# umount /mnt/tmp

You can also download kernel and initrd image from one of Slackware mirrors. There are some examples below.

Slackware 14.0 64-bit:

Slackware 14.0 32-bit:

Boot Loader

There are many boot loaders around. Slackware uses SYSLINUX to boot from install media, installs LILO to boot installed system, provides GRUB-legacy package in /extra (32 bit only). Many distributions use GRUB (renamed from GRUB2) as they main boot loader. If you use a Linux system you probably already have suitable one. You need to put bzImage and initrd.img to right place and instruct boot loader to boot them.
Note parameters passed to kernel in /isolinux/isolinux.cfg, you need them to properly configure your boot loader.

LILO

Add to /etc/lilo.conf something like:

image = /boot/swsetup/bzImage
  initrd = /boot/swsetup/initrd.img
  addappend = "load_ramdisk=1 prompt_ramdisk=0 rw printk.time=0 SLACK_KERNEL=huge.s"
  label = SwSetup

and run

# lilo

GRUB

Add to /boot/grub/grub.cfg something like:

menuentry 'SwSetup' {
  set root='(hd0,2)'
  linux /boot/swsetup/bzImage  load_ramdisk=1 prompt_ramdisk=0 rw printk.time=0 SLACK_KERNEL=huge.s
  initrd /boot/swsetup/initrd.img
}
(hd0,2) means second partition on first drive (i.e. /dev/sda2). You can find right value in set root command of menuentry used to boot your system or consult with GRUB manual.
If you use separate partition for /boot remove “/boot” from paths.

GRUB-legacy

Add to /boot/grub/menu.lst something like:

title SwSetup
  root (hd0,1)
  kernel /boot/swsetup/bzImage  load_ramdisk=1 prompt_ramdisk=0 rw printk.time=0 SLACK_KERNEL=huge.s
  initrd /boot/swsetup/initrd.img
(hd0,1) means second partition (this in not typo, first partition has number 0 here) on first drive (i.e. /dev/sda2). You can find right value in root command in section used to boot your system or consult with GRUB-legacy manual.
If you use separate partition for /boot remove “/boot” from paths.

Test It

Reboot your system and select SwSetup at boot prompt.

If you have unused partition you can install Slackware on it right now.

Using ISO Image as Source

If you downloaded Slackware DVD iso image you can use it as package source. On “SOURCE MEDIA SELECTION” step select “2 Install from hard drive partition”, type in partition name with image file, for ex. /dev/sda2, then type in path to directory with DVD iso image, for ex. /tmp/, and agree with prompt to use image as package source:

┌──────────────────────SOURCE MEDIA SELECTION────────────────────────┐
│ Please select the media from which to install Slackware Linux:     │
│ ┌────────────────────────────────────────────────────────────────┐ │
│ │           1  Install from a Slackware CD or DVD                │ │
│ │           2  Install from a hard drive partition               │ │
│ │           3  Install from NFS (Network File System)            │ │
│ │           4  Install from FTP/HTTP server                      │ │
│ │           5  Install from Samba share                          │ │
│ │           6  Install from a pre-mounted directory              │ │
│ └────────────────────────────────────────────────────────────────┘ │
├────────────────────────────────────────────────────────────────────┤
│                   <  OK  >          <Cancel>                       │
└────────────────────────────────────────────────────────────────────┘
┌────────────────────INSTALLING FROM HARD DISK───────────────────────┐
│ In order to install directly from the hard disk you must have a    │
│ partition (such as /dev/sda1, /dev/sdb5, etc) with the Slackware   │
│ distribution's slackware/ directory like you'd find it on the FTP  │
│ site.  It can be in another directory.  For example, if the        │
│ distribution is in /stuff/slackware/, then you have to have        │
│ directories named /stuff/slackware/a, /stuff/slackware/ap, and so  │
│ on each containing the files that would be in that directory on    │
│ the FTP site.  You may install from FAT or Linux partitions.       │
│                                                                    │
│ Please enter the partition (such as /dev/sda1) where the Slackware │
│ sources can be found, or [enter] to see a partition list:          │
│ ┌────────────────────────────────────────────────────────────────┐ │
│ │/dev/sda2                                                       │ │
│ └────────────────────────────────────────────────────────────────┘ │
├────────────────────────────────────────────────────────────────────┤
│                   <  OK  >          <Cancel>                       │
└────────────────────────────────────────────────────────────────────┘
┌───────────────────SELECT SOURCE DIRECTORY─────────────────────┐
│ Now we need to know the full path on this partition to the    │
│ slackware/ directory where the directories containing         │
│ installation files and packages to be installed are kept.     │
│ For example, if you downloaded Slackware into the /stuff      │
│ directory on your hard drive (so that you have the            │
│ directories /stuff/slackware/a, /stuff/slackware/ap, and so   │
│ on each containing the files that would be in that directory  │
│ on the FTP site), then the full path to enter here would be:  │
│                                                               │
│       /stuff/slackware                                        │
│                                                               │
│ What directory are the Slackware sources in?                  │
│ ┌───────────────────────────────────────────────────────────┐ │
│ │/tmp/                                                      │ │
│ └───────────────────────────────────────────────────────────┘ │
├───────────────────────────────────────────────────────────────┤
│                 <  OK  >         <Cancel>                     │
└───────────────────────────────────────────────────────────────┘
┌────────────────────────USE ISO IMAGE──────────────────────────┐
│                                                               │
│ An ISO image of Slackware's install DVD was found.            │
│ Do you want me to mount the ISO image and use this as the     │
│ package source?                                               │
│                                                               │
├───────────────────────────────────────────────────────────────┤
│                   < Yes >          < No  >                    │
└───────────────────────────────────────────────────────────────┘

Then continue as usually.

Slackware setup automatically finds iso image named as slackwar*-install-dvd.iso. You can also mount your image by hands before starting setup or after that from another console (use Alt+Fn to switch)

# mkdir /hd /iso
# mount /dev/sda2 /hd
# mount -o loop /hd/tmp/slackware64-14.0-install-dvd.iso /iso

and on “SOURCE MEDIA SELECTION” step select “6 Install from a premounted directory” and type in path to packages /iso/slackware64 for 64 bit system or /iso/slackware for 32 bit and continue as usually.

Sources

 wiki:user:bormant:booting_install_from_hdd ()