Use of Ubuntu system Debootstrap

Source: Internet
Author: User

This article is quoted from http://www.latelee.org/using-gnu-linux/ubuntu-debootstrap.html

Debootstrap is a tool under Debian/ubuntu to build a basic set of systems (the root file system). The generated directory conforms to the Linux file system standard (FHS), which includes the/boot,/etc,/bin,/usr, and so on, but it is much smaller than the release version of Linux, of course, the function is not so powerful, so it can only be said to be "basic system."

Tools with similar functionality under Fedora (CentOS also available): Febootstrap. Looking at the two tool names, you can see that Debootstrap uses the Debian prefix "de", while Febootstrap uses the fedora prefix "Fe", bootstrap meaning "bootstrap", and if you have done lfs, know more about it, This concept is also involved when compiling the GCC compiler. But Debootstrap or febootstrap does not seem to express the meaning of "guidance".

To make the root file system, the most comprehensive on the PC is LFS (Linux form scratch, a Linux system from scratch), and embedded, BusyBox is the perfect choice. Of course, with the power of the chip and the evolution of some Linux distributions, there are desktop systems that are directly used in the embedded domain, such as Ubuntu, which have tools that support hardware floating-point direct downloads.

Ubuntu is not installed by default Debootstrap, installation is very simple, the following commands can be executed:

# sudo apt-get install Debootstrap

Use is also very simple, the command format is:

sudo debootstrap–arch [platform] [release code] [directory]

Like the following command.

sudo debootstrap–arch i386 trusty/mnt

This is the basic system for building the x86 (32-bit) platform Ubuntu latest release 14.04 (codenamed Trusty), which is stored in the/MNT directory.

Current Debootstrap supported releases can be viewed in/usr/share/debootstrap/scripts, and each release code can be viewed http://en.wikipedia.org/wiki/List_of_Ubuntu_releases. For example, gutsy is the code of 7.10, precise is the code of 12.04, and so on.

After entering the above command, the relevant files are downloaded from the network, and when you see

I:configuring python-central ...

I:configuring Ubuntu-minimal ...

I:configuring Libc-bin ...

I:configuring Initramfs-tools ...

I:base system installed successfully.

That means success. If you see

e:failed getting release file

Http://archive.ubuntu.com/ubuntu/dists/trusty/Release

or stuck in

I:retrieving Release

may be a network cause.

The downloaded file is under/mnt/var, such as:

$ tree

.

├──debootstrap

│├──debootstrap.log

│└──debpaths

└──var

├──cache

│└──apt

│└──archives

│├──adduser_3.113+nmu3ubuntu3_all.deb

│├──apt_1.0.1ubuntu2_i386.deb

Where adduser_3.113 is the corresponding adduser of 14.04. From here, you can also confirm which version of the software is being downloaded.

Use Chroot to enter the/MNT directory below and view the Linux version.

[Email protected]:~$ cd/mnt/

[Email protected]:/mnt$ ls

Bin Boot Dev etc home lib media mnt opt proc root run sbin SRV sys tmp usr var

[Email protected]:/mnt$ sudo-s

[sudo] password for Latelee:

[Email protected]:/mnt# chroot.

[Email protected]:/# ls

Bin Boot Dev etc home lib media mnt opt proc root run sbin SRV sys tmp usr var

[Email protected]:/# cat Etc/issue

Ubuntu 14.04 LTS \ \l

[Email protected]:/# ls/proc/-L

Total 0

[Email protected]:/# ifconfig

Warning:cannot Open/proc/net/dev (No such file or directory). Limited output.

[Email protected]:/# uname-a

Linux ubuntu 3.13.0-32-generic #57-ubuntu SMP Tue Jul 03:51:12 UTC i686 i686 i686 gnu/linux

Because of course the system does not use this new system, so/proc does not have content, and the kernel is still the version of the current system.

Using the disc is unsuccessful

W:failure trying to run:chroot/home/latelee/test_sys mount-t proc Proc/proc

W:see/home/latelee/test_sys/debootstrap/debootstrap.log for details

Note:

This article is not too much technical content, only in the course of learning to meet the debootstrap and write some notes. The environment used in this article is virtual machine vmware.

Appendix:

Unfinished matter:

Limited to the time, there is no actual launch of the new system.

Some resources related to the Ubuntu root file system build:

Http://www.virtuatopia.com/index.php/Building_a_Debian_or_Ubuntu_Xen_Guest_Root_Filesystem_using_debootstrap

Https://wiki.ubuntu.com/DebootstrapChroot

Https://help.ubuntu.com/10.04/installation-guide/i386/linux-upgrade.html

http://www.thegeekstuff.com/2010/01/debootstrap-minimal-debian-ubuntu-installation/

Http://askubuntu.com/questions/442610/debootstrap-warning-during-installation-12-04-lts-server-vmware-virtual-mach

Https://help.ubuntu.com/lts/installation-guide/i386/index.html

View Ubuntu releases wiki:

Http://en.wikipedia.org/wiki/List_of_Ubuntu_releases

To view the Ubuntu installation package:

http://packages.ubuntu.com/

PostScript: This would like to write a little bit of technical content of the article, the process involved in the knowledge points are mentioned, but found that their writing is no longer as before, or according to Journal as the writing to more comfortable.

This article fixed link: http://www.latelee.org/using-gnu-linux/ubuntu-debootstrap.html

Use of Ubuntu system Debootstrap

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.