Mac miniに入れたUbuntu natty(11.04)をprecise(12.04LTS)にアップデートする

さすがに、もうリポジトリのサポートも切れたので、しょうがなくアップデート。
これ入れるときは、独自のPPAとか入れてたけど、大丈夫かしらん。
起動にはrEFItを使っている。
Mac miniは、Core i7-2635QM CPU @ 2.00GHzのMid-2011 Serverモデル。
普段はAOSPの自宅ミラーとか、Android-x86やRK30xxのビルドに使っている。


すでに、apt-get updateしてもパッケージリポジトリがない状態。

kinneko@kinneko-Macmini:~$ sudo sudo do-release-upgrade
Checking for a new ubuntu release
Your Ubuntu release is not supported anymore.
For upgrade information, please visit:
http://www.ubuntu.com/releaseendoflife

Get:1 Upgrade tool signature [198 B]
Get:2 Upgrade tool [1471 kB]
Fetched 1471 kB in 6s (137 kB/s)
authenticate 'oneiric.tar.gz' against 'oneiric.tar.gz.gpg'
extracting 'oneiric.tar.gz'

Reading cache

Checking package manager
Reading package lists... Done
Building dependency tree
(snip)
Ign http://jp.archive.ubuntu.com natty-updates/universe Translation-ja
Fetched 11.3 kB in 6s (0 B/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
Building data structures... Done

Updating repository information
WARNING: Failed to read mirror file

Third party sources disabled

Some third party entries in your sources.list were disabled. You can
re-enable them after the upgrade with the 'software-properties' tool
or your package manager.

To continue please press [ENTER]

パッケージリポジトリが取れてないんだけど大丈夫なんかな。
サードパーティリポジトリがあるので無効にしたというので確認停止した。
エンターして継続。
続いてarchive.canonical.comのoneiricのリポジトリでパッケージデータベースのアップデートを開始した。
extras.ubuntu.com, security.ubuntu.com, jp.archive.ubuntu.comも。
oneiricって、11.10か。
最初のコマンドで、指定できたのかな?

Get:80 http://jp.archive.ubuntu.com oneiric-updates/universe Translation-en [92.6 kB]
Fetched 25.6 MB in 6s (145 kB/s)

Checking package manager
Reading package lists... Done
Building dependency tree
Reading state information... Done
Building data structures... Done

Calculating the changes

Calculating the changes

Do you want to start the upgrade?


51 installed packages are no longer supported by Canonical. You can
still get support from the community.

26 packages are going to be removed. 363 new packages are going to be
installed. 1193 packages are going to be upgraded.

You have to download a total of 913 M. This download will take about
1 hour 38 minutes with your connection.

Fetching and installing the upgrade can take several hours. Once the
download has finished, the process cannot be cancelled.

 Continue [yN]  Details [d]

継続。

 Continue [yN]  Details [d]y
 
Fetching
Get:1 http://jp.archive.ubuntu.com/ubuntu/ oneiric/main debianutils amd64 4.0.2 [63.2 kB]
(snip)
Upgrading
apport start/running
xset:  unable to open display ""
xset:  unable to open display ""
Fetched 0 B in 0s (0 B/s)
Extracting templates from packages: 100%
Preconfiguring packages ...
Extracting templates from packages: 100%
(snip)

Configuring keyboard-configuration画面になった。
無線キーボードの設定が残っていたかな。今は使ってないんだけど。
Apple Aluminium Keyboard (JIS)を選ぶ。


裏でxset: unable to open display ""が出続けている。


Configuring console-setup画面。
UTF-8を選ぶ。


あとは、自動で進む。
止まった。

Searching for obsolete software
Reading package lists... Done
Building dependency tree
Reading state information... Done
Building data structures... Done
xset:  unable to open display ""
xset:  unable to open display ""
Building data structures... Done

Remove obsolete packages?


67 packages are going to be removed.

 Continue [yN]  Details [d]

そんなにいっぱい削除しちゃうのか...

System upgrade is complete.

Restart required

To finish the upgrade, a restart is required.
If you select 'y' the system will be restarted.

Continue [yN]y
The system is going down for reboot NOW!

終わった。再起動。
上がってくるかな?
Xはちゃんと上がってくる。sshアクセスも問題なし。


次に12.04.3 LTSに上げる。

kinneko@kinneko-Macmini:~$ cat /etc/update-manager/release-upgrades
Prompt=normal

その前に、設定を見直す。
LTS以外に上がらないようにltsに書き換える。

kinneko@kinneko-Macmini:~$ sudo sudo do-release-upgrade
Checking for a new ubuntu release
No new release found

ん?
normalのまま上げないといけないのかな?
とりあえず、今のバージョンを確認。

kinneko@kinneko-Macmini:~$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=11.10
DISTRIB_CODENAME=oneiric
DISTRIB_DESCRIPTION="Ubuntu 11.10"

やっぱ、上がってない。
normalに戻して実行。
こんどは通った。

36 installed packages are no longer supported by Canonical. You can
still get support from the community.

25 packages are going to be removed. 413 new packages are going to be
installed. 1505 packages are going to be upgraded.

You have to download a total of 1062 M. This download will take about
2 hours 1 minute with your connection.

Installing the upgrade can take several hours. Once the download has
finished, the process cannot be canceled.

 Continue [yN]  Details [d]

うわ、これは死ぬほど時間かかるわ...
libc6上げるので、"Services to restart for GNU libc library upgrade: dropbear rsync cups cron atd"って言われた。
これssh環境からやってるんだけど...
切れるよね...
項目から、dropbearだけ外す。
okしたけど、また同じの出た...
もっかい除外して通った。

Searching for obsolete software
Reading package lists... Done
Building dependency tree
Reading state information... Done
Building data structures... Done
Building data structures... Done

Remove obsolete packages?


66 packages are going to be removed.

 Continue [yN]  Details [d]

だから、何を消すのか出してほしいわ...
dで出るんだろうけど、消さないと先に進めないのなら、めんどくさいので進む。
見てても、それほどアレ?と思うようなものはなかった。

System upgrade is complete.

Restart required

To finish the upgrade, a restart is required.
If you select 'y' the system will be restarted.

Continue [yN]

南無三。上がってくればいいけどな。


Xきたきた。
音も出てる。
NICも生きてる。

kinneko@kinneko-Macmini:~$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=12.04
DISTRIB_CODENAME=precise
DISTRIB_DESCRIPTION="Ubuntu 12.04.3 LTS"

resolv.confが動的生成になったので名前引きが失敗するとかいう懸念もあったけど、それもないみたい。DHCPだからかな。
resolv.confもローカルしか書いてなくて、/etc/resolvconf/resolv.conf.d/baseもからっぽだった。
kernelPPAも入ってないし、oem-audio-hda-daily-dkms_*~raring1_all.debとかも入ってない。
でも、ちゃんと動いている風。
chromiumの動きがなんだか鈍い気がするけどね。
基本、リモートでしか使わないから、いいか。


最後にLTSで固定しておく。

kinneko@kinneko-Macmini:~$ sudo vi /etc/update-manager/release-upgrades
Prompt=lts

あれ?
変更されてら... orz
なら、ログインの時に、

New release '12.10' available.
Run 'do-release-upgrade' to upgrade to it.

って出すなよな...