コグノスケ


link 未来から過去へ表示(*)  link 過去から未来へ表示

link もっと前
2023年6月14日 >>> 2023年6月1日
link もっと後

2023年6月13日

DebianのUpgrade

目次: 自宅サーバー

Debianの更新はとても簡単でありがたいですが、セキュリティ強化やらなんやらで毎回やり方が変わりますね。11.7 (bullseye) から12.0 (bookworm) にバージョンアップする方法をメモしておきます。

まずaptのリポジトリ設定はstable指定とします。コードネーム指定は使ったことないので知らないです、たぶん書き換える必要があるはず。単にapt-get updateとdist-upgradeを実行すると下記のように怒られます。

InReleaseが変わっていると怒られる
# apt-get update && apt-get dist-upgrade

取得:1 http://ftp.jp.debian.org/debian stable InRelease [147 kB]
取得:2 http://security.debian.org stable-security InRelease [48.0 kB]
取得:3 http://security.debian.org stable-security/main Sources [9,184 B]
取得:4 http://security.debian.org stable-security/main amd64 Packages [17.6 kB]
取得:5 http://security.debian.org stable-security/main Translation-en [7,460 B]
パッケージリストを読み込んでいます... 完了
N: Repository 'http://ftp.jp.debian.org/debian stable InRelease' changed its 'Version' value from '11.7' to '12.0'
E: Repository 'http://ftp.jp.debian.org/debian stable InRelease' changed its 'Codename' value from 'bullseye' to 'bookworm'
N: This must be accepted explicitly before updates for this repository can be applied. See apt-secure(8) manpage for details.

エラーメッセージにあるapt-secureのヘルプを眺めても特に何も書いてなくて悲しいですが、apt-getの説明を見ると --allow-releaseinfo-changeというオプションがあるようです。悲しいことにまだ和訳がなくて英語のままでした……。

apt-getのヘルプ
       --allow-releaseinfo-change
           Allow the update command to continue downloading data from a
           repository which changed its information of the release contained
           in the repository indicating e.g a new major release. APT will fail
           at the update command for such repositories until the change is
           confirmed to ensure the user is prepared for the change. See also
           apt-secure(8) for details on the concept and configuration.

           Specialist options (--allow-releaseinfo-change-field) exist to
           allow changes only for certain fields like origin, label, codename,
           suite, version and defaultpin. See also apt_preferences(5).
           Configuration Item: Acquire::AllowReleaseInfoChange.

(適当訳)
updateコマンドにリリースの情報が変更されたリポジトリ(新たなメジャーリリースなどを示す)からのデータのダウンロード継続を許可します。
ユーザーが確実に変更に対して準備ができるように、変更が確認されるまでは、APTはそのようなリポジトリに対するupdateコマンドを失敗させます。
概念や設定の詳細についてはapt-secure(8) も参照してください。

いくつかのorigin, label, codename, suite, version, defaultpinのようなフィールドに限った変更を許可するための、専門家向けオプション(--allow-releaseinfo-change-field)があります。
apt_preferences(5) も参照してください。
設定項目: Acquire::AllowReleaseInfoChange

私の和訳は若干怪しいですけど、apt-get update --allow-releaseinfo-changeを実行すれば良さそうです。security.debian.orgのInReleaseは、この日記を書く前にallow-releaseinfo-changeをしたせい?なのか、取得にならずヒット(既に更新済み)になっています。気にしないでください。

InReleaseの更新
# apt-get update --allow-releaseinfo-change

取得:1 http://ftp.jp.debian.org/debian stable InRelease [116 kB]
ヒット:2 http://security.debian.org stable-security InRelease
116 kBを0秒 で取得しました (252 kB/s)
パッケージリストを読み込んでいます... 完了


# apt-get update && apt-get dist-upgrade

ヒット:1 http://security.debian.org stable-security InRelease
取得:2 http://ftp.jp.debian.org/debian stable InRelease [147 kB]
パッケージリストを読み込んでいます... 完了
N: Repository 'http://ftp.jp.debian.org/debian stable InRelease' changed its 'Version' value from '11.7' to '12.0'
E: Repository 'http://ftp.jp.debian.org/debian stable InRelease' changed its 'Codename' value from 'bullseye' to 'bookworm'
N: This must be accepted explicitly before updates for this repository can be applied. See apt-secure(8) manpage for details.

あれ?ダメですね、まだ怒っています。もう一回やってみましょうか。

InReleaseの更新、再び
# apt-get update --allow-releaseinfo-change

取得:1 http://ftp.jp.debian.org/debian stable InRelease [147 kB]
取得:2 http://ftp.jp.debian.org/debian stable/non-free Sources [78.2 kB]
取得:3 http://ftp.jp.debian.org/debian stable/main Sources [9,628 kB]
ヒット:4 http://security.debian.org stable-security InRelease
取得:5 http://ftp.jp.debian.org/debian stable/contrib Sources [51.2 kB]
取得:6 http://ftp.jp.debian.org/debian stable/main amd64 Packages [8,904 kB]
取得:7 http://ftp.jp.debian.org/debian stable/main Translation-ja [754 kB]
取得:8 http://ftp.jp.debian.org/debian stable/main Translation-en [6,076 kB]
取得:9 http://ftp.jp.debian.org/debian stable/main all Contents (deb) [32.8 MB]
取得:10 http://ftp.jp.debian.org/debian stable/main amd64 Contents (deb) [11.3 MB]
取得:11 http://ftp.jp.debian.org/debian stable/contrib amd64 Packages [54.3 kB]
取得:12 http://ftp.jp.debian.org/debian stable/contrib Translation-en [48.7 kB]
取得:13 http://ftp.jp.debian.org/debian stable/contrib amd64 Contents (deb) [61.2 kB]
取得:14 http://ftp.jp.debian.org/debian stable/contrib all Contents (deb) [98.6 kB]
取得:15 http://ftp.jp.debian.org/debian stable/non-free amd64 Packages [98.5 kB]
取得:16 http://ftp.jp.debian.org/debian stable/non-free Translation-en [67.2 kB]
取得:17 http://ftp.jp.debian.org/debian stable/non-free all Contents (deb) [839 kB]
取得:18 http://ftp.jp.debian.org/debian stable/non-free amd64 Contents (deb) [76.4 kB]
71.1 MBを23秒 で取得しました (3,091 kB/s)
パッケージリストを読み込んでいます... 完了
N: Repository 'http://ftp.jp.debian.org/debian stable InRelease' changed its 'Version' value from '11.7' to '12.0'
N: Repository 'http://ftp.jp.debian.org/debian stable InRelease' changed its 'Codename' value from 'bullseye' to 'bookworm'


# apt-get update && apt-get dist-upgrade

ヒット:1 http://security.debian.org stable-security InRelease
ヒット:2 http://ftp.jp.debian.org/debian stable InRelease
パッケージリストを読み込んでいます... 完了
パッケージリストを読み込んでいます... 完了
依存関係ツリーを作成しています... 完了
状態情報を読み取っています... 完了
アップグレードパッケージを検出しています... 完了
(以下略)

今度はうまくいきました。先ほどとの違いは良くわかりませんが、めげずに何回かやった方が良いんでしょうか。

編集者:すずき(2024/01/13 14:29)

コメント一覧

  • hdkさん(2023/06/13 22:57)
    リリースノートのアップグレード手順を見ると時々いろいろとこわいことが書かれているので(特にsystemdが導入された時など)、間違えてアップグレードしないために、stableじゃなくてコードネーム指定で使っています。
  • すずきさん(2023/06/14 14:23)
    私はあまりカスタマイズしていない(SSH, SambaとWebサーバーくらいしか使っていない)のもあって、ぶっ飛んだら直すのさ〜と割と気楽にアップグレードしてしまいます。
open/close この記事にコメントする




2023年6月1日

自宅サーバー - まとめリンク

目次: 自宅サーバー

この日記システム、Wikiの話。

その他、Sakuraで借りているサーバーの話。

目次: 一覧の一覧

編集者:すずき(2025/06/09 02:48)

コメント一覧

  • コメントはありません。
open/close この記事にコメントする



link もっと前
2023年6月14日 >>> 2023年6月1日
link もっと後

管理用メニュー

link 記事を新規作成

<2023>
<<<06>>>
----123
45678910
11121314151617
18192021222324
252627282930-

最近のコメント5件

  • link 24年6月17日
    すずきさん (06/05 23:32)
    「Thnaks for your info...」
  • link 24年6月17日
    Bobさん (06/04 09:25)
    「BindIPv6Only=no does...」
  • link 18年8月12日
    すずきさん (05/29 16:57)
    「コメントありがとうございます。\n\nこ...」
  • link 18年8月12日
    ARM926EJ-Sさん (05/29 14:27)
    「この記事が書かれたのは2018年ですが、...」
  • link 17年9月3日
    すずきさん (05/26 23:59)
    「>ちょさんさん\nご参考になれば幸いです...」

最近の記事20件

  • link 21年12月28日
    すずき (06/22 23:33)
    「[ゲーム - まとめリンク] 目次: ゲーム一覧が欲しくなったので作りました。Wizardry(囚われし亡霊の街)敵が強すぎる...」
  • link 25年6月19日
    すずき (06/22 23:33)
    「[歴代据え置きハードのCPUとGPU] 目次: ゲーム最近、据え置きハードのCPUとGPUがNVIDIAとAMDに収束していま...」
  • link 25年6月18日
    すずき (06/22 23:33)
    「[Nintendo Switch 2当選] 目次: ゲームSwitch 2の抽選4回目で当選してました。わーい。今回も落選だっ...」
  • link 10年4月17日
    すずき (06/13 21:41)
    「[何もしていないのに負荷が高いWindows 7] 目次: WindowsWindows 7は何もしていなくても常時CPU負荷...」
  • link 23年9月11日
    すずき (06/12 02:52)
    「[Windows - まとめリンク] 目次: Windows使いづらいWindows 7のエクスプローラ何もしていないのに負荷...」
  • link 10年4月10日
    すずき (06/12 02:52)
    「[使いづらいWindows 7のエクスプローラ] 目次: Windows週末を利用して旧マシンを葬って、新マシンを立ち上げまし...」
  • link 10年4月23日
    すずき (06/12 02:49)
    「[Windows 7のオーディオ処理負荷] 目次: Windows先日の日記(2010年4月17日の日記を参照)で書いたWin...」
  • link 10年4月25日
    すずき (06/12 02:48)
    「[Windows 7のサウンド機能は辛いよ] 目次: WindowsWindows Vista/7はサウンド周りがXPの頃と比...」
  • link 10年5月11日
    すずき (06/12 02:46)
    「[Sound Blaster X-Fiの話の訂正] 目次: Windows以前(2010年5月4日の日記を参照)書いた内容の訂...」
  • link 10年5月4日
    すずき (06/12 02:45)
    「[Sound Blaster X-Fiのサウンド設定いじってばっかり] 目次: Windows今使っているPCで激しく失敗した...」
  • link 10年5月12日
    すずき (06/12 02:43)
    「[Sound Blaster X-Fiのドライバが劣化] 目次: WindowsWindows UpdateにてCreativ...」
  • link 25年6月7日
    すずき (06/12 00:28)
    「[THPを一時的に無効にする方法] 目次: Linux何か訳があってLinuxのTHP(Transparent HugePag...」
  • link 25年6月6日
    すずき (06/11 00:49)
    「[新しめのRaspberry Pi OS LiteをQEMUで使う] 目次: Linux以前(2022年2月2日の日記参照)、...」
  • link 23年4月10日
    すずき (06/11 00:48)
    「[Linux - まとめリンク] 目次: Linux関係の深いまとめリンク。目次: RISC-V目次: ROCK64/ROCK...」
  • link 23年5月15日
    すずき (06/10 15:39)
    「[車 - まとめリンク] 目次: 車三菱FTOの話。群馬県へのドライブ1群馬県へのドライブ2将来車を買い替えるとしたら?FTO...」
  • link 22年1月22日
    すずき (06/10 15:38)
    「[バッテリーなんですぐ死んでしまうん?] 目次: 車正月、北海道から帰ってきて車の様子を見たら、完全にバッテリーが上がっていま...」
  • link 13年3月20日
    すずき (06/10 15:35)
    「[車が故障した(Er HC)] 目次: 車今朝、同期の人たちと梅見に行くため車で出発しようとしたのですが、キーをSTARTまで...」
  • link 16年5月1日
    すずき (06/09 03:10)
    「[自作ARMエミュレータでLinux 4.4が動かなかった] 目次: LinuxLinux 4.4系がLongtermの仲間入...」
  • link 16年4月30日
    すずき (06/09 03:08)
    「5月1日と全く同じ内容を書いていたので削除。...」
  • link 17年1月5日
    すずき (06/09 02:56)
    「[ノートPCのメモリが足りない] 目次: PC我が家のノートPC(Lenovo ThinkPad Edge E420, Win...」
link もっとみる

こんてんつ

open/close wiki
open/close Linux JM
open/close Java API

過去の日記

open/close 2002年
open/close 2003年
open/close 2004年
open/close 2005年
open/close 2006年
open/close 2007年
open/close 2008年
open/close 2009年
open/close 2010年
open/close 2011年
open/close 2012年
open/close 2013年
open/close 2014年
open/close 2015年
open/close 2016年
open/close 2017年
open/close 2018年
open/close 2019年
open/close 2020年
open/close 2021年
open/close 2022年
open/close 2023年
open/close 2024年
open/close 2025年
open/close 過去日記について

その他の情報

open/close アクセス統計
open/close サーバ一覧
open/close サイトの情報

合計:  counter total
本日:  counter today

link About www2.katsuster.net
RDFファイル RSS 1.0

最終更新: 06/22 23:33