使用 debootstrap 安装更多软件包

使用 debootstrap 安装更多软件包

debootstrap是一个将 Debian/Ubuntu 基础系统安装到另一个已安装系统的子目录中的工具。

安装日志结束如下:

. . . 
I: Validating xxd 2:8.1.0320-1ubuntu3
I: Validating xz-utils 5.2.4-1
I: Validating zlib1g 1:1.2.11.dfsg-1ubuntu2
I: Chosen extractor for .deb packages: dpkg-deb
I: Extracting base-files...

所以在我看来唯一的包debootstrap提取是base-files,对吗?

有没有办法debootstrap提取/安装更多软件包?特别是,我发现debootstrap根本没有安装 Linux 内核。我能以某种方式debootstrap安装 Linux 内核吗?

答案1

我还没有安装内核,但发现

在链接中,代码位--include=iputils-ping是如何添加软件包的一个例子,但是你在你喜欢的文件夹中安装机器后,你可以chroot在该文件夹中添加你喜欢的所有 apt repo 并提供apt update && apt upgradeapt install packXXX

对于我的学习,我做了以下事情:
$ mkdir -p sviluppo/studio/progetti/docker/immagini/ubuntu19.10
$ cd sviluppo/studio/progetti/docker/immagini/ubuntu19.10
cd重要的是不要忘记在未来的 chroot 文件夹中执行上述操作

$ sudo apt policy debootstrap

debootstrap:安装程序:1.0.116ubuntu1.1 候选版本:1.0.116ubuntu1.1 版本号:*** 1.0.116ubuntu1.1 500 500http://archive.ubuntu.com/ubuntueoan-updates/main amd64 软件包 500http://archive.ubuntu.com/ubuntueoan-updates/main i386 软件包 100 /var/lib/dpkg/status 1.0.116ubuntu1 500 500http://archive.ubuntu.com/ubuntueoan/main amd64 软件包 500http://archive.ubuntu.com/ubuntueoan/main i386 软件包

然后我在我的文件夹上安装了 ubuntu 19.10:
$ sudo debootstrap --verbose eoan ./
$ sudo vim ./etc/apt/sources.list 并将其更改为:

#deb http://archive.ubuntu.com/ubuntu eoan main

deb http://archive.ubuntu.com/ubuntu eoan main restricted
deb-src http://archive.ubuntu.com/ubuntu eoan main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://archive.ubuntu.com/ubuntu eoan-updates main restricted
deb-src http://archive.ubuntu.com/ubuntu eoan-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://archive.ubuntu.com/ubuntu eoan universe
deb-src http://archive.ubuntu.com/ubuntu eoan universe
deb http://archive.ubuntu.com/ubuntu eoan-updates universe
deb-src http://archive.ubuntu.com/ubuntu eoan-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu 
## team, and may not be under a free licence. Please satisfy yourself as to 
## your rights to use the software. Also, please note that software in 
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://archive.ubuntu.com/ubuntu eoan multiverse
deb-src http://archive.ubuntu.com/ubuntu eoan multiverse
deb http://archive.ubuntu.com/ubuntu eoan-updates multiverse
deb-src http://archive.ubuntu.com/ubuntu eoan-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://archive.ubuntu.com/ubuntu eoan-backports main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu eoan-backports main restricted universe multiverse

deb http://archive.ubuntu.com/ubuntu eoan-security main restricted
deb-src http://archive.ubuntu.com/ubuntu eoan-security main restricted
deb http://archive.ubuntu.com/ubuntu eoan-security universe
deb-src http://archive.ubuntu.com/ubuntu eoan-security universe
deb http://archive.ubuntu.com/ubuntu eoan-security multiverse
deb-src http://archive.ubuntu.com/ubuntu eoan-security multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
deb http://archive.canonical.com/ubuntu eoan partner
deb-src http://archive.canonical.com/ubuntu eoan partner

# deb http://archive.ubuntu.com/ubuntu eoan-proposed main restricted universe multiverse #Non per esseri umani durante la fase di sviluppo del rilascio eoan

然后

# sudo chroot /home/leonardo/sviluppo/studio/progetti/docker/immagini/ubuntu19.10
# sudo apt update
# sudo apt list --upgradable

file/eoan-updates,eoan-security 1:5.37-5ubuntu0.1 amd64 [可从 1:5.37-5 升级] libfribidi0/eoan-updates,eoan-security 1.0.5-3.1ubuntu0.19.10.1 amd64 [可从 1.0.5-3.1 升级] libmagic-mgc/eoan-updates,eoan-security 1:5.37-5ubuntu0.1 amd64 [可从 1:5.37-5 升级] libmagic1/eoan-updates,eoan-security 1:5.37-5ubuntu0.1 amd64 [可从 1:5.37-5 升级]

# sudo apt upgrade
# exit

问候,
莱昂纳多

相关内容