東京エリアDebian勉強会 debootstrapを有効活用してみよう



Similar documents
142 Debian.Deb 銀河系唯一の Debian 専門誌 LXC

第133回東京エリアDebian勉強会   Debian GNU/kFreeBSD セットアップガイド 2015年版

Raspberry Pi 2 Model B に Debian Jessie / armhf をインストールする - 第125回 2015年3月度

第173回東京エリアDebian勉強会   grml-debootstrapを用いた USB起動メモリの作成

Xen入門 ppt

Xen入門 ppt

sato-FBSDW key

Add-onアプリケーション開発 - 環境構築マニュアル -

bash on Ubuntu on Windows bash on Ubuntu on Windows bash on Ubuntu on Windows bash on Ubuntu on Windows bash on Ubuntu on Windows ˆ Windows10 64bit Wi

OpenStack環境で、 FreeBSD Jail + VIMAGE を使った 疑似インターネット実験環境の構築

東京エリアDebian勉強会   Buffalo Linkstation向け Debian Installer - 第139回 2016年5月度

Red Hat Enterprise Linux AS (v.3 for IPF) Update 3

debian_manual.dvi

Docker Haruka Iwao Storage Solution Architect, Red Hat K.K. February 12, 2015

unix.dvi

CentOSv2_furoku


Debian GNU/kFreeBSDで暮らせる環境を構築してみる - 第38回関西Debian勉強会

Raspberry Pi3 / arm64 - Debian/Ubuntu ミートアップ in 札幌

Mail_Spam_Manual_120815b

Red Hat Enterprise Linux ES (v. 3)

UNIX

fx-9860G Manager PLUS_J

% finger apt-get kernel-package, libc6-dev, gcc, make, bin86, bzip2, libdb3-dev, libncurses-dev, fakeroot

Evalution of Linux Container(LXC) on Embedded Linux 株式会社富士通コンピュータテクノロジーズ町田裕樹 1201ka01 Copyright 2013 FUJITSU COMPUTER TECHLONOGIES LIMITED

Microsoft Word - PSB導入ガイド_ docx

3 Ubuntu Linux Ubuntu Linux Debian Linux DistroWatch.com 1 Debian Ubuntu Linux 1 Debian CD(4.1 ) Knoppix Debian CentOS Linux CentOS 1 Ubuntu L

untitled

知っておきたいLinuxの知識

<Documents Title Here>

Microsoft Word - nvsi_090196_r1_vaultdr_offline_rhel_dualpath.doc

PowerGres on Linuxマニュアル

Ubuntu Linux PC Ubuntu Linux (14.04 LTS, Trusty Tahr) 32bit CD 64bit CD 2. 32bit CPU 64bit 32bit PC CPU 32bit 64bit Windows 64bit 64bit. 32bit Core 64

2012/6/8 (c) Hiroki Sato 2 / 70

ゲスト OS インストール ガイド

Introduction Purpose This training course demonstrates the use of the High-performance Embedded Workshop (HEW), a key tool for developing software for

KNOB Knoppix for Bio Itoshi NIKAIDO

dvi

t20s3-fn09.pdf

LAN Copyright c Daikoku Manabu This tutorial is licensed under a Creative Commons Attribution 2.1 Japan License

Ansible

Oracle Application Server 10g( )インストール手順書

slice00_install.dvi


橡ボーダーライン.PDF

VMware Lab Manager User’s Guide

INR-HG5579a_Netshut_Guide_Linux-Solaris_.doc

108 Debian.Deb 銀河系唯一のDebian 専門誌

XEN 仮想マシンの移植 Islandcenter.jp 2009/04/14 既に作成済みの XEN 仮想マシンを移植する方法を説明します 仮想マシンイメージは 通常 /var/lib/xen/image/myvmachine に作成されていますが このファイルを tar 圧縮してリムーバブルメデ

東京エリアDebian勉強会 - 第111回 2014年3月度

tebiki00.dvi

第168回東京エリアDebian勉強会   debianにおけるnginxの設定例

e164.arpa DNSSEC Version JPRS JPRS e164.arpa DNSSEC DNSSEC DNS DNSSEC (DNSSEC ) DNSSEC DNSSEC DNS ( ) % # (root)

Server Backup Manager 5.0 Debian および Ubuntu システムへの Server Backup Free のインストール 1. APT-GET をしてServer Backup Free をインストールする 2. Server Backup Free のインストール

Javaインストール手順書

E2 Spider 2018/08/03 Intel NUC Core i7 PC 2.5 /M.2 SSD BOXNUC7I7BNH PC DDR4-2133(PC ) 8GBX2 260pin 1.2V CL15 SP016GBSFU213B22 WD SSD M /51

使おう!coLinux!

SFS UML-KNOPPIX 1), 1), ), 3) 1),

DCL intro Manual for Ubuntu11.10

debian_install.dvi

Helix Swarm2018.1アップグレード手順

A : kerl kerl Erlang/OTP Erlang/OTP 2 2 Elixir/Phoenix URL 2 PDF A.2 Bash macos.bash_profile exp

r10s4-fn03.pdf

untitled

開発キットを使用したMSFシリーズシステム構築事例<Linux入門編>

a0postercls? Gerlinde Kettl, Matthias Weiser T E Xmacro wwwctanorg/tex-archive/macros/latex/contrib/a0poster LAT E X

東京エリアDebian勉強会 - 第91回 2012年9月度/OSC2012 Tokyo/Fall)

28 Docker Design and Implementation of Program Evaluation System Using Docker Virtualized Environment

KNOPPIX/Math ( ) MathLibre 2012dojo

プレゼンテーション

ネットワークユーティリティ説明書

Microsoft Word - Win-Outlook.docx

appli_HPhi_install

橡環境設定.PDF

Oracle Application Server 10g(9

PowerGres on Linuxマニュアル

untitled

東京エリアDebian勉強会 Debian JP Project - OSC 2017 Tokyo/Fall (第154回出張勉強会)

<4D F736F F D FE382C56E733282F093AE8DEC82B382B982E98EE88F872E646F63>

Sybase on CLUSTERPRO for Linux HowTo

Web apache

LAN LAN LAN LAN LAN LAN,, i

Microsoft Word - マニュアル4.1J

スパコンに通じる並列プログラミングの基礎

install

スパコンに通じる並列プログラミングの基礎

2 Windows 10 *1 3 Linux 3.1 Windows Bash on Ubuntu on Windows cygwin MacOS Linux OS Ubuntu OS Linux OS 1 GUI Windows Explorer Mac Finder 1 GUI

174 Debian.Deb 銀河系唯一の Debian 専門誌 /usr Merge

US40cユーザーズガイド

Oracle Calendar Oracle Collaboration Suite 2(9.0.4) Creation Date: Jun 04, 2003 Last Update: Nov 18, 2003 Version:

-2 gnuplot( ) j ( ) gnuplot /shell/myscript 1

1 Debian Debian nabaua dictoss Roger Shimizu koedoyoshida

④辻修平_37-48.smd

161 Debian.Deb 銀河系唯一の Debian 専門誌 GO

東京エリアDebian勉強会 - systemd


情報の分析 1. Linux ツールの活用

MathLibre KNOPPIX (next generation) 2012 KNOPPIX/Math MathLibre KNOPPIX , KNOPPIX 6.0, next generation. KNOPPIX/Math KDE,

untitled

tosh-docker pub

Transcription:

.. Debian debootstrap dictoss@live.jp 2013 04 20

debian debootstrap

(SUGIMOTO Norimitsu) Twitter: @dictoss Debian User FreeBSD User debian Debian GNU/kFreeBSD

QEMU VirtualBox KVM Xen OpenVZ LXC FreeBSD jail

debian

debootstrap sh debootstrap C cdebootstrap $ sudo apt-get install debootstrap cdebootstrap $ sudo debootstrap --arch=amd64 sid \ /var/chroot/mysid http://ftp.jp.debian.org/debian

chroot chroot PATH $ cd /srv/chroot $ sudo chroot./mysid # pwd /

schroot $ sudo apt-get install schroot $ sudo vi /etc/schroot/schroot.conf [mysid] description=my sid for devel type=directory directory=/srv/chroot/mysid users=norimitu root-groups=root personality=linux preserve-environment=true

schroot $ schroot -c mysid W: Failed to change to directory /etc/schroot : No such file or directory I: The directory does not exist inside the chroot. Use the --directory option to run the command in a different directory. W: Falling back to directory /home/norimitu $ ls -la /srv total 8 drwxr-xr-x 2 root root 4096 Apr 14 02:59. drwxr-xr-x 22 root root 4096 Apr 14 03:04.. chroot $ cd /home/norimitu $ ls (chroot )

debian debian

debootstrap CPU OS debian

stable sid sid debootstrap chroot sid

CPU CPU debootstrap debian CPU amd64 i386 OK i386 chroot $ sudo debootstrap --arch=i386 sid./mysid-i386 \ http://ftp.jp.debian.org/debian

CPU chroot QEMU CPU QEMU debootstrap foreign /usr/bin/qemu-*-static chroot second-stage debootstrap

CPU $ sudo apt-get install binfmt-support qemu \ qemu-user-static debootstrap $ sudo mkdir -p /srv/chroot $ cd /srv/chroot $ sudo debootstrap --foreign --arch=armel wheezy \./armdev1 http://ftp.jp.debian.org/debian $ sudo chroot./armdev1 chroot: /bin/bash : No such file or directory $ sudo cp /usr/bin/qemu-arm-static \ /srv/chroot/armdev1/usr/bin/ $ sudo chroot./armdev1 I have no name!@hostname:/# I have no name!@hostname:/# /debootstrap/debootstrap \ --second-stage I have no name!@hostname:/# apt-get update

Linux OpenVZ LXC LXC Linux config IP br0

$ sudo apt-get install lxc $ sudo vi /etc/fstab cgroup /sys/fs/cgroup cgroup defaults 0 0 $ sudo mount -a $ lxc-checkconfig

$ sudo vi /etc/sysctl.conf net.ipv4.ip_forward=1 $ sudo sysctl -p net.ipv4.ip_forward = 1 $ vi br-lxc.sh sudo./br-lxc.sh $ sudo ifconfig lxc-bridge-nat

$ sudo lxc-create -n lxc-deb1 -t debian $ cd /var/lib/lxc/lxc-deb1 $ ls config rootfs $ sudo vi config ## Network lxc.utsname = lxc-deb1 lxc.network.type = veth lxc.network.flags = up # that s the interface defined above in host s # interfaces file lxc.network.link = lxc-bridge-nat # name of network device inside the container, # defaults to eth0, you could choose a name freely # lxc.network.name = lxcnet0 lxc.network.hwaddr = 00:FF:AA:00:00:01 # the ip may be set to 0.0.0.0/24 or skip this line # if you like to use a dhcp client inside the container lxc.network.ipv4 = 192.168.20.101/24

$ sudo cp /etc/resolv.conf /var/lib/lxc/lxc-deb1/rootfs/etc/ $ sudo vi /var/lib/lxc/lxc-deb1/rootfs/etc/ssh/sshd_config #ListenAddress 0.0.0.0 ListenAddress 192.168.20.101 $ sudo lxc-start -n lxc-deb1 Using makefile-style concurrent boot in runlevel 2. Starting OpenBSD Secure Shell server: sshd Could not load host key: /etc/ssh/ssh_host_rsa_key Could not load host key: /etc/ssh/ssh_host_dsa_key $ sudo chroot /var/lib/lxc/lxc-deb1/rootfs ssh-keygen \ -t dsa -f /etc/ssh/ssh_host_dsa_key $ sudo chroot /var/lib/lxc/lxc-deb1/rootfs ssh-keygen \ -t rsa -f /etc/ssh/ssh_host_rsa_key $ sudo lxc-start -n lxc-deb1 -d $ ssh root@192.168.20.101 root@lxc-deb1:~#

OS bebian debian debootstrap apt debian OS debootstrap tarball FreeBSD 8.3-RELEASE amd64 jail Debian GNU/kFreeBSD amd64

OS bebian debootstrap > cd > wget http://ftp.jp.debian.org/debian/pool/main/d/debootstrap/ > tar xf debootstrap_1.0.48.tar.gz > cd debootstrap-1.0.48 # su # setenv DEBOOTSTRAP_DIR pwd #./debootstrap --arch=kfreebsd-amd64 wheezy \ /usr/jails/jailkfdeb http://ftp.jp.debian.org/debian # kldload fdescfs linprocfs linsysfs tmpfs # umount /usr/jails/jailkfdeb/dev/fd # umount /usr/jails/jailkfdeb/dev # mount -t linprocfs linprocfs /usr/jails/jailkfdeb/proc # mount -t linsysfs linsysfs /usr/jails/jailkfdeb/sys # mkdir -p /usr/jails/jailkfdeb/lib/init/rw # mount -t tmpfs tmpfs /usr/jails/jailkfdeb/lib/init/rw # cp /etc/resolv.conf /usr/jails/jailkfdeb/etc/resolv.conf

OS bebian jail > sudo portsnap fetch > sudo portsnap update > cd /usr/ports/sysutils/ezjail > sudo make > sudo make install > sudo /usr/local/etc/rc.d/ezjail start jailkfdeb Configuring jails:. Starting jails: jailkfdeb. > jls JID IP Address Hostname Path 11 192.168.1.63 jailkfdeb /usr/jails/jailkfdeb > sudo jexec 11 /bin/sh # uname -irps GNU/kFreeBSD 8.3-RELEASE-p6 amd64 Intel(R) Core(TM) i5-2500s CPU @ 2.70GHz

Debian Wiki Schroot http://wiki.debian.org/schroot Debian Wiki LXC http://wiki.debian.org/lxc Debian Wiki EmDebianCrossDebootstrap http://wiki.debian.org/emdebian/crossdebootstrap Debian 2009 04 Debian install Updated Tutorial: Debian GNU/kFreeBSD in a FreeBSD jail