お知らせ

  • 利用規約を守って投稿してください。また、よくある質問および投稿の手引きも参照してください。
  • メッセージの投稿にはアカウントが必要です。未登録の方は、ユーザ登録ページからアカウントを作成することができます。

#1 2012-02-27 17:40:09

jackalope
メンバ
登録日: 2009-01-01

簡単インストーラーの作成

次期バージョンPrecise Paugolinのリリース/インストールに備えて簡単インストーラーの作り方を紹介します。

1.作業用ディレクトリを作る

コード:

mkdir ~/work

2.作業に必要なパッケージをインストール

コード:

sudo aptitude install p7zip-full

3.netbootインストーラーをダウンロード

コード:

cd ~/work
wget http://jp.archive.ubuntu.com/ubuntu/dists/precise/main/installer-i386/current/images/netboot/mini.iso

4.mini.isoの展開

コード:

7z x -oiso mini.iso

5.initrd.gzの展開

コード:

mkdir initrd
cd initrd 
zcat ../iso/initrd.gz | sudo cpio -iv

6.preseed.cfgの作成
   下記参照
7.initrd.gzの生成

コード:

find . -print0 | cpio -0 -H newc -ov | gzip -c > ../iso/initrd.gz

8.isoファイルの生成

コード:

mkisofs -o ../preseed-installer.iso -r -J -no-emul-boot -boot-load-size 4 -boot-info-table -b isolinux.bin -c boot.cat ../iso

***** preseed.cfg *****
下記設定で/dev/sdaの空き領域に20GBの/と搭載メモリの2倍のswapと残りすべてのパーティション構成になります。
ユーザーが入力するのは、
1.ミラーの国の選択(なぜかpreseedができません)
2.パーティショニング後の確認(安全の為、確認画面で<いいえ>を選択しEnterで前に戻りパーティションを確認してから書き込みします)
3.grubのインストール先デバイス(/dev/sdaに複数のOSが存在する時、Ubuntu以外何もなければ質問画面はでません。自動でgrubはsdaのMBRにインストールされます)
以上の3箇所です。
ホスト名Paugolinユーザー名preciseパスワードtoorはお好みの物に変更して下さい。

コード:

d-i debian-installer/locale string ja_JP
d-i localechooser/languagelist select ja
d-i localechooser/translation/warn-light boolean true
d-i localechooser/countrylist/Asia select Japan
d-i console-setup/ask_detect boolean false
d-i keyboard-configuration/layout select japanese
d-i keyboard-configuration/variant select japanese
d-i netcfg/get_hostname string Paugolin
d-i mirror/http/countries select JP
d-i mirror/http/mirror select jp.archive.ubuntu.com
d-i mirror/http/proxy string
disk-detect disk-detect/activate_dmraid boolean true
partman-auto partman-auto/disk string /dev/sda
partman-auto partman-auto/init_automatically_partition select biggest_free
partman-auto partman-auto/expert_recipe string    \
manual-partition ::                \
10000 15000 20000 ext4                \
$primary{ }                    \
method{ format } format{ }            \
use_filesystem{ } filesystem{ ext4 }        \
.                        \
64 512 200% linux-swap                \
method{ swap } format{ }            \
.                        \
10000 15000 1000000000 ext4            \
method{ keep }                    \
use_filesystem{ } filesystem{ ext4 }        \
mountpoint{  }                    \
.
partman-basicfilesystems partman-basicfilesystems/no_mount_point boolean false
partman-basicfilesystems partman-basicfilesystems/no_swap boolean false
user-setup-udeb passwd/username string precise
user-setup-udeb passwd/user-password password toor
user-setup-udeb passwd/user-password-again password toor
user-setup-udeb passwd/user-fullname string Precise Paugolin
user-setup-udeb user-setup/encrypt-home boolean false
pkgsel pkgsel/update-policy select No automatic updates
clock-setup clock-setup/utc boolean true 
tzsetup-udeb tzsetup/detected boolean true
tasksel tasksel/first multiselect none
bootstrap-base base-installer/initramfs-tools/driver-policy select targeted
bootstrap-base base-installer/kernel/image select linux-generic
grub-installer grub-installer/bootdev string /dev/sda
grub-installer grub-installer/only_debian boolean true
grub-installer grub-installer/with_other_os boolean false

オフライン

 

Board footer

Powered by FluxBB