2016年12月7日水曜日

★★ UEFI + btrfs で ハードディスクへインストール




数学は 神の言葉である


ノーベル賞をもらえるくらいの英語の文学を書こうとすると 相当の英語力が必要とされる。 高校英語では 英語で皮肉はいえない。

量子力学を展開しようとすると 片言数学(算数)ではなく、高度な数学が必要だ。
物理学にとって数学は言葉だ。
数学を流暢に喋れないと 物理にならない。

任意の角度を定規とコンパスだけで三等分ができないことは数学で証明されている。
従って神様でも定規とコンパスだけで任意の角度を3等分することはできない。
もっとも神様は 別の方法でやすやすと3等分してしまうけど。

宇宙のはじまりが 何か 有から始まったとしたら
その 有は 何から始まったかという無限の問におちいってしまう。
従って 宇宙は 無 から始まらなければならない。
無 そして インフレーション そして ビッグバンだ。


今までずっと人類の先祖がどうやってであったかわからなかった
先祖が生きていた時には氷河期であって海面は今より50メートル下であった
氷河期で寒いので冷蔵庫のなかのようにカラカラに乾燥し 世界は砂漠化していた
したがってアフリカで住むところは限られていた
だから 人類の男女はであえた
そしてアフリカの東南部で発生した祖先は紅海を島伝いにわたり(海面は今より50メートル下)イエメンに入った。
そこから3つの方角にわかれた
ヨーロッパに行ったもの(白人cocasian コーカサス山脈)
モンゴルに行ったもの (黄色人種)
マレーシアからオーストラリアに行ったもの (オーストリアの原住民アポリジア)

さらにユーラシア大陸からベーリング海峡を通ってアメリカ大陸に渡って行ったもの(海面は今より50メートル下)
もちろんアフリカに残ったものを忘れてはいけない。

アフリカでは 日差しがきついので 皮膚の色をメラニンにて黒くしないと日光で葉酸が破壊されてしまう、
また スウェーデンなどでは日差しがよわいので メラニンを薄くして光を通すようにしないと ビタミンDがつくれない。
黄色人種は 放熱を防ぐために 手足を短くし顔の凹凸をなくした耐寒仕様か


http://ameblo.jp/djdjysk/entry-11347755909.html より
日本が勝って清国と交わした、日清講和条約の第一条 
清国は、朝鮮国が完全無欠なる独立自主の国であること」を確認し、
独立自主を損害するような
「朝鮮国から清国に対する貢(みつぎもの)・献上・典礼等」永遠に廃止する。

淸國ハ 「朝鮮國ノ完全無缺ナル獨立自主ノ國タルコト」ヲ確認ス
因テ
右獨立自主ヲ損害スヘキ
「朝鮮國ヨリ淸國ニ對スル貢獻典禮等」ハ將來全ク之ヲ廢止スヘシ



さて本論です。


あとで 解説しますが、 宣伝として
btrfs fi balance start / -dusage=5 して
snapper -c root list  すると


Type   | #   | Pre # | Date                     | User | Cleanup | Description         | Userdata
-------+-----+-------+--------------------------+------+---------+---------------------+---------
single | 0   |       |                          | root |         | current             |         
post   | 334 | 333   | Thu Feb 23 10:54:34 2017 | root | number  | pacman -Syu         |         
pre    | 335 |        | Thu Feb 23 15:07:44 2017 | root | number  | pacman -Rsc blueman |   
post   | 336 | 335   | Thu Feb 23 15:07:50 2017 | root | number  | pacman -Rsc blueman |         
pre    | 337 |        | Fri Feb 24 09:56:38 2017 | root | number  | pacman -Sy blueman  |         
post   | 338 | 337   | Fri Feb 24 09:56:42 2017 | root | number  | pacman -Sy blueman  |
です・

ここで  snapper -c root undochange 337..338
すると  Feb 23 の過去に もどれるかな?
これが btrfs + snapper の絶大な威力で 
したがって UEFI +btrfsが 巨大データサーバーに 必要な所以かな?。

過ちを取り消すことができるかな?


this page is written in japanese !
so i put english translation (by google's machine translation)
                                             at the end of this URL .



manjorolinuxでは 簡単に UEFI + btrfs ができました。


しかし archlinux で UEFI + btrfs については くぐると
 gummiboot とかsyslinux とかを使ってできたのがありますが、試みるとダメです。
よって 自分で歩き たどり着きました。
最初 USBハードディスクで成功し、その成功は sataハードディスクでもOKでした。


注意:最新のISOをつかわないと駄目です



しかし犠牲もありました。
あなたはこのフォーラム(日本のarchlinux)に対するアクセスが制限されています。
以下はアクセスを制限した管理者またはモデレータのメッセージです。
本家フォーラムでも行動規範に反するような投稿をしているようなので永久BANとします

これおかしいと思います。
法による支配ではないですし、もともとlinuxは
http://cruel.org/freeware/cathedral.html#1からですが

引用開始------>
前略

Linux コミュニティはむしろ、いろんな作業やアプローチが渦を巻く、でかい騒がしいバザールに似ているみたいだった(これをまさに象徴しているのが Linux のアーカイブサイトで、ここはどこのだれからでもソフトを受け入れてしまう)
そしてそこから一貫した安定なシステムが出てくる なんて、
奇跡がいくつも続かなければ不可能に思えた。
<------引用終了 伽藍がお好みなら、openbsdがいい。 テオ神とその天使たちより 福音がおりてくる。圧倒的力量の差がある。

ですからね。


http://qiita.com/sion_cojp/items/c8e015db39ddbf43012eによると
     最大ファイルサイズ    最大ボリュームサイズ
ext4         16TiB      1EiB
btrfs         16EiB      16EiB
なので これから超巨大データベース(例えば映像)をつくるには 
btrfs でしょう 1 EiB = 2の60乗B = 1,152,921,504,606,846,976 B

また uefiでないと 2.2TB以上のバーティションから 起動できないですしね。



A)まず 最初は USB ハードディスクに btrfs + UEFI で arhlinuxをいれます。
 全く同じ方法で PC内蔵ハードディスクにインストールできます。
 B)では PC内蔵ハードディスクにインストールした結果を載せてます
  内蔵ハードディスクの場合はsdbをsdaに置き換えてください

その前に sata ハードディスクにある ntfs , vfat などの microsoft file system はのけとかないといけないとおもいます。
これがあると UEFIが USB ハードディスクでなく sata ハードディスクの方にいっちゃいます。
おそらく UEFIの仕様のためではないかと 自分は想像します。



他のPCから archlinux にはいります。
つまり
ssh -l root 192.168.80.116

root@archiso ~ # fdisk -l /dev/sda  <-----------ここです ntfs , vfat はないですね
Device     Boot     Start       End   Sectors   Size Id Type
/dev/sda2  *      1050624 614402047 613351424 292.5G 83 Linux
/dev/sda3       614404094 874369023 259964930   124G  5 Extended
/dev/sda4       874371072 976773119 102402048  48.8G a6 OpenBSD
/dev/sda5       614404096 622792703   8388608     4G 82 Linux swap / Solaris
/dev/sda6       622794752 874369023 251574272   120G 83 Linux



root@archiso ~ # gdisk  /dev/sda




root@archiso ~ # gdisk  /dev/sda 
GPT fdisk (gdisk) version 1.0.3

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with protective MBR; using GPT.

Command (? for help): p
Disk /dev/sda: 156301488 sectors, 74.5 GiB
Model: FB080C4080      
Sector size (logical/physical): 512/512 bytes
Disk identifier (GUID): ABC1DAE2-2A33-4625-8743-F674621D4D3F
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 156301454
Partitions will be aligned on 2048-sector boundaries
Total free space is 2157 sectors (1.1 MiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048         1050623   512.0 MiB   EF00  EFI System
   2         1050624         3147775   1024.0 MiB  8200  Linux swap
   3         3147776       156301311   73.0 GiB    8300  Linux filesystem

Command (? for help): o
This option deletes all partitions and creates a new protective MBR.
Proceed? (Y/N): Y

Command (? for help): n
Partition number (1-128, default 1): 
First sector (34-156301454, default = 2048) or {+-}size{KMGTP}: 
Last sector (2048-156301454, default = 156301454) or {+-}size{KMGTP}: +512M
Current type is 'Linux filesystem'
Hex code or GUID (L to show codes, Enter = 8300): EF00
Changed type of partition to 'EFI System'

Command (? for help): n
Partition number (2-128, default 2): 
First sector (34-156301454, default = 1050624) or {+-}size{KMGTP}: 
Last sector (1050624-156301454, default = 156301454) or {+-}size{KMGTP}: +4G
Current type is 'Linux filesystem'
Hex code or GUID (L to show codes, Enter = 8300): 8200
Changed type of partition to 'Linux swap'

Command (? for help): n
Partition number (3-128, default 3): 
First sector (34-156301454, default = 9439232) or {+-}size{KMGTP}: 
Last sector (9439232-156301454, default = 156301454) or {+-}size{KMGTP}: 
Current type is 'Linux filesystem'
Hex code or GUID (L to show codes, Enter = 8300): 
Changed type of partition to 'Linux filesystem'

Command (? for help): p
Disk /dev/sda: 156301488 sectors, 74.5 GiB
Model: FB080C4080      
Sector size (logical/physical): 512/512 bytes
Disk identifier (GUID): 248024E5-B5F3-43C1-BFF5-ECA8B8E5DA59
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 156301454
Partitions will be aligned on 2048-sector boundaries
Total free space is 2014 sectors (1007.0 KiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048         1050623   512.0 MiB   EF00  EFI System
   2         1050624         9439231   4.0 GiB     8200  Linux swap
   3         9439232       156301454   70.0 GiB    8300  Linux filesystem

Command (? for help): w

Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING
PARTITIONS!!

Do you want to proceed? (Y/N): Y
OK; writing new GUID partition table (GPT) to /dev/sda.
The operation has completed successfully.


これにて


Number  Start (sector)    End (sector)  Size       Code  Name

   1            2048         1050623   512.0 MiB   EF00  EFI System

   2         1050624         9439231   4.0 GiB     8200  Linux swap

   3         9439232       156301454   70.0 GiB    8300  Linux filesyste



そして
#  mkfs.fat -F32    /dev/sda1

# mkswap /dev/sda2
# swapon /dev/sda2

 
# mkfs.btrfs -f -L arch /dev/sda3
# mount /dev/sda3 /mnt
# cd /mnt
# btrfs subvolume create /mnt/ROOT
# cd /
# umount /mnt
# mount -o defaults,compress=lzo,subvol=ROOT /dev/sda3 /mnt


# mkdir -p /mnt/boot
# mount   /dev/sda1 /mnt/boot 


# nano /etc/pacman.d/mirrorlist  

Server = http://ftp.jaist.ac.jp/pub/Linux/ArchLinux/$repo/os/$arch
をミラーリストの一番上に書き加えます

# pacstrap /mnt base  base-devel btrfs-progs



genfstab  -p /mnt >> /mnt/etc/fstab

and 
rewrite  /mnt/etc/fstab <------------ sda1,2,3 をつかうと状況によっては変なのにつながるのでUUIDに変えます


arch-chroot /mnt


echo 'arch-pc' >  /etc/hostname

rm /etc/localtime
# ln -s /usr/share/zoneinfo/Asia/Tokyo /etc/localtime 


# nano /etc/locale.gen 


一番上に次を書き加える
ja_JP.UTF-8 UTF-8
en_US.UTF-8 UTF-8



 そして
# locale-gen



 /etc/locale.conf を
LANG=en_US.UTF-8
LC_ADDRESS=en_US.UTF-8
LC_IDENTIFICATION=en_US.UTF-8
LC_MEASUREMENT=en_US.UTF-8
LC_MONETARY=en_US.UTF-8
LC_NAME=en_US.UTF-8
LC_NUMERIC=en_US.UTF-8
LC_PAPER=en_US.UTF-8
LC_TELEPHONE=en_US.UTF-8
LC_TIME=en_US.UTF-8





# passwd

# useradd -m -G wheel -s /bin/bash taro
# passwd  taro

# pacman -S net-tools dnsutils  openssh dialog wpa_supplicant

systemctl enable dhcpcd.service
systemctl enable sshd.service
systemctl enable dhcpcd.service

<   ここからが キモですので 省略せず書いてます  > 
# pacman -S dosfstools efibootmgr grub

# grub-install --target=x86_64-efi --efi-directory=/boot  --bootloader-id=arch_grub --recheck
Installing for x86_64-efi platform.
Installation finished. No error reported.


# mkdir /boot/EFI/boot
# cp /boot/EFI/arch_grub/grubx64.efi /boot/EFI/boot/bootx64.efi


[root@archiso /]# grub-mkconfig > kg
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-linux
Found initrd image(s) in /boot: initramfs-linux.img
Found fallback initrd image(s) in /boot: initramfs-linux-fallback.img
done
[root@archiso /]# cp kg /boot/grub/grub.cfg
私の癖です。普通は -o ですよね。

[root@archiso /]# exit
exit
arch-chroot /mnt  8.03s user 1.75s system 1% cpu 8:52.70 total

root@archiso / # umount -R /mnt

root@archiso / # halt -p


やっと USBハードディスクで archlinixを立ち上げます


そして 他のパソコンからここにはいります
[yu@DELL ~]$ ssh -l taro 192.168.80.116
The authenticity of host '192.168.80.116 (192.168.80.116)' can't be 
established.
ECDSA key fingerprint is 
SHA256:re8IllqmOJaI4BNrUdp0OqA4aK5wZnIh1k2lXVklZVo.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.80.116' (ECDSA) to the list of known 
hosts.
taro@192.168.80.116's password: 



[taro@arch-pc ~]$ su
Password: 
と入りました


以下はきちんと USBハードディスクにはいったかの確認です
[root@arch-pc taro]# cat /etc/fstab 
# 
# /etc/fstab: static file system information
#
# <file system> <dir> <type> <options> <dump> <pass>
# UUID=df5ce463-a907-40f8-9021-bb3f565c48d6 LABEL=arch
UUID=df5ce463-a907-40f8-9021-bb3f565c48d6            /          
btrfs      
rw,relatime,compress=lzo,space_cache,subvolid=257,subvol=/ROOT,subvol=ROOT 
0 0

# UUID=479C-992A LABEL=arch
UUID=479C-992A            /boot      vfat       
rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro 
0 2

# UUID=a35045d7-d17b-401f-a14b-9ffb1ff37816 LABEL=arch
UUID=a35045d7-d17b-401f-a14b-9ffb1ff37816            none       
swap       defaults   0 0
/ も /boot も swap もはいってます




[root@arch-pc taro]# df
Filesystem     1K-blocks    Used Available Use% Mounted on
dev               965852       0    965852   0% /dev
run               970420     820    969600   1% /run
/dev/sdb3      153668420 1008028 150647300   1% /
tmpfs             970420       0    970420   0% /dev/shm
tmpfs             970420       0    970420   0% /sys/fs/cgroup
tmpfs             970420       0    970420   0% /tmp
/dev/sdb1         523248   43740    479508   9% /boot
tmpfs             194084       0    194084   0% /run/user/1000

と USBハードディスクのしかマウントされてません。


[root@arch-pc taro]# btrfs filesystem show
Label: 'arch'  uuid: df5ce463-a907-40f8-9021-bb3f565c48d6
 Total devices 1 FS bytes used 934.87MiB
 devid    1 size 146.55GiB used 3.02GiB path /dev/sdb3
これ USBハードディスクのルートです

Label: 'arch'  uuid: 8c2be69a-433e-4816-92a9-b28b23256eb1
 Total devices 1 FS bytes used 76.50GiB
 devid    1 size 119.96GiB used 113.95GiB path /dev/sda6
これは 今回はかんけいないのですが sata ハードディスクの分も感知されてます。


[root@arch-pc taro]# cat /boot/grub/grub.cfg ここですよね
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
insmod part_gpt
insmod part_msdos
if [ -s $prefix/grubenv ]; then
  load_env
fi
if [ "${next_entry}" ] ; then
   set default="${next_entry}"
   set next_entry=
   save_env next_entry
   set boot_once=true
else
   set default="0"
fi

if [ x"${feature_menuentry_id}" = xy ]; then
  menuentry_id_option="--id"
else
  menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}

function load_video {
  if [ x$feature_all_video_module = xy ]; then
    insmod all_video
  else
    insmod efi_gop
    insmod efi_uga
    insmod ieee1275_fb
    insmod vbe
    insmod vga
    insmod video_bochs
    insmod video_cirrus
  fi
}

if [ x$feature_default_font_path = xy ] ; then
   font=unicode
else
insmod part_gpt
insmod btrfs
set root='hd1,gpt3'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt3 
--hint-efi=hd1,gpt3 --hint-baremetal=ahci1,gpt3  
df5ce463-a907-40f8-9021-bb3f565c48d6
else
  search --no-floppy --fs-uuid --set=root 
df5ce463-a907-40f8-9021-bb3f565c48d6
fi
    font="/ROOT/usr/share/grub/unicode.pf2"
fi

if loadfont $font ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
  set locale_dir=$prefix/locale
  set lang=en_US
  insmod gettext
fi
terminal_input console
terminal_output gfxterm
if [ x$feature_timeout_style = xy ] ; then
  set timeout_style=menu
  set timeout=5
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
  set timeout=5
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Arch Linux' --class arch --class gnu-linux --class gnu 
--class os $menuentry_id_option 
'gnulinux-simple-df5ce463-a907-40f8-9021-bb3f565c48d6' {
 load_video
 set gfxpayload=keep
 insmod gzio
 insmod part_gpt
 insmod fat
 set root='hd1,gpt1'  <ーーーーーーーーーーーーーーーーーーーーーーここ
 if [ x$feature_platform_search_hint = xy ]; then
   search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt1 
--hint-efi=hd1,gpt1 --hint-baremetal=ahci1,gpt1  479C-992A
 else
   search --no-floppy --fs-uuid --set=root 479C-992A
 fi
 echo 'Loading Linux linux ...'
 linux /vmlinuz-linux 
root=UUID=df5ce463-a907-40f8-9021-bb3f565c48d6 rw rootflags=subvol=ROOT  <ーーーーーーーーーーーーーーーーーーーーーーここ
quiet
 echo 'Loading initial ramdisk ...'
 initrd  /initramfs-linux.img <ーーーーーーーーーーーーーーーーーーーーーーここ
}
submenu 'Advanced options for Arch Linux' $menuentry_id_option 
'gnulinux-advanced-df5ce463-a907-40f8-9021-bb3f565c48d6' {
 menuentry 'Arch Linux, with Linux linux' --class arch --class 
gnu-linux --class gnu --class os $menuentry_id_option 
'gnulinux-linux-advanced-df5ce463-a907-40f8-9021-bb3f565c48d6' {
  load_video
  set gfxpayload=keep
  insmod gzio
  insmod part_gpt
  insmod fat
  set root='hd1,gpt1'
  if [ x$feature_platform_search_hint = xy ]; then
    search --no-floppy --fs-uuid --set=root 
--hint-bios=hd1,gpt1 --hint-efi=hd1,gpt1 --hint-baremetal=ahci1,gpt1  
479C-992A
  else
    search --no-floppy --fs-uuid --set=root 479C-992A
  fi
  echo 'Loading Linux linux ...'
  linux /vmlinuz-linux 
root=UUID=df5ce463-a907-40f8-9021-bb3f565c48d6 rw rootflags=subvol=ROOT  
quiet
  echo 'Loading initial ramdisk ...'
  initrd  /initramfs-linux.img
 }
 menuentry 'Arch Linux, with Linux linux (fallback initramfs)' 
--class arch --class gnu-linux --class gnu --class os 
$menuentry_id_option 
'gnulinux-linux-fallback-df5ce463-a907-40f8-9021-bb3f565c48d6' {
  load_video
  set gfxpayload=keep
  insmod gzio
  insmod part_gpt
  insmod fat
  set root='hd1,gpt1'
  if [ x$feature_platform_search_hint = xy ]; then
    search --no-floppy --fs-uuid --set=root 
--hint-bios=hd1,gpt1 --hint-efi=hd1,gpt1 --hint-baremetal=ahci1,gpt1  
479C-992A
  else
    search --no-floppy --fs-uuid --set=root 479C-992A
  fi
  echo 'Loading Linux linux ...'
  linux /vmlinuz-linux 
root=UUID=df5ce463-a907-40f8-9021-bb3f565c48d6 rw rootflags=subvol=ROOT  
quiet
  echo 'Loading initial ramdisk ...'
  initrd  /initramfs-linux-fallback.img
 }
}

### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply 
type the
# menu entries you want to add after this comment.  Be careful not to 
change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  ${config_directory}/custom.cfg ]; then
  source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###




[root@arch-pc taro]# du /boot/
3176 /boot/grub/x86_64-efi
3736 /boot/grub/locale
2872 /boot/grub/themes/starfield
2876 /boot/grub/themes
2356 /boot/grub/fonts
12168 /boot/grub
124 /boot/EFI/arch_grub
124 /boot/EFI/boot
252 /boot/EFI
43740 /boot/
な ふうにUEFIがはいってます。
やっと manjoroとおなじく UEFI+btrfsができたようです。

以下は 単なる空想なのですが
--------------------------
鳥の巣をつくって 木にかけます。
すると しばらくすると 鳥がすみつきます。

これの比喩で ntfs , fat32のパーティションをつくると
UEFI鳥は これをキャッチしてここに住みつきますが、 まず sata木 次に USB木の順番に 察知するんじゃないでしょうか。
これは UEFIの仕様かと そうイマジンします。
--------------------------

もう新しいPCは 99%以上は UEFI仕様でしょう。
そして 巨大サーバーマシンは 2.2TB以上のパーティションからたちあがるのでしょう。
こうなると UEFIしか対応できません。

そして 超巨大データベースに対応するには oracleの創始したbtrfsしかないでしょう。



あとは

pacman  -S openntpd
systemctl enable  openntpd
systemctl start   openntpd
でまず 時間合わせをします。



genisoimage     <- pacman -S cdrkit
growisofs       <-   pacman -S dvd+rw-tools






5) X
http://hanjuku-am2.blogspot.jp/2013/05/vaio-type-parch-linux-2.html
をみて

pacman -S xorg xorg-xinit  xfce4



nano /home/taro/.xinitrc
startxfce4



pacman -S sddm
sddm --example-config > /etc/sddm.conf
systemctl enable sddm





日本語fontは

pacman -S otf-ipafont

   
 
pae対応してない非力なPCでは fcitxはおすすめできません
pacman -S fcitx-im fcitx-configtool fcitx-mozc

nano /home/taro/.xprofile
export XMODIFIERS=@im=fcitx
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx






音です


http://opamp.hatenablog.jp/entry/20110829/1314619739 より

# pacman -S alsa-utils




14)cups は 


そのため

the step is the following .
--------------------------------
1) pacman -S cups ghostscript


systemctl enable org.cups.cupsd.service わすれてはいけません!


以上です。





https://www.howtoforge.com/a-beginners-guide-to-btrfs
https://www.howtoforge.com/a-beginners-guide-to-btrfs-p2
は素晴らしいbtrfsの解説サイトです。 何度も読み直さないと理解できません。
特に
we can create subvolumes in volumes or other subvolumes
は btrfs のキモは subvolume



B) PC内蔵ハードディスクにインストールした結果です
動画は  https://www.youtube.com/watch?v=3jYST5ziVos


gdisk -l /dev/sda
GPT fdisk (gdisk) version 1.0.1

Partition table scan:

  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with protective MBR; using GPT.

Disk /dev/sda: 976773168 sectors, 465.8 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 63CDA5C0-46C7-4190-B788-AA95162889CF
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 976773134
Partitions will be aligned on 2048-sector boundaries
Total free space is 2029 sectors (1014.5 KiB)

Number  Start (sector)    End (sector)  Size       Code  Name

   1            2048         1050623   512.0 MiB   EF00  EFI System
   2         1050624       614404095   292.5 GiB   8300  Linux filesystem
   5       614404096       622792703   4.0 GiB     8200  Linux swap

   6       622792704       976773119   168.8 GiB   8300  Linux filesystem

2は btrfs + UEFI なarchlinux です

6は btrfs    だけの archlinux です





 /etc/fstab
/dev/sda2           /         btrfs     rw,relatime,compress=lzo,space_cache,subvolid=257,subvol=/ROOT,subvol=ROOT 0 0

/dev/sda1           /boot     vfat       rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro 0 2

/dev/sda5           none       swap       defaults   0 0


btrfs filesystem df /
Data, single: total=99.01GiB, used=97.96GiB
System, DUP: total=8.00MiB, used=16.00KiB
Metadata, DUP: total=1.00GiB, used=466.41MiB
GlobalReserve, single: total=134.91MiB, used=0.00B


# btrfs filesystem show
Label: 'arch'  uuid: ee2c052d-0e7c-4685-a34a-5890f2528008
Total devices 1 FS bytes used 98.42GiB
devid    1 size 292.47GiB used 101.02GiB path /dev/sda2

Label: 'arch'  uuid: 8c2be69a-433e-4816-92a9-b28b23256eb1
Total devices 1 FS bytes used 105.80GiB
devid    1 size 168.79GiB used 110.95GiB path /dev/sda6




/boot/grub/grub.cfg
insmod part_gpt
insmod part_msdos
if [ -s $prefix/grubenv ]; then
  load_env
fi
if [ "${next_entry}" ] ; then
   set default="${next_entry}"
   set next_entry=
   save_env next_entry
   set boot_once=true
else
   set default="0"
fi
if [ x"${feature_menuentry_id}" = xy ]; then
  menuentry_id_option="--id"
else
  menuentry_id_option=""
fi
export menuentry_id_option
if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi
function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}
function load_video {
  if [ x$feature_all_video_module = xy ]; then
    insmod all_video
  else
    insmod efi_gop
    insmod efi_uga
    insmod ieee1275_fb
    insmod vbe
    insmod vga
    insmod video_bochs
    insmod video_cirrus
  fi
}
if [ x$feature_default_font_path = xy ] ; then
   font=unicode
else
insmod part_gpt
insmod btrfs
set root='hd0,gpt2'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2  ee2c052d-0e7c-4685-a34a-5890f2528008
else
  search --no-floppy --fs-uuid --set=root ee2c052d-0e7c-4685-a34a-5890f2528008
fi
    font="/ROOT/usr/share/grub/unicode.pf2"
fi
if loadfont $font ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
  set locale_dir=$prefix/locale
  set lang=en_US
  insmod gettext
fi
terminal_input console
terminal_output gfxterm
if [ x$feature_timeout_style = xy ] ; then
  set timeout_style=menu
  set timeout=5
else
  set timeout=5
fi
menuentry 'Arch Linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-ee2c052d-0e7c-4685-a34a-5890f2528008' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod fat
set root='hd0,gpt1'
if [ x$feature_platform_search_hint = xy ]; then
 search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1 --hint-baremetal=ahci0,gpt1  7220-A86F
else
 search --no-floppy --fs-uuid --set=root 7220-A86F
fi
echo 'Loading Linux linux ...'
linux /vmlinuz-linux root=UUID=ee2c052d-0e7c-4685-a34a-5890f2528008 rw rootflags=subvol=ROOT  quiet
echo 'Loading initial ramdisk ...'
initrd  /initramfs-linux.img
}




















english english english



Install on hard disk with UEFI + btrfs


This page is written in japanese!
In manjorolinux it was easy to create UEFI + btrfs.


But in archlinux we go through UEFI + btrfs
There are things you could do with gummiboot or syslinux, but if you try it, it will not work.
So I got to walk by myself.
First successfully with USB hard disk, its success was OK on sata hard disk.


Attention: You must use the latest ISO



But there was sacrifice.
You are limited access to this forum (Japanese archlinux). 
The following is an administrator or moderator message that restricted access.
It seems that you are making posts that go against the Code of Conduct even in the Honkei Forum so it will be permanent BAN

I think it is strange.
It is not dominance by law, originally linux
It's from http://cruel.org/freeware/cathedral.html#1

Start quoting ------>
Abbreviation

Rather, the Linux community seemed to resemble a big noisy bazaar where various tasks and approaches swirled ( This is the archival site of Linux, which is exactly what symbolizes this, accepting software from anyone anywhere ) .
And from that there is a consistent and stable system comes out , 
It seemed impossible unless many miracles continued.
<------ End of quote If you like cathedral, openbsd is good. Gospel comes from Teo God and its angels.There is a difference in overwhelming competence.

That's why.


According to http://qiita.com/sion_cojp/items/c8e015db39ddbf43012e
Maximum file size Maximum volume size 
Ext 4   16TiB   1 EiB
Btrfs   16 EiB   16 EiB
So from now on to create a huge database (eg video)
Btrfs 1 EiB = 2 to the 60th power B = 1,152,921,504,606,846,976 B.

Also, unless you are uefi, you can not boot from the 2.2 TB or higher version.



A) First of all, you can put btrfs + arflinux on UEFI on the USB hard disk.
You can install it on the PC internal hard disk in exactly the same way.
  B) I put the result of installation on the PC internal hard disk

Before that, I think that it is necessary to have a microsoft file system such as ntfs, vfat etc. on sata hard disk. 
With this, UEFI will go to the sata hard disk instead of the USB hard disk. 
I imagine it probably because of UEFI specifications.


他のぱそこんから archlinux にはいります。 つまりssh -l root 192.168.80.116 root@archiso ~ # fdisk -l /dev/ sda <-----------ここです ntfs , vfat はないですねDevice Boot Start End Sectors Size Id Type /dev/sda2 * 1050624 614402047 613351424 292.5G 83 Linux /dev/sda3 614404094 874369023 259964930 124G 5 Extended /dev/sda4 874371072 976773119 102402048 48.8G a6 OpenBSD /dev/sda5 614404096 622792703 8388608 4G 82 Linux swap / Solaris /dev/sda6 622794752 874369023 251574272 120G 83 Linux root@archiso ~ # gdisk -l /dev/sdb Number Start (sector) End (sector) Size Code Name 1 2048 1050623 512.0 MiB EF00 EFI System 2 1050624 5244927 2.0 GiB 8200 Linux swap 3 5244928 312581774 146.5 GiB 8300 Linux filesystemといふうに USBハードディスクを調整します。 そしてroot@archiso ~ # mkfs.fat -F32 /dev/sdb1 mkfs.fat 4.0 (2016-05-06) # mkswap /dev/sdb2 # swapon /dev/sdb2 swapon /dev/sd   
 # mkfs.btrfs -f -L arch /dev/sdb3 # mount /dev/sdb3 /mnt # cd /mnt # btrfs subvolume create /mnt/ROOT # cd / # umount /mnt # mount -o defaults,compress=lzo,subvol=ROOT /dev/sdb3 /mnt 
 

 # mkdir -p /mnt/boot # mount /dev/sdb1 /mnt/boot 
 # nano /etc/pacman.d/mirrorlist 

Server = http://ftp.jaist.ac.jp/pub/Linux/ArchLinux/$repo/os/$arch
To the top of the mirror list
 # pacstrap /mnt base base-devel btrfs-progs genfstab -p /mnt >> /mnt/etc/fstab and rewrite /mnt/etc/fstab <-------------------- sdb1,2,3 をつかうと状況によっては変なのにつながるのでUUIDに変えます# # /etc/fstab: static file system information # # <file system> <dir> <type> <options> <dump> <pass> # UUID=df5ce463-a907-40f8-9021-bb3f565c48d6 LABEL=arch UUID=df5ce463-a907-40f8-9021-bb3f565c48d6 / btrfs rw,relatime,compress=lzo,space_cache,subvolid=257,subvol=/ROOT,subvol=ROOT 0 0 # UUID=479C-992A LABEL=arch UUID=479C-992A /boot vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro 0 2 # UUID=a35045d7-d17b-401f-a14b-9ffb1ff37816 LABEL=arch UUID=a35045d7-d17b-401f-a14b-9ffb1ff37816 none swap defaults 0 0 arch-chroot /mnt echo 'arch-pc' > /etc/hostname # ln -s /usr/share/zoneinfo/Asia/Tokyo /etc/localtime

 # nano /etc/locale.gen を操作してから 
 

一番上に次を書き加える 
En_US.UTF - 8 UTF - 8
Ja_JP.UTF - 8 UTF - 8
 
  
 # locale-gen Generating locales... en_US.UTF-8... done ja_JP.UTF-8... done Generation complete.と発生させます# passwd # useradd -m -G wheel -s /bin/bash taro # passwd taro # pacman -S net-tools dnsutils openssh dialog wpa_supplicant systemctl enable dhcpcd.service systemctl enable sshd.service systemctl enable dhcpcd.service < ここからが キモですので 省略せず書いてます > # pacman -S dosfstools efibootmgr grub # grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=arch_grub --recheck Installing for x86_64-efi platform. Installation finished. No error reported. # mkdir /boot/EFI/boot # cp /boot/EFI/arch_grub/grubx64.efi /boot/EFI/boot/bootx64.efi [root@archiso /] # grub-mkconfig > kg Generating grub configuration file ... Found linux image: /boot/vmlinuz-linux Found initrd image(s) in /boot: initramfs-linux.img Found fallback initrd image(s) in /boot: initramfs-linux-fallback.img done [root@archiso /]# cp kg /boot/grub/grub.cfg私の癖です。普通は -o ですよね。 [root@archiso /]# exit exit arch-chroot /mnt 8.03s user 1.75s system 1% cpu 8:52.70 total root@archiso / # umount -R /mnt root@archiso / # halt -p やっと USBハードディスクで archlinixを立ち上げますそして 他のパソコンからここにはいります[yu@DELL ~]$ ssh -l taro 192.168.80.116 The authenticity of host '192.168.80.116 (192.168.80.116)' can't be established. ECDSA key fingerprint is SHA256:re8IllqmOJaI4BNrUdp0OqA4aK5wZnIh1k2lXVklZVo. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '192.168.80.116' (ECDSA) to the list of known hosts. taro@192.168.80.116's password: [taro@arch-pc ~]$ su Password:と入りました以下はきちんと USBハードディスクにはいったかの確認です[root@arch-pc taro]# cat /etc/fstab # # /etc/fstab: static file system information # # <file system> <dir> <type> <options> <dump> <pass> # UUID=df5ce463-a907-40f8-9021-bb3f565c48d6 LABEL=arch UUID=df5ce463-a907-40f8-9021-bb3f565c48d6 / btrfs rw,relatime,compress=lzo,space_cache,subvolid=257,subvol=/ROOT,subvol=ROOT 0 0 # UUID=479C-992A LABEL=arch UUID=479C-992A /boot vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro 0 2 # UUID=a35045d7-d17b-401f-a14b-9ffb1ff37816 LABEL=arch UUID=a35045d7-d17b-401f-a14b-9ffb1ff37816 none swap defaults 0 0 / も /boot も swap もはいってます[root@arch-pc taro]#  df Filesystem 1K-blocks Used Available Use% Mounted on dev 965852 0 965852 0% /dev run 970420 820 969600 1% /run /dev/sdb3 153668420 1008028 150647300 1% / tmpfs 970420 0 970420 0% /dev/shm tmpfs 970420 0 970420 0% /sys/fs/cgroup tmpfs 970420 0 970420 0% /tmp /dev/sdb1 523248 43740 479508 9% /boot tmpfs 194084 0 194084 0% /run/user/1000と USBハードディスクのしかマウントされてません。 [root@arch-pc taro]# btrfs filesystem show Label: 'arch' uuid: df5ce463-a907-40f8-9021-bb3f565c48d6 Total devices 1 FS bytes used 934.87MiB devid 1 size 146.55GiB used 3.02GiB path /dev/sdb3これ USBハードディスクのルートです Label: 'arch' uuid: 8c2be69a-433e-4816-92a9-b28b23256eb1 Total devices 1 FS bytes used 76.50GiB devid 1 size 119.96GiB used 113.95GiB path /dev/sda6これは 今回はかんけいないのですが sata ハードディスクの分も感知されてます。 [root@arch-pc taro]# cat /boot/grub/grub.cfg ここですよね# # DO NOT EDIT THIS FILE # # It is automatically generated by grub-mkconfig using templates # from /etc/grub.d and settings from /etc/default/grub # ### BEGIN /etc/grub.d/00_header ### insmod part_gpt insmod part_msdos if [ -s $prefix/grubenv ]; then load_env fi if [ "${next_entry}" ] ; then set default="${next_entry}" set next_entry= save_env next_entry set boot_once=true else set default="0" fi if [ x"${feature_menuentry_id}" = xy ]; then menuentry_id_option="--id" else menuentry_id_option="" fi export menuentry_id_option if [ "${prev_saved_entry}" ]; then set saved_entry="${prev_saved_entry}" save_env saved_entry set prev_saved_entry= save_env prev_saved_entry set boot_once=true fi function savedefault { if [ -z "${boot_once}" ]; then saved_entry="${chosen}" save_env saved_entry fi } function load_video { if [ x$feature_all_video_module = xy ]; then insmod all_video else insmod efi_gop insmod efi_uga insmod ieee1275_fb insmod vbe insmod vga insmod video_bochs insmod video_cirrus fi } if [ x$feature_default_font_path = xy ] ; then font=unicode else insmod part_gpt insmod btrfs set root='hd1,gpt3' if [ x$feature_platform_search_hint = xy ]; then search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt3 --hint-efi=hd1,gpt3 --hint-baremetal=ahci1,gpt3 df5ce463-a907-40f8-9021-bb3f565c48d6 else search --no-floppy --fs-uuid --set=root df5ce463-a907-40f8-9021-bb3f565c48d6 fi font="/ROOT/usr/share/grub/unicode.pf2" fi if loadfont $font ; then set gfxmode=auto load_video insmod gfxterm set locale_dir=$prefix/locale set lang=en_US insmod gettext fi terminal_input console terminal_output gfxterm if [ x$feature_timeout_style = xy ] ; then set timeout_style=menu set timeout=5 # Fallback normal timeout code in case the timeout_style feature is # unavailable. else set timeout=5 fi ### END /etc/grub.d/00_header ### ### BEGIN /etc/grub.d/10_linux ### menuentry 'Arch Linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-df5ce463-a907-40f8-9021-bb3f565c48d6' { load_video set gfxpayload=keep insmod gzio insmod part_gpt insmod fat set root='hd1,gpt1' <ーーーーーーーーーーーーーーーーーーーーーーここ if [ x$feature_platform_search_hint = xy ]; then search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt1 --hint-efi=hd1,gpt1 --hint-baremetal=ahci1,gpt1 479C-992A else search --no-floppy --fs-uuid --set=root 479C-992A fi echo 'Loading Linux linux ...' linux /vmlinuz-linux root=UUID=df5ce463-a907-40f8-9021-bb3f565c48d6 rw rootflags=subvol=ROOT <ーーーーーーーーーーーーーーーーーーーーーーここquiet echo 'Loading initial ramdisk ...' initrd /initramfs-linux.img <ーーーーーーーーーーーーーーーーーーーーーーここ} submenu 'Advanced options for Arch Linux' $menuentry_id_option 'gnulinux-advanced-df5ce463-a907-40f8-9021-bb3f565c48d6' { menuentry 'Arch Linux, with Linux linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-advanced-df5ce463-a907-40f8-9021-bb3f565c48d6' { load_video set gfxpayload=keep insmod gzio insmod part_gpt insmod fat set root='hd1,gpt1' if [ x$feature_platform_search_hint = xy ]; then search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt1 --hint-efi=hd1,gpt1 --hint-baremetal=ahci1,gpt1 479C-992A else search --no-floppy --fs-uuid --set=root 479C-992A fi echo 'Loading Linux linux ...' linux /vmlinuz-linux root=UUID=df5ce463-a907-40f8-9021-bb3f565c48d6 rw rootflags=subvol=ROOT quiet echo 'Loading initial ramdisk ...' initrd /initramfs-linux.img } menuentry 'Arch Linux, with Linux linux (fallback initramfs)' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-fallback-df5ce463-a907-40f8-9021-bb3f565c48d6' { load_video set gfxpayload=keep insmod gzio insmod part_gpt insmod fat set root='hd1,gpt1' if [ x$feature_platform_search_hint = xy ]; then search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt1 --hint-efi=hd1,gpt1 --hint-baremetal=ahci1,gpt1 479C-992A else search --no-floppy --fs-uuid --set=root 479C-992A fi echo 'Loading Linux linux ...' linux /vmlinuz-linux root=UUID=df5ce463-a907-40f8-9021-bb3f565c48d6 rw rootflags=subvol=ROOT quiet echo 'Loading initial ramdisk ...' initrd /initramfs-linux-fallback.img } } ### END /etc/grub.d/10_linux ### ### BEGIN /etc/grub.d/20_linux_xen ### ### END /etc/grub.d/20_linux_xen ### ### BEGIN /etc/grub.d/30_os-prober ### ### END /etc/grub.d/30_os-prober ### ### BEGIN /etc/grub.d/40_custom ### # This file provides an easy way to add custom menu entries. Simply type the # menu entries you want to add after this comment. Be careful not to change # the 'exec tail' line above. ### END /etc/grub.d/40_custom ### ### BEGIN /etc/grub.d/41_custom ### if [ -f ${config_directory}/custom.cfg ]; then source ${config_directory}/custom.cfg elif [ -z "${config_directory}" -a -f $prefix/custom.cfg ]; then source $prefix/custom.cfg; fi ### END /etc/grub.d/41_custom ### [root@arch-pc taro]#  du /boot/ 3176 /boot/grub/x86_64-efi 3736 /boot/grub/locale 2872 /boot/grub/themes/starfield 2876 /boot/grub/themes 2356 /boot/grub/fonts 12168 /boot/grub 124 /boot/EFI/arch_grub 124 /boot/EFI/boot 252 /boot/EFI 43740 /boot/な ふうにUEFIがはいってます。 
Finally it seems that UEFI + btrfs has been created just like manjoro. 


The following is just fantasy 
-------------------------- 
I make a bird's nest and put it on a tree. 
Then a bird will cling to a little while.
When we create a partition of ntfs, fat32 with a metaphor of this 
The UEFI bird catches this and plays here, but first of all we will notice the sata tree next to the US tree in order. 
This is a UEFI specification and so imagine. 
--------------------------
More than 99% of new PCs will be UEFI specifications. 
And huge server machines will be built from partitions of 2.2 TB or more. 
In this way, only UEFI can correspond.
And to deal with super-huge databases, there will be only btrfs created by oracle.



later

Pacman -S openntpd
Systemctl enable openntpd
Systemctl start openntpd
First we will set the time.


Genisoimage <- pacman - S cdrkit
Growisofs <- pacman - S dvd + rw - tools






5) X
Http://hanjuku-am2.blogspot.jp/2013/05/vaio-type-parch-linux-2.html
Look at

Pacman - S xorg xorg - xinit x fce 4



Nano / home / arch /.xinitrc
Startxfce4


Pacman - S slim
Systemctl enable slim







Japanese font

Pacman- S otf-ipafont

   

Fcitx is not recommended for non-powerful PCs that do not support pae
Pacman - S fcitx - im fcitx - configtool fcitx - mozc

Nano / home / arch /. Xprofile
Export XMODIFIERS = @ im = fcitx
Export GTK_IM_MODULE = fcitx
Export QT_IM_MODULE = fcitx





It is a sound.


From http://opamp.hatenablog.jp/entry/20110829/1314619739

Pacman -S alsa-utils



14) cups is


for that reason

The step is the following. 
-------------------------------------------------- 
1) pacman -S cups ghostscript

Systemctl enable org.cups.cupsd.service Do not forget!


that's all.





Https://www.howtoforge.com/a-beginners-guide-to-btrfs
Https://www.howtoforge.com/a-beginners-guide-to-btrfs-p2

Is a nice btrfs commentary site. I can not understand it unless I read it again and again.

Especially
We can create subvolumes in volumes or other subvolumes
Is btrfs kimo is subvolume



B) It is the result of installation on PC internal hard disk
Videos are   Https://www.youtube.com/watch?v=3jYST5ziVos

Gdisk -l / dev / sda
GPT fdisk (gdisk) version 1.0.1

Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present

Found valid GPT with protective MBR; using GPT.
Disk / dev / sda: 976773168 sectors, 465.8 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 63 CDA 5 C 0 - 46 C 7 - 4190 - B 788 - A A 95162889 CF
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 976773134
Partitions will be aligned on 2048-sector boundaries
Total free space is 2029 sectors (1014.5 KiB)

Number Start (sector) End (sector) Size Code Name
1 2048 1050623 512.0 MiB EF00 EFI System
2 1050624 614404095 292.5 GiB 8300 Linux filesystem
5 614404096 622792703 4.0 GiB 8200 Linux swap

6 622792704 976773119 168.8 GiB 8300 Linux filesystem

2 is btrfs + UEFI archlinux
6 is archlinux only btrfs





/ Etc / fstab
/ Dev / sda 2   /   Btrfs   Rw, relatime, compress = lzo, space_cache, subvolid = 257, subvol = / ROOT, subvol = ROOT   0 0

/ Dev / sda 1   / Boot   Vfat   Rw, relatime, fmask = 0022, dmask = 0022, codepage = 437, iocharset = iso8859-1, shortname = mixed, errors = remount-ro   0 2

/ Dev / sda 5   None   Swap   Defaults   0 0


Btrfs filesystem df /
Data, single: total = 99.01 GiB, used = 97.96 GiB
System, DUP: total = 8.00 MiB, used = 16.00 KiB
Metadata, DUP: total = 1.00 Gi B, used = 466.41 M i B
GlobalReserve, single: total = 134.91 MiB, used = 0.00 B


# Btrfs filesystem show
Label: 'arch' uuid: ee 2 c 052 d - 0 e 7 c - 4685 - a 34 a - 5890 f 2528 007
 Total devices 1 FS bytes used 98.42 GiB
 Devid 1 size 292.47 GiB used 101.02 GiB path / dev / sda 2

Label: 'arch' uuid: 8 c 2 be 69 a - 433 e - 4816 - 92 a 9 - b 28 b 23255 eb 1
 Total devices 1 FS bytes used 105.80 GiB
 Devid 1 size 168.79 GiB used 110.95 GiB path / dev / sda 6




/boot/grub/grub.cfg
Insmod part_gpt
Insmod part_msdos
If [- s $ prefix / grubenv]; then
Load_env
Fi
If ["$ {next_entry}"]; then
Set default = "$ {next_entry}"
Set next _entry =
Save_env next_entry
Set boot_once = true
Else
Set default = "0"
Fi
If [x "$ {feature_menuentry_id}" = xy]; then
Menuentry_id_option = "- id"
Else
Menuentry_id_option = ""
Fi
Export menuentry_id_option
If ["$ {prev_saved_entry}"]; then
Set saved_entry = "$ {prev_saved_entry}"
Save_env saved_entry
Set prev_saved_entry =
Save_env prev_saved_entry
Set boot_once = true
Fi
Function savedefault {
If [- z "$ {boot_once}"]; then
Saved_entry = "$ {chosen}"
Save_env saved_entry
Fi
}
Function load_video {
If [x $ feature_all_video_module = xy]; then
Insmod all_video
Else
Insmod efi_gop
Insmod efi_uga
Insmod ieee 1275_fb
Insmod vbe
Insmod vga
Insmod video_bochs
Insmod video_cirrus
Fi
}
If [x $ feature_default_font_path = xy]; then
Font = unicode
Else
Insmod part_gpt
Insmod btrfs
Set root = 'hd 0, gpt 2'
If [x $ feature_platform_search_hint = xy]; then
Search - no - floppy - fs - uuid - set = root - hint - bios = hd 0, gpt 2 - hint - efi = hd 0, gpt 2 - hint - baremetal = ahci 0, gpt 2 ee 2 c 0 5 2 d - 0 e 7 c - 4685 - a 34 a -5890f 2528008
Else
Search - no - floppy - fs - uuid - set = root ee 2 c 0 5 2 d - 0 e 7 c - 4685 - a 34 a - 5890 f 2528 007
Fi
Font = "/ ROOT / usr / share / grub / unicode.pf 2"
Fi
If loadfont $ font; then
Set gfxmode = auto
Load_video
Insmod gfxterm
Set locale_dir = $ prefix / locale
Set lang = en_US
Insmod gettext
Fi
Terminal_input console
Terminal_output gfxterm
If [x $ feature_timeout_style = xy]; then
Set timeout_style = menu
Set timeout = 5
Else
Set timeout = 5
Fi
Menuentry 'Arch Linux' --class arch --class gnu - linux --class gnu --class os $ menuentry_id_option 'gnulinux - simple - ee2c052d - 0e7c - 4685 - a34a - 5890f 2528008'
 Load_video
 Set gfxpayload = keep
 Insmod gzio
 Insmod part_gpt
 Insmod fat
 Set root = 'hd 0, gpt 1'
 If [x $ feature_platform_search_hint = xy]; then
 Search - no - floppy - fs - uuid - set = root - hint - bios = hd 0, gpt 1 - hint - efi = hd 0, gpt 1 - hint - baremetal = ahci 0, gpt 1 7220 - A 86 F
 Else
 Search - no - floppy - fs - uuid - set = root 7220 - A 86 F
 Fi
 Echo   'Loading Linux linux ...'
 Linux   / Vmlinuz - linux root = UUID = ee 2 c 0 5 2 d - 0 e 7 c - 4685 - a 34 a - 5890 f 2528 007 rw rootflags = subvol = ROOT quiet
 Echo   'Loading initial ramdisk ...'
 Initrd /initramfs-linux.img
}




C) Cloning to a smaller disk


The bigger one is / deb / sdb
The smaller one is called / dev / sdc
will do.
For the sake of clarity / deb / sdb has only / dev / sdb 1


First make / deb / sdb gparted smaller than the capacity of / dev / sdc

next
Dd if = / dev / sdb of = / dev / sdc bs = 512 count = 10000

then
Dd if = / dev / sdb 1 of = / dev / sdc 1 bs = 32 K

That's all.





D) coping with btrfs and then increasing /.snapshots


Https://www.suse.com/documentation/sles11/stor_admin/data/trbl_btrfs_volfull.html#b15tk0m4

is.
In particular

$ Su
Password:

# Btrfs filesystem show
Label: 'arch' uuid: db 4 ef 4 b 9 - d 89 a - 4 bf 6 - a 5 cb - 9 a 48 d 734 e f 18
 Total devices 1 FS bytes used 38.34 GiB
 Devid 1 size 53.90 GiB used 40.02 GiB path / dev / sda 1


# Df
Filesystem 1K-blocks Used Available Use% Mounted on
Dev 2989216 0 2989216 0% / dev
Run 2993808 772 2993036 1% / run
/ Dev / sda 1 56516608 4116865 6 1509 2 9 12 74% /
Tmpfs 2993808 3384 2990424 1% / dev / shm
Tmpfs 2993808 0 2993808 0% / sys / fs / cgroup
Tmpfs 2993808 8 299 3800 1% / tmp
Tmpfs 598760 4 598756 1% / run / user / 1000



# Btrfs fi balance start / - dusage = 5
Done, had to relocate 0 out of 41 chunks


Snapper -c root list | more


Snapper - c root delete 3 - 100


Df
Filesystem 1K-blocks Used Available Use% Mounted on
Dev 2989216 0 2989216 0% / dev
Run 2993808 780 2993028 1% / run
/ Dev / sda 1 565 16 60 8 25 75 5 13 6 29 4 48 8 32 47%
Tmpfs 2993808 3404 2990404 1% / dev / shm
Tmpfs 2993808 0 2993808 0% / sys / fs / cgroup
Tmpfs 2993808 8 299 3800 1% / tmp
Tmpfs 598760 4 598756 1% / run / user / 1000

And I was able to afford it!

after
Automatic timeline snapshot is started by activating / enabling snapper-timeline.timer. In addition, when snapper-cleanup.timer is started and activated, old snapshots are erased regularly.
Because of that, we also need the following
Systemctl enable snapper-timeline.timer
# Systemctl enable snapper-cleanup.timer 








2016年8月11日木曜日

★ UEFI なパソコンへの arch の インストール Vater

太平洋戦争と アジアの国例えばインドネシアの独立
http://warof.jp/daitoua-k.html のとおりですが
(太平洋戦争で) 日本が東アジアから欧米諸国を追い払う以前は、
それらの地域には政府が認められておらず、当然独自の軍備も持っていませんでしたが、日本はそれらの国々を占領すると同時に
現地の政府と軍隊、ならびに様々なインフラ整備を行いました。
そして、それらの(欧米諸国の)国々は、日本が全面降伏した後
再びそれら(東アジア)の国々を植民地化するために
のこのこ戻って来た欧米諸国と独立戦争を行うことができ、
また、一度日本が欧米の国々を追い払う手本を見せていたために、以前のように簡単に屈服することはなく、現在のような独立を勝ち取ることができたのです。
https://ja.wikipedia.org/wiki/%E3%82%A4%E3%83%B3%E3%83%89%E3%83%8D%E3%82%B7%E3%82%A2%E7%8B%AC%E7%AB%8B%E6%88%A6%E4%BA%89
より
インドネシア独立戦争
日本が第二次世界大戦で連合国へ降伏した後の旧オランダ領東インドで、独立を宣言したインドネシア共和国と、これを認めず再植民地化に乗り出したオランダとの間で発生した戦争(独立戦争)。
http://magazine.campus-web.jp/archives/315550
(ベトナムの再植民地化にのりだした)フランスは次第に追いつめられ最終的に北部のディエンビエンフーの戦いに破れて終結し、1954年7月21日、ジュネーヴ協定の調印で中北部のフランス統治が終結しました。
--------------
ここは UEFI arch だよ。
話横道で UEFI + BTRFS にするには以下です。
http://hatahata50.blogspot.jp/2016/12/uefi-btrfs-usb.html

話を元に戻します、普段使いのPCにするには
    日本語入力 :ちょっとだけ難しい fcitx-mozc
    印刷    :手強い cups
    ワープロ  :簡単 librewriter
が必要ですが、このページで賄えます

menuentry 'Windows 7 (loader) (on /dev/sdb2)'  {insmod part_msdos
insmod ntfs
set root='hd1,msdos2'
chainloader +1
}
nat.bat
ifconfig enp2s0 192.168.11.1  echo 1 > /proc/sys/net/ipv4/ip_forward
     internal_net='192.168.11.0/24'
     my_internal_ip='192.168.11.1'
    /sbin/iptables -F
    /sbin/iptables -t nat -F
    /sbin/iptables -X
    /sbin/iptables -P INPUT DROP
    /sbin/iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
    /sbin/iptables -P OUTPUT ACCEPT
    /sbin/iptables -P FORWARD DROP
    /sbin/iptables -A FORWARD -i enp2s0 -o wlp3s0  -s $internal_net -j ACCEPT
    /sbin/iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT
    /sbin/iptables -A INPUT -i lo -j ACCEPT
/sbin/iptables -t nat -A POSTROUTING -o wlp3s0 -s $internal_net -j MASQUERADE
    /sbin/iptables -A OUTPUT -o wlp3s0 -d 10.0.0.0/8 -j DROP
    /sbin/iptables -A OUTPUT -o wlp3s0 -d 172.16.0.0/12 -j DROP
    /sbin/iptables -A OUTPUT -o wlp3s0 -d 192.168.0.0/16 -j DROP
    /sbin/iptables -A OUTPUT -o wlp3s0 -d 127.0.0.0/8 -j DROP
    /sbin/iptables -N LOGGING
    /sbin/iptables -A LOGGING -j LOG --log-level warning --log-prefix "DROP:" -m limit
    /sbin/iptables -A LOGGING -j DROP
    /sbin/iptables -A INPUT -j LOGGING
    /sbin/iptables -A FORWARD -j LOGGING

route.bat 
ifconfig eth1 192.168.11.100
route add default gw  192.168.11.1
rm  /etc/resolv.conf  
echo 'nameserver 8.8.8.8 ' >> /etc/resolv.conf 
ping -c 3 www.google.com


 
lenovo を UEFIでも BIOSでもブートできるようにするために
 な形でBIOS設定しておけば 
archの入ったusb harddisk が

UEFIではいってても BIOSではいってても
両方ともこのPCでブートできます。

 

 

さてhttp://www.dosv.jp/feature/1103/17.htm より

Unified Extensible Firmware Interfaceとは、
当初Intelが
BIOS(Basic Input/Output System)を「EFI」に置き換える目的で考案したファームウェアの仕様だとさ。
そして

BIOSでは2.2TB以上のディスクパーティションからのOS起動に対応していない。んでUEFIなのか。





ここから インストールについて書いてます。
有線LANから dhcpで導入後、wifi は後から設定が常道です。
従って上のrepeater があれば便利です。
windowsから電波マークをクリックして接続してから
リピーターのアドレス192.168.10.1をプラウザにいれてやると
認証画面がでてきて repeater 機能を選んで
ちょちょいのちょい でOK!

 
 
ISOのダウンロードは
lftp http://ftp.tsukuba.wide.ad.jp/Linux/archlinux/iso
                

CDに焼いてブートです。

黄色の背景の大文字のところだけ
で インストールできます。 (小文字は解説にすぎません)



systemctl  start  sshd 
passwd
ifconfig              アドレス確認
します。

そして 192.168.100.102なら

この後は 他のパソコンから
ssh
-l root 192.168.100.102

で入ってインストールします。
つまりこのページの 
コピー&ペースト
だから楽です。





まず インストールするところを決めます。

root@archiso ~ # gdisk /dev/sda (私はUSB HDDにしました)

にて

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048         1050623   512.0 MiB    EF00  EFI System
   2         1050624         5244927   2.0 GiB      8200  Linux swap
   3         5244928       156250046   72.0 GiB    8300  Linux filesystem

なふうにします。



それから
 mkfs.fat -F32 /dev/sda1 
  mkswap /dev/sda2
  swapon /dev/sda2
 mkfs.ext4 /dev/sda3

以下の通りマウントします。
mount   /dev/sda3 /mnt
mkdir   /mnt/boot
mount   /dev/sda1 /mnt/boot




# nano /etc/pacman.d/mirrorlist
Server = http://ftp.jaist.ac.jp/pub/Linux/ArchLinux/$repo/os/$arch
をミラーリストの一番上に書き加えます・



# pacstrap /mnt base  base-devel
 
これが終わってから
  • 以下のコマンドを実行して fstab を生成してください
 
# genfstab  -p /mnt >> /mnt/etc/fstab
     
  • 新しくインストールしたシステムに chroot:
# arch-chroot /mnt      
 
  • あなたのホストネームを nano /etc/hostname に書き込んでください。  例えば arch-pc
 
rm  /etc/localtime

ln -s /usr/share/zoneinfo/Asia/Tokyo /etc/localtime

  • /etc/locale.gen 内の使用するロケールをアンコメントし、
  • # 日本語の UTF-8 を有効にする 
  • LANG="ja_JP.UTF-8" 
  • # デフォルトのソート順を保つ (例えば '.' で始まるファイルは # ディレクトリのリストで最初に並ぶ) 
  • LC_COLLATE="C" 
  • # 短い月日表示を YYYY-MM-DD に設定 ("date +%c" でテスト)               LC_TIME="en_DK.UTF-8"
  •  
  • # nano /etc/locale.gen  の一番上に次を書き加える
    en_US.UTF-8   UTF-8
    ja_JP.UTF-8    UTF-8
そして locale-gen を実行してロケールを生成。


       /etc/locale.conf を
      LANG=en_US.UTF-8
      LC_ADDRESS=en_US.UTF-8
      LC_IDENTIFICATION=en_US.UTF-8
      LC_MEASUREMENT=en_US.UTF-8
      LC_MONETARY=en_US.UTF-8
      LC_NAME=en_US.UTF-8
      LC_NUMERIC=en_US.UTF-8
      LC_PAPER=en_US.UTF-8
      LC_TELEPHONE=en_US.UTF-8
      LC_TIME=en_US.UTF-8







再起動後もキーマップ設定を持続させるために、vconsole.conf を作る
この柿色部分はしなくていいようです。
# nano /etc/vconsole.conf
KEYMAP=jp106
FONT=Lat2-Terminus16

  • passwd で root パスワードを設定します。 
  •  

以下コマンドを実行してユーザー登録しましょう。

# useradd -m -G wheel -s /bin/bash maiu
# passwd  maiu



  • ifconfig wifi-menu のために                           
    pacman -S ne
    t-tools
    dnsutils  openssh dialog wpa_supplicant
  •  
  • systemctl enable dhcpcd.service
  • systemctl enable sshd.service


  • systemctl enable netctl-auto@wlpXXXX
     

 

以下は http://archlinux-blogger.blogspot.jp/2016/03/arch-linux-uefi-gpt-xfs.html で勉強しました。

pacman -S dosfstools efibootmgr  grub


grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=arch_grub --recheck

mkdir /boot/EFI/boot

cp /boot/EFI/arch_grub/grubx64.efi /boot/EFI/boot/bootx64.efi

grub-mkconfig > kg
cp kg
/boot/grub/grub.cfg

chroot 環境から抜けるために

exit
次に /mnt の下にマウントしたパーティションをアンマウントします:
# umount -R /mnt


これでやっと halt -p して終了します,archははいりました。 




2)arch を再起動します 
それから

ifconfig
で アドレスをみて


別のPCから またもやsshではいります
しかし、もはや rootでははいれないので さっき作ったユーザー archで入ります
ssh -l arch 192.168.100.103
su

そして

pacman -S btrfs-progs
pacman -S openntpd
systemctl enable  openntpd
systemctl start openntpd
でまず 時間合わせをします。




3)  pacman -yS ...... でアプリをいれる。

アプリを探すには
pacman  -Ss

除けるには
pacman  -Rsc


updte
packman  -Syy
packman  -Syu


 

4) その他のアプリ
genisoimage     <- pacman -S cdrkit
growisofs       <-   pacman -S dvd+rw-tools







5) X
http://hanjuku-am2.blogspot.jp/2013/05/vaio-type-parch-linux-2.html
をみて

pacman -S xorg xorg-xinit  xfce4
(vostro 1400 は mesaではなく  nvidia でないとだめだった)


nano /home/arch/.xinitrc
startxfce4



pacman -S sddm
sddm --example-config > /etc/sddm.conf
systemctl enable sddm


日本語キーボードのために
# nano  /etc/X11/xorg.conf.d/01-keyboard-layout.conf
Section "InputClass"
Identifier "keyboard-layout"
      #       Driver "evdev" <ーこれは archbangでみたかな?
MatchIsKeyboard "yes"
Option "XkbModel" "jp106"
Option "XkbLayout" "jp"
EndSection





日本語fontは

pacman -S otf-ipafont

ibus-anthy
pacman -S  ibus-anthy  
.bashrcを
export GTK_IM_MODULE=ibus
export XMODIFIERS=@im=ibus
export QT_IM_MODULE=ibus
ibus-daemon &   <ー日本語入力をなくしたらここだけ動かせばいい
    


 
pae対応してない非力なPCでは fcitxはおすすめできません
pacman -S fcitx-im fcitx-configtool fcitx-mozc

nano /home/arch/.xprofile
export XMODIFIERS=@im=fcitx
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx



 fcitx-config-gtk3 で



 italianのすぐ下に japaneseがあります


ここなあたりで fcitx-autostart をしたような気がします








ここで一旦 PCをhalt -p します。

再起動したらそのまま fcitx-mozc 動いてます

なお grubは
menuentry 'Arch Linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-7e234184-c64a-4860-933c-89e11e177e1e' {
    load_video
    set gfxpayload=keep
    insmod gzio
    insmod part_gpt
    insmod fat
    set root='hd1,gpt1'
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt1 --hint-efi=hd1,gpt1 --hint-baremetal=ahci1,gpt1  10F4-D887
    else
      search --no-floppy --fs-uuid --set=root 10F4-D887
    fi
    echo    'Loading Linux linux ...'
    linux    /vmlinuz-linux root=UUID=7e234184-c64a-4860-933c-89e11e177e1e rw  quiet
    echo    'Loading initial ramdisk ...'
    initrd  /intel-ucode.img /initramfs-linux.img
}

なんでした



以上で日本語設定まで終わってます。
あとは付録みたいなもんです。





11) 音です


http://opamp.hatenablog.jp/entry/20110829/1314619739 より

# pacman -S alsa-utils
$  alsamixer

音は 
vlc でもでますが、 ecasoundが手軽です。








13) AUR を使う。ソースからインストール
openbsdのports systemの公開版かな

https://wiki.archlinux.org/index.php/Arch_User_Repository_%28%E6%97%A5%E6%9C%AC%E8%AA%9E%29
のとおりです。

例として flashpluginをとります。
まず 一般ユーザーで
$ mkdir  ~/builds
そしてhttps://aur.archlinux.org/ へいって flashplugin でさがしてこれをダウンロードします。
すると ~/Downloads/に flashplugin-10.1.tar.gzがおちてきます。
そこで 
$ cd ~/builds
$ mv ../Downloads/flashplugin-10.1.tar.gz   ./
$ tar -xvf flashplugin-10.1.tar.gz
$ cd flashplugin-10.1
$ makepkg -s
すると
==> ソースを取得...
  -> ダウンロード fp_10.1.102.64_and_9.0.289.0_archive.zip...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
 74  126M   74 93.6M    0     0   177k      0  0:12:08  0:08:59  0:03:09  259k

になって
 flashplugin-10.1-10.1.102.64-3-i686.pkg.tar.xz がつくられてます。
そこで
su して
# pacman -U   flashplugin-10.1-10.1.102.64-3-i686.pkg.tar.xz  
で あっけなく あっさりと するするっと入ります。

たしかに
$ pacman -Qm で flashplugin-10.1

なり aurを使ったことがわかります。







14)cups は ppdがむつかしい


そのため

the step is the following .
--------------------------------
1) pacman -S cups ghostscript
then can test print 



多分 以下の細字は不要
2)pacman -S system-config-printer
# system-config-printer

i do some things ( but forget them)
then
i can print directly from firefox's File-> Print 







systemctl enable org.cups.cupsd.service わすれてはいけません!



印刷できるようになったので archがメインマシンになりました。




なお epson EP-706A でも印刷OK!

 

さらに cupsでサポートされてない ブラザーの DCP-J925N です。
arch 64bitのため

Enabling
To use the multilib repository, uncomment the [multilib] section in /etc/pacman.conf (Please be sure to uncomment both lines):
[multilib]
Include = /etc/pacman.d/mirrorlist
Then update the package list and upgrade with pacman -Syu.
Note: Do not just run pacman -Sy, see System maintenance#Partial upgrades are unsupported.


そして https://github.com/nozaki87/brother-dcpj925n
の 

PKGBUILD
brother-dcpj925n.install
の2つを buildsフォルダにつれてきて
makepkg
あとは root で pacman -U brother-dcpj925n-3.0.0-1-x86_64.pkg.tar.xz
でした。


17) 待望のwifiです。
http://www.garunimo.com/program/linux/corumn-linux31.xhtml
をみて、

pacman -S iw wpa_supplicant wpa_actiond dialog


ls /sys/class/net/

enp9s0    lo  wlp0s29f7u2

 

wlp0s29f7u2 がwifiだ



だから


systemctl start dhcpcd@wlp0s29f7u2
systemctl enable dhcpcd@wlp0s29f7u2
systemctl enable netctl-auto@wlp0s29f7u2
 wifi-menu wlp2s0






なお 念のため 手動で wifiを立ち上げるには
./comment-out.bat wifi.bat

x=wlp0s29f7u1
echo 'ctrl_interface=DIR=/run/wpa_supplicant' > /etc/wpa_supplicant.conf
wpa_passphrase URoad-662EA0 04271 >> /etc/wpa_supplicant.conf
   ip link set $x  up
   wpa_supplicant -B -D nl80211 -c /etc/wpa_supplicant.conf -i $x
 dhcpcd -A $x
sleep 10
echo '----------------------------'
ping -c 3 www.google.com
ifconfig | grep 192




あと wifi を起動時自動接続させるには ウィンドウマネージャが slimとして

/etc/slim.conf を
default_path        /bin:/usr/bin:/usr/local/bin
default_xserver     /usr/bin/X
xserver_arguments -nolisten tcp vt07
halt_cmd            /sbin/shutdown -h now
reboot_cmd          /sbin/shutdown -r now
console_cmd         /usr/bin/xterm -C -fg white -bg black +sb -T "Console login" -e /bin/sh -c "/bin/cat /etc/issue; exec /bin/login"
xauth_path         /usr/bin/xauth
authfile           /var/run/slim.auth
 numlock             on
login_cmd           exec /bin/bash -login ~/.xinitrc %session
sessionstart_cmd    /home/X-user/wifi.bat
sessiondir            /usr/share/xsessions/
screenshot_cmd      import -window root /slim.png
welcome_msg         Welcome to %host
shutdown_msg       The system is halting...
reboot_msg         The system is rebooting...
default_user        X-user
focus_password      yes
auto_login         
yes
current_theme       default
lockfile            /var/lock/slim.lock
logfile             /var/log/slim.log







18)ユーザー権限のを自動実行するには

 https://wiki.archlinuxjp.org/index.php/Xfce#.E3.82.B9.E3.82.BF.E3.83.BC.E3.83.88.E3.82.A2.E3.83.83.E3.83.97.E3.82.A2.E3.83.97.E3.83.AA.E3.82.B1.E3.83.BC.E3.82.B7.E3.83.A7.E3.83.B3

をみて

スタートアップアプリケーション

Xfce の起動時にカスタムアプリケーションを実行するには、Applications Menu -> Settings -> Settings Manager から Session and Startup オプションを選択して Application Autostart タブをクリックしてください。











19)dhcpdサーバーをつくろう
pacman -S dnsmasq

./comment-out.bat /etc/dnsmasq.conf 
interface=enp2s0
bind-interfaces
dhcp-range=192.168.8.51,192.168.8.55,12h





以下のスクリプトは
まず固定アドレスをふり、
次に
dnsmasqをうごかし
最後に
natをしてます。

./comment-out.bat dhcpd-server+NAT.bat 
 ip addr show
 ip link set enp2s0 down
 ip link set enp2s0 up
 ip addr add 192.168.8.1/24 dev enp2s0
 ip addr show
systemctl restart dnsmasq
mac='wlp3s0'
echo '--------- wlan? ------------'
echo $mac
echo '----------------------------'
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t filter -F FORWARD
iptables -t nat -F POSTROUTING
iptables -t nat -F PREROUTING
iptables -t nat -P PREROUTING ACCEPT
iptables -t nat -P POSTROUTING ACCEPT
iptables -t filter -P FORWARD ACCEPT
iptables -t nat -A POSTROUTING -o $mac -j MASQUERADE
/sbin/modprobe ip_nat_ftp
/sbin/modprobe ip_conntrack_ftp
iptables-save
iptables -L
echo '---------------'
ifconfig -a | grep 192



後記 
oprnbsd------>arch-------->internet
ほんとはbridgeでいきたかったのですが archではむつかしいので
natに にげました


20)最後に変わったインストールを書きます
これは Arch20.qcow2 というqemuイメージを 現実のHDDにいれます。


詳しくは
 http://qemuandopenbsd.blogspot.jp/2015/11/bohdi-arch20qcow2.html

 
  楽しかったあの頃 (小学校5年生の作文)
体の中の血が 「ジン ジーン」と足の裏を通り 頭の方へ昇っていく。 (ウソ) 私は全然知らなかった。 今は午前7時半ごろ 父が引きつった顔で
「おじいちゃんが 危ない」
 「あぶないってなにが」
「命が」
    「えっ」
それっきり父は A病院へ行ってしまった。
私は何も知らない。
母から聞いた話だが 「おじいちゃん、昨夜の夜 お酒を飲んでて気持ちが悪くなって倒れたんだって。 それで従姉妹のMちゃんたちがA病院へつれていったの」
母も化粧を速くしているつもりだが、焦るほどいつもと違って遅かった。
「プルル」電話がかかってきた。私は「は、はい」とでた。電話の相手は 父で「おじいちゃん、、、死んだ。 お母さんに代わって」
父は今にも泣き出しそうな声だった。
祖父に公園に連れて行ってもらったことを思い出した。 
そうして(楽しかったなー)と思っていると涙が一筋流れ出した.
本当はMちゃんとお町に行く予定だったがもちろん中止だ。
電話で「ごめん 、A町のじいちゃんが死んだきー」
私の声は泣いていた。
祖父は孫の中で私を一番可愛がってくれ、どこへでも連れて行ってくれた。
母方の祖母の家に着くとMちゃんが鼻をすすりあげているのが聞こえた。
こたつの部屋で私は一人で泣いていた。
心の中では「ダメ泣いたらいいかん」と思っていても涙が次から次へと流れていく 。
M ちゃんと会っても口もきかず、まるで他人だった。
中略

人の一生には出会いがあって、別れがあるんだということがここで初めて実感した。
おじいちゃんという人はこの世でとっても大切な人だった、、、
 

金言
言わぬは言うに勝る
自慢は知恵の行き止まり
3人寄れば文殊の知恵
急ぎの文は静かに書け
我が身を立てんとせばまず人を立てよ 
千兵は得安く一将は求め難し
知る者は言わず言う者は知らず
怒りは敵と思え
人をもって鏡となす
いいたいことは明日言え
腹は立て損喧嘩は仕損
礼も過ぎれば無礼になる
http://hole.tuziwo.info/install-arch-linux-on-uefi-gpt-computer-with-btrfs-support.html
 

Configure a wireless network connection

We will configure a default profile for a wireless connection with SSID mySSID and a WPA security. Then we will make this connection automatic with wpa_actiond. Begin to install wpa_actiond with the base package netctl. The dialog package allow us the use of wifi-menu to generate netctl profiles.
$ pacman -S netctl iw dialog wpa_actiond
Then create a netctl profile from an example file. You can either automatically generate a profile file with wifi-menu or use the manual configuration below.
$ cp /etc/netctl/examples/wireless-wpa-config /etc/netctl/profile
You should modify /etc/netctl/profile to make it look like the following.
Description='A wpa_supplicant configuration file based wireless connection'
Interface=wlp3s0
Connection=wireless
Security=wpa-config
WPAConfigFile='/etc/wpa_supplicant/wpa_supplicant.conf'
IP=dhcp
Do not forget to change the path to the wpa_supplicant.conf file which should be /etc/wpa_supplicant/wpa_supplicant.conf.
Now, we can configure the WPA configuration of our mySSID wifi network. To configure this network, we use wpa_passphrase. We first backup the default configuration file.
$ cp /etc/wpa_supplicant/wpa_supplicant.conf /etc/wpa_supplicant/wpa_supplicant.conf.example
$ wpa_passphrase "mySSID" "mypassword" > /etc/wpa_supplicant/wpa_supplicant.conf
Do not forget the double quotes, especially if the SSID contains spaces. You may edit the file and remove the password which appear in clear.
You can now enable this service.
$ systemctl enable netctl-auto@wlp3s0.service