Create a Debian Image

Source: Internet
Author: User
Create a Debian image-Debian information for the Linux release. See the following for details. Debian image is required during FAI. In this case, a local image is required. If fai-mirror is used directly, the generated image will be a package in package-config, generally, the debmirror method is used.

How to Create a Debian image website? The official website of Debian already has a special introduction:

Http://www.debian.org/mirror/ftpmirror

This method is based on the rsync software. Web pages also provide ready-to-use scripts for website images, but it is troublesome to implement and often fails. I think it should be simpler to use debmirror for Debian images.

Debmirror is a German Debian website image tool written in perl, Which is simpler and more convenient to use. By default, debmirror uses ftp (or rsync) to obtain all debian content to the local disk, then, the local machine is set to a valid apt source through the system's http server or ftp server. Other customers modify their debian system's/etc/sources. the list file points to the machine.

Before you create an image for Debian, you must consider the following: to what extent are you preparing for the Debian image, or how big is your hard disk? Do some Debian resources that we rarely use require images? If the entire Debian image requires about GB of hard disk space, the Woody Sarge Sid software for each CPU architecture adds up to about 6-8 GB.

Let's take a look at the specific process:

1. Install debmirror software:

# Apt-get install debmirror

2. Run debmirror to obtain the debian software package:

Before that, you need to decide the directory where your debian software package is stored on the hard disk. This is a required parameter for running debmirror. For example:

# Debmirror/mydebian

It means to mirror the entire debian to the/mydebian directory of my computer with all the default parameters. Ah, 100G! How long will it take to download! Obviously it is unrealistic. We need to use some other parameters to adjust our image process. There are many optional parameters for debmirror. You can:

# Man debmirror

To view, the following describes several important:

-V: detailed steps to display the image. It is best to choose from and keep abreast of the trend of debmirror.

-H: from which the debian software package is downloaded. The default value is ftp.debian.org. In China, I 'd like to use debian.cn99.com.

-D: determines the debian version of the image. I like tolerance and select sarge. All are selected by default.

-S: determines which part of the image debian, that is, select one of main, contrib, and non-free. All are selected by default.

-A: select the computer architecture mode. The default value is i386.

-- Nosource: by default, debmirror downloads the source code of the debian package together. This parameter prohibits the download of the source code.

If I want to be the simplest debian source, the main software package of the sarge image on i386 from the fastest debian website around me, without the source code, if the downloaded package is placed in the mydebian directory, the command is:

# Debmirror-v-d unstable-s main/debian-installer-e http-h 192.168.10.202 -- ignore-release-gpg -- ignore-missing-release -- nosource debmirror

3. settings after the download.

I want to publish my debian image via http, first add a sentence after my httpd. conf:

Alias/debmirror/mydebian

Restart the apache server with # apachectl restart.

4. Client modification:

Modify the/etc/apt/sources. list file and add or retain the file only:

Deb http: // your ip/debmirror sarge main

Use # apt-get update to update.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.