揮発性のメモ2

http://d.hatena.ne.jp/iww/

debootstrap で新しい環境を作る

debootstrap で古い環境を作る - 揮発性のメモ2

debootstrapで、今よりも新しいディストリビューション環境を作る。
具体的には jessie(8) の環境で buster(10) をどうにかして作りたい。

次のコマンドで作成ができた。

# 準備
ln -s sid /usr/share/debootstrap/scripts/buster

# 構築
debootstrap --no-check-gpg buster hoge http://ftp.jp.debian.org/debian/




まず、普通に実行するとエラーになる

# debootstrap buster hoge http://ftp.jp.debian.org/debian/
E: No such script: /usr/share/debootstrap/scripts/buster


/usr/share/debootstrap/scripts/buster が無いので、作るか、作らずに済ますか。
ほかの新しめの環境で確認してみると、なんか適当にシンボリックリンクを張るだけで良さそうな感じ

$ ls -l /usr/share/debootstrap/scripts
total 148
-rw-r--r-- 1 root root 6044 Nov 20  2018 aequorea
lrwxrwxrwx 1 root root    5 Jan  9  2019 artful -> gutsy
lrwxrwxrwx 1 root root    8 Jan  9  2019 bartholomea -> aequorea
lrwxrwxrwx 1 root root    5 Jan  9  2019 bionic -> gutsy
lrwxrwxrwx 1 root root    3 Jan  9  2019 bookworm -> sid
-rw-r--r-- 1 root root 5404 Nov 20  2018 breezy
lrwxrwxrwx 1 root root    3 Jan  9  2019 bullseye -> sid
lrwxrwxrwx 1 root root    3 Jan  9  2019 buster -> sid
lrwxrwxrwx 1 root root    8 Jan  9  2019 chromodoris -> aequorea
...


シンボリックリンクを作成する

# ln -s sid /usr/share/debootstrap/scripts/buster

もう一度実行してみると、違うエラーになった

# debootstrap buster hoge http://ftp.jp.debian.org/debian/
I: Retrieving Release
I: Retrieving Release.gpg
I: Checking Release signature
E: Release signed by unknown key (key id DCC9EFBF77E11517)


証明書が期限切れなので、更新するか、更新せずに済ますか。
このあたりはほんと良くわからないので、一時的に無視することにする

# debootstrap --no-check-gpg buster hoge http://ftp.jp.debian.org/debian/
I: Retrieving Release
I: Retrieving Packages
I: Validating Packages
I: Resolving dependencies of required packages...
...
I: Configuring libc-bin...
I: Configuring systemd...
I: Base system installed successfully.

モリモリとダウンロードとインストールを始めれば成功。 数分で終わる。