USB de Boot!
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
#contents
*ZFSが落ちる? [#yfcdeed3]
http://d.hatena.ne.jp/smectic_g/20100827/1282862472
http://uyota.asablo.jp/blog/2009/03/17/4187277
/boot-mount/boot/loader.conf
vfs.zfs.prefetch_disable="1"
http://www.nekolove.jp/wp/archives/2009/02
/boot/loader.confに下記を追加
zfs_load="YES"
vm.kmem_size_max="1536M"
vm.kmem_size="1536M"
vfs.zfs.arc_max="512M"
vfs.zfs.vdev.cache.size="20M"
メモリ4Gなので、パフォーマンス重視の設定です
*USBメモリのディスクイメージを消す [#b73101e5]
他のインストールイメージを書き込んだUSBメモリーはWindows...
HPU_v2.2.3.exe
http://download.chip.eu/en/download_getfile_en_2028647.ht...
*USBメモリへディスクイメージを書き込む [#d021e0a4]
http://www.pcbsd.org/en/get-it/90-isotope-downloads から"...
-Writing an IMG File to USB
http://wiki.pcbsd.org/index.php/Burning_the_Installation_...
-Windowsでの書き込みにはDD for Windowsを利用するのが確実.
http://www.si-linux.co.jp/wiki/silinux/index.php?DDforWin...
#ref(DD_Windows.png);
*PC-BSD9 インストール [#h3bc7a21]
http://gihyo.jp/admin/clip/01/fdt/201004/0016
PCBSD-9のイメージを書き込んだUSBで起動させ、FreeBSD9.0Rを...
+HDD3台でraidz な Zpoolをつくる。
+bootブロックは、ufs で
インストールログは、ココに書き込まれる。
えらくあっさりとインストールが終わるが、/usr/src とか、/u...
/root/pc-sysinstall.log
kern.geom.debugflags: 0 -> 16
Deleting all gparts
Running: gpart delete -i 1 /dev/ada0
ada0s1 deleted
Running: gpart destroy /dev/ada0
ada0 destroyed
Clearing gpt backup table location on disk
Running: dd if=/dev/zero of=/dev/ada0 bs=1m count=1
1+0 records in
1+0 records out
1048576 bytes transferred in 0.011520 secs (91022942 byt...
Running: dd if=/dev/zero of=/dev/ada0 bs=1m oseek=305241
dd: /dev/ada0: short write on character device
dd: /dev/ada0: end of device
5+0 records in
4+1 records out
4546560 bytes transferred in 0.045503 secs (99917501 byt...
Running: dd if=/dev/zero of=/dev/ada0 count=3000
3000+0 records in
3000+0 records out
1536000 bytes transferred in 0.277431 secs (5536516 byte...
Running gpart on /dev/ada0
Running: gpart create -s mbr -f active /dev/ada0
ada0 created
Running gpart add on /dev/ada0
Running: gpart add -b 2016 -s 625140432 -t freebsd -i 1 ...
ada0s1 added
Cleaning up /dev/ada0s1
Running: dd if=/dev/zero of=/dev/ada0s1 count=1024
1024+0 records in
1024+0 records out
524288 bytes transferred in 0.107515 secs (4876413 bytes...
Stamping boot1 on /dev/ada0
Running: gpart bootcode -b /boot/boot1 /dev/ada0
bootcode written to ada0
Running: gpart create -s BSD /dev/ada0s1
ada0s1 created
Running: gpart add -s 1024M -t freebsd-ufs -i 1 /dev/ada...
ada0s1a added
Running: gpart add -t freebsd-zfs -i 2 /dev/ada0s1
ada0s1b added
Running: gpart bootcode -b /boot/boot /dev/ada0s1
bootcode written to ada0s1
NEWFS: /dev/ada0s1a - UFS
Running: newfs /dev/ada0s1a
/dev/ada0s1a: 1024.0MB (2097152 sectors) block size 3276...
using 4 cylinder groups of 256.03MB, 8193 blks, 16512 i...
super-block backups (for fsck -b #) at:
192, 524544, 1048896, 1573248
Running: sync
Running: glabel label boot1 /dev/ada0s1a
Running: sync
NEWFS: /dev/ada0s1b - ZFS
Running: zpool create -m none -f tank0 raidz /dev/ada0s1...
Running: zfs set atime=off tank0
Running: zfs set mountpoint=/mnt tank0
Running: zfs set atime=off tank0
zfs create -p tank0/usr
Running: zfs create -p tank0/usr
Running: zfs set mountpoint=/mnt/usr tank0/usr
Running: zfs set atime=off tank0/usr
zfs create -p tank0/var
Running: zfs create -p tank0/var
Running: zfs set mountpoint=/mnt/var tank0/var
Running: zfs set atime=off tank0/var
mount -o rw /dev/ada0s1a -> /mnt/boot
Running: mount -o rw /dev/ada0s1a /mnt/boot
FOUND USB: /dev/da0s1a
pc-sysinstall: Starting Extraction
pc-sysinstall: Extraction Finished
Running chroot command: /usr/bin/cap_mkdb /etc/login.conf
Setting hostname: freebsd-8083
Setting root password
Running chroot command: cat /.rootpw | pw usermod root -...
Running: rm /mnt/.rootpw
Running: mkdir -p /mnt//boot-mount/boot
Running: mv /mnt/boot/* /mnt/boot-mount/boot/
Running: mv /mnt/boot-mount/boot /mnt/boot/
Running: umount /dev/ada0s1a
Running: mount /dev/ada0s1a /mnt/boot-mount
Running: rmdir /mnt/boot
Running: chroot /mnt ln -s boot-mount/boot /boot
インストール直後
PCBSD# zpool list
NAME SIZE ALLOC FREE CAP DEDUP HEALTH ALTROOT
tank0 888G 504M 888G 0% 1.00x ONLINE -
PCBSD# zpool status
pool: tank0
state: ONLINE
scan: none requested
config:
NAME STATE READ WRITE CKSUM
tank0 ONLINE 0 0 0
raidz1-0 ONLINE 0 0 0
ada0s1b ONLINE 0 0 0
ada1 ONLINE 0 0 0
ada2 ONLINE 0 0 0
errors: No known data errors
PCBSD# df -h
Filesystem Size Used Avail Capacity Mount...
tank0 581G 22M 581G 0% /
devfs 1.0k 1.0k 0B 100% /dev
/dev/label/boot1 1G 59M 867M 6% /boot...
tank0/usr 582G 312M 581G 0% /usr
tank0/var 581G 246k 581G 0% /var
*SWAPを造る [#i2265fbb]
http://lovepeers.org/2010/11/22/install_zfs-boot-enabled-...
# zfs create -V 8G tank0/swap
# zfs set org.freebsd:swap=on tank0/swap
# zfs set checksum=off tank0/swap
# zfs create -V 8G tank0/swap && zfs set org.freebsd:swa...
リブートしないとSwapとして認識しないので、再起動
PCBSD# swapinfo -h
Device 1K-blocks Used Avail Capacity
/dev/zvol/tank0/swap 8388608 0B 8.0G 0%
PCBSD# zpool list
NAME SIZE ALLOC FREE CAP DEDUP HEALTH ALTROOT
tank0 888G 1.65G 886G 0% 1.00x ONLINE -
PCBSD# zfs list
NAME USED AVAIL REFER MOUNTPOINT
tank0 9.35G 573G 22.3M legacy
tank0/swap 8.25G 581G 21.3K -
tank0/usr 1005M 573G 1005M /usr
tank0/var 99.8M 573G 99.8M /var
終了行:
#contents
*ZFSが落ちる? [#yfcdeed3]
http://d.hatena.ne.jp/smectic_g/20100827/1282862472
http://uyota.asablo.jp/blog/2009/03/17/4187277
/boot-mount/boot/loader.conf
vfs.zfs.prefetch_disable="1"
http://www.nekolove.jp/wp/archives/2009/02
/boot/loader.confに下記を追加
zfs_load="YES"
vm.kmem_size_max="1536M"
vm.kmem_size="1536M"
vfs.zfs.arc_max="512M"
vfs.zfs.vdev.cache.size="20M"
メモリ4Gなので、パフォーマンス重視の設定です
*USBメモリのディスクイメージを消す [#b73101e5]
他のインストールイメージを書き込んだUSBメモリーはWindows...
HPU_v2.2.3.exe
http://download.chip.eu/en/download_getfile_en_2028647.ht...
*USBメモリへディスクイメージを書き込む [#d021e0a4]
http://www.pcbsd.org/en/get-it/90-isotope-downloads から"...
-Writing an IMG File to USB
http://wiki.pcbsd.org/index.php/Burning_the_Installation_...
-Windowsでの書き込みにはDD for Windowsを利用するのが確実.
http://www.si-linux.co.jp/wiki/silinux/index.php?DDforWin...
#ref(DD_Windows.png);
*PC-BSD9 インストール [#h3bc7a21]
http://gihyo.jp/admin/clip/01/fdt/201004/0016
PCBSD-9のイメージを書き込んだUSBで起動させ、FreeBSD9.0Rを...
+HDD3台でraidz な Zpoolをつくる。
+bootブロックは、ufs で
インストールログは、ココに書き込まれる。
えらくあっさりとインストールが終わるが、/usr/src とか、/u...
/root/pc-sysinstall.log
kern.geom.debugflags: 0 -> 16
Deleting all gparts
Running: gpart delete -i 1 /dev/ada0
ada0s1 deleted
Running: gpart destroy /dev/ada0
ada0 destroyed
Clearing gpt backup table location on disk
Running: dd if=/dev/zero of=/dev/ada0 bs=1m count=1
1+0 records in
1+0 records out
1048576 bytes transferred in 0.011520 secs (91022942 byt...
Running: dd if=/dev/zero of=/dev/ada0 bs=1m oseek=305241
dd: /dev/ada0: short write on character device
dd: /dev/ada0: end of device
5+0 records in
4+1 records out
4546560 bytes transferred in 0.045503 secs (99917501 byt...
Running: dd if=/dev/zero of=/dev/ada0 count=3000
3000+0 records in
3000+0 records out
1536000 bytes transferred in 0.277431 secs (5536516 byte...
Running gpart on /dev/ada0
Running: gpart create -s mbr -f active /dev/ada0
ada0 created
Running gpart add on /dev/ada0
Running: gpart add -b 2016 -s 625140432 -t freebsd -i 1 ...
ada0s1 added
Cleaning up /dev/ada0s1
Running: dd if=/dev/zero of=/dev/ada0s1 count=1024
1024+0 records in
1024+0 records out
524288 bytes transferred in 0.107515 secs (4876413 bytes...
Stamping boot1 on /dev/ada0
Running: gpart bootcode -b /boot/boot1 /dev/ada0
bootcode written to ada0
Running: gpart create -s BSD /dev/ada0s1
ada0s1 created
Running: gpart add -s 1024M -t freebsd-ufs -i 1 /dev/ada...
ada0s1a added
Running: gpart add -t freebsd-zfs -i 2 /dev/ada0s1
ada0s1b added
Running: gpart bootcode -b /boot/boot /dev/ada0s1
bootcode written to ada0s1
NEWFS: /dev/ada0s1a - UFS
Running: newfs /dev/ada0s1a
/dev/ada0s1a: 1024.0MB (2097152 sectors) block size 3276...
using 4 cylinder groups of 256.03MB, 8193 blks, 16512 i...
super-block backups (for fsck -b #) at:
192, 524544, 1048896, 1573248
Running: sync
Running: glabel label boot1 /dev/ada0s1a
Running: sync
NEWFS: /dev/ada0s1b - ZFS
Running: zpool create -m none -f tank0 raidz /dev/ada0s1...
Running: zfs set atime=off tank0
Running: zfs set mountpoint=/mnt tank0
Running: zfs set atime=off tank0
zfs create -p tank0/usr
Running: zfs create -p tank0/usr
Running: zfs set mountpoint=/mnt/usr tank0/usr
Running: zfs set atime=off tank0/usr
zfs create -p tank0/var
Running: zfs create -p tank0/var
Running: zfs set mountpoint=/mnt/var tank0/var
Running: zfs set atime=off tank0/var
mount -o rw /dev/ada0s1a -> /mnt/boot
Running: mount -o rw /dev/ada0s1a /mnt/boot
FOUND USB: /dev/da0s1a
pc-sysinstall: Starting Extraction
pc-sysinstall: Extraction Finished
Running chroot command: /usr/bin/cap_mkdb /etc/login.conf
Setting hostname: freebsd-8083
Setting root password
Running chroot command: cat /.rootpw | pw usermod root -...
Running: rm /mnt/.rootpw
Running: mkdir -p /mnt//boot-mount/boot
Running: mv /mnt/boot/* /mnt/boot-mount/boot/
Running: mv /mnt/boot-mount/boot /mnt/boot/
Running: umount /dev/ada0s1a
Running: mount /dev/ada0s1a /mnt/boot-mount
Running: rmdir /mnt/boot
Running: chroot /mnt ln -s boot-mount/boot /boot
インストール直後
PCBSD# zpool list
NAME SIZE ALLOC FREE CAP DEDUP HEALTH ALTROOT
tank0 888G 504M 888G 0% 1.00x ONLINE -
PCBSD# zpool status
pool: tank0
state: ONLINE
scan: none requested
config:
NAME STATE READ WRITE CKSUM
tank0 ONLINE 0 0 0
raidz1-0 ONLINE 0 0 0
ada0s1b ONLINE 0 0 0
ada1 ONLINE 0 0 0
ada2 ONLINE 0 0 0
errors: No known data errors
PCBSD# df -h
Filesystem Size Used Avail Capacity Mount...
tank0 581G 22M 581G 0% /
devfs 1.0k 1.0k 0B 100% /dev
/dev/label/boot1 1G 59M 867M 6% /boot...
tank0/usr 582G 312M 581G 0% /usr
tank0/var 581G 246k 581G 0% /var
*SWAPを造る [#i2265fbb]
http://lovepeers.org/2010/11/22/install_zfs-boot-enabled-...
# zfs create -V 8G tank0/swap
# zfs set org.freebsd:swap=on tank0/swap
# zfs set checksum=off tank0/swap
# zfs create -V 8G tank0/swap && zfs set org.freebsd:swa...
リブートしないとSwapとして認識しないので、再起動
PCBSD# swapinfo -h
Device 1K-blocks Used Avail Capacity
/dev/zvol/tank0/swap 8388608 0B 8.0G 0%
PCBSD# zpool list
NAME SIZE ALLOC FREE CAP DEDUP HEALTH ALTROOT
tank0 888G 1.65G 886G 0% 1.00x ONLINE -
PCBSD# zfs list
NAME USED AVAIL REFER MOUNTPOINT
tank0 9.35G 573G 22.3M legacy
tank0/swap 8.25G 581G 21.3K -
tank0/usr 1005M 573G 1005M /usr
tank0/var 99.8M 573G 99.8M /var
ページ名: