How is the installation of Debian from a flash drive

In this article you will learn how to create a USB flash drive that contains the fully automated installation of the operating system Debian.With this setting used Wallix system, in addition to the traditional settings.Booting Linux from a flash drive - the most convenient and efficient way to download today.This installation media will be based on the image of the program to install Debian.

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

Creating a bootable USB drive

The first step is to prepare sections of USB flash drive, the file system and install grub2.If you do not want to completely purify your flash drive, you can use one of its existing profile until Grub2 support file system on it (if there is enough space).

You can use fdisk, Cfdisk or your other favorite tool for this section.So, create a primary partition, the size, at least, 2G, download and install (for example, type command with respect to the stick / dev / sdb) # cfisk / dev / sdb).

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

Then set Grub2 # mkdir / mnt / usb

# mount / dev / sdb1 / mnt / usb

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

Grub2 be recorded by the MBR (Master Boot Record) on the first 512 bytes of flash disk, since it is necessary to copy the image boot.img.Furthermore, this will create a directory that contains a set of modules GRUB.Later in the catalog you should create a file grub.cfg.

Now Debian installation must be carried out with the stick through the HD-media.This method will search for ISO-image from the installation media, Debian.So, enter the following command # mkdir / mnt / usb / hdmedia-squeeze

Then you should use the following:

# wget http://ftp.debian.org/debian/dists/squeeze/main/installer-amd64/current/images / hd-media / vmlinuz -O / mnt / usb / hdmedia-squeeze / vmlinuz

# wget http://ftp.debian.org/debian/dists/squeeze/main/installer-amd64/current/images/hd-media / initrd.gz -O /mnt/usb/hdmedia-squeeze/initrd.gz

# mkdir / mnt / usb / isos

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

to finish training you must provide a configuration file for GRUB:

#set color_normal = 'green / black'

#set color_highlight = 'light-green / black'

# Define the desired route

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

set isosdir = '/ ISO-image "

set hdmediasqueeze =' / hdmedia- 'squeeze'

# Then, when there is a Debian installation from a USB drive, the programautomatically find the file you specified.

# program of installing Debian, using the HD-image, copy the file system in

/ HD-media.

Configure response = '/ hd-media / preseed'

# Debian lxde Manual entry 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

# Automatic input can be entered:

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 manual input will be loaded with the standard Debian installation stick, by automatically - with answers installation.

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

to the guest OS with USB flash drive you need to put together a real device real device / dev / sdb in a special VMDK file and install / TMP / usb.vmdk the first SATA drive in the guest configuration panels # VBoxManage internalcommands createrawvmdk -filename / tmp/usb.vmdk -rawdisk / dev / sdb

Shut

If you were able to download the Debian installer with MDI, now you have to create a database of Debconf.This database is used during installation Debian, in particular for installation details.Using a parameter file, you download the predefined conditions for the installation programs.

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

then enter the command line:

# cat & lt; & lt;EOF & gt;/mnt/usb/preseed/standard-squeeze.preseed

di debian-installer / locale string en_US

di console-tools / archs select skip-config

di time / zone string US / Eastern

you will not needto connect to the network when it is booted from the stick.

The above instructions assume that the target computer has only one hard disk.Moreover, in most cases, the flash card is automatically released.If all the same when you start the first detected hard disk, you can manually set the following command: partman-auto / disk and grub-installer / bootdev or use option early_command, to automatically set the device to use.

How to install the OS Debian

Now you can start to load the operating system on your computer.However, if you do not want to create a bootable USB flash drive, you can install Debian through the use of the boot drive.

To begin, make a backup copy of important files on your computer.Installing Debian on your machine will require to clear the entire hard disk and then overwrite it, erases all data in the process.Store important data on a removable disk before starting the installation.

If you did not create a flash drive, download the installation image from the official Debian Web site that is appropriate for your processor architecture.If you are unsure what type of processor installed in your computer, select the image for 32-bit PCs, as it is compatible with the standard 32-bit Intel or AMD.

Record installation image on a CD or DVD.Once you have downloaded the file (it will have the extension .ISO), burn it to a CD with the help of specialized software.Today, there are several free applications that can perform this task if your computer has a CD-R or DVD-R.

Boot the computer with the newly recorded disc.After you install the .ISO file to disk, put the media into the optical drive and restart the computer.The machine will boot from the disk and takes you directly to the wizard to install Debian.

you can experience the Debian Live from disk if desired.Debian OS includes an option that allows you to run your operating system from a CD or DVD, without overwriting the data on your hard drive (this option is called Debian Live).Select this option in the setup wizard, if you want to check the shell before the full installation.Please note that the performance will be quite low when you run this option.

Debian Install in accordance with the instructions of the installation wizard.When you're ready to start a full load, follow the installation wizard and make the settings of the operating system as desired.You will be given the opportunity to manage hard disk partitions when you want to run Debian together with another operating system, such as Microsoft Windows.

If for some reason you can not download and install yourself installation images, you can get a boot disk on the site.Debian Installation may take some time, so it is best to do other things while you wait for downloads.