Debian live-build官方教程学习笔记

环境说明:

debian 8(jessie)

更改下载源:

# vim /etc/live/build.conf
LB_MIRROR_BOOTSTRAP="http://ftp.cn.debian.org/debian/"
LB_MIRROR_CHROOT_SECURITY="http://ftp.cn.debian.org/debian-security/"
LB_MIRROR_CHROOT_BACKPORTS="http://ftp.cn.debian.org/debian-backports/"

教程 1: A default image

$ mkdir tutorial1 ; cd tutorial1 ; lb config
# lb build 2>&1 | tee build.log

教程 2: A web browser utility

$ mkdir tutorial2
$ cd tutorial2
$ lb config
$ echo "task-lxde-desktop iceweasel" >> config/package-lists/my.list.chroot
# lb build 2>&1 | tee build.log

教程 3: A personalized image

第一版:

$ mkdir -p tutorial3/auto
$ cp /usr/share/doc/live-build/examples/auto/* tutorial3/auto/
$ cd tutorial3
$ vim auto/config
#!/bin/sh

lb config noauto \
     --architectures i386 \
     --linux-flavours 686-pae \
     "${@}"
$ lb config
$ echo "task-lxde-desktop iceweasel xchat" >> config/package-lists/my.list.chroot
First, --architectures i386 ensures that on our amd64 build system, we build a 32-bit version suitable for use on most machines. 
Second, we use --linux-flavours 686-pae because we don't anticipate using this image on much older systems. 
Third, we have chosen the lxde task metapackage to give us a minimal desktop. 
And finally, we have added two initial favourite packages: iceweasel and xchat. 
# lb build

$ git init
$ cp /usr/share/doc/live-build/examples/gitignore .gitignore
$ git add .
$ git commit -m "Initial import."

第二版:

# lb clean
$ echo vlc >> config/package-lists/my.list.chroot
# lb build

$ git commit -a -m "Adding vlc media player."

教程 4:A VNC Kiosk Client (构建的镜像启动不成功)

$ mkdir vnc-kiosk-client
$ cd vnc-kiosk-client
$ lb config -a i386 -k 686-pae --apt-recommends false
$ echo '! Packages Priority standard' > config/package-lists/standard.list.chroot
$ echo "xorg gdm3 metacity xvnc4viewer" > config/package-lists/my.list.chroot
$ apt-cache depends live-config live-boot
$ echo "live-tools user-setup sudo eject" > config/package-lists/recommends.list.chroot
$ mkdir -p config/includes.chroot/etc/skel
$ cat > config/includes.chroot/etc/skel/.xsession << EOF
#!/bin/sh

/usr/bin/metacity &
/usr/bin/xvncviewer 192.168.1.2:1

exit
EOF
# lb build

教程 5:A base image for a 128MB USB key (构建的镜像启动不成功)

$ mkdir base-image && cd base-image
$ lb config --apt-indices false --apt-recommends false --debootstrap-options "--variant=minbase" --firmware-chroot false --memtest none
$ echo "user-setup sudo" > config/package-lists/recommends.list.chroot
# lb build 2>&1 | tee build.log

教程 6:A localized GNOME desktop and installer

# apt-get install dctrl-tools tasksel-data
$ grep-dctrl -FTest-lang zh /usr/share/tasksel/descs/debian-tasks.desc -sTask
Task: chinese-s
Task: chinese-t
$ grep-dctrl -FEnhances chinese-s /usr/share/tasksel/descs/debian-tasks.desc -sTask
Task: chinese-s-desktop
Task: chinese-s-kde-desktop
$ mkdir live-gnome-ch && cd live-gnome-ch
$ lb config \
-a i386 \
--bootappend-live "boot=live components locales=zh_CN.UTF-8 keyboard-layouts=us" \
--debian-installer live
$ echo '! Packages Priority standard' > config/package-lists/standard.list.chroot
$ echo task-gnome-desktop task-chinese-s task-chinese-s-desktop >> config/package-lists/desktop.list.chroot
$ echo debian-installer-launcher >> config/package-lists/installer.list.chroot
# lb build
上一篇:ubuntu安装mysql


下一篇:KAL1 LINUX 官方文档之政策---Kali Linux更新政策