Installing without a CD

From MEPIS Documentation Wiki

Jump to: navigation, search

This page describes how to install MEPIS (this process will work with other distributions too) on a computer without a working CDROM drive.

Note that method 1 is relatively simple but methods 2 to 4 are significantly more difficult than installing from the CD and first-time users should install from the CD if possible.

This guide is very helpful when using a laptop without a working CD drive. Or, you may not have a CD burner or blank CDs (in this case, you could also purchase CDs from


Method 1: create bootable MEPIS USB key

Note: A 'USB key' is also called a 'flash key', a 'flash drive', a 'thumb drive', etc. For this particular application, you will need one that is at least 1.0-GB in size, because the MEPIS LiveCD is just slightly smaller than that in Mepis 8.0 and 8.5. You will need a minimum of a 2.0-GB in size for Mepis 11 and beyond as they are larger than 1.0-GB in size.

This is by far the simplest way to install without a CDROM-drive available on the target system, since USB flash key can do exactly the same things as the Live CD can. Just create a bootable MEPIS USB key by booting MEPIS from the LiveCD and using MEPIS System Assistant. Then you can use it for installing without a CD or you can just run MEPIS from it.

Note: If your USB key's device-name does not appear in the MEPIS System Assistant, you will first need to erase the existing file-system formatting info from it. Warning: This permanently erases all data from the USB-key! To do that, you can execute a cmd-line command of the form:

 dd if=/dev/zero of=<my-flash-device> bs=1024 count=1000

substituting your USB-key's actual device-name, in place of <my-flash-device>; for example '/dev/sdb1'. Then, restart the MEPIS System Assistant and your USB-key's device-name should now appear there.

Method 2: copy an existing install

Get access to the MEPIS installation *.iso file

We need to have the MEPIS .iso file to install it. There are two ways of doing this.

  1. You could download it and save it to a USB flash drive or USB hard drive.
  2. If you have an operating system working that can connect to the internet on the target computer, you can download it to the hard drive. Floppy distro networking suggestions

Set up partitions with a different Linux distribution

We should have a different Linux distribution that we can work with to set up the hard drive partitions. There are three options here.

  1. There is a pre-existing Linux install on the computer whose root partition does not need to be resized.
  2. The computer is recent and its BIOS is capable of booting from the USB drive. Then a distribution like GParted Live or DSL will do the job.
  3. Boot a floppy distribution such as BG-rescue Linux. Blowing the dust off the Oregon Trail floppies you have from 1998 will probably not work -- floppies go bad after a while. They are hard to find and not cheap nowadays, but it would be a worthwhile purchase to get fresh ones.

The rest of the guide will assume the use of BG-rescue, but other distributions will have similar if not the same steps. Use a tool such as fdisk to set up the partitions on the target hard drive. A good description of how partitioning works can be found here.


We will need

  • the partition for the MEPIS root
  • the swap partition
  • a partition to hold the MEPIS .iso contents (~750 MB should be sufficient)

Any pre-existing partitions that you want to keep can be left untouched. As a reminder, partitioning is dangerous, so you should back up your important data.

The small partition to hold the .iso is temporary. Format it as ext2. If it was located at /dev/hda3, this could be done with

mkfs.ext2 /dev/hda3

Next, mount the device/partition containing the .iso file. Let's say it is on a FAT32 partitioned USB drive at /mepis/SimplyMEPIS-CD_6.0-4-beta1_i386.iso

cd /mnt
mkdir sda1
mount -t vfat /dev/sda1 /mnt/sda1

Now, mount the iso file.

mkdir mepis
losetup /dev/loop0 /mnt/sda1/mepis/SimplyMEPIS-CD_6.0-4-beta1_i386.iso
mount -t iso9660 -o ro /dev/loop0 /mnt/mepis

Mount the empty partition and copy the CD contents into it.

mkdir hda3
mount -t ext2 /dev/hda3 /mnt/hda3
cd hda3
cp -rp /mnt/mepis/* .

Look at the contents of the MEPIS Grub boot options for later use

less /mnt/mepis/boot/grub/menu.lst

You should see something like

kernel /boot/vmlinuz init=/etc/init apm=power-off vga=791 quiet
initrd /boot/initrd.gz

For other distributions you may find the options at /isolinux/isolinux.cfg instead of /boot/grub/menu.lst.

Boot with GRUB

You need to have the Grub bootloader available. If it is not already installed, you can put it on a floppy from the MEPIS CD

dd if=/mnt/mepis/floppies/boot1.img of=/dev/fd0

Now, restart into Grub. Press c to go into command line mode.

Note that Grub identifies devices differently from Linux. The device is specified by the first number instead of the first letter. The partition on the device is specified by the second number like in Linux, but both the device and the partition start counting at 0 instead of 1. Therefore, our partition that was at /dev/hda3 in Linux speak is at (hd0,2) in grub speak. Also, hd* and sd* are all just hd* in grub. Grub has tab completion and a find function that help us know that we have the correct device/partition. For instance,

find (hd0,2)/floppies/boot1.<TAB>

would complete to

find (hd0,2)/floppies/boot1.img


find /boot/vmlinuz

would show


and any other places where /boot/vmlinuz could be found.

Verify the files are at (hd0,2) or wherever they are located and enter

root (hd0,2)

This tells grub where the subsequent file references will be.

Then issue

kernel /boot/vmlinuz root=/dev/hda3 apm=power-off vga=791 quiet

Notice the addition of root=/dev/hda3 and the removal of init=/etc/init. root=/dev/hda3 tells the kernel that the root of the filesystem is located at /dev/hda3.

initrd /boot/initrd.gz

Install as usual

After you are finished, don't forget to reuse the extra partition. If needed, see Installing MEPIS on old hardware

Method 3: install in a virtual environment

In order to do this method you need the following items:

  1. A computer running MEPIS (or some other Linux)
  2. qemu installed (install with synaptic in MEPIS)
  3. Your MEPIS CD or an .iso file of the MEPIS CD (preferred for speed)
  4. Some way to connect the install hard drive to your working computer (spare ide channel, usb adapter, etc)


  • As far as I know, qemu only emulates IDE drives. If you want to do this on a SATA or SCSI drive, you'll have to research how to emulate those types of drives in qemu, or find another emulator that can emulate those drives AND install directly to a physical device.
  • If your host machine (the one you run qemu on) doesn't at least have a 1 GHz processor and 512 MB of RAM, this is going to be a hideously slow procedure.
  • Read the man page and wiki entries on qemu for additional information on improving the performance and setting hardware emulation options.

Get some info

First and most important, you need to know how to refer to the attached drive. If you attached it to a spare IDE channel, it's going to be named per the following chart:

primary master hda
primary slave hdb
secondary master hdc
secondary slave hdd

If you attached it by USB, it's going to be called "sdX", where "X" is the next available letter. If you have no USB, SCSI, or SATA drives in your machine, it's going to be "sda". If you have one of the aforementioned, it'll be "sdb". Just plug it in and type "dmesg" at the command line, and you should see what name the system has assigned.

For the purpose of this tutorial, we'll use "sda".

MAKE SURE YOU UNDERSTAND: You MUST find the correct device. Don't just assume it's sda and start copying these commands. It will either not work or erase something you wanted to keep.

Launch the Emulator

Now, launch the emulator, using the MEPIS CD (or iso) as the cdrom and your attached drive as hda:

qemu -hda /dev/sda -cdrom SimplyMEPIS- -boot d

If you have lots of RAM in your system and want the process to go faster, you might add "-m 256" to add more RAM to the virtual machine.

The MEPIS liveCD will now boot up in a window on your desktop.

NOTE: You may have an error message saying the device cannot be found, try running as root:

su -c "qemu -hda /dev/sda -cdrom SimplyMEPIS- -m 256 -boot d"


Proceed with the install as you normally would. See Getting and Installing MEPIS


After the install completes, shut down the virtual machine and remove the drive from the system.

Install the drive in your other computer and boot it up. It should boot to MEPIS now!

If you get only a command prompt login when it boots, login as root (with the root password you setup during installation), and execute the following command:

dpkg-reconfigure xserver-xorg

As you will need to redetect video hardware and reconfigure display settings appropriate to the new hardware.

Method 4: Boot from ISO

Back to installation guide | Main Page

Personal tools
In other languages