Ubuntu Serverリポジトリでイメージを作成するための質問

Ubuntu Serverリポジトリでイメージを作成するための質問

最近、私はOrange Pi 2G IoTを購入しました(この小さなSoCは本当に素晴らしいです!)。 Ubuntuサーバーをインストールし、シリアルポートを介して接続し、システムをアップデートし(apt-getアップデートのみ可能)、一部をインストールすることもできました。しかし、ここに小さな問題があります。パッケージをオフラインでインストールしたいです(私の家ではインターネットに接続されていません)。リポジトリしかし、約9MBしかダウンロードできません」プール(私の意見では)パッケージが存在する「ファイルを検索すると、そのリポジトリにあるファイルのリストだけが作成され、「index.html」のほんの一部しかダウンロードできません。

wget私はDebian Jessie amd64がインストールされているPCを使用しており、NTFSパーティションのフォルダにあり(スペースが十分であることを確認して)、次のコマンドを使用してコンソールからリポジトリをミラー化しようとしました。

wget --mirror --convert-links --show-progress --recursive --wait=5 http://mirrors.ustc.edu.cn/ubuntu-ports/

より良いアイデアを持っている人がオフラインで使用するためにこのリポジトリをダウンロードするのに役立ちますか?

ベストアンサー1

debmirrorすべてがリンクされているわけではないので、tryignの代わりにwgetを使用する方が良いでしょう。

これは私が実行するために使用したスクリプトです。debmirrorスキーマ、セクション、バージョンなどを変更する必要があることに注意してください。

#!/bin/sh

# Architecture (i386, powerpc, amd64, etc.)
arch=i386,amd64

# Section (main,contrib,non-free)
section=main,multiverse,universe,restricted,partner

# Release of the system (squeeze,lenny,stable,testing,etc)
release=xenial,xenial-backports,xenial-proposed,xenial-security,xenial-updates,yakkety,yakkety-backports,yakkety-proposed,yakkety-security,yakkety-updates,zesty,zesty-backports,zesty-proposed,zesty-security,zesty-updates,artful,artful-updates,artful-security,artful-proposed,artful-backports

# Server name, minus the protocol and the path at the end
server=us.archive.ubuntu.com

# Path from the main server, so http://my.web.server/$dir, Server dependant
inPath=/ubuntu

# Protocol to use for transfer (http, ftp, hftp, rsync)
proto=http

# Directory to store the mirror in
outPath=/storage/mirrors/mirror/archive.ubuntu.com/ubuntu

logfile=ubuntu-mirror.log-`date +%m-%d-%Y`

# Start script

debmirror -a $arch \
--no-source \
--slow-cpu \
--i18n \
--md5sums \
--progress \
--passive \
--verbose \
-s $section \
-h $server \
-d $release \
-r $inPath \
-e $proto \
$outPath 

# pull in all the Release.gz etc. stuff
for i in `echo $release | sed s/\,/\ /g`
do
     rsync -avrt rsync://us.archive.ubuntu.com/ubuntu/dists/$i $outPath/dists
done

# fix Translation files
cd $outPath/dists
for i in `find ./ -iname Translation-en.gz`
    do nn=`echo $i | sed s/\.gz//g`
    zcat $i > $nn
done

おすすめ記事