普段使いのPCがDebianなので、WindowsのUbuntuをDebianにする。
aptの依存関係解決能力を信じて、強引にディストリビューションを変更する。
※ Emacsが立ち上がらないので、何か不都合があるっぽい。ubuntu由来のパッケージを全部置き換えただけではダメなのかもわからんね…。
sources.listをDebian jessie に変更。
#deb http://archive.ubuntu.com/ubuntu trusty main restricted universe multiverse
#deb http://archive.ubuntu.com/ubuntu trusty-updates main restricted universe multiverse
#deb http://security.ubuntu.com/ubuntu trusty-security main restricted universe multiverse
deb http://ftp.jp.debian.org/debian/ jessie main contrib non-free
deb-src http://ftp.jp.debian.org/debian/ jessie main contrib non-free
deb http://security.debian.org/ jessie/updates main contrib non-free
deb-src http://security.debian.org/ jessie/updates main contrib non-free
deb http://ftp.jp.debian.org/debian/ jessie-updates main contrib non-free
deb-src http://ftp.jp.debian.org/debian/ jessie-updates main contrib non-free
定石通りにまずupdate -> upgrade。
apt-get update
apt-get install debian-archive-keyring
apt-get update
apt-get upgrade
fuseはカーネル関連の設定をしようとしてエラーになるのでファイルを削除。
rm /var/lib/dpkg/info/fuse.postinst
dpkg --configure fuse
昔のDebianのようにaptを先に更新。
dpkg-reconfigure locales
aptitude install apt # n -> y
gccとlibgcc1をダウングレード。
aptitudeとperlを更新。
perlは依存関係が大量なので念のため先に入れる。
apt-get install aptitude
apt-get install perl
apt-get dist-upgrade
apt-get install
apt-get dist-upgrade
apt-get install
...
apt-get remove --purge plymouth
apt-get dist-upgrade
apt-get remove --purge init
apt-get dist-upgrade
apt-get remove --purge exim4-base
apt-get dist-upgrade
apt-get autorimove --purge
設定ファイルは古いものを残す。
エラーが出るけど強引に進める。initパッケージを消しちゃってるけども、docしかないし利用されないので今のところ特に問題はない。
/mnt/c が見えなくなってるのはbashを立ち上げ直すと見えるようになる。
おそらくfuseのntfsがアップグレード時に一度停止したため?
あとはダウングレードするようにPinのPriorityを1001以上に設定。
# /etc/apt/preferences.d/debian
Package: *
Pin: release a=stable
Pin-Priority: 1010
ダウングレード実行。
apt-get update
apt-get dist-upgrade
apt-get remove --purge `dpkg -l|grep ubuntu |awk '{print $2}'`
rm /var/lib/dpkg/info/pollinate.*rm
apt-get remove --purge pollinate
rm /etc/apt/preferences.d/debian
これで完了。
rpm系は詳しくないからやらないけど、がんばればCentOSとかにも置き換え可能な気がする。
補足:
壊れてどうしようもなくなったら管理者モードのcmd.exeで再インストール。
lxrun /uninstall /full
lxrun /install
参考:
http://qiita.com/Aruneko/items/c79810b0b015bebf30bb
http://engetu21.hatenablog.com/entry/2014/12/06/004525