2017年2月13日月曜日

ubuntu16.04, cubic:custom ubuntu ISO createrによるlivecdづくり

https://help.ubuntu.com/community/LiveCDCustomization
はあるがubuntu9の時代の記事だった。

cubic

ref.
http://askubuntu.com/questions/741753/how-to-use-cubic-to-create-a-custom-ubuntu-live-cd-image

proxyがある場合は、
$ export http_proxy="http://proxy.server:XXXX"
$ export https_proxy="https://proxy.server:XXXX"
$ sudo -E apt-add-repository ppa:cubic-wizard/release
$ sudo apt-get update
$ sudo apt-get install cubic
$ cubic

local fileをここに入れるには,cubic terminalへのdrag & dropでファイルのコピーが可能。

Anaconda3をinstallする。 anaconda2ではorange3が動かない。
anacondaのinstall fileは消すこと。

conda install orange3
は失敗する。同じissueがここにある。
https://github.com/ContinuumIO/anaconda-issues/issues/1191
がこれでは解決しない。

export all_proxy="http://proxy.server:XXXX/"
pip install orange3
pipできな場合はanacondaへのpathが通っていない。

installするpackageでなく削除するpackageをチェックする。しかし、これはlive時の選択ではない。

squashfs作成に時間がかかる。CPUパワーが要るのでwindows上の仮想環境では非力すぎるので実環境へ移行。

live実行でパスワードを聞かれる。しかし、空白パスワードで入れない。usernameが変わったのだろうか。typo?
ref.
http://askubuntu.com/questions/103896/live-cd-asks-for-a-username-and-password

ctl-alt-f2でnon-GUIになるが、入れないことは同じ。ctl-alt-f1はwindows仮想環境では使えない。ctl-alt-f7でGUIに戻る。

cubic terminalで
passwd
を設定。

仮想環境ではliveは一度しか起動しない。一度消してまたつくる。

/root/.profileの読み取り中にエラーだと。しかし、起動する。

terminalから
orange-canvas
も起動する。

packageのcheckでlibreofficeを消したはずだが残っている。要削除。
要らないpackageも消す。libreofficeを消す。
apt-get purge libreoffice*
apt autoremove
も必要。

次はwindow menuのカスタマイズを行う。

uck

http://linux-user.hatenablog.com/entry/2012/12/06/182302
uckもある。こちらの方がimageが小さくなりそう。
しかし、language-pack-en-baseでエラーが起きる。残念!

lxdeへの更新

ref. 
http://qiita.com/snowman8765/items/d2beab7a2b73948a8975

# apt-get purge unity
# apt-get install lxde
# apt-get install lubuntu-desktop

が出る。
Failed to open connection to "system" message bus: Failed to connect to socket /root/anaconda3/var/run/dbus/system_bus_socket: No such file or directory
anacondaのinstallは一番後だな。

devian

ubuntuはサイズが大きい。 devianではどうか。

live devian:
https://www.debian.org/CD/live/index.ja.html
https://wiki.debian.org/DebianLive
GUI:
https://chris-lamb.co.uk/projects/live-magic
情報が結構古い。
http://tokyodebian.alioth.debian.org/html/debianmeetingresume200906-kansaise3.html
https://blog.bobuhiro11.net/2014/04-07-debian-livecd.html
http://gihyo.jp/admin/serial/01/ubuntu-recipe/0113

これもまた古い
http://computemode.imag.fr/mediawiki/index.php/HowTo_Build_Images:_step_by_step_process

http://yakushi.shinshu-u.ac.jp/robotics/?DebianLive%2FBuild-HOWTO-for-the-Impatient
chrootできない。



[記事には必ず日付をつけるように!]

ubuntu minimal を使った方が良いか。
https://help.ubuntu.com/community/Installation/MinimalCD
https://denshiyugi.blogspot.jp/2011/07/ubuntu-minimal.html

mini.isoではcubicは動かない。
# apt purge アプリ
したところ起動中のOSのアプリをpurgeしてくれた!

$ apt install ubuntu-desktop
https://makandat.wordpress.com/2014/12/23/ubuntu-14-desktop-%E3%81%A7gui%E7%94%BB%E9%9D%A2%E3%81%8C%E6%AD%A3%E3%81%97%E3%81%8F%E8%A1%A8%E7%A4%BA%E3%81%A7%E3%81%8D%E3%81%AA%E3%81%84/
gonme-terminalを立ち上げるところまでやって。
http://askubuntu.com/questions/789481/how-to-restore-default-unity/789581
$ unity reset
でこのコマンド後だけは復活するが。rebootするとおかしくなったままだ。

結論:
ubuntu16.04ではcubicで、大きなisoを用いて、面倒だが不要なものを削除していくのが簡単。