ãã©ã€ãããªããããããŒããã©ã€ãã®ããã¯ããŒã¯ãæããããšã¯ãããŸããã åèµ·ååŸã«ã·ã¹ãã ãå ã®ç¶æ ã«æ»ããããã¯ã¬ã€ãžãŒãªãŠãŒã¶ãŒãã³ãäœããå£ãããšã¯ãããŸããã ãã¡ãããå¿ èŠãªæ©èœã®ã¿ãå«ãŸããããã«ãèµ·åå¯èœãªã·ã¹ãã ãåå¥ã«å€æŽããŠåŠç¿ããããšãã§ããŸãã ãã®éã«ãLinuxãã©ã®ããã«ãã©ã®ãããªé åºã§ããŒããããããŸããããäœã§æ§æãããŠãããã調ã¹ãŸãã ãåç¥ã®ããã«ãç¥èã¯è²Žéã§ãããããç¡æã§å ±æããŠããŸãã
ããŸãè°è«ããã«ãäœãèµ·ãã£ãŠããã®ãã説æããããšè©Šã¿ãŸããæã«ã¯å°ãå ãèµ°ããŸããããã®åŸã¯å¿ ãæŽçããŠãã ããã ç解ã«åé¡ããªãããã«ãæ¢è£œã®Linuxãã£ã¹ããªãã¥ãŒã·ã§ã³ã§æ¢ã«äœæ¥ããŠãããnanoãŸãã¯å¥ã®ããã¹ããšãã£ã¿ãŒã䜿çšããŠç°¡åãªã¹ã¯ãªãããèšè¿°ããããšããŠããããšãåæãšããŠããŸãã ArchLinuxãåããŠäœ¿çšããå Žåãå€ãã®ããšãåŠã³ãŸãããè人ãã§ããã°ãããŸãåŠã°ãªãã§ããããããããã«ããŠãLinuxããã£ãšæããããšãé¡ã£ãŠããŸãã
å€ãã®æ å ±ããããŸããã ãããŠã確ç«ãããããªãŠããã®äŒçµ±ã«ããã°ãããã€ãã®ããŒãã®ã·ãªãŒãºãããªããåŸ ã£ãŠããŸãã
ç¶ç¶ ;
çµäºããŸãã
ããã§ãVirtualBoxã«Archlinuxãã€ã³ã¹ããŒã«ããŸããããã¯ãè¿œå ã®èšå®ãªãã§ãã¬ã¬ã·ãŒBIOSãåããã»ãšãã©ãã¹ãŠã®ã³ã³ãã¥ãŒã¿ãŒã§è€è£œããã³å®è¡ã§ããŸãã ãã®éã«ãsystemdãæäœããããã®åºæ¬çãªãã¯ããã¯ãåŠã³ãããŒãæã«ä»»æã®ãµãŒãã¹ãšããã°ã©ã ãéå§ããããã«ããã䜿çšããæ¹æ³ãåŠã³ãŸãã ãŸããLinuxãããŒãæã«ã©ã®æ®µéãééãããã確èªããinitramfsã«ç¬èªã®ããã¯ãäœæããŸãã initramfsãäœã§ãããããããŸãããïŒ ãã®åŸãç«ã®äžã«è¡ããŸãã
Archlinuxãéžæãããçç±ã¯ãããããããŸãã æåã®çç±ïŒåœŒã¯ç§ã®å€ã颚å€ãããªå人ã§ãããå¿ å®ãªã¢ã·ã¹ã¿ã³ãã§ãã Gentooã¯ã€ã³ã¿ãŒãããäžã§æžããŠããããã«ããã£ãšå±éºãªãã®ã§ããããœãŒã¹ããã·ã¹ãã ãæ§ç¯ããããããŸããã 2çªç®ã®çç±ïŒæ¢è£œã®ã¢ã»ã³ããªã«ã¯åžžã«å€ãã®äœåãªããŒã¿ãå«ãŸããŠããã倧éã®ããŒã¿ãéä¿¡ãããšãããã¯ãŒã¯ããã©ãŒãã³ã¹ã«é倧ãªåœ±é¿ãäžããå¯èœæ§ããããŸãã 4çªç®ïŒsystemdã¯åŸã ã«ãã¹ãŠã®ãã£ã¹ããªãã¥ãŒã·ã§ã³ã ããã«ã¯Debianã«ãŸã§æµžéããŸããArchlinuxã®äŸã䜿çšããŠãä»åŸã®æ¢è£œã®ãã£ã¹ããªãã¥ãŒã·ã§ã³ãæ·±ãæãäžããããšãã§ããŸãã ãã®ãã¹ãŠã®ããã«ãåŸã§æºåããã·ã¹ãã ã¯ãä»®æ³ãã·ã³ã§å®è¡ãããŠãããµãŒããŒããã ãã§ãªããããšãã°Raspberry PiãWestern Digital My CloudïŒæ€èšŒæžã¿ïŒãªã©ã®éåžžã®ã³ã³ãã¥ãŒã¿ãŒããããããã¯ãŒã¯çµç±ã§ããŠã³ããŒãã§ããŸãã Debianã§åäœããŸãã
æºåäœæ¥
å ¬åŒãŠã§ããµã€ãã®ãªã³ã¯ããææ°ã®ç»åãããŠã³ããŒãããŠãã ãã ã ããšãã°ãã¢ã¹ã¯ã¯ã§ã¯ãYandexãµãŒããŒããã®ããŠã³ããŒãã¯éåžžã«é«éã§ããããã»ã¹ãåŒãããããŠããå Žåã¯ãä»ã®å Žæã§ããŠã³ããŒãããŠã¿ãŠãã ããã ãã®æ å ±ã¯ãŸã æçšã§ãããããã©ã¡ããèŠããŠããããšããå§ãããŸãã
VirtualBoxã§ãæ°ããä»®æ³ãã·ã³ãäœæããŸãïŒããšãã°ã1 GBã®RAMãš8 GBã®ã¹ãã¬ãŒãžïŒã ãããã¯ãŒã¯èšå®ã§ãæ¥ç¶ã®çš®é¡ããããã¯ãŒã¯ããªããžããšãã€ã³ã¿ãŒãããã«ã¢ã¯ã»ã¹ã§ããé©åãªãããã¯ãŒã¯ã¢ããã¿ãŒãéžæããå¿ èŠããããŸãã ããŠã³ããŒãããã€ã¡ãŒãžãCD-ROMã«æ¥ç¶ããŸãã ããŒããŠã§ã¢ã®äœ¿çšãéå§ããã®ãåŸ ã¡ãããªãå Žåã¯ãUSBãã©ãã·ã¥ãã©ã€ãã䜿çšããŠWin32 Disk Imagerã䜿çšããŠç»åãèšé²ãïŒWindowsã§äœæ¥ããŠããå ŽåïŒãããããå°æ¥ã®ãµãŒããŒãçŽæ¥ããŠã³ããŒãããŸãã
ãã·ã³ã®é»æºãå ¥ããã³ãã³ãã©ã€ã³ã衚瀺ãããã®ãåŸ ã¡ãSSHãæ©èœããªããã¹ã¯ãŒããèšå®ããŸãã
passwd
次ã®ã³ãã³ãã§SSHãµãŒããŒãèµ·åããŸãã
systemctl start sshd
ã³ãã³ãã®åºåã調ã¹ãŠããã·ã³ã®IPã¢ãã¬ã¹ãèŠã€ããããšã¯æ®ã£ãŠããŸãã
ip addr | grep "scope global"
ã¢ãã¬ã¹ã¯ãinetãã®çŽåŸã«ç€ºãããŸãã
ããã§ãWindowsãŠãŒã¶ãŒã¯puttyã䜿çšããŠãã·ã³ã«æ¥ç¶ã§ããããã«ãªããããããã³ãã³ããã³ããŒããŠè²Œãä»ããŠå³ã¯ãªãã¯ããŸãã
åºæ¬èšå®
ããã«ãã§ããã ãç°¡åã«Archlinuxã®æšæºã€ã³ã¹ããŒã«ã«ã€ããŠèª¬æããŸãã 質åãããå Žåã¯ãããããåå¿è åãã®ã€ã³ã¹ããŒã«ã®è©³çŽ°ãªèª¬æã«åçããããŸã ã wikiã¯ãã°ãããã ãã§ãªããè±èªçã®wikiãé¢é£ããŠããã®ã§ã䜿çšããŠã¿ãŠãã ããã
cfdiskã䜿çšããŠã¡ãã£ã¢ãæºåããŸãïŒããã¯ãã·ã³ãã«ã§çŽæçãªã€ã³ã¿ãŒãã§ã€ã¹ãåããã³ã³ãœãŒã«ãŠãŒãã£ãªãã£ã§ãïŒã 1ã€ã®ã»ã¯ã·ã§ã³ã§ååã§ããããŒãå¯èœãšããŠããŒã¯ããããšãå¿ããªãã§ãã ããã
cfdisk /dev/sda
ext4ã§ãã©ãŒãããããHABRãªã©ã®ã©ãã«ãèšå®ããŸãã
mkfs.ext4 /dev/sda1 -L "HABR"
å°æ¥ã®ã«ãŒãããŒãã£ã·ã§ã³ã/ mntã«ããŠã³ãããŸãã
export root=/mnt mount /dev/sda1 $root
éåžžãArchlinuxã¯ã€ã³ã¿ãŒãããçµç±ã§ã€ã³ã¹ããŒã«ããããããã€ã³ã¹ããŒã«åŸããã«ææ°ããŒãžã§ã³ãå ¥æã§ããŸãã ãªããžããªã®ãªã¹ãã¯/etc/pacman.d/mirrorlistãã¡ã€ã«ã«ãããŸãã ãã£ã¹ããªãã¥ãŒã·ã§ã³ã®ããŠã³ããŒãå ãèŠããŠããããã®ãµãŒããŒããªã¹ãã®äžçªæåã«ç§»åããŠãã ãããããã«ããã次ã®ã¹ãããã§æéãå€§å¹ ã«ç¯çŽã§ããŸãã éåžžããããã¯çŸåšã®å Žæãšåãå Žæã«å°ççã«é 眮ããããµãŒããŒã§ãã
nano /etc/pacman.d/mirrorlist
ããã±ãŒãžã®åºæ¬ã»ãããšéçºè çšã»ãããã€ã³ã¹ããŒã«ããŸãã
pacstrap -i $root base base-devel
次ã«ãarch-chrootã³ãã³ãã䜿çšããŠãã«ãŒããã£ã¬ã¯ããªãäžæçã«Linuxã«ãŒããã¡ã€ã«ã·ã¹ãã ã®æ§é ãæã€ä»ã®ãã£ã¬ã¯ããªã«çœ®ãæããããšãã§ããããã«ããŸãã åæã«ãããããèµ·åããããã°ã©ã ã¯ãä»ã«äœããååšããããšãç¥ããŸããã ç§ãã¡ã¯ã管çè æš©éãæã€æ°ããã·ã¹ãã ã§å®éã«èªåèªèº«ãèŠã€ããŸãã
arch-chroot $root
ã³ãã³ãã©ã€ã³ããã³ãããã©ã®ããã«å€æŽããããã«æ³šç®ããŠãã ããã
䜿çšããäºå®ã®èšèªãéžæããŸãã en_US.UTF-8 UTF-8ããã³ru_RU.UTF-8 UTF-8ã®ãŸãŸã«ããããšããå§ãããŸãã ããã¹ããšãã£ã¿ãŒã§ã¯ãå察ã®ã³ã¡ã³ããåé€ããã ãã§ãã
nano /etc/locale.gen
éžæããããŒã«ã©ã€ãºãçæããŸãïŒ
locale-gen
ãã¹ãŠãããŸããã£ãå Žåã次ã®ãããªãã®ã衚瀺ãããŸãã
Generating locales... en_US.UTF-8... done ru_RU.UTF-8... done Generation complete.
ããã©ã«ãã§äœ¿çšãããèšèªãèšå®ããŸãã
echo LANG=ru_RU.UTF-8 > /etc/locale.conf
ã³ã³ãœãŒã«ã®ã¬ã€ã¢ãŠããšãã©ã³ãïŒ
echo -e "KEYMAP=ru\nFONT=cyr-sun16\nFONT_MAP=" > /etc/vconsole.conf
ã¿ã€ã ãŸãŒã³ãæå®ããŸãïŒã¢ã¹ã¯ã¯æéã䜿çšããŸãïŒã
ln -s /usr/share/zoneinfo/Europe/Moscow /etc/localtime
å°æ¥ã®ãµãŒããŒã®ååãæãä»ããŸãã
echo "HabraBoot" > /etc/hostname
次ã«ã管çè ãã¹ã¯ãŒããèšå®ããŸãã ããã¯äž»ã«ãSSHã§ã¯ãã¹ã¯ãŒããªãã§ã¯ã·ã¹ãã ã«æ¥ç¶ã§ããªãããã§ãã ãã¹ã¯ãŒãã§ä¿è·ãããŠããªãã·ã¹ãã ã®äžåœãªäœ¿çšã®ãããã¯ã¯ãããã§ã¯éçºããŸããã
passwd
ãã¹ã¯ãŒãã2åå ¥åãããã¹ã¯ãŒããæ£åžžã«æŽæ°ãããããšã確èªããŸã ã
ãŠãŒã¶ãŒåãæå®ããŠæ°ãããŠãŒã¶ãŒãè¿œå ãïŒãããããéžæã§ããŸãïŒãåãçç±ã§ç®¡çè æš©éãšãã¹ã¯ãŒããä»äžããŸãããŸããArchã®çŸåšã®ããŒãžã§ã³ã®ã«ãŒãã§ã¯AURïŒArch Userãªããžããªã¯ãã¡ã€ã³ãªããžããªã«ãªãããã°ã©ã ãå«ãArch LinuxãŠãŒã¶ãŒã³ãã¥ããã£ã®ãªããžããªã§ãïŒïŒ
useradd -m username
nanoã§èšå®ãã¡ã€ã«/ etc / sudoersãç·šéããŸãã
EDITOR=nano visudo
ãroot ALL =ïŒALLïŒALLããšããè¡ã®çŽåŸã«å¥ã®è¡ãè¿œå ããŸãã
username ALL=(ALL) ALL
ãŠãŒã¶ãŒåã®ãã¹ã¯ãŒããèšå®ããŸãã
passwd username
次ã«ãããŒãããŒããŒãå éšãã©ã€ãã«ã€ã³ã¹ããŒã«ããŠãã·ã¹ãã ãããããåç¬ã§ããŒãã§ããããã«ããå¿ èŠããããŸãã GRUBãããŒããŒãšããŠäœ¿çšããããšããå§ãããŸããããã¯ãåŸã§åã³äŸ¿å©ã«ãªãããã§ãã Archlinuxã®æšæºpacmanããã±ãŒãžãããŒãžã£ãŒã䜿çšããŠããã±ãŒãžãã€ã³ã¹ããŒã«ããŸãã
pacman -S grub
ããŒãããŒããŒã¯ãå éšãã©ã€ãã®MBRïŒãã¹ã¿ãŒããŒãã¬ã³ãŒãïŒã«æžã蟌ã¿ãŸãã
grub-install --target=i386-pc --force --recheck /dev/sda
ãã¹ãŠãããŸããã£ãå Žåã ã€ã³ã¹ããŒã«ãå®äºããããšãããããŸãã ãšã©ãŒã¯å ±åãããŠããŸãã ã
chrootã®çµäºïŒ
exit
ãããŠãã³ãã³ãã©ã€ã³ããã³ãããã©ã®ããã«å€åãããã確èªããŸãã
ãã£ã¹ã¯ã©ãã«ã䜿çšããŸããããã®ã¹ããŒãã¡ã³ãã®è©³çŽ°ãªèª¬æã¯åŸã§èª¬æããŸãã
ãã©ã€ãUUIDã䜿çšãããªãããã«ã GRUB_DISABLE_LINUX_UUID = trueã®è¡ã®ã³ã¡ã³ããå€ããŸã ã
nano $root/etc/default/grub
arch-chrootã䜿çšããŠããŒãããŒããŒèšå®ãã¡ã€ã«ãå床çæããŸãã ãã°ã€ã³ãã1ã€ã®ã³ãã³ããå®è¡ããŠãèªåçã«çµäºããŸãã
arch-chroot $root grub-mkconfig --output=/boot/grub/grub.cfg
æ§æãã¡ã€ã«ã§/ dev / sda1ãžã®ãã¹ãŠã®åç §ãLABEL = HABRã«çœ®ãæããå¿ èŠããããŸãã
mv $root/boot/grub/grub.cfg $root/boot/grub/grub.cfg.autoconf && cat $root/boot/grub/grub.cfg.autoconf | sed 's/\(root=\)\/dev\/sda1/\1LABEL=HABR/g' > $root/boot/grub/grub.cfg
set lang = en_USã®è¡ãå€æŽããŠåããã¡ã€ã«ã§lang = ru_RUãèšå®ãããšãããŒãããŒããŒã¯åªãã匷åãªéä¿¡ãè¡ããŸãã
-Lã¹ã€ããã䜿çšããŠfstabãã¡ã€ã«ãçæããŸããããã«ããããžã§ãã¬ãŒã¿ãŒã«ãã£ã¹ã¯ã©ãã«ã®äœ¿çšã匷å¶ããŸãã
genfstab -p -L $root > $root/etc/fstab
ããã§ArchLinuxã®åºæ¬çãªã€ã³ã¹ããŒã«ãå®äºããŸããã ã·ã¹ãã ã¯èªåçã«èµ·åãããã¬ã³ããªãŒãªãã·ã¢èªã®ã³ãã³ãã©ã€ã³ã€ã³ã¿ãŒãã§ã€ã¹ã§ããªããæè¿ããŸãã ãã®åŸã«dhcpcdã³ãã³ããå ¥åãããšãã»ãšãã©ã®å Žåã€ã³ã¿ãŒããããæ©èœããŸãã ããããä»ã®ãšãããåèµ·åãæ¥ãããšã¯ãããŸããã
äŸãšããŠNTPããã³SSHã䜿çšããŠsystemdã䜿çšããèµ·åæã®èµ·å
ã·ã¹ãã ã¯ä»ã®ã³ã³ãã¥ãŒã¿ãŒãšéä¿¡ãããããæéãåæããå¿ èŠããããŸãã ãµãŒããŒãšã¯ã©ã€ã¢ã³ãã®æéãç°ãªãå Žåãäºãã«æ¥ç¶ã§ããªããªãå¯èœæ§ãé«ããªããŸãã åæ§ã«ãsudoã¯åã¢ã¯ã·ã§ã³ã®åŸã«ãã¹ã¯ãŒãã®èŠæ±ãéå§ããå Žåããããèš±å¯ã¿ã€ã ã¢ãŠããé·ãæéåãã«ãªã£ããšèããŸãã ãããŠãç§ãã¡ããŸã çŽé¢ããªããã°ãªããªãããšã誰ãç¥ã£ãŠããŸããïŒ å®å šã§ããã
NTPçµç±ã§ã€ã³ã¿ãŒãããçµç±ã§ãµãŒããŒãšæå»ãåæããã«ã¯ãäžè¶³ããŠããããã±ãŒãžãã€ã³ã¹ããŒã«ããå¿ èŠããããŸãã arch-rootã䜿çšã§ããŸãããæ°ããã€ã³ã¹ããŒã«å Žæãããã±ãŒãžãããŒãžã£ãŒã«äŒããããŒã䜿çšããŠååŸããŸãã
pacman --root $root --dbpath $root/var/lib/pacman -S ntp
ãã·ã¢ã®ãµãŒããŒããæ£ç¢ºãªæéãèšå®ããŸãã
mv $root/etc/ntp.conf $root/etc/ntp.conf.old && cat $root/etc/ntp.conf.old | sed 's/\([0-9]\).*\(.pool.ntp.org\)/\1.ru\2/g' | tee $root/etc/ntp.conf
ããŒãæã«äžåºŠæéãåæããã ãã§ååã§ãã 以åã¯ãæ£ç¢ºãªã¿ã€ã ãµãŒãã¹ã®éå§ãrc.localãã¡ã€ã«ã«èšé²ããŠããŸããããã·ã¹ãã ãšãµãŒãã¹ãããŒãžã£ãŒsystemdã衚瀺ãããã·ã¹ãã ã®èµ·åæéãççž®ããããã«ïŒå ã ã¯ãŠããããšåŒã°ããïŒãµãŒãã¹ãéå§ããããšããŸããã åœç¶ããããµãŒãã¹ã®ããã©ãŒãã³ã¹ã¯å¥ã®ãµãŒãã¹ã®æ©èœã«äŸåããå ŽåããããŸãã ããšãã°ããããã¯ãŒã¯ãã³ã³ãã¥ãŒã¿ãŒäžã§åäœãéå§ããåã«ãã€ã³ã¿ãŒããããä»ããŠæå»ãåæããããšããããšã¯åœ¹ã«ç«ã¡ãŸããã å®è¡å¯èœãã¡ã€ã«ã®ååãåã«èª¬æããã ãã§ã¯ãããããã¹ãŠã®é¢ä¿ã説æããã®ã«ååã§ã¯ãªããããsystemdããå§ããããšã¯éåžžã«éèŠãªäœæ¥ã«ãªããŸããã ãã®ç®çã®ããã«ãæ¡åŒµåãã.serviceãã®ç¹å¥ãªãã¡ã€ã«ãäœæãããŸããã ãããã¯ãäŸåé¢ä¿ãå®è¡å¯èœãã¡ã€ã«åãããã³èµ·åãæåãããããã«èæ ®ããå¿ èŠããããã®ä»ã®ãã©ã¡ãŒã¿ãŒã瀺ããŸãã ç¹ã«ãsystemdã®èªã¿èŸŒã¿ã¹ããŒãžãå¶åŸ¡ããããã«ãã¿ãŒã²ããã䜿çšãããŸããããã¯ãå²ãåœãŠãããã¿ã¹ã¯ã®ã©ã³ã¬ãã«ã¬ãã«ã«äŒŒãŠããŸãã wikiã®è©³çŽ°ãèªãã§ãã ããã
åå¿è ã«åã°ããããã«ãntpdate.serviceã¯ãã§ã«ntpããã±ãŒãžã§æäŸãããŠããŸãã ãµãŒãã¹ã®èµ·åãèšè¿°ãããã¹ãŠã®ãã¡ã€ã«ã¯$ root / usr / lib / systemd / system /ãã©ã«ããŒã«ãããä»»æã®ããã¹ããšãã£ã¿ãŒã§éãããéåžžã®æ¹æ³ã§è¡šç€ºã§ããŸãã ããã§ãããšãã°ã$ root / usr / lib / systemd / system / ntpdate.serviceïŒ
[Unit] Description=One-Shot Network Time Service After=network.target nss-lookup.target Before=ntpd.service [Service] Type=oneshot PrivateTmp=true ExecStart=/usr/bin/ntpd -q -n -g -u ntp:ntp [Install] WantedBy=multi-user.target
[Unit]ãããã¯ã®[Description]è¡ã«ããµãŒãã¹ã®ç°¡åãªèª¬æã衚瀺ãããã©ã®æ¡ä»¶ã§ãµãŒãã¹ãéå§ããå¿ èŠããããŸãïŒãã®å Žåããããã¯ãŒã¯ãéå§ããåŸãNTPãµãŒããŒãéå§ããåã«éå§ããŸãïŒã æ£ç¢ºãªæéèŠæ±ã¯ããŒãæã«1åã ãçºçãã[Service]ãããã¯ã®Type = oneshotè¡ããããæ åœããŸãã åããããã¯ã®è¡ExecStartã¯ããµãŒãã¹ãéå§ããããã«å®è¡ããå¿ èŠãããã¢ã¯ã·ã§ã³ã瀺ããŸãã ãã®å Žåã®[ã€ã³ã¹ããŒã«]ãããã¯ã§ã¯ãmulti-user.targetã®ç®æšãéæããããã«ãµãŒãã¹ã®èµ·åãå¿ èŠã§ããããšã瀺ããŠããŸãã [Install]ãããã¯ãšåãã³ã³ãã³ãã䜿çšããŠãæ¥æ倧工ãµãŒãã¹ãéå§ããããšããå§ãããŸãã
æåã®å®çšçãªäŸãšããŠãntpdate.serviceã®æ©èœãå°ãæ¡åŒµããããŒããŠã§ã¢ã¯ããã¯ã®æå»ãããã«ä¿®æ£ããããã«äŸé ŒããŸãã ãã®åŸãåãã³ã³ãã¥ãŒã¿ãŒã§Windowsãèµ·åãããšãGMTæéã衚瀺ããããããå¿é ããå¿ èŠã¯ãããŸããã
systemdãµãŒãã¹ã®æšæºåäœã®å€æŽã¯æ¬¡ã®ãšããã§ããæåã«ã/ etc / systemd / system /ãã©ã«ããŒã«ããµãŒãã¹ã®ãã«ããŒã ãšæ¡åŒµåã.dãã§æ°ãããã£ã¬ã¯ããªãäœæãããŸããããã§ãä»»æã®ååãšæ¡åŒµåã.confããæã€ãã¡ã€ã«ãè¿œå ããããã§ã«ããã«ãããŸãå¿ èŠãªå€æŽãè¡ãããŸãã ç¶è¡ïŒ
mkdir -p $root/etc/systemd/system/ntpdate.service.d && echo -e '[Service]\nExecStart=/usr/bin/hwclock -w' > $root/etc/systemd/system/ntpdate.service.d/hwclock.conf
ãµãŒãã¹ãéå§ããçŽåŸã«ãã³ãã³ãã/ usr / bin / hwclock -wããå®è¡ãããšãããŒããŠã§ã¢ã¯ããã¯ãå€æããããšããã ãã§ãã
èªåèªã¿èŸŒã¿ã«ntpdateãµãŒãã¹ãè¿œå ããŸãïŒæ§æã¯ãã¹ãŠã®ãµãŒãã¹ã®æšæºã§ãïŒã
arch-chroot $root systemctl enable ntpdate Created symlink from /etc/systemd/system/multi-user.target.wants/ntpdate.service to /usr/lib/systemd/system/ntpdate.service.
ã芧ã®ãšãããntpdate.serviceãã¡ã€ã«ãžã®éåžžã®ã·ã³ããªãã¯ãªã³ã¯ãmulti-user.target.wantsãã£ã¬ã¯ããªã«äœæããããã®ãã¡ã€ã«èªäœã®[Install]ãããã¯ã«multi-user.targetã¿ãŒã²ããã®èšè¿°ããããŸããã ã·ã¹ãã ãmulti-user.targetã®ç®æšãéæããã«ã¯ãmulti-user.target.wantsãã£ã¬ã¯ããªããã®ãã¹ãŠã®ãµãŒãã¹ãéå§ããå¿ èŠãããããšãããããŸãã
åãæ¹æ³ã§SSHããã±ãŒãžãã€ã³ã¹ããŒã«ããŸãïŒArchLinuxã§ã¯opensshãšåŒã°ããŸãïŒïŒ
pacman --root $root --dbpath $root/var/lib/pacman -S openssh
ãã ããä»åã¯èªåå®è¡ã®ããã«ããœã±ããã䜿çšããŠãæ¥ç¶èŠæ±ãåä¿¡ããåŸã«ã®ã¿SSHãµãŒããŒãèµ·åããRAMã®ãããããŒãããã³ã°ããªãããã«ããŸãã
arch-chroot $root systemctl enable sshd.socket
æšæºã®22çªç®ã®ããŒããå€æŽããããããã³ã«2ã®åŒ·å¶äœ¿çšãæå¹ã«ããŸããã§ãã-ç§ã®è¯å¿ã®ãŸãŸã«ããŠãããŸãã
å°æ¥ãèŠæ®ããããŸãã¯ããã¯ãç¥ã
èŠãã«å°æ¥ã®ãµãŒããŒã«æ¥ç¶ããã«ã¯ããã®IPã¢ãã¬ã¹ãç¥ãå¿ èŠããããŸãã ãã®ã¢ãã¬ã¹ãéçã§ããã°ãã¯ããã«ç°¡åã«ãªããŸãã ãŠã£ãã«èšèŒãããŠããéåžžã®æ¹æ³ã¯ãç§ãã¡ã«ã¯é©ããŠããŸããã åé¡ã¯ãçŸä»£ã®ãããã¯ãŒã¯ã¢ããã¿ãŒã¯ããã¶ãŒããŒãäžã®ç©ççãªå Žæã«åºã¥ããŠååãä»ããããŠããããšã§ãã ããšãã°ãããã€ã¹åenp0s3ã¯ã3çªç®ã®ã¹ãããã®ãŒãPCIãã¹äžã«ããã€ãŒãµããããããã¯ãŒã¯ã¢ããã¿ãŒã§ããããšãæå³ããŸãïŒè©³çŽ°ã¯ãã¡ã ïŒã ããã¢ããã¿ãå¥ã®ã¢ããã¿ãšäº€æãããšãã«ãã·ã¹ãã å ã®ããã€ã¹åãå€ãããªãããã«äœæãããŠããŸãã ãã¶ãŒããŒãã®ã¢ãã«ã«ãã£ãŠãããã¯ãŒã¯ã«ãŒãã®äœçœ®ãç°ãªãå Žåãããããããã®åäœã¯æãŸãããããŸããããŸããVirtualBoxããå®éã®ããŒããŠã§ã¢ã«ããŒããµãŒããŒã転éããããšãããšãã»ãšãã©ã®å Žåããããã¯ãŒã¯ãé©åã«æ§æããããã«ããŒããŒããšã¢ãã¿ãŒã§èµ·åããå¿ èŠããããŸãã ãããã¯ãŒã¯ã¢ããã¿åã¯ãããšãã°eth0ïŒãã®å Žæã¯çµµæåã«ãã£ãŠäºçŽãããŠããŸãïŒãªã©ãããäºæž¬å¯èœã«ãªãããã«å¿ èŠã§ãã
ãªããããè¡ãã®ã§ããããïŒ
ããã€ã¹åã®åé¡ã«å¯Ÿãããããšã¬ã¬ã³ããªè§£æ±ºçãããããšã¯ééããããŸãããã次ã®ãªãã·ã§ã³ã¯ãLinuxãããŒãããäžè¬çãªåçã瀺ãã®ã«éåžžã«é©ããŠããããšãããããŸããã ã³ã¡ã³ãã§ãã¹ãããæ¹æ³ã«æ
£ããããšãå¿ããªãã§ãã ããã
mkinitcpio-nfs-utilsããã±ãŒãžãã€ã³ã¹ããŒã«ãããšããnetããšããããã¯ãäœæãããŸãã
pacman --root $root --dbpath $root/var/lib/pacman -S mkinitcpio-nfs-utils
ããã©ã«ãã§ã¯ããã¹ãŠã®ãã³ãã©ãã¡ã€ã«ã¯/ usr / lib / initcpio /ã«åé¡ãããŸãã éåžžããããã¯åãååã®ãã¢ã®ãã¡ã€ã«ã§ã1ã€ã¯ã€ã³ã¹ããŒã«ãµããã£ã¬ã¯ããªã«è¡šç€ºããããã1ã€ã¯ããã¯ã«è¡šç€ºãããŸãã ãã¡ã€ã«èªäœã¯éåžžã®ã¹ã¯ãªããã§ãã éåžžãhooksãã©ã«ããŒã®ãã¡ã€ã«ã¯initramfsãã¡ã€ã«å ã«æ ŒçŽããïŒåŸã§è©³ãã説æããŸãïŒãã·ã¹ãã ã®ããŒãæã«å®è¡ãããŸãã ãã¢ã®2çªç®ã®ãã¡ã€ã«ã¯ãã€ã³ã¹ããŒã«ãã©ã«ããŒã«é 眮ãããŸãã ãã®å éšã«ã¯buildïŒïŒé¢æ°ããããŸããããã«ã¯ãinitramfsãã¡ã€ã«çæäžã«å®è¡ããã¢ã¯ã·ã§ã³ã«é¢ããæ å ±ãšããã®ãã³ãã©ãŒã®ç®çã説æããhelpïŒïŒé¢æ°ãå«ãŸããŠããŸãã æ··ä¹±ããŠããå Žåã¯ãèªã¿é²ããŠãã ããããã®æ®µèœã§è¿°ã¹ãããŠããããšã¯ãã¹ãŠé©åãªäœçœ®ã«åãŸããŸãã
initcpioãã©ã«ããŒã¯/ etcãã£ã¬ã¯ããªãŒã«ãååšããã€ã³ã¹ããŒã«ããã³ããã¯ã®ãµããã£ã¬ã¯ããªãŒããããŸãã åæã«ã/ usr / lib / initcpioãããç¡æ¡ä»¶ã®åªå é äœããããŸããã€ãŸããäž¡æ¹ã®ãã©ã«ãã«åãååã®ãã¡ã€ã«ã衚瀺ãããå Žåãinitcpioãçæãããšãã/ usr / lib / initcpioããã§ã¯ãªã/ etc / initcpioããã®ãã¡ã€ã«ã䜿çšãããŸãã
ããããã³ãã©ãŒã®æ©èœãå°ãå€æŽããå¿ èŠãããããã/ usr / lib / initcpioãã/ etc / initcpioã«ãã¡ã€ã«ãã³ããŒããã ãã§ãã
cp $root/usr/lib/initcpio/hooks/net $root/etc/initcpio/hooks/ && cp $root/usr/lib/initcpio/install/net $root/etc/initcpio/install/
ããã¯/ããããã¡ã€ã«ã次ã®åœ¢åŒã«ããŸãã
cat $root/etc/initcpio/hooks/net # vim: set ft=sh: run_hook() { if [ -n "$ip" ] then ipconfig "ip=${ip}" fi } # vim: set ft=sh ts=4 sw=4 et:
ãã¡ã€ã«$ root / etc / initcpio / install / netãéããŠãhelpïŒïŒé¢æ°ãipå€æ°ã®å 容ãå®å šã«ç€ºããŠããããšã確èªããŸãã
ip=<client-ip>:<server-ip>:<gw-ip>:<netmask>:<hostname>:<device>:<autoconf>
ã192.168.1.100::192.168.1.1:255.255.255.0::eth0:noneãã®ããã«ãå€æ°å€ãèšå®ããŠéçIPã¢ãã¬ã¹ãšãããã¯ãŒã¯ããã€ã¹ã®ååãèšå®ããã ãã§ãïŒä»¥éãé©åãªãããã¯ãŒã¯èšå®ã䜿çšããŠãã ããïŒã 次ã®ã»ã¯ã·ã§ã³ã§ã¯ãå€ãèšå®ãããŠããæ£ç¢ºãªå Žæã確èªããŸãã
ãããŸã§ã¯ããã¡ã€ã«$ root / etc / initcpio / install / netããäžèŠãªãã®ããã¹ãŠåé€ããŸãã ãããã¯ãŒã¯ããã€ã¹ã¢ãžã¥ãŒã«ãäžèšã§äœ¿çšããipconfigããã°ã©ã ããããŠãã¡ãããã¹ã¯ãªããèªäœã¯hooksãã©ã«ããŒããããŒãããŸããããã¯ãã¹ãŠã®äž»èŠãªäœæ¥ãè¡ããŸãã 次ã®ãããªãã®ãåŸãããŸãã
cat $root/etc/initcpio/install/net #!/bin/bash build() { add_checked_modules '/drivers/net/' add_binary "/usr/lib/initcpio/ipconfig" "/bin/ipconfig" add_runscript } help() { cat <<HELPEOF This hook loads necessary modules for a network device. Manually configures network and freezes network device name. HELPEOF } # vim: set ft=sh ts=4 sw=4 et:
èµ·åäžã«ãsystemd-udevdããã€ã¹ãããŒãžã£ãŒããããã¯ãŒã¯ããã€ã¹ã®ååããenp0s3ãªã©ã®äœ¿ãæ £ããäºæž¬å¯èœãªãããã¯ãŒã¯ã€ã³ã¿ãŒãã§ã€ã¹åã«å€æŽããããšãããšã倱æããŸãã ãªã-èªãã§ãã ããã
ã·ã¹ãã ã®èµ·åæ¹æ³
ç°¡åã«ããããã«ãéåžžã®BIOSãæ€èšããŠãã ããã é»æºãå ¥ããŠåæåãããšãBIOSã¯ããŒãå¯èœãªããã€ã¹ã®ãªã¹ããé çªã«èª¿ã¹ãããŒãå¶åŸ¡ã転éããå ã®ããŒãããŒããŒãèŠã€ãããŸã§éå§ããŸãã
ãã©ã€ãã®MBRã«èšé²ãããŸãã«ãã®ãããªããŒãããŒããŒã GRUBã䜿çšãããã®èšå®ïŒgrub.cfgãã¡ã€ã«ïŒã§ãã«ãŒãããŒãã£ã·ã§ã³ãHABRãšããã©ãã«ã®ãã£ã¹ã¯äžã«ããããšã瀺ããŸããã è¡å šäœã¯æ¬¡ã®ãšããã§ãã
linux /boot/vmlinuz-linux root=LABEL=HABR rw quiet
ããã§ã¯ãvmlinuz-linuxãã¡ã€ã«ã«ã€ããŠèª¬æããŸããããã¯ã·ã¹ãã ã®ã³ã¢ã§ãããã«ãŒãã·ã¹ãã ãžã®ãã€ã³ã¿ãŒã¯ãã®ãã©ã¡ãŒã¿ãŒã§ãã HABRãšããã©ãã«ã®ä»ããããã€ã¹ã§ã«ãŒãã·ã¹ãã ãæ€çŽ¢ããããã«ãé¡ãããŸãã åãã©ã€ãã«äžæã®UUIDãååšããããšããããŸããããã®å Žåãã·ã¹ãã ãå¥ã®ãã©ã€ãã«è»¢éãããšãã«ãééããªãå€æŽããå¿ èŠããããŸãã Linuxoidsã®éåžžã®æ¹æ³ã§ã«ãŒãã·ã¹ãã ã®äœçœ®ã瀺ããå ŽåïŒ/ dev / sda1ããã®ååã¯USBãã©ã€ããã³ã³ãã¥ãŒã¿ãŒã®å¯äžã®ãã©ã€ããšããŠååŸãããããUSBãã©ã€ãããèµ·åããããšã¯ã§ããŸããã ã³ã³ãã¥ãŒã¿ãŒã«HABRãšããã©ãã«ã®ä»ããå¥ã®ãã©ã€ããååšããããšã¯ãŸããããŸããããå¿ããªãã§ãã ããã
ããã§ã¯ãã°ããŒãã«å€æ°ãipãã®å€ããnetããã³ãã©ãŒã«èšå®ãããŠããŸãïŒãããã¯ãŒã¯ã§äœ¿çšãããŠããã¢ãã¬ã¹ã«å€æŽããããšãå¿ããªãã§ãã ããïŒã
linux /boot/vmlinuz-linux root=LABEL=HABR rw quiet ip=192.168.1.100::192.168.1.1:255.255.255.0::eth0:none
次ã®è¡ã«ã¯ãinitramfsãã¡ã€ã«ã«ã€ããŠã®èšåããããŸãã
initrd /boot/initramfs-linux.img
次ã«ãããŒãæã«æ¬¡ã®ããšãè¡ãããŸããGRUBããŒãããŒããŒã¯vmlinuzãã¡ã€ã«ãšinitramfsãã¡ã€ã«ãåãåããã«ãŒããã¡ã€ã«ã·ã¹ãã ãæ¢ãå ŽæãäŒããããã«ããŒããå¶åŸ¡ããŸãã
initramfsãšããååã¯ãåæramãã¡ã€ã«ã·ã¹ãã ã«ç±æ¥ããŸãã ããã¯å®éã«ã¯ãã¢ãŒã«ã€ãã«ããã±ãŒãžåãããéåžžã®Linuxã«ãŒããã¡ã€ã«ã·ã¹ãã ã§ãã ããŒãæã«RAMã«ãããã€ãããçµæãšããŠããŒãããããšããŠããLinuxã®ã«ãŒããã¡ã€ã«ã·ã¹ãã ãèŠã€ããŠæºåããããã«èšèšãããŠããŸãã Initramfsã«ã¯ããããã®ç®çã«å¿ èŠãªãã®ããã¹ãŠæã£ãŠããŸããããã¯ãå€ãã®éåžžã®ã³ãã³ããå®è¡ã§ããå®éã®ãå°ããªLinuxãã ããã§ãã ãã®æ©èœã¯ãLinuxã®æ°ããã«ãŒããã¡ã€ã«ã·ã¹ãã ã®åœ¢æã«åœ¹ç«ã€ããã¯ã®å©ããåããŠæ¡åŒµãããŸãã
initramfsããã®ããã°ã©ã ãäœæ¥ãå®äºãããšãããã«ããŒãå¶åŸ¡ãæºåãããã«ãŒããã¡ã€ã«ã·ã¹ãã ã®initããã»ã¹ã«è»¢éãããŸãã Archlinuxã¯systemdãinitããã»ã¹ãšããŠäœ¿çšããŸãã
systemd-udevdããã€ã¹ãããŒãžã£ãŒã¯systemdã®äžéšã§ãã 圌ã¯å ãšåãããã«ãã·ã¹ãã å ã®ãã¹ãŠã®ããã€ã¹ã䞊è¡ããŠæ€åºããã³æ§æããããšããŸãã 圌ã¯æåã®äœæ¥ã®1ã€ãéå§ããŸãããããã¯ãããããã³ãã©ãŒãinitramfsã¹ããŒãžã§ãããã¯ãŒã¯ã«ãŒããåæåããåŸã«éããŸãã ãããã£ãŠãsystemd-udevdã¯äœ¿çšãããŠããããã€ã¹ã®ååãå€æŽã§ãããååeth0ã¯æäœã®å šæéã«ããã£ãŠãããã¯ãŒã¯ã«ãŒãã«ãã£ãŠä¿æãããŸãã
initramfsã®èª¿ç
initramfsãã¡ã€ã«ãäœæããã«ã¯ãæåã«ã€ã³ã¹ããŒã«ããããŒã¹ããã±ãŒãžã«å«ãŸããŠããmkinitcpioããã°ã©ã ã䜿çšããŸãã èšå®ã¯$ root / etc / mkinitcpio.confãã¡ã€ã«ã«ãããããªã»ããã¯/etc/mkinitcpio.dãã©ã«ããŒã«ãããŸãã ã«ãŒããã¡ã€ã«ã·ã¹ãã ãèŠã€ããŠæºåã§ããããã«initramfsãäœæããå¿ èŠããããŸããããã«ãããsystemdãäœæ¥ãéå§ããŸãã èãããããã¹ãŠã®ãªãã·ã§ã³ãèæ ®ããå¿ èŠã¯ãããŸãããinitramfsãã¡ã€ã«ã®ãµã€ãºã倧ããããªãã®ã«æãå¿ èŠãªãã®ã ãã§ååã§ãã 詳现ã¯ãã¡ãwiki.archlinux.org/index.php/Mkinitcpio
å¿ ãèªåæ€åºãã³ãã©ãåé€ããŠãã ããã ãã®ç¹å®ã®ã³ã³ãã¥ãŒã¿ãŒã«ã€ã³ã¹ããŒã«ãããŠããããã€ã¹ããã§ãã¯ãããããã«å¿ èŠãªã¢ãžã¥ãŒã«ã®ã¿ãinitramfsã«æ®ããŸãã ã·ã¹ãã ãå¥ã®ã³ã³ãã¥ãŒã¿ãŒã«ããã«è»¢éããå¯èœæ§ãæåã«èæ ®ããããã䜿çšããä»®æ³ãã·ã³ãšããŒããŠã§ã¢ãç°ãªãå¯èœæ§ãé«ããããããã¯å¿ èŠãããŸããã
äœæããããããå«ããç®çã«ååãªãã³ãã©ãŒã®ãªã¹ãã¯æ¬¡ã®ãšããã§ãã
HOOKS="base udev net block filesystems"
ãã®è¡ãmkinitcpio.confãã¡ã€ã«ã«æ¿å ¥ããå€ãè¡ã«ã³ã¡ã³ãããŸãã
nano $root/etc/mkinitcpio.conf
æšæºã®Linuxããªã»ããã«åºã¥ããŠãhabrããªã»ãããäœæããŸãã
cp $root/etc/mkinitcpio.d/linux.preset $root/etc/mkinitcpio.d/habr.preset
ãããŠããã®ãã©ãŒã ã«ããããããããŸãïŒ
cat $root/etc/mkinitcpio.d/habr.preset ALL_config="/etc/mkinitcpio.conf" ALL_kver="/boot/vmlinuz-linux" PRESETS=('default' ) default_image="/boot/initramfs-linux.img"
ãã©ãŒã«ããã¯ãã©ã³ãã¯å¿ èŠãããŸããããã©ãŒã«ããã¯ãã©ã³ãã¯ãã³ãã©ãŒããèªåæ€åºãåé€ããŸããæ¢ã«åé€ãããŠãããããç°ãªãååã®åãinitramfsãã¡ã€ã«ã2åçæããå¿ èŠã¯ãããŸããã
habrããªã»ããã䜿çšããŠæ°ããinitramfsãçæããŸãã
arch-chroot $root mkinitcpio -p habr
systemdã§äœ¿çšããDNSæŽæ°ãµãŒãã¹ã®äœæ
ãããã¯ãŒã¯ã«ãŒãã¯ããããã¯ãŒã¯ãšã€ã³ã¿ãŒããããæ©èœããããã®ãã¹ãŠã®èšå®ãåãåããŸãã ãã ãããµã€ãã®ååã¯IPã¢ãã¬ã¹ã«å€æãããŸãããããã¯ãã·ã¹ãã ãããã«äœ¿çšããDNSãµãŒããŒãèªèããŠããªãããã§ãã ãããã®ç®çã®ããã«ãããŒãæã«systemdãéå§ããç¬èªã®ãµãŒãã¹ãäœæããŸãããããŠãäœãæ°ããããšãåŠã³ãå調ããéå±ãããªãããã«ããããã¯ãŒã¯ããã€ã¹ã®ååã«é¢ããæ å ±ããã©ã¡ãŒã¿ãŒãšããŠè»¢éããDNSãµãŒããŒã®ãªã¹ããå€éšãã¡ã€ã«ã«ä¿åããŸãã
DNSãµãŒããŒæ å ±ã¯ãresolvconfã«ãã£ãŠæŽæ°ãããŸããæ§æã¯ç§ãã¡ã«æé©ã§ãïŒ
resolvconf [-m metric] [-p] -a interface <file
ããã§ã€ã³ããŒãããããã¡ã€ã«ã§ã¯ãåãµãŒããŒã®IPã¢ãã¬ã¹ãããŒã¯ãŒãnameserverã®åŸã®æ°ããè¡ã«ç€ºãããŠããŸãã奜ããªã ããµãŒããŒãæå®ã§ããŸãããæåã®3ã€ã ãã䜿çšãããŸããäŸãšããŠYandexãµãŒããŒã䜿çšããŸãããã®å Žåãresolvconfã«æž¡ããããã¡ã€ã«ã¯æ¬¡ã®ããã«ãªããŸãã
nameserver 77.88.8.8 nameserver 77.88.8.1
ã·ã¹ãã ããããã¯ãŒã¯ãå®å šã«åäœããŠããããšã確èªããåãã€ãŸãnetwork.targetã®ç®æšã«å°éããåã«ãDNSãµãŒããŒã«é¢ããæ å ±ãååŸããå¿ èŠããããŸããããŒãæã«äžåºŠãµãŒããŒæ å ±ãæŽæ°ããã ãã§ååã§ãããšæ³å®ããŠããŸãããããŠæšæºçã«ãç§ãã¡ã®ãµãŒãã¹ã«ã¯multi-user.targetã¿ãŒã²ãããå¿ èŠã ãšèšããŸãã次ã®å 容ã®ãã£ã¬ã¯ããªã«ãµãŒãã¹èµ·åãã¡ã€ã«ãäœæããŸãã
cat $root/etc/systemd/system/update_dns@.service [Unit] Description=Manual resolvconf update (%i) Before=network.target [Service] Type=oneshot EnvironmentFile=/etc/default/dns@%i ExecStart=/usr/bin/sh -c 'echo -e "nameserver ${DNS0}\nnameserver ${DNS1}" | resolvconf -a %i' [Install] WantedBy=multi-user.target
ExecStartè¡ã§echoã³ãã³ããå®è¡ããŸãããã®ã³ãã³ãã¯ããµãŒããŒã®ãªã¹ããå«ããã¡ã€ã«ããã®å Žã§çæãããã€ãã©ã€ã³ãä»ããŠresolvconfãæž¡ããŸããäžè¬ã«ãExecStartè¡ã§è€æ°ã®ã³ãã³ãã䜿çšããããšã¯ã§ããŸãããããã«ããã€ãã©ã€ã³ã䜿çšããããšã¯ã§ããŸãããããããã®ã³ãã³ãã-cãã©ã¡ãŒã¿ãŒãšããŠ/ usr / bin / shã«æž¡ãããšã«ãããã ãããã ãŸãããŸããã
ãã¡ã€ã«ã®ååupdate_dns @ .serviceã¯@èšå·ã䜿çšããããšã«æ³šæããŠãã ããããã®åŸã«å€æ°ãæå®ã§ãããïŒ iãã眮ãæããŠãã¡ã€ã«å ã«é 眮ãããŸãããããã£ãŠãEnvironmentFile = / etc / default / dns @ïŒ iãšããè¡ã¯ãEnvironmentFile = / etc / default / dns @ eth0ã«ãªããŸããããã¯ãå€æ°DNS0ããã³DNS1ã®å€ãæ ŒçŽããããã«äœ¿çšããå€éšãã¡ã€ã«ã®ååã§ããæ§æã¯ãéåžžã®ã¹ã¯ãªããã®ãããªãã®ã§ãïŒãå€æ°å=å€æ°å€ãããã¡ã€ã«ãäœæããŸãã
nano $root/etc/default/dns@eth0
ãããŠã次ã®è¡ãè¿œå ããŸãã
DNS0=77.88.8.8 DNS1=77.88.8.1
ããã§ã@ã®åŸã«ãããã¯ãŒã¯ã«ãŒãã®ååãæå®ããããšãå¿ããã«ããªãŒãããŒãã«ãµãŒãã¹ãè¿œå ããŸãã
arch-chroot $root systemctl enable update_dns@eth0.service
ãµãŒãã¹ãéå§ã§ãããŠãããŒãµã«ãã¡ã€ã«ãäœæããŸãããæ®éæ§ã¯ãã·ã¹ãã ã«è€æ°ã®ãããã¯ãŒã¯ã¢ããã¿ãŒãããå Žåããããã®ããããã«å¯ŸããŠç¬èªã®DNSãµãŒããŒãæå®ã§ãããšããäºå®ã«ãããŸããåããã€ã¹ã®ãµãŒããŒã®ãªã¹ããå«ããã¡ã€ã«ã®ã»ãããæºåãã@ã®åŸã®ååãåå¥ã«ç€ºãã¢ããã¿ãŒããšã«ãµãŒãã¹ãéå§ããå¿ èŠããããŸãã
æåã®æã¡äžãå
ããã§åæèšå®ã¯å®äºã§ããã€ã³ã¹ããŒã«ãããArchLinuxãå éšãã©ã€ãããããŠã³ããŒãããŠãå€æŽãæå¹ã«ããå¿ èŠããããŸãã
å®æããã«ãŒãã·ã¹ãã ãç¡å¹ã«ããŸãã
umount $root
ãããŠãä»®æ³ãã·ã³ããªãã«ããŸãã
poweroff
ããã§ãããŒãã€ã¡ãŒãžãCD-ROMããåæããããUSBãã©ãã·ã¥ãã©ã€ããå ¥æããŠããããã·ã³ã®é»æºãå ¥ããŠããã¹ãŠãæ©èœããããšã確èªã§ããŸãã
ç¶ç¶ãšçµäºã