How does Debian install from a USB flash drive

In this article, you will learn how to create a USB flash drive,which contains a fully automated installation of the operating system Debian. This installation uses the Wallix system, in addition to the traditional settings. Booting Linux from a USB flash drive is the most convenient and fastest way to download to date. This installation media will be based on the image of the Debian installation program.

The method described in this article is easy to repeat. In addition, it allows you to use the Debian operating system on removable media. Installing Debian from the flash drive in this case will be based on standard ISO images.

installing Debian from a flash drive

Creating a bootable USB flash drive

The first step is to prepare the USB partitionsflash drive, create a file system and install grub2. If you do not want to completely clean your flash drive, you can use one of its existing partition, while Grub2 supports the file system on it (if there is enough space).

You can use fdisk, Cfdisk or anotheryour favorite tool for the section. So, create a main partition, at least 2G in size, and install the download (for example, enter the command / dev / sdb relative to the flash drive) # cfisk / dev / sdb).

Create the file system in the first partition - # mkfs.ext2 / dev / sdb1

linux with flash drive

Then install Grub2 # mkdir / mnt / usb

# mount / dev / sdb1 / mnt / usb

# grub-install --root-directory = / mnt / usb / dev / sdb

Grub2 must be written using MBR (MasterBoot Record) to the first 512 bytes of the flash drive, as it is necessary to copy the boot.img image. In addition, this will create a directory that contains a set of GRUB modules. Later in this directory, you should create the file grub.cfg.

Now you need to install Debian from the flash drive via HD media. This method will look for an ISO image from the Debian installation media. So, enter the command # mkdir / mnt / usb / hdmedia-squeeze

After that you should use the following:

# wget -O / mnt / usb / hdmedia-squeeze / vmlinuz

# wget -O /mnt/usb/hdmedia-squeeze/initrd.gz

# mkdir / mnt / usb / isos

# cp debian-6.0.3-amd64-CD-1.iso / mnt / usb / isos /

To complete the preparation, you must provide a configuration file for GRUB:

debian lxde

#set color_normal = "green / black"

#set color_highlight = "light-green / black"

# Determine the required route

# / Specify the root directory of the installation disk (/ dev / sdb1)

set isosdir = "/ ISO image"

set hdmediasqueeze = "/ hdmedia-" squeeze "

# Then, when installing Debian from the USB flash drive, the program will automatically find the file with the specified parameters.

# The Debian installer, using the HD image, will copy the file system

in / HD-media.

Configure response parameters = "/ hd-media / preseed"

# The manual input of Debian lxde is configured as follows:

menuentry "Debian 6.0 amd64 manual install" {

linux $ hdmediasqueeze / vmlinuz iso-scan / filename = $ isodir / debian-6.0.3-amd64-CD-1.iso priority = critical

initrd $ hdmediasqueeze / initrd.gz

# You can enter automatic input like this:

menuentry "Debian 6.0 amd64 automatic install" {

linux $ hdmediasqueeze / vmlinuz iso-scan / filename = $ isodir / debian-6.0.3-amd64-CD-1.iso preseed / file = $ preseed / standard-squeeze.preseed auto = true priority = critical

initrd $ hdmediasqueeze / initrd.gz

By means of manual input, the standard installation of Debian from the USB flash drive will be loaded, by means of automatic installation with the installation answers.

The Iso-scan / filename option tells the system where to find the full Debian installation.

To download a guest OS from a USB flash driveyou need to build the real device / dev / sdb device into a special VMDK file and set / TMP / usb.vmdk as the first SATA disk in the guest configuration of the panels # VBoxManage internalcommands createrawvmdk -filename /tmp/usb.vmdk -rawdisk / dev / sdb


If you managed to load the program correctlyinstall Debian with manual input, now you must create a Debconf database. This database is used during the installation of Debian, in particular for installing parts. Using the parameter file, you load predefined conditions for installing programs.

Create a directory in the root of the USB flash drive and copy the parameter file by running the following command: # mkdir / mnt / usb / preseed

Then, at the command prompt, type:

# cat << EOF> /mnt/usb/preseed/standard-squeeze.preseed

d-i debian-installer / locale string en_US

d-i console-tools / archs select skip-config

d-i time / zone string US / Eastern

You will not need to connect to the network when there will be a download from the USB flash drive.

The above instructions suggest thatThe target computer has only one hard drive. In addition, in most cases the USB flash drive works automatically. If you still find the hard disk first, you can manually run the following command: partman-auto / disk and grub-installer / bootdev, or use the early_command option to automatically install the device for use.

How to install the Debian OS

Now you can proceed directly toloading the operating system onto the computer. However, if you do not want to create a bootable USB flash drive, you can install Debian by using a boot disk.

To get started, make a backup of your importantfiles on your computer. Installing Debian on your machine will require you to clean the entire hard drive and re-overwrites it by erasing all the data in the process. Store important information on a removable disk before installing.

If you did not create a flash drive, downloadThe Debian installation image from the official website, which is suitable for the architecture of your processor. If you do not know what type of processor is installed on your computer, select the image for 32-bit PCs, as it is compatible with the standard 32-bit Intel or AMD.

Write the installation image to a CD orDVD. After you have downloaded the file (it will have the extension .ISO), write it to disk using specialized software. Today there are several free applications that can perform this task if your computer has a CD-R or DVD-R drive.

Boot the computer from the newly recordeddisk. After you install the .ISO file on the disk, put the media in the optical drive and restart the computer. The machine will boot from the disk and take you directly to the Debian installation wizard.

You can try Debian Live from the disk whendesire. The Debian OS includes an option that allows you to run the operating system completely from a CD or DVD, without overwriting the information on your hard disk (this option is called Debian Live). Select this option in the installation wizard if you want to test the shell before the full installation. Note that performance will be quite low when this option is run.

Install Debian in accordance with the instructionsinstallation wizard. When you are ready to start full boot, follow the instructions of the installation wizard and make the operating system settings as desired. You will be given the option to manage hard disk partitions if you want to run Debian together with another operating system, for example, with Microsoft Windows.

If for some reason you can not download andinstall itself installation images, you can purchase a boot disk on the site. Installing Debian may take some time, so it's best to do other things while you wait for the download.

Related news

How does Debian install from a USB flash drive How does Debian install from a USB flash drive How does Debian install from a USB flash drive How does Debian install from a USB flash drive How does Debian install from a USB flash drive How does Debian install from a USB flash drive How does Debian install from a USB flash drive How does Debian install from a USB flash drive How does Debian install from a USB flash drive How does Debian install from a USB flash drive