Upgrade to Pro — share decks privately, control downloads, hide ads and more …

小さいLinux環境の作り方

 小さいLinux環境の作り方

割と新しめのカーネルで、フロッピーディスク1枚に収まるLinuxディストリビューションを作る方法を解説します

635e53b96114c922fa5486b418895960?s=128

Fadis

May 09, 2015
Tweet

Transcript

  1. খ͍͞ -JOVY؀ڥͷ ࡞Γํ Naomasa Matsubayashi

  2. อଘ͢ΔΞΠίϯ ϑϩοϐʔσΟεΫ

  3. ೥୅ॳ಄ ϑϩοϐʔσΟεΫʹඞཁͳ෺͕શ෦ೖͬͨ -JOVYσΟετϦϏϡʔγϣϯ͕ྲྀߦͬͨ qPQQJY )"- UPNTSUCU IUUQDISJTTJMNPSEFIBM IUUQqPQQJYDPN IUUQXXXUPNTOFUSC

  4. େମͲͷυϥΠϒͰ΋ಡΊΔ ࠷େͷσΟεΫϑΥʔϚοτ͸,J#ͷ)% ΠϯνϑϩοϐʔσΟεΫͷ༰ྔ % ,J# % ,J# %% .BD ,J#

    %% ,J# %% .BD ,J# %% 1$ ,J# %% ,J# )% 1$ ,J# )% 1$"5 .BD ,J# &% ,J# 5% ,J#
  5. ϒʔτϩʔμʔͱ -JOVYΧʔωϧͱ ϢʔβϥϯυΛ ߹Θͤͯ ,J#ʹऩΊΕ͹Α͍

  6.          

                   Y σϑΥϧτͷΧʔωϧίϯϑΟάͰ Ϗϧυͨ͠ΧʔωϧͷαΠζͷਪҠ CZUFT
  7.          

                 Y ϑϩοϐʔσΟεΫͷ༰ྔͷݶք ݱ࣮తͳΧʔωϧαΠζͷݶք -JOVY༨༟ -JOVY͍ۤ͠ -JOVYઈ๬త CZUFT
  8. ೥݄೔ -JOVY։ൃऴྃ IUUQTMLNMPSHMLNM Date Mon, 9 Apr 2012 15:30:50 +0200

    From Willy Tarreau <> Subject No more Linux 2.4 releases
  9. σϑΥϧτͷΧʔωϧίϯϑΟάͰ Ϗϧυͨ͠-JOVY ,J#

  10. ,J# ࠷খݶͷυϥΠό͚ͩͰ Ϗϧυͨ͠-JOVY 7("ίϯιʔϧ4"5"")$* 64#&)$*0)$*γϦΞϧϙʔτ 64#ετϨʔδ64#)*%FYU *OUFMͱ3FBMUFLͷ/*$υϥΠό*1W

  11. $0/'*(@&91&35 ΧʔωϧͷجຊతͳػೳΛແޮʹͰ͖ΔΑ͏ʹͳΔ

  12. $0/'*(@6*% ೥-JOVYͷϢʔβ*%͕CJU͔ΒCJUʹҠߦ IUUQTXXXLFSOFMPSHEPD%PDVNFOUBUJPOIJHIVJEUYU ݹ͍ιϑτ΢ΣΞͷҝʹ CJUͰ6*%Λ౉͢γεςϜίʔϧ͕࢒͞Ε͍ͯΔ ࠓ೔ͷ-JOVY؀ڥʹͦ͏ͨ͠ιϑτ΢ΣΞ͕ ࢒͍ͬͯΔ͜ͱ͸໓ଟʹͳ͍ CJU6*%ͷγεςϜίʔϧΛαϙʔτ͢Δ

  13. $0/'*(@,"--4:.4 Χʔωϧ͕Ϋϥογϡͨ࣌͠ͷόοΫτϨʔεʹ γϯϘϧ໊͕ग़ΔΑ͏ʹ͢Δ ͋Δ࣌ ͳ͍࣌ ਓ͕ؒಡΊΔ όΠφϦΞϯ͚͕ͩಡΊΔ

  14. Linux version 3.12.8 (root@Grueza) (gcc version 4.7.3 (Gentoo 4.7.3-r1 p1.4,

    pie-0.5.5) ) #2 Sat Feb 22 17:22:05 JST 2014 e820: BIOS-provided physical RAM map: BIOS-e820: [mem 0x0000000000000000-0x000000000009fbff] usable BIOS-e820: [mem 0x000000000009fc00-0x000000000009ffff] reserved BIOS-e820: [mem 0x00000000000f0000-0x00000000000fffff] reserved BIOS-e820: [mem 0x0000000000100000-0x0000000007ffdfff] usable BIOS-e820: [mem 0x0000000007ffe000-0x0000000007ffffff] reserved BIOS-e820: [mem 0x00000000feffc000-0x00000000feffffff] reserved BIOS-e820: [mem 0x00000000fffc0000-0x00000000ffffffff] reserved Notice: NX (Execute Disable) protection cannot be enabled: non- PAE kernel! SMBIOS 2.4 present. e820: last_pfn = 0x7ffe max_arch_pfn = 0x100000 PAT not supported by CPU. init_memory_mapping: [mem 0x00000000-0x000fffff] init_memory_mapping: [mem 0x07800000-0x07bfffff] init_memory_mapping: [mem 0x00100000-0x077fffff] init_memory_mapping: [mem 0x07c00000-0x07ffdfff] 0MB HIGHMEM available. 127MB LOWMEM available. mapped low ram: 0 - 07ffe000 low ram: 0 - 07ffe000 Zone ranges: DMA [mem 0x00001000-0x00ffffff] Normal [mem 0x01000000-0x07ffdfff] HighMem empty Movable zone start for each node Early memory node ranges node 0: [mem 0x00001000-0x0009efff] node 0: [mem 0x00100000-0x07ffdfff] e820: [mem 0x08000000-0xfeffbfff] available for PCI devices Built 1 zonelists in Zone order, mobility grouping on. Total pages: 32412 Kernel command line: console=ttyS0 PID hash table entries: 512 (order: -1, 2048 bytes) Dentry cache hash table entries: 16384 (order: 4, 65536 bytes) $0/'*(@13*/5, Χʔωϧ͕ίϯιʔϧ౳ʹ৘ใΛग़ྗ͢Δػೳ ੾ΔͱΧʔωϧ͕ແޱʹͳΔ ͋Δ࣌ ͳ͍࣌
  15. $0/'*(@#6( Χʔωϧ͕ҟৗΛݕ஌ͨ࣌͠ʹ ΞʔΩςΫνϟຖͷద੾ͳํ๏Ͱ ͦͷ͜ͱΛ௨஌͢Δ࢓૊Έ ੾ΔͱυϥΠό౳͕ ҟৗΛݕ஌ͯ͠΋ ͦͷ··૸Δ

  16. $0/'*(@4:4$5-@4:4$"-- QSPDϑΝΠϧγεςϜಋೖҎલʹ࢖ΘΕ͍ͯͨ QSPDTZTҎԼͷύϥϝʔλʹΞΫηε͢Δํ๏ ۃΊͯݹ͍ιϑτ΢ΣΞͷҝʹ࢒͞Ε͍ͯΔ͕ ·ͱ΋ʹอक͞Ε͓ͯΒͣ ͠͹͠͹Χʔωϧͷมߋ͔Βஔ͖ڈΓʹ͞ΕΔ NBOͷઆ໌͕ %POPUVTFUIJT TZTUFNDBMM

  17. $0/'*(@&-'@$03& ϢʔβۭؒͰϓϩηε͕Ϋϥογϡͨ࣌͠ʹ ίΞμϯϓΛੜ੒͢Δػೳ $0/'*(@1$41,3@1-"5'03. 1$εϐʔΧʔυϥΠό $0/'*(@#"4&@'6-- ΧʔωϧͷԿΒ͔ͷߏ଄ମʹ ແͯ͘΋Կͱ͔ͳΔཁૉΛؚΊΔ͔൱͔ͷઃఆΒ͍͠ ͔͠͠YͰ࢖͍ͬͯΔՕॴ͸ݟ͚ͭΒΕͳ͔ͬͨ

  18. $0/'*(@'65&9 GVUFYΛ࢖͑ΔΑ͏ʹ͢Δ ڞ༗ϝϞϦΛ࢖͏৔߹౳ʹ ϓϩηεΛލ͍ͰϩοΫΛߦ͏ඞཁ͕͋Δ ͜ͷͨΊʹΧʔωϧ͕ఏڙ͍ͯ͠Δͷ͕ GBTUVTFSTQBDFNVUFYFT ུͯ͠GVUFY IUUQMXOOFU"SUJDMFT ৄ͘͠͸͜ͷล

  19. $0/'*(@4*(/"-'% γάφϧΛγάφϧϋϯυϥͰ͸ͳ͘ ϑΝΠϧσΟεΫϦϓλͰड͚ͱΕΔΑ͏ʹ͢Δ $0/'*(@5*.&3'% ϑΝΠϧσΟεΫϦϓλͱͯ͠ѻ͑ΔλΠϚʔ $0/'*(@&7&/5'% Ϣʔβۭؒͷϓϩηεಉ࢜΍ ΧʔωϧͱϢʔβۭؒͷϓϩηεͷؒͰ ΠϕϯτΛ௨஌͢ΔͨΊͷϑΝΠϧσΟεΫϦϓλ $0/'*(@&10--

    ϑΝΠϧσΟεΫϦϓλʹมԽ͕͋ͬͨࣄΛ Χʔωϧ͔Β௨஌ͯ͠΋Β͏࢓૊Έ
  20. $0/'*(@4).&. ڞ༗ϝϞϦϑΝΠϧγεςϜΛΨν࣮૷ʹ͢Δ͔ ࠷খݶͷ࣮૷ʹ͢Δ͔Λબ΂Δ ࠷খݶͷ࣮૷Ͱ͸ Ϧιʔε੍ݶ͕ޮ͔ͳ͍ TXBQΛ࢖Θͳ͍ ͱ੍͍ͬͨ໿͕͋Δ

  21. $0/'*(@"*0 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CMF@QHT@NVOMPDLFE VOFWJDUBCMF@QHT@DMFBSFEVOFWJDUBCMF@QHT@TUSBOEFEUIQ@GBVMU@BMMPDUIQ@GBVMU@GBMMCBDL UIQ@DPMMBQTF@BMMPDUIQ@DPMMBQTF@BMMPD@GBJMFEUIQ@TQMJUUIQ@[FSP@QBHF@BMMPD UIQ@[FSP@QBHF@BMMPD@GBJMFEOS@UMC@SFNPUF@qVTIOS@UMC@SFNPUF@qVTI@SFDFJWFE OS@UMC@MPDBM@qVTI@BMMOS@UMC@MPDBM@qVTI@POF ༗ޮʹ͢ΔͱQSPDWNTUBUʹҎԼͷ৘ใ͕௥Ճ͞ΕΔ
  23. $0/'*(@4-0# $0/'*(@&91&35Λ༗ޮʹ͢Δͱ௥Ճ͞ΕΔ ΧʔωϧϝϞϦΞϩέʔλ 4-"#Ξϩέʔλ࣮૷Ҏલͷ-JOVYͷΞϩέʔλʹ 4-"#ΤϛϡϨʔγϣϯϨΠϠʔΛ௥Ճͯ͠ 4-"#ͷ୅ΘΓʹ࢖͑ΔΑ͏ʹͨ͠΋ͷ 4-"#ΑΓϑϥάϝϯςʔγϣϯΛى͜͠΍͘͢ εέʔϥϏϦςΟʹ͚ܽΔ͕ ඇৗʹখ͍͞ίʔυͰ࣮૷͞Ε͍ͯΔ IUUQMXOOFU"SUJDMFT

    ৄ͘͠͸͜ͷล
  24. #-0$,%&'"6-5@/001 *0εέδϡʔϥΛ ཁٻ͞ΕͨॱʹॲཧΛΩϡʔʹੵΉ͚ͩͷ εέδϡʔϦϯά͠ͳ͍εέδϡʔϥ /PPQεέδϡʔϥ ͷΈαϙʔτ͢ΔΑ͏ʹ͢Δ ৄ͘͠͸͜ͷล IUUQTBDDFTTSFEIBUDPNTJUFEPDVNFOUBUJPOFO 643FE@)BU@&OUFSQSJTF@-JOVYIUNM 1FSGPSNBODF@5VOJOH@(VJEFDITTIUNM

  25. ,J# $0/'*(@&91&35Ͱߋʹ࡟ͬͨ -JOVY 7("ίϯιʔϧ4"5"")$* 64#&)$*0)$*γϦΞϧϙʔτ 64#ετϨʔδ64#)*%FYU *OUFMͱ3FBMUFLͷ/*$υϥΠό*1W

  26. ,J# -JOVYͰ ಉ༷ͷઃఆΛͨ͠৔߹ 7("ίϯιʔϧ4"5"")$* 64#&)$*0)$*γϦΞϧϙʔτ 64#ετϨʔδ64#)*%FYU *OUFMͱ3FBMUFLͷ/*$υϥΠό*1W

  27. ۭ͖ྖҬʹऩ·ΔΑ͏ʹϢʔβϥϯυΛ࡞Δ ϑϩοϐʔσΟεΫͷ༰ྔ ΧʔωϧͷαΠζ ,J# ,J# ,J# Ϣʔβϥϯυʹ࢖͑Δ༰ྔ -;."Ͱѹॖͨ͠ঢ়ଶͰ ,J#ະຬʹͳΔJOJUSBNGTΛ࡞Δ

  28. ϒʔτ ϩʔμʔ Χʔωϧ JOJUSBNGT ϒʔτ ϩʔμʔ Χʔωϧ ϒʔτϩʔμىಈ Χʔωϧىಈ JOJUSBNGTͷJOJUىಈ

    ϧʔτϑΝΠϧγεςϜͷJOJUىಈ JOJUSBNGT SPPUGT SPPUGT JOJUSBNGTʹඞཁͳ΋ͷΛશͯೖΕͯ SPPUGTΛͳͦ͘͏
  29. -;."Ͱѹॖͨ͠ঢ়ଶͰ ,J#ະຬʹͳΔJOJUSBNGTΛ࡞Δ ѹॖϑΝΠϧγεςϜΑΓখ͘͞ͳΔ ϑϩοϐʔσΟεΫͷυϥΠό͕ཁΒͳ͍ ϑΝΠϧγεςϜͷυϥΠό͕ཁΒͳ͍

  30. ۭ͖ྖҬʹऩ·ΔΑ͏ʹϢʔβϥϯυΛ࡞Δ MJCDTPM[NB ,J# ,J# HMJCDΛ࢖͏ͷ͸ແཧͦ͏ ,J# Ϣʔβϥϯυʹ࢖͑Δ༰ྔ

  31. ͍ʹ͑͠ͷϑϩοϐʔ-JOVYୡ͸ -JOVYMJCDΛ࢖͍ͬͯΔ

  32. )J (BMTBOE(VZT 5IF-JOVY$MJCSBSZJTBCVHpYJOH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ʔτ ͜Ε͸MJCDYYͷ࠷ޙͷϦϦʔεͩ HMJCD΁ͷҠߦΛݕ౼ͯ͘͠Ε ೥݄೔-JOVYMJCD։ൃऴྃ
  34. ଞͷখ͍͞MJCDͷબ୒ࢶ IUUQXXXVDMJCDPSH V$MJCD NVTMMJCD IUUQXXXNVTMMJCDPSH IUUQXXXGFGFEFEJFUMJCD EJFUMJCD IUUQXXXFUBMBCTOFUDPNQBSF@MJCDTIUNM ੑೳൺֱ͸͜ͷล ࠓճ͸͜ΕΛ࢖͏

  35. ଞͷখ͍͞MJCDͷબ୒ࢶ V$MJCD NVTMMJCD EJFUMJCD IUUQXXXFUBMBCTOFUDPNQBSF@MJCDTIUNM ੑೳൺֱ͸͜ͷล ࠓճ͸͜ΕΛ࢖͏ ͻͨ͢Βখ͍͞ɺ஗͍ɺػೳ଍Γͯͳ͍ ෯޿͍ΞʔΩςΫνϟΛαϙʔτ V$MJCDΑΓখ͘͞ɺV$MJCDΑΓ଎͍

  36. #64:#09 -JOVY؀ڥͰΑ͘࢖ΘΕΔίϚϯυΛ ՄೳͳݶΓখ࣮͘͞૷ͨ͠΋ͷ શͯͷίϚϯυΛͭͷόΠφϦʹू໿͢Δ͜ͱͰ ಉ͡Α͏ͳ࣮૷͕ෳ਺ͷόΠφϦʹࢄΒ͹ΔͷΛ๷͙ IUUQXXXCVTZCPYOFU %SPQCFBS ඇৗʹখ͍͞44)αʔόɺΫϥΠΞϯτ IUUQTNBUUVDDBTOBVESPQCFBSESPQCFBSIUNM

  37. $ readelf -s a.out Symbol table '.dynsym' contains 13 entries:

    Num: Value Size Type Bind Vis Ndx 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND 1: 0000000000000000 0 NOTYPE WEAK DEFAULT UND __gmon_start__ 2: 0000000000000000 0 NOTYPE WEAK DEFAULT UND _Jv_RegisterClasses 3: 0000000000000000 0 FUNC GLOBAL DEFAULT UND _ZNSt8ios_base4InitC1Ev@GLIBCXX_3.4 (2) 4: 0000000000000000 0 FUNC GLOBAL DEFAULT UND __libc_start_main@GLIBC_2.2.5 (3) 5: 0000000000000000 0 FUNC GLOBAL DEFAULT UND __cxa_atexit@GLIBC_2.2.5 (3) 6: 0000000000000000 0 NOTYPE WEAK DEFAULT UND _ITM_deregisterTMCloneTab 7: 0000000000000000 0 FUNC GLOBAL DEFAULT UND _ZStlsISt11char_traitsIcE@GLIBCXX_3.4 (2) 8: 0000000000000000 0 NOTYPE WEAK DEFAULT UND _ITM_registerTMCloneTable 9: 0000000000000000 0 FUNC GLOBAL DEFAULT UND _ZNSolsEPFRSoS_E@GLIBCXX_3.4 (2) 10: 00000000004007d0 0 FUNC GLOBAL DEFAULT UND _ZSt4endlIcSt11char_trait@GLIBCXX_3.4 (2) $ readelf -s a.out Symbol table '.dynsym' contains 13 entries: Num: Value Size Type Bind Vis Ndx Name 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND 1: 0000000000000000 0 NOTYPE WEAK DEFAULT UND __gmon_start__ 2: 0000000000000000 0 NOTYPE WEAK DEFAULT UND _Jv_RegisterClasses 3: 0000000000000000 0 FUNC GLOBAL DEFAULT UND _ZNSt8ios_base4InitC1Ev@GLIBCXX_3.4 (2) 4: 0000000000000000 0 FUNC GLOBAL DEFAULT UND __libc_start_main@GLIBC_2.2.5 (3) 5: 0000000000000000 0 FUNC GLOBAL DEFAULT UND __cxa_atexit@GLIBC_2.2.5 (3) 6: 0000000000000000 0 NOTYPE WEAK DEFAULT UND _ITM_deregisterTMCloneTab 7: 0000000000000000 0 FUNC GLOBAL DEFAULT UND _ZStlsISt11char_traitsIcE@GLIBCXX_3.4 (2) 8: 0000000000000000 0 NOTYPE WEAK DEFAULT UND _ITM_registerTMCloneTable 9: 0000000000000000 0 FUNC GLOBAL DEFAULT UND _ZNSolsEPFRSoS_E@GLIBCXX_3.4 (2) 10: 00000000004007d0 0 FUNC GLOBAL DEFAULT UND TUSJQTUSJQVOOFFEFEόΠφϦ ࣮ߦՄೳόΠφϦ͔ΒγϯϘϧςʔϒϧΛ࡟আ͢Δ TUSJQTUSJQVOOFFEFE ࣮ߦՄೳόΠφϦ͔Β γϯϘϧςʔϒϧΛ࡟আ͢Δ ΍Δલ ΍ͬͨޙ
  38. $ readelf -S a.out There are no sections in this

    file. $ readelf -S a.out There are 28 section headers, starting at offset 0x1180: Section Headers: [Nr] Name Type Address Offset Size EntSize Flags Link Info Align [ 0] NULL 0000000000000000 00000000 0000000000000000 0000000000000000 0 0 0 [ 1] .interp PROGBITS 0000000000400270 00000270 000000000000001c 0000000000000000 A 0 0 1 [ 2] .note.ABI-tag NOTE 000000000040028c 0000028c 0000000000000020 0000000000000000 A 0 0 4 [ 3] .hash HASH 00000000004002b0 000002b0 0000000000000048 0000000000000004 A 5 0 TUSJQTUSJQVOOFFEFEόΠφϦ ࣮ߦՄೳόΠφϦ͔ΒγϯϘϧςʔϒϧΛ࡟আ͢Δ TTUSJQ ࣮ߦՄೳόΠφϦ͔Β ηΫγϣϯϔομΛ࡟আ͢Δ ΍Δલ ΍ͬͨޙ IUUQXXXNVQQFUMBCTDPNdCSFBECPYTPGUXBSFFMGLJDLFSTIUNM
  39. $ mkdir etc/ $ cat <<EOF >etc/init.d/rcS #!/bin/ash hostname Tiny

    mount -t proc none /proc mount -t sysfs none /sys ifconfig eth0 up udhcpc eth0 crond EOF $ cat <<EOF >etc/inittab ::sysinit:/etc/init.d/rcS tty1::respawn:/sbin/getty -L tty1 38400 linux tty2::respawn:/sbin/getty -L tty2 38400 linux ttyS0::respawn:/sbin/getty -L ttyS0 115200 vt100 ::restart:/sbin/init ::shutdown:/bin/umount -a -r EOF
  40. $ mkdir -p proc sys dev root tmp var/spool/cron/ crontabs/

    usr/share/udhcpc/ cp -rpdf /dev/ {console,full,hpet,initctl,kmem,mem,null,nvram,port, ptya[0-9],ptya[a-f],random,rtc0,sda*,tty,tty [0-9],ttyS[0-1],urandom,zero} dev/ $ cp /usr/share/udhcpc/default.script usr/share/ udhcpc $ cat <<EOF >etc/group root:x:0:root bin:x:1:root,bin tty:x:5: kmem:x:9: uucp:x:14: EOF $ cat <<EOF >etc/passwd root:5vqD6957XLPg2:0:0:root:/root:/bin/ash bin:x:1:1:bin:/bin:/bin/false EOF $ ln -s bin/busybox init
  41. ۭ͖ྖҬʹऩ·ΔΑ͏ʹϢʔβϥϯυΛ࡞Δ ,J# CVTZCPY ελςΟοΫϦϯΫ ,J# ESPQCFBS ελςΟοΫϦϯΫ ඇѹॖͷϢʔβϥϯυ ,J# DQJPͯ͠M[NB

    JOJUSBNGTDQJPM[NB ,J# ,J# Ϣʔβϥϯυʹ࢖͑Δ༰ྔ ଍Γͨ
  42. ϑϩοϐʔσΟεΫΛ ϒʔτՄೳʹ͠Α͏ %JSFDUqPQQZCPPUJTOPUTVQQPSUFE 6TFBCPPUMPBEFSQSPHSBNJOTUFBE 3FNPWFEJTLBOEQSFTTBOZLFZUPSFCPPU ΧʔωϧΛϑϩοϐʔ͔Β௚઀ϒʔτ͢Δͷ͸ ΋͏αϙʔτ͞Ε͍ͯͳ͍ͷͰɺ ఘΊͯϒʔτϩʔμʔΛ࢖͍ͬͯͩ͘͞

  43. $ mkfs.minix /dev/fd0 $ mount -t auto /dev/fd0 /boot $

    cp initramfs.cpio.lzma /boot $ cp $(KERNEL_DIR)/arch/x86/boot/ bzImage /boot/vmlinuz $ cat <<EOF >/etc/lilo.conf boot = /dev/fd0 compact map = /boot/map vga = normal image = /boot/vmlinuz label = "Linux" initrd = /boot/initramfs.cpio.lzma EOF $ lilo -*-0ΛΠϯετʔϧ
  44. LILO 23.2 Loading Linux BIOS data check successful starting pid

    35, tty '/dev/tty1': '/ sbin/getty -L tty1 38400 linux' Tiny login: ಈ͍ͨ
  45. # wget http://slashdot.org/ Connecting to slashdot.org (216.34.181.45:80) # dmesg dmesg:

    klogctl: Function not implemented
  46. 44)ΫϥΠΞϯτಉࠝ൛ *1WରԠ൛ IUUQUDP:/24MFF NETVNECFBEBE IUUQUDPRG-Y[PL NETVNGECDGGFBE

  47. Ͱ΋΍ͬͺΓϑϧػೳͷ-JOVYΧʔωϧͷ্Ͱ σεΫτοϓ؀ڥಈ͔ͯ͠ 5XJUUFS͍ͨ͠ΑͶ ϑϩοϐʔσΟεΫ͔Βىಈ͢ΔΧʔωϧ͸ ωοτϫʔΫ͔Βμ΢ϯϩʔυͨ͠ผͷΧʔωϧΛ LFYFDͰىಈ͢Δ͜ͱʹಛԽͤ͞Δ ஈ֊໨ͷΧʔωϧ͸ J4$4*λʔήοτΛSPPUGTͱͯ͠Ϛ΢ϯτ ͋ͱ͸༰ྔͷ੍ݶͳ͍ͭ͘΋ͷ-JOVY؀ڥ

  48. LFYFD -JOVYΧʔωϧΛϒʔτϩʔμͱͯ͠ ผͷ-JOVYΧʔωϧΛىಈ͢Δ࢓૊Έ ҰൠతͳϒʔτϩʔμͰ͸खʹෛ͑ͳ͍ॴʹ ஔ͔ΕͨΧʔωϧΛىಈ͍ͨ͠ #*04Λܦ༝ͤͣʹߴ଎ʹϦϒʔτ͍ͨ͠ Χʔωϧ͕Ϋϥογϡͨ࣌͠ʹ ผͷΧʔωϧͰσόοά͍ͨ͠ LEVNQ ͦΜͳ࣌ʹ࢖͏

  49. ʮ਌ํۭ͔ΒGentoo͕ʯγεςϜ Ϋϥ΢υ LFYFD༻ Χʔωϧ BVGTΛ࢖ͬͯ มߋ͸3".ʹอଘ ϑϧ૷උͳΧʔωϧ J4$4* SFBEPOMZ ᶃ

    ᶄ IUUQUDPI'YZVTBLFO CBDEFEFCEBFFEDEEF ᶅ Gentoo )551
  50. ʮ਌ํۭ͔ΒGentoo͕ʯγεςϜ IUUQUDPI'YZVTBLFO CBDEFEFCEBFFEDEEF

  51. MJOVYYZ͕&0-ʹͳͬͨΒ ·ͩઓ͏ज़͸͋Δ ͜͜·ͰY@Λ࢖͖͕ͬͯͨ Yʹ͢Ε͹ एׯΧʔωϧ͕খ͘͞ͳΔ ,J# ͷ৔߹ ,J#

  52. MJOVYYZ͕&0-ʹͳͬͨΒ ·ͩઓ͏ज़͸͋Δ ϒϩοΫσόΠεΛ Ұ੾αϙʔτ͠ͳ͍Α͏ʹ͢Ε͹ /PPQεέδϡʔϥ͕ෆཁʹͳΔ ,J# ,J# ͷ৔߹

  53. MJOVYYZ͕&0-ʹͳͬͨΒ ·ͩઓ͏ज़͸͋Δ "$1*ͱDQVGSFR͸ ʮඞͣ༗Δͱظ଴͢ΔυϥΠό͕ډΔʯ ͨΊʹ΍Ήͳ͘༗ޮʹ͍ͯ͠Δ ͜ͷ΁ΜͷυϥΠόͷ ιʔεΛमਖ਼͢Ε͹ "$1*ͱDQVGSFR͸֎ͤΔ͸ͣ

  54.          

                ·ͱΊ -JOVYΧʔωϧ͸͜ͷ೥ͰڊେԽ͚ͨ͠Ͳ ࠓͷ-JOVYʹ͸ڊେԽʹ߅͏खஈ΋๛෋ʹ͋Δ͔Β ετϨʔδ͕ઈ๬తʹখͯ͘͞΋ ෛ͚ΔͳΨϯόϨʂ
  55. 44)ಉࠝ൛ *1W൛ (FOUPP൛ Thank you for listening. ઃఆ౳ IUUQUDPRG-Y[PL NETVNGECDGGFBE

    IUUQUDP:/24MFF NETVNECFBEBE IUUQUDPI'YZVTBLFO NETVNCBDEFEFCEBFFEDEEF IUUQXXXVTBLVSBOFKQEFOFCDPOpHT