Copyright © 2008, 2009, 2010 Guillaume Kielwasser
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License".
Revision History | ||
---|---|---|
Revision 0.1 | 09 Sept 2008 | G. Kielwasser |
Creation of this document | ||
Revision 0.2 | 19 Oct 2009 | G. Kielwasser |
First usefull documentation | ||
Revision 0.3 | 06 Aug 2010 | G. Kielwasser |
Main contribution | ||
Revision 0.4 | 25 Nov 2010 | G. Kielwasser |
Added License, modified book info |
About this document
Understanding this document assume a certain knowledge of UNIX administration. It can serve as reminder of infrequently used admin commands, but not as novice guidance for beginners.
Table of Contents
Table of Contents
Table of Contents
Linux is a clone of the operating system Unix, written from scratch by Linus Torvalds with assistance from a loosely-knit team of hackers across the Net. It aims towards POSIX and Single UNIX Specification compliance.
Make sure you have no stale .o files and dependencies lying around:
make mrproper
Run the text based color menus, radiolists & dialogs kernel configuration tools:
make menuconfig
Configure the kernel based on
arch/x86/configs/i386_defconfig
and the following
recommandations:
Stack utilization instrumentation: disable to avoid
messages like "lvm used greatest stack depth:
5956 bytes left
"
Symbol: DEBUG_STACK_USAGE [=n] Prompt: Stack utilization instrumentation Depends on: DEBUG_KERNEL Location: -> Kernel hacking
Kernel .config support
Symbol: IKCONFIG [=y] Prompt: Kernel .config support Location: -> General setup
Symbol: IKCONFIG_PROC [=y] Prompt: Enable access to .config through /proc/config.gz Depends on: IKCONFIG && PROC_FS Location: -> General setup -> Kernel .config support (IKCONFIG [=y])
Universal TUN/TAP device driver support
Symbol: TUN [=y] Prompt: Universal TUN/TAP device driver support Depends on: NETDEVICES Location: -> Device Drivers -> Network device support (NETDEVICES [=y]) Selects: CRC32
KVM
Symbol: KVM [=n] Prompt: Kernel-based Virtual Machine (KVM) support Depends on: VIRTUALIZATION && HAVE_KVM && PCI Location: -> Virtualization (VIRTUALIZATION [=y]) Selects: PREEMPT_NOTIFIERS && MMU_NOTIFIER && ANON_INODES
Symbol: KVM_INTEL [=y] Prompt: KVM for Intel processors support Depends on: VIRTUALIZATION && KVM Location: -> Virtualization (VIRTUALIZATION [=y]) -> Kernel-based Virtual Machine (KVM) support (KVM [=y])
Symbol: KVM_AMD [=y] Prompt: KVM for AMD processors support Depends on: VIRTUALIZATION && KVM Location: -> Virtualization (VIRTUALIZATION [=y]) -> Kernel-based Virtual Machine (KVM) support (KVM [=y])
Symbol: VIRTIO_PCI [=n] Prompt: PCI driver for virtio devices (EXPERIMENTAL) Depends on: VIRTUALIZATION && PCI && EXPERIMENTAL Location: -> Virtualization (VIRTUALIZATION [=y]) Selects: VIRTIO && VIRTIO_RING
Symbol: VIRTIO_BALLOON [=n] Prompt: Virtio balloon driver (EXPERIMENTAL) Depends on: VIRTUALIZATION Location: -> Virtualization (VIRTUALIZATION [=y]) Selects: VIRTIO && VIRTIO_RING
Symbol: VIRTIO_BLK [=n] Prompt: Virtio block driver (EXPERIMENTAL) Depends on: BLK_DEV && EXPERIMENTAL && VIRTIO Location: -> Device Drivers -> Block devices (BLK_DEV [=y])
Symbol: VIRTIO_NET [=y] Prompt: Virtio network driver (EXPERIMENTAL) Depends on: NETDEVICES && EXPERIMENTAL && VIRTIO Location: -> Device Drivers -> Network device support (NETDEVICES [=y])
Symbol: VIRTIO_CONSOLE [=y] Prompt: Virtio console Depends on: VIRTIO Location: -> Device Drivers -> Character devices Selects: HVC_DRIVER Selected by: LGUEST_GUEST && PARAVIRT_GUEST && X86_32 && !X86_PAE
Symbol: HW_RANDOM_VIRTIO [=y] Prompt: VirtIO Random Number Generator support Depends on: HW_RANDOM && VIRTIO Location: -> Device Drivers -> Character devices -> Hardware Random Number Generator Core support
Symbol: KVM_CLOCK [=y] Prompt: KVM paravirtualized clock Depends on: PARAVIRT_GUEST Location: -> Processor type and features -> Paravirtualized guest support (PARAVIRT_GUEST [=y]) Selects: PARAVIRT && PARAVIRT_CLOCK
Symbol: KVM_GUEST [=y] Prompt: KVM Guest support Depends on: PARAVIRT_GUEST Location: -> Processor type and features -> Paravirtualized guest support (PARAVIRT_GUEST [=y]) Selects: PARAVIRT
RAID Support
Symbol: MD_LINEAR [=y] Prompt: Linear (append) mode Depends on: MD && BLK_DEV_MD Location: -> Device Drivers -> Multiple devices driver support (RAID and LVM) (MD [=y]) -> RAID support (BLK_DEV_MD [=y])
Symbol: MD_RAID0 [=y] Prompt: RAID-0 (striping) mode Depends on: MD && BLK_DEV_MD Location: -> Device Drivers -> Multiple devices driver support (RAID and LVM) (MD [=y]) -> RAID support (BLK_DEV_MD [=y])
Symbol: MD_RAID1 [=y] Prompt: RAID-1 (mirroring) mode Depends on: MD && BLK_DEV_MD Location: -> Device Drivers -> Multiple devices driver support (RAID and LVM) (MD [=y]) -> RAID support (BLK_DEV_MD [=y])
Symbol: MD_RAID10 [=y] Prompt: RAID-10 (mirrored striping) mode (EXPERIMENTAL) Depends on: MD && BLK_DEV_MD && EXPERIMENTAL Location: -> Device Drivers -> Multiple devices driver support (RAID and LVM) (MD [=y]) -> RAID support (BLK_DEV_MD [=y])
Symbol: MD_RAID456 [=y] Prompt: RAID-4/RAID-5/RAID-6 mode Depends on: MD && BLK_DEV_MD Location: -> Device Drivers -> Multiple devices driver support (RAID and LVM) (MD [=y]) -> RAID support (BLK_DEV_MD [=y]) Selects: MD_RAID6_PQ && ASYNC_MEMCPY && ASYNC_XOR
Device Mapper
Symbol: DM_CRYPT [=y] Prompt: Crypt target support Depends on: MD && BLK_DEV_DM Location: -> Device Drivers -> Multiple devices driver support (RAID and LVM) (MD [=y]) -> Device mapper support (BLK_DEV_DM [=y]) Selects: CRYPTO && CRYPTO_CBC
Symbol: DM_SNAPSHOT [=y] Prompt: Snapshot target Depends on: MD && BLK_DEV_DM Location: -> Device Drivers -> Multiple devices driver support (RAID and LVM) (MD [=y]) -> Device mapper support (BLK_DEV_DM [=y])
Symbol: DM_MULTIPATH [=y] Prompt: Multipath target Depends on: MD && BLK_DEV_DM && (SCSI_DH || !SCSI_DH) Location: -> Device Drivers -> Multiple devices driver support (RAID and LVM) (MD [=y]) -> Device mapper support (BLK_DEV_DM [=y])
VLAN Support
Symbol: VLAN_8021Q [=y] Prompt: 802.1Q VLAN Support Depends on: NET Location: -> Networking support (NET [=y]) -> Networking options
Bridge Support
Symbol: BRIDGE [=y] Prompt: 802.1d Ethernet Bridging Depends on: NET Location: -> Networking support (NET [=y]) -> Networking options Selects: LLC && STP
Bonding Support
Symbol: BONDING [=y] Prompt: Bonding driver support Depends on: NETDEVICES && INET && (IPV6 || IPV6=n) Location: -> Device Drivers -> Network device support (NETDEVICES [=y])
RealTek RTL-8139 C+ (KVM default NIC)
Symbol: 8139CP [=y] Prompt: RealTek RTL-8139 C+ PCI Fast Ethernet Adapter support (EXPERIME Depends on: NETDEVICES && NET_ETHERNET && NET_PCI && PCI && EXPERIMEN Location: -> Device Drivers -> Network device support (NETDEVICES [=y]) -> Ethernet (10 or 100Mbit) (NET_ETHERNET [=y]) Selects: CRC32 && MII
EXT4
Symbol: EXT4_FS [=y] Prompt: The Extended 4 (ext4) filesystem Depends on: BLOCK Location: -> File systems Selects: JBD2 && CRC16
ReiserFS
Symbol: REISERFS_FS [=y] Prompt: Reiserfs support Depends on: BLOCK Location: -> File systems Selects: CRC32
JFS
Symbol: JFS_FS [=y] Prompt: JFS filesystem support Depends on: BLOCK Location: -> File systems Selects: NLS && CRC32
XFS
Symbol: XFS_FS [=y] Prompt: XFS filesystem support Depends on: BLOCK Location: -> File systems Selects: EXPORTFS
NTFS
Symbol: NTFS_FS [=y] Prompt: NTFS file system support Depends on: BLOCK Location: -> File systems -> DOS/FAT/NT Filesystems Selects: NLS
If you configured any of the parts of the kernel as modules,
install them in /lib/modules/2.6.30.1
:
make modules_install
Export the kernel's header files in a form suitable for use by userspace programs:
make headers_install
Install Linux kernel image:
cp arch/i386/boot/bzImage /boot/vmlinuz
System.map is used by module-init tools and some debugging tools to retrieve the actual addresses of symbols in the kernel.
cp System.map /boot
Save kernel configuration file:
cp .config /boot/config
Table of Contents
initrd provides the capability to load a RAM disk by the boot loader. This RAM disk can then be mounted as the root file system and programs can be run from it. Afterwards, a new root file system can be mounted from a different device. The previous root (from initrd) is then moved to a directory and can be subsequently unmounted.
Recent kernels have support for populating a ramdisk from a compressed cpio archive. On such systems, the creation of a ramdisk image doesn't need to involve special block devices or loopbacks; you merely create a directory on disk with the desired initrd content, cd to that directory, and run (as an example):
find . | cpio --quiet -H newc -o | gzip -9 -n > /boot/imagefile.img
Examining the contents of an existing image file is just as simple:
mkdir /tmp/imagefile cd /tmp/imagefile gzip -cd /boot/imagefile.img | cpio -imd --quiet
Table of Contents
ISO file is generated from /wakes/cdrom
tree,
which contents 2 directories:
# ls -l /wakes/cdrom/ total 4 drwxr-xr-x 1 root root 0 Jul 5 22:53 depot drwxr-xr-x 1 root root 4096 Aug 5 10:52 isolinux
# ls -l /wakes/cdrom/isolinux total 15653 -rw-r--r-- 1 root root 6166439 Aug 5 11:07 initrd.gz -rw-r--r-- 1 root root 13432 Aug 5 11:44 isolinux.bin -rw-r--r-- 1 root root 311 Jul 8 23:08 isolinux.cfg -rw-r--r-- 1 root root 237 Oct 5 2009 isolinux.txt -rw-r--r-- 1 root root 3690848 Aug 9 2009 vmlinuz
/wakes/cdrom/isolinux/isolinux.txt
__ __ _ \ \ / / | | \ \ /\ / /_ _| | _____ ___ \ \/ \/ / _` | |/ / _ \/ __| \ /\ / (_| | < __/\__ \ \/ \/ \__,_|_|\_\___||___/ The Wakes GNU/Linux Operating System
/wakes/cdrom/isolinux/isolinux.cfg
default linux prompt 0 timeout 0 display isolinux.txt label linux kernel vmlinuz append initrd=initrd.gz boot=install quiet noapic
wakes=/wakes
-R Generate SUSP and RR records using the Rock Ridge protocol to further describe the files on the ISO-9660 filesystem. The Rock Ridge protocol is needed in order to add POSIX like file meta data like permissions, extended time stamps, user/group is'd, link counts, inode numbers and symbolic links. The Rock Ridge protocol allows to archive hierarchy trees with unlimited depth.
-f Follow all symbolic links when generating the filesystem. When this option is not in use, symbolic links will be entered using Rock Ridge if enabled, otherwise the file will be ignored.
mkisofs -R -f -b isolinux/isolinux.bin -c boot.catalog -no-emul-boot \ -boot-info-table -o $wakes/iso/wakes-full-alpha1-$new_num-$arch.iso \ $wakes/cdrom
Table of Contents
Initramfs used to host the Wakes installer is a debian one. In the
init
script we use the keyword
boot
to pass the install
argument:
boot=*) BOOT=${x#boot=} ;;
As $BOOT
is sourced:
. /scripts/${BOOT}
we created the file scripts/install
:
mountroot () { /wakes/install.sh }
and we use the moutroot
function to start the
Wakes installer;
mountroot
The Wakes installer is divided into 3 phases:
1. wait_disk
2. initial_menu
3. choice_install
The actual installation is made by choice_install
.
create partition
fdisk $disk
create root volume group
pvcreate -ff $sys_part vgcreate rootvg $sys_part lvcreate -l 90%VG rootvg
format root partion
/sbin/mke2fs -j /dev/mapper/rootvg-lvol0
mount root partion
create_dir $rootmnt mount /dev/mapper/rootvg-lvol0 $rootmnt
create root tree
create_dir $rootmnt/sys $rootmnt/dev $rootmnt/proc $rootmnt/tmp \ $rootmnt/var $rootmnt/var/lock $rootmnt/var/run $rootmnt/var/log \ $rootmnt/etc $rootmnt/root $rootmnt/var/tmp $rootmnt/mnt $rootmnt/boot \ $rootmnt/var/wkpkg $rootmnt/var/wkpkg/rep $rootmnt/var/wkpkg/db \ $rootmnt/var/wkpkg/run $rootmnt/var/wkpkg/build \ $rootmnt/var/wkpkg/mnt/cdrom $rootmnt/var/wkpkg/cat $rootmnt/mnt
install packages
for pkg in $pkg_list do /bin/wkpkg -d $rootmnt -i $pkg done
create boot partition
mke2fs -j $boot_part create_dir $rootmnt/boot mount $boot_part $rootmnt/boot
install linux kernel
/bin/wkpkg -d $rootmnt -i linux
install grub
create_dir $rootmnt/boot/grub cp $rootmnt/usr/lib/grub/i386-pc/* $rootmnt/boot/grub cat <<EOF > $rootmnt/boot/grub/menu.lst default 0 timeout 10 title Wakes GNU/Linux, kernel 2.6.30.1 root (hd0,0) kernel /vmlinuz root=/dev/mapper/rootvg-lvol0 ro quiet initrd /initrd boot title Install Wakes GNU/Linux root (hd0,0) kernel /vmlinuz-install boot=install quiet initrd /initrd-install boot EOF
setup grub
grub --no-curses --batch <<EOF > /dev/null 2>&1 root ($gpart) setup ($gdisk) quit EOF
install config files
cp -r /wakes/X11 $rootmnt/etc
create passwd
cat <<EOF > $rootmnt/etc/passwd root:\$1\$8/H0/gjl\$L5QE8vjJw5BTt/QAu41gk/:0:0:root:/root:/bin/ksh nobody:x:99:99:Unprivileged User:/dev/null:/bin/false sshd:x:50:50:sshd PrivSep:/var/lib/sshd:/bin/false rsyncd:x:48:48:rsyncd Daemon:/home/rsync:/bin/false EOF
create group
cat <<EOF > $rootmnt/etc/group root:x:0: bin:x:1: sys:x:2: kmem:x:3: tty:x:4: tape:x:5: daemon:x:6: floppy:x:7: disk:x:8: lp:x:9: uucp:x:10: audio:x:11: video:x:12: utmp:x:13: usb:x:14: cdrom:x:15: mail:x:34: nogroup:x:99: sshd:x:50: rsyncd:x:48: EOF
create inittab
cat <<EOF > $rootmnt/etc/inittab # Begin /etc/inittab id:3:initdefault: si::sysinit:/etc/rc.d/init.d/rc sysinit l0:0:wait:/etc/rc.d/init.d/rc 0 l1:S1:wait:/etc/rc.d/init.d/rc 1 l2:2:wait:/etc/rc.d/init.d/rc 2 l3:3:wait:/etc/rc.d/init.d/rc 3 l4:4:wait:/etc/rc.d/init.d/rc 4 l5:5:wait:/etc/rc.d/init.d/rc 5 l6:6:wait:/etc/rc.d/init.d/rc 6 #ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now su:S016:once:/sbin/sulogin 1:2345:respawn:/sbin/agetty tty1 9600 2:2345:respawn:/sbin/agetty tty2 9600 3:2345:respawn:/sbin/agetty tty3 9600 #4:2345:respawn:/sbin/agetty tty4 9600 #5:2345:respawn:/sbin/agetty tty5 9600 #6:2345:respawn:/sbin/agetty tty6 9600 # Run xdm as a separate service x:5:respawn:/usr/X11R6/bin/xdm -nodaemon # End /etc/inittab EOF
create hosts
cat <<EOF > $rootmnt/etc/hosts 127.0.0.1 localhost EOF
create ld.so.conf
# Begin /etc/ld.so.conf /usr/local/lib /opt/lib # End /etc/ld.so.conf EOF
create resolv.conf
cat <<EOF > $rootmnt/etc/resolv.conf nameserver 89.2.0.1 nameserver 89.2.0.2 EOF
create network
cat <<EOF > $rootmnt/etc/sysconfig/network HOSTNAME=$hostname EOF
create clock
cat <<EOF > $rootmnt/etc/sysconfig/clock # Begin /etc/sysconfig/clock UTC=1 # End /etc/sysconfig/clock EOF
create profile
cat <<EOF > $rootmnt/etc/profile # Begin /etc/profile # Default PATH export PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/i686-pc-linux-gnu/bin # For ksh -o vi export EDITOR=vi if [ "\`id -u\`" -eq 0 ] then PS1="\`id -un\`@\`uname -n\` # " else PS1='$ ' fi # End /etc/profile EOF
create nsswitch.conf
cat <<EOF > $rootmnt/etc/nsswitch.conf # Begin /etc/nsswitch.conf passwd: files group: files shadow: files hosts: files dns networks: files protocols: files services: files ethers: files rpc: files # End /etc/nsswitch.conf EOF
create fstab
cat <<EOF > $rootmnt/etc/fstab # Begin /etc/fstab # file system mount-point type options dump fsck # order xxxxxxxxx / ext3 defaults 1 1 yyyyyyyyy /boot ext3 defaults 1 1 #/dev/zzzz swap swap pri=1 0 0 proc /proc proc defaults 0 0 sysfs /sys sysfs defaults 0 0 devpts /dev/pts devpts gid=4,mode=620 0 0 tmpfs /dev/shm tmpfs defaults 0 0 # End /etc/fstab EOF
create wkpkg.conf
cat <<EOF > $rootmnt/etc/wkpkg.conf # # cat /etc/wkpkg.conf # Default network depot http://www.gnuwales.org/wakes/depot main #usb://depot main #ftp://www.gnuwales.org/wakes/depot main #cdrom://depot main #disk://var/wkpkg/rep main EOF
configure fstab
sed -i "s%xxxxxxxxx %/dev/mapper/rootvg-lvol0 %; s%yyyyyyyyy %$boot_part %" \ $rootmnt/etc/fstab
do some configuration...
cd $rootmnt/usr/bin && ln -s gcc cc && cd / cd $rootmnt && ln -s /usr usr/X11R6 cd $rootmnt && mkdir usr/share/fonts && \ ln -s /usr/lib/X11/fonts/OTF usr/share/fonts/OTF && \ ln -s /usr/lib/X11/fonts/TTF usr/share/fonts/TTF mkdir -p $rootmnt/usr/lib/X11/xdm print "DisplayManager*userPath: /bin:/usr/bin:/sbin:/usr/sbin" \ >> $rootmnt/usr/lib/X11/xdm/xdm-config print "DisplayManager*systemPath: /bin:/usr/bin:/sbin:/usr/sbin" \ >> $rootmnt/usr/lib/X11/xdm/xdm-config [ -f /usr/bin/i686-pc-linux-gnu-gcc-4.1.2 ] && \ ln -s /usr/bin/i686-pc-linux-gnu-gcc-4.1.2 /usr/bin/gcc
confiigure network
cd $rootmnt/etc/sysconfig/network-devices mkdir ifconfig.eth0 cat << EOF > ifconfig.eth0/ipv4 ONBOOT=yes SERVICE=ipv4-static IP=$ip_address GATEWAY=$gateway PREFIX=$prefix EOF
setup Wakes version
print "0.1" > $rootmnt/etc/wakes_version
install root passsword
print -n "Enter root password: " stty -echo read passwd stty echo print "" crypted=$(crypt $passwd) grep -v '^root:' $rootmnt/etc/passwd > $rootmnt/etc/passwd.tmp print "root:$crypted:0:0:root:/root:/bin/ksh" > $rootmnt/etc/passwd cat $rootmnt/etc/passwd.tmp >> $rootmnt/etc/passwd rm $rootmnt/etc/passwd.tmp
umount $rootmnt/boot
umount $rootmnt/boot
create /dev/console
[ -c $rootmnt/dev/console ] || mknod $rootmnt/dev/console c 5 1
reboot
reboot
Table of Contents
Configuration file /etc/wkpkg.conf
:
# Default network depot http://www.gnuwakes.org/wakes/depot main #usb://depot main #ftp://www.gnuwales.org/wakes/depot main #cdrom://depot main #disk://wakes/rep main
Working directory /var/wkpkg
:
# ls -l /var/wkpkg total 24 drwxr-xr-x 7 root root 4096 Jul 28 23:08 build drwxr-xr-x 2 root root 4096 Jul 16 02:22 cat drwxr-xr-x 198 root root 4096 Jul 19 01:32 db drwxr-xr-x 3 root root 4096 Jul 16 02:22 mnt drwxr-xr-x 3 root root 4096 Jul 16 02:22 rep drwxr-xr-x 3 root root 4096 Aug 9 14:40 run
Directory structure:
build
: where you create new packages
cat
: where is the index catalog
db
: database of installed packages
mnt
: to mount device with repository
rep
:
repo where wkpkg
download packages before
installing them (for remote sources)
run
: to edit packages
create the following structure:
# ls -l total 24 -rw-r--r-- 1 root root 186 Sep 6 2009 Buildfile drwxr-xr-x 2 root root 4096 Sep 6 2009 binaries drwxr-xr-x 2 root root 4096 Sep 6 2009 build drwxr-xr-x 2 root root 4096 Sep 6 2009 infos drwxr-xr-x 2 root root 4096 Sep 6 2009 patchs drwxr-xr-x 2 root root 4096 Sep 6 2009 procedures
binaries
is the directory where the compiled
programs will stay and build
is where the
programs will be built with Buildfile
:
f_build () { $SOURCES_DIR/configure --prefix=/usr \ && make && make DESTDIR=$INSTALL_DIR install } f_clean () { return 0 }
In patch
put the patches. In
procedures
create the following files:
Configure Postinstall Postremove Preinstall Preremove
for a future use. Meta datas for the package are in the
directory infos
:
Architecture Category Depends Description Maintainer Version
And put the sources of the program in the directory
sources
. Then, build the program using
build
and create the package using:
wkpkg <package_name>
and create the binary package:
wkpkg -b <package_name>
Install python:
wkpkg -i python
Install freetype2:
wkpkg -i freetype2
Install fontconfig:
wkpkg -i fontconfig
Install libpng:
wkpkg -i libpng
Make xmlto running: ?
configure-docbook-sxl.sh
Set environment
export SOURCE=/tmp/src export PREFIX=/tmp/modular
Get the build tree
mkdir /tmp/src; cd /tmp/src git clone git://anongit.freedesktop.org/git/xorg/util/modular util/modular ./util/modular/build.sh $PREFIX --clone --cmd "git pull"
Table of Contents
Download the latest Wakes version on www.gnuwakes.org, section "Downloads".
CDROM Install
Starting SeaBIOS (version 0.5.1-20100223_133805-squirrel.codemonkey.ws) gPXE (http://etherboot.org) - 00:03.0 C900 PCI2.10 PnP BBS PMM07E0@10 C900 Booting from CD-Rom... 902MB medium detected ISOLINUX 3.36 Debian-2007-08-30 Copyright (C) 1994-2007 H. Peter Anvin __ __ _ \ \ / / | | \ \ /\ / /_ _| | _____ ___ \ \/ \/ / _` | |/ / _ \/ __| \ /\ / (_| | < __/\__ \ \/ \/ \__,_|_|\_\___||___/ The Wakes GNU/Linux Operating System Loading vmlinuz............................................................ Loading initrd.gz............................................................... ................................. Ready.
Wakes GNU/Linux 0.1 Installation [1] - Install Wakes on your hard disk [2] - Boot from the hard disk [0] - Exit to shell Choice:
Are you sure do you want to proceed to installation ? [Ynq]
Disk /dev/hda: 10.7 GB, 10737418240 bytes Make manual partition ? [Ynq]
Disk /dev/hda: 10.7 GB, 10737418240 bytes Which disk ?
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklab el Building a new DOS disklabel with disk identifier 0xef380ca4. Changes will remain in memory only, until you decide to write them. After that, of course, the previous content won't be recoverable. The number of cylinders for this disk is set to 1305. There is nothing wrong with that, but this is larger than 1024, and could in certain setups cause problems with: 1) software that runs at boot time (e.g., old versions of LILO) 2) booting and partitioning software from other OSs (e.g., DOS FDISK, OS/2 FDISK) Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite) Command (m for help):
Command (m for help): n Command action e extended p primary partition (1-4) p Partition number (1-4): 1 First cylinder (1-1305, default 1): Using default value 1 Last cylinder or +size or +sizeM or +sizeK (1-1305, default 1305): +120M Command (m for help): p Disk /dev/hda: 10.7 GB, 10737418240 bytes 255 heads, 63 sectors/track, 1305 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0xef380ca4 Device Boot Start End Blocks Id System /dev/hda1 1 16 128488+ 83 Linux Command (m for help):
Command (m for help): n Command action e extended p primary partition (1-4) p Partition number (1-4): 2 First cylinder (17-1305, default 17): Using default value 17 Last cylinder or +size or +sizeM or +sizeK (17-1305, default 1305): Using default value 1305 Command (m for help): p Disk /dev/hda: 10.7 GB, 10737418240 bytes 255 heads, 63 sectors/track, 1305 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0xef380ca4 Device Boot Start End Blocks Id System /dev/hda1 1 16 128488+ 83 Linux /dev/hda2 17 1305 10353892+ 83 Linux Command (m for help):
Command (m for help): w The partition table has been altered! Calling ioctl() to re-read partition table. Syncing disks.
Disk /dev/hda: 10.7 GB, 10737418240 bytes Device Boot Start End Blocks Id System /dev/hda1 1 16 128488+ 83 Linux /dev/hda2 17 1305 10353892+ 83 Linux Enter the system installation device:
Create root volume group ? [Ynq]
Physical volume "/dev/hda2" successfully created Volume group "rootvg" successfully created /dev/hdc: open failed: Read-only file system Attempt to close device '/dev/hdc' which is not open. Logical volume "lvol0" created All data on /dev/hda2 will be lost. Continue ? [Ynq]
mke2fs 1.40.8 (13-Mar-2008) Filesystem label= OS type: Linux Block size=4096 (log=2) Fragment size=4096 (log=2) 582912 inodes, 2328576 blocks 116428 blocks (5.00%) reserved for the super user First data block=0 Maximum filesystem blocks=2386558976 72 block groups 32768 blocks per group, 32768 fragments per group 8096 inodes per group Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632 Writing inode tables: done Creating journal (32768 blocks): done Writing superblocks and filesystem accounting information: done This filesystem will be automatically checked every 21 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override. Mounting root partition... Creating root tree...OK Choose depot source (cdrom, disk, net):
Install operating system ? [Ynq]
Choose one or more categories to install 1 [x] coreos 2 [ ] crypt 3 [ ] devel 4 [ ] internet 5 [ ] multimedia 6 [ ] virt 7 [ ] x11 0 - OK Select a category:
Installing operting system (coreos) installing /root/var/wkpkg/mnt/cdrom/depot/0.1/main/binaries/i686/amanda.wkb installing /root/var/wkpkg/mnt/cdrom/depot/0.1/main/binaries/i686/apg.wkb installing /root/var/wkpkg/mnt/cdrom/depot/0.1/main/binaries/i686/bash.wkb installing /root/var/wkpkg/mnt/cdrom/depot/0.1/main/binaries/i686/bc.wkb installing /root/var/wkpkg/mnt/cdrom/depot/0.1/main/binaries/i686/binutils.wkb
installing /root/var/wkpkg/mnt/cdrom/depot/0.1/main/binaries/i686/sysvinit.wkb installing /root/var/wkpkg/mnt/cdrom/depot/0.1/main/binaries/i686/tar.wkb installing /root/var/wkpkg/mnt/cdrom/depot/0.1/main/binaries/i686/tcsh.wkb installing /root/var/wkpkg/mnt/cdrom/depot/0.1/main/binaries/i686/texinfo.wkb installing /root/var/wkpkg/mnt/cdrom/depot/0.1/main/binaries/i686/texlive.wkb installing /root/var/wkpkg/mnt/cdrom/depot/0.1/main/binaries/i686/transfig.wkb installing /root/var/wkpkg/mnt/cdrom/depot/0.1/main/binaries/i686/ucspi-tcp.wkb installing /root/var/wkpkg/mnt/cdrom/depot/0.1/main/binaries/i686/udev.wkb installing /root/var/wkpkg/mnt/cdrom/depot/0.1/main/binaries/i686/unzip.wkb installing /root/var/wkpkg/mnt/cdrom/depot/0.1/main/binaries/i686/util-linux-ng. wkb installing /root/var/wkpkg/mnt/cdrom/depot/0.1/main/binaries/i686/vim.wkb installing /root/var/wkpkg/mnt/cdrom/depot/0.1/main/binaries/i686/w3m.wkb installing /root/var/wkpkg/mnt/cdrom/depot/0.1/main/binaries/i686/wakesbook.wkb installing /root/var/wkpkg/mnt/cdrom/depot/0.1/main/binaries/i686/wget.wkb installing /root/var/wkpkg/mnt/cdrom/depot/0.1/main/binaries/i686/which.wkb installing /root/var/wkpkg/mnt/cdrom/depot/0.1/main/binaries/i686/wkpkg.wkb installing /root/var/wkpkg/mnt/cdrom/depot/0.1/main/binaries/i686/wmclock.wkb installing /root/var/wkpkg/mnt/cdrom/depot/0.1/main/binaries/i686/xfig.wkb installing /root/var/wkpkg/mnt/cdrom/depot/0.1/main/binaries/i686/xinetd.wkb installing /root/var/wkpkg/mnt/cdrom/depot/0.1/main/binaries/i686/xmlto.wkb installing /root/var/wkpkg/mnt/cdrom/depot/0.1/main/binaries/i686/xz-utils.wkb installing /root/var/wkpkg/mnt/cdrom/depot/0.1/main/binaries/i686/zip.wkb installing /root/var/wkpkg/mnt/cdrom/depot/0.1/main/binaries/i686/zlib.wkb Install boot partition ? [Ynq]
Disk /dev/hda: 10.7 GB, 10737418240 bytes Device Boot Start End Blocks Id System /dev/hda1 1 16 128488+ 83 Linux /dev/hda2 17 1305 10353892+ 83 Linux Enter the boot installation device (/boot partition):
Format partition ? [Ynq]
Filesystem label= OS type: Linux Block size=1024 (log=0) Fragment size=1024 (log=0) 32128 inodes, 128488 blocks 6424 blocks (5.00%) reserved for the super user First data block=1 Maximum filesystem blocks=67371008 16 block groups 8192 blocks per group, 8192 fragments per group 2008 inodes per group Superblock backups stored on blocks: 8193, 24577, 40961, 57345, 73729 Writing inode tables: done Creating journal (4096 blocks): done Writing superblocks and filesystem accounting information: done This filesystem will be automatically checked every 22 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override. Mounting /boot partition...OK Installing the linux kernel...OK Installing grub...OK Setting grub to hd0,0...OK Enter ip address:
Enter network prefix:
Enter gateway:
Enter hostname:
Installing config files...OK Configuring fstab...OK Configuring network script...OK Enter root password:
GNU GRUB version 0.97 (637K lower / 130036K upper memory) +-------------------------------------------------------------------------+ | Wakes GNU/Linux, kernel 2.6.30.1 | | Install Wakes GNU/Linux | | | | | | | | | | | | | | | | | | | | | +-------------------------------------------------------------------------+ Use the and keys to select which entry is highlighted. Press enter to boot the selected OS, 'e' to edit the commands before booting, or 'c' for a command-line. The highlighted entry will be booted automatically in 10 seconds.
Setting the console log level to 1..........................[ OK ] Populating /dev with device nodes...........................[ OK ] Creating volume groups nodes................................[ OK ] Activating all swap files/partitions........................[ OK ] Recording existing mounts in /etc/mtab......................[ OK ] Cleaning file systems.......................................[ OK ] Retrying failed uevents, if any.............................[ OK ] Bringing up the loopback interface..........................[ OK ] Setting hostname to devlab..................................[ OK ] ############################################################################## # # # Starting runlevel 3 boot scripts # # # ############################################################################## Starting system log daemon..................................[ OK ] Starting kernel log daemon..................................[ OK ] Adding IPv4 address 192.168.1.103 to the eth0 interface.....[ OK ] Setting up default gateway..................................[ OK ] Starting SSH Server.........................................[ OK ] Welcome to the Wakes GNU/Linux operating system ! devlab login:
Table of Contents
First, create a bridge device. Edit the script bridge.sh
:
#!/usr/bin/ksh # Configure a bridge device to use with qemu # Bridged interface if=eth0 # Bridge name bridge=br0 # Bridge network address=192.168.1.7 netmask=255.255.255.0 gateway=192.168.1.1 broadcast=192.168.1.255 case $1 in start) print "Configure $bridge bridge..." brctl addbr $bridge print "Add $if on $bridge..." brctl addif $bridge $if print "Activating promiscuous mode on $if..." ip addr flush dev $if ip link set $if promisc on ip link set up dev $if print "IP address on $bridge..." ip addr add $address/$netmask broadcast $broadcast dev $bridge ip link set $bridge up print "Set default route..." ip route add default via $gateway ;; stop) ip link set $bridge down brctl delbr $bridge ip addr flush dev $if ip link set $if promisc off ip link set down dev $if ;; *) print -u2 "usage: $0 start|stop" exit 1 ;; esac exit 0
Run the script to create the bridge:
./bridge.sh start
Then, edit the script that will add the qemu tap device on the bridge (/etc/qemu-ifup
):
#!/usr/bin/ksh tap=$1 bridge=br0 # put the $tap interface up ip link set up dev $tap # adding $tap to bridge interface $bridge... brctl addif $bridge $tap exit 0
You can now run qemu with tap network interfaces.
This is the command to launch Qemu with the previous kernel on a x86_64 plateform with a vnc output:
qemu-system-x86_64 \ -snapshot \ -curses \ -no-kqemu \ -hda /dev/sda \ -kernel /usr/src/linux-2.6.26.5/arch/x86/boot/bzImage \ -append "root=/dev/hda1" \ -vnc www.gnuwakes.org:0
Explanation:
-snapshot Write to temporary files instead of disk image files. In this case, the raw disk image you use is not written back. -hda file -hdb file -hdc file -hdd file Use file as hard disk 0, 1, 2 or 3 image. -vnc d Normally, QEMU uses SDL to display the VGA output. With this option, you can have QEMU listen on VNC display d and redirect the VGA display over the VNC session. -kernel bzImage Use bzImage as kernel image. -append cmdline Use cmdline as kernel command line "root=/dev/hda1" ==> /dev/sda1 (if physical disk is SATA) -initrd file Use file as initial ram disk.
To launch Qemu on an x86 compatible architecture without kqemu, on a physical disk image with the newly compiled kernel:
qemu \ -no-kqemu \ -hda /dev/sda \ -kernel /usr/src/linux-2.6.26.5/arch/x86/boot/bzImage \ -append "root=/dev/hda1"
Pay attention to the file /etc/fstab
when trying to boot on a physical partition. The root device with Qemu is always an hda device (ie /dev/hda1
), but on your machine it can be something else, like /dev/sda1
. Example of /etc/fstab
when booting your physical machine:
# cat /etc/fstab /dev/sda1 / ext3 errors=remount-ro 0 1 proc /proc proc defaults 0 0 sysfs /sys sysfs defaults 0 0
When booting with Qemu, it must seem like this:
# cat /etc/fstab /dev/hda1 / ext3 errors=remount-ro 0 1 proc /proc proc defaults 0 0 sysfs /sys sysfs defaults 0 0
To run Qemu with a bridged network and VNC, run:
#!/usr/bin/ksh root=/wakes/vm image=$root/devlab.img pidfile=$root/devlab.pid memory=128 tap=tap1 vnc=1 mac=52:54:00:12:34:58 case $1 in start) # with tun/tap network /usr/local/bin/qemu -daemonize -M pc -m $memory -hda $image \ -pidfile $pidfile -net nic,vlan=0,macaddr=$mac \ -net tap,vlan=0,ifname=$tap,script=/etc/qemu-ifup \ -boot c -vnc :$vnc -localtime -k fr ;; stop) kill $(cat $pidfile) rm $pidfile ;; console) vncviewer :$vnc ;; install) /usr/local/bin/qemu -M pc -m $memory -hda $image -localtime \ -net nic,vlan=0,macaddr=$mac \ -net tap,vlan=0,ifname=$tap,script=/etc/qemu-ifup \ -boot d -cdrom /wakes/iso/wakes.iso -vnc :$vnc -k fr ;; esac exit 0
And without VNC:
#!/usr/bin/ksh root=$(cd $(dirname $(readlink -f $0))/..; pwd) vm_name=$(basename $0 .sh) img=$root/vmdisk/$vm_name.img pidfile=$root/vmdisk/$vm_name.pid qemu=/usr/kvm/bin/qemu-system-x86_64 mac=$(print $vm_name | md5sum | \ sed 's/^\(..\)\(..\)\(..\)\(..\).*$/52:54:\1:\2:\3:\4/') [ ! -f "$img" ] && qemu-img create $img 10G case $1 in install) $qemu -boot d -hda $img \ -cdrom $root/iso/wakes-alpha1-001-i386.iso ;; start) $qemu -boot c -hda $img -pidfile $pidfile \ -net nic,vlan=0,macaddr=$mac \ -net tap,vlan=0,ifname=$vm_name,script=/etc/qemu-ifup ;; stop) kill $(cat $pidfile) rm $pidfile ;; *) print -u2 "usage: $0 install|start|stop" exit 1 ;; esac exit 0
Comment out the following lines in
/scripts/init-top/console_setup
in initrd:
if [ -f /etc/console-setup/boottime.kmap.gz ] && type loadkeys >/dev/null; then eval loadkeys /etc/console-setup/boottime.kmap.gz $verbose fi
#!/usr/bin/ksh root=$(cd $(dirname $(readlink -f $0))/..; pwd) wakes=/windows/perso/wakes mem=512 vm_name=$(basename $0 .sh) img=$wakes/vmdisk/$vm_name.img pidfile=$wakes/vmdisk/$vm_name.pid qemu=/usr/kvm/bin/qemu-system-x86_64 cdrom=$wakes/iso/wakes-full-alpha1-???-i386.iso mac=$(print $vm_name | md5sum | \ sed 's/^\(..\)\(..\)\(..\)\(..\).*$/52:54:\1:\2:\3:\4/') [ ! -f "$img" ] && qemu-img create $img 10G case $1 in install) $qemu -name $vm_name -boot once=d -hda $img -cdrom $cdrom ;; start) $qemu -name $vm_name -boot c -hda $img -pidfile $pidfile -cdrom $cdrom \ -net nic,vlan=0,macaddr=$mac -m $mem -vga vmware -k fr \ -net tap,vlan=0,ifname=$vm_name,script=/etc/qemu-ifup ;; stop) kill $(cat $pidfile) rm $pidfile ;; ssh) xterm -T $vm_name -bg black -fg green -e \ ssh -Y -o StrictHostKeyChecking=no $vm_name 2> /dev/null & ;; ncurses_start) xterm -geometry 80x25 -title "$vm_name console" -e \ $qemu -name $vm_name -boot c \ -drive file=$img,if=virtio,index=0,media=disk,boot=on \ -pidfile $pidfile -cdrom $cdrom \ -net nic,vlan=0,macaddr=$mac,model=virtio -m $mem -vga vmware -curses \ -net tap,vlan=0,ifname=$vm_name,script=/etc/qemu-ifup 2> /dev/null & ;; failsafe) xterm -geometry 80x25 -title "$vm_name console" -e \ $qemu -name $vm_name -boot c \ -drive file=$img,if=virtio,index=0,media=disk,boot=on \ -pidfile $pidfile -cdrom $cdrom \ -kernel /boot/vmlinuz-failsafe -initrd /boot/initrd-failsafe \ -append "root=/dev/mapper/rootvg-lvol0" \ -net nic,vlan=0,macaddr=$mac,model=virtio -m $mem -vga vmware -curses \ -net tap,vlan=0,ifname=$vm_name,script=/etc/qemu-ifup 2> /dev/null & ;; *) print -u2 "usage: $0 install|start|stop|ncurses_start|ssh" exit 1 ;; esac exit 0
First, create the allno.config
file. This file will be used to compile a Qemu compatible kernel.
cat << EOF > allno.config # allno.config CONFIG_BINFMT_ELF=y CONFIG_IDE=y CONFIG_BLK_DEV_IDE=y CONFIG_HAVE_IDE=y CONFIG_BLK_DEV_IDEDISK=y CONFIG_IDE_GENERIC=y CONFIG_VIDEO_SELECT=y CONFIG_EXT3_FS=y CONFIG_MPENTIUMII=y CONFIG_SYSVIPC=y CONFIG_TMPFS=y CONFIG_IOSCHED_DEADLINE=y CONFIG_NET=y CONFIG_UNIX=y CONFIG_INET=y CONFIG_PACKET=y CONFIG_NETDEVICES=y CONFIG_IKCONFIG=y CONFIG_IKCONFIG_PROC=y CONFIG_IP_MULTICAST=y CONFIG_IP_MROUTE=y CONFIG_BLK_DEV_INITRD=y CONFIG_INOTIFY=y CONFIG_INOTIFY_USER=y CONFIG_ISO9660_FS=y CONFIG_JOLIET=y CONFIG_UDF_FS=y CONFIG_UDF_NLS=y CONFIG_BLK_DEV_IDECD=y CONFIG_CC_OPTIMIZE_FOR_SIZE=y EOF
Then compile the kernel.
make mrproper make allnoconfig make
Explanation:
"make config" Plain text interface. "make menuconfig" Text based color menus, radiolists & dialogs. "make xconfig" X windows (Qt) based configuration tool. "make gconfig" X windows (Gtk) based configuration tool. "make oldconfig" Default all questions based on the contents of your existing ./.config file and asking about new config symbols. "make silentoldconfig" Like above, but avoids cluttering the screen with questions already answered. "make defconfig" Create a ./.config file by using the default symbol values from arch/$ARCH/defconfig. "make allyesconfig" Create a ./.config file by setting symbol values to 'y' as much as possible. "make allmodconfig" Create a ./.config file by setting symbol values to 'm' as much as possible. "make allnoconfig" Create a ./.config file by setting symbol values to 'n' as much as possible. "make randconfig" Create a ./.config file by setting symbol values to random values. The allyesconfig/allmodconfig/allnoconfig/randconfig variants can also use the environment variable KCONFIG_ALLCONFIG to specify a filename that contains config options that the user requires to be set to a specific value. If KCONFIG_ALLCONFIG=filename is not used, "make *config" checks for a file named "all{yes/mod/no/random}.config" for symbol values that are to be forced. If this file is not found, it checks for a file named "all.config" to contain forced values.
In our case, the make allnoconfig
variants will check for the file allno.config
for symbol values that are to be forced (if the environment variable KCONFIG_ALLCONFIG
is not used).
kernel allno.config with sda disk support:
######################################## # Executable file formats / Emulations # ######################################## # Kernel support for ELF binaries CONFIG_BINFMT_ELF=y ################ # File systems # ################ # Ext3 journalling file system support CONFIG_EXT3_FS=y # /proc file system support CONFIG_PROC_FS=y # Virtual memory file system support (former shm fs) CONFIG_TMPFS=y # Inotify file change notification support CONFIG_INOTIFY=y # Inotify support for userspace CONFIG_INOTIFY_USER=y # ISO 9660 CDROM file system support CONFIG_ISO9660_FS=y ############################### # Processor type and features # ############################### # Pentium-II/Celeron(pre-Coppermine) CONFIG_MPENTIUMII=y # Paravirtualized guest support CONFIG_PARAVIRT_GUEST=y # KVM Guest support CONFIG_KVM_GUEST=y # KVM paravirtualized clock CONFIG_KVM_CLOCK=y ################# # General setup # ################# # Prompt for development and/or incomplete code/drivers CONFIG_EXPERIMENTAL=y # System V IPC CONFIG_SYSVIPC=y # Initial RAM filesystem and RAM disk (initramfs/initrd) support CONFIG_BLK_DEV_INITRD=y # Optimize for size CONFIG_CC_OPTIMIZE_FOR_SIZE=y # Kernel .config support CONFIG_IKCONFIG=y # Enable access to .config through /proc/config.gz CONFIG_IKCONFIG_PROC=y ########################## # Enable the block layer # ########################## # Enable the block layer CONFIG_BLOCK=y # Deadline I/O scheduler CONFIG_IOSCHED_DEADLINE=y ###################### # Networking support # ###################### # Networking support CONFIG_NET=y # Packet socket #CONFIG_PACKET=y # Unix domain sockets CONFIG_UNIX=y # TCP/IP networking CONFIG_INET=y ########################## # Bus options (PCI etc.) # ########################## # PCI support CONFIG_PCI=y ################## # Device Drivers # ################## # Block devices CONFIG_BLK_DEV=y # Virtio block driver (EXPERIMENTAL) CONFIG_VIRTIO_BLK=y # Network device support CONFIG_NETDEVICES=y # Ethernet (10 or 100Mbit) CONFIG_NET_ETHERNET=y # EISA, VLB, PCI and on board controllers CONFIG_NET_PCI=y # RealTek RTL-8139 C+ PCI Fast Ethernet Adapter support CONFIG_8139CP=y # PCI NE2000 and clones support (This driver also works for RealTek RTL-8029) CONFIG_NE2K_PCI=y # Virtio network driver (EXPERIMENTAL) CONFIG_VIRTIO_NET=y # Serial ATA (prod) and Parallel ATA (experimental) CONFIG_ATA=y # ATA SFF support (SFF is the legacy IDE interface) CONFIG_ATA_SFF=y # Intel PATA MPIIX support CONFIG_ATA_PIIX=y # SCSI device support CONFIG_SCSI=y # SCSI disk support CONFIG_BLK_DEV_SD=y # SCSI CDROM support CONFIG_BLK_DEV_SR=y # Multiple devices driver support (RAID and LVM) CONFIG_MD=y # Device mapper support CONFIG_BLK_DEV_DM=y ################## # Virtualization # ################## # Virtualization CONFIG_VIRTUALIZATION=y # PCI driver for virtio devices (EXPERIMENTAL) CONFIG_VIRTIO_PCI=y
With modules support:
# Enable loadable module support CONFIG_MODULES=y # Module unloading CONFIG_MODULE_UNLOAD=y ######################################## # Executable file formats / Emulations # ######################################## # Kernel support for ELF binaries CONFIG_BINFMT_ELF=y ################ # File systems # ################ # Ext3 journalling file system support CONFIG_EXT3_FS=m # /proc file system support CONFIG_PROC_FS=y # Virtual memory file system support (former shm fs) CONFIG_TMPFS=y # Inotify file change notification support CONFIG_INOTIFY=y # Inotify support for userspace CONFIG_INOTIFY_USER=y # ISO 9660 CDROM file system support CONFIG_ISO9660_FS=m ############################### # Processor type and features # ############################### # Pentium-II/Celeron(pre-Coppermine) CONFIG_MPENTIUMII=y # Paravirtualized guest support CONFIG_PARAVIRT_GUEST=y # KVM Guest support CONFIG_KVM_GUEST=y # KVM paravirtualized clock CONFIG_KVM_CLOCK=y ################# # General setup # ################# # Prompt for development and/or incomplete code/drivers CONFIG_EXPERIMENTAL=y # System V IPC CONFIG_SYSVIPC=y # Initial RAM filesystem and RAM disk (initramfs/initrd) support CONFIG_BLK_DEV_INITRD=y # Optimize for size CONFIG_CC_OPTIMIZE_FOR_SIZE=y # Kernel .config support CONFIG_IKCONFIG=y # Enable access to .config through /proc/config.gz CONFIG_IKCONFIG_PROC=y ########################## # Enable the block layer # ########################## # Enable the block layer CONFIG_BLOCK=y # Deadline I/O scheduler CONFIG_IOSCHED_DEADLINE=y ###################### # Networking support # ###################### # Networking support CONFIG_NET=y # Packet socket #CONFIG_PACKET=y # Unix domain sockets CONFIG_UNIX=m # TCP/IP networking CONFIG_INET=y ########################## # Bus options (PCI etc.) # ########################## # PCI support CONFIG_PCI=y ################## # Device Drivers # ################## # Block devices CONFIG_BLK_DEV=y # Virtio block driver (EXPERIMENTAL) CONFIG_VIRTIO_BLK=m # Network device support CONFIG_NETDEVICES=y # Ethernet (10 or 100Mbit) CONFIG_NET_ETHERNET=y # EISA, VLB, PCI and on board controllers CONFIG_NET_PCI=y # RealTek RTL-8139 C+ PCI Fast Ethernet Adapter support CONFIG_8139CP=m # PCI NE2000 and clones support (This driver also works for RealTek RTL-8029) CONFIG_NE2K_PCI=m # Virtio network driver (EXPERIMENTAL) CONFIG_VIRTIO_NET=m # Serial ATA (prod) and Parallel ATA (experimental) CONFIG_ATA=m # ATA SFF support (SFF is the legacy IDE interface) CONFIG_ATA_SFF=y # Intel PATA MPIIX support CONFIG_ATA_PIIX=m # SCSI device support CONFIG_SCSI=m # SCSI disk support CONFIG_BLK_DEV_SD=m # SCSI CDROM support CONFIG_BLK_DEV_SR=m # Multiple devices driver support (RAID and LVM) CONFIG_MD=y # Device mapper support CONFIG_BLK_DEV_DM=m ################## # Virtualization # ################## # Virtualization CONFIG_VIRTUALIZATION=y # PCI driver for virtio devices (EXPERIMENTAL) CONFIG_VIRTIO_PCI=m
Java installation:
cd /usr/lib/seamonkey-1.1.9/plugins ln -s /usr/java/plugin/i386/ns7/libjavaplugin_oji.so . export PATH=$PATH:/usr/java/bin export PLUGIN_HOME=/usr/lib/seamonkey-1.1.9/plugins export JAVA_HOME=/usr/java http://java.com/en/download/installed.jsp
Create new public key pair:
silcd -C /etc/silc
Adjust private key permissions:
chmod 600 /etc/silc/silcd.prv
To allow remote connections, modify /etc/silc/silcd.conf
:
Secondary { ip = "192.168.1.7"; port = 706; };
add the group nobody
:
groupadd nobody
start the silc server:
silcd
and run the silc client:
silc -c 192.168.1.7
adjust /usr/share/fvwm/system.fvwm2rc
:
+ "Chat%mini.telnet.xpm%" Exec exec \ xterm -title Chat -geometry 80x24-0+0 -name Chat -e silc -c 192.168.1.7
Install MySQL package:
wkpkg -i mysql
Install mysql
group:
groupadd mysql
Install mysql
user:
useradd -g mysql mysql
Make /var/mysql
writable for
mysql
user:
chown mysql:mysql /var/mysql
Install initial database:
mysql_install_db --user=mysql
Start MySQL server:
/usr/share/mysql/mysql.server start
Other MySQL commands:
/usr/bin/mysql_secure_installation mysqladmin -u root password 'new-password' mysqladmin -u root -h devlab01 password 'new-password' #/usr/bin/mysqld_safe & #mysqld_safe --user=mysql &
Table of Contents
xterm: /usr/share/X11/app-defaults/XTerm
or /usr/X11R7.5/lib/X11/app-defaults/XTerm
*charClass: 33:48,35:48,37-38:48,43-47:48,58:48,61:48,63-64:48,95:48,126:48
Version 1.3, 3 November 2008
Copyright © 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
The purpose of this License is to make a manual, textbook, or other functional and useful document “free” in the sense of freedom: to assure everyone the effective freedom to copy and redistribute it, with or without modifying it, either commercially or noncommercially. Secondarily, this License preserves for the author and publisher a way to get credit for their work, while not being considered responsible for modifications made by others.
This License is a kind of “copyleft”, which means that derivative works of the document must themselves be free in the same sense. It complements the GNU General Public License, which is a copyleft license designed for free software.
We have designed this License in order to use it for manuals for free software, because free software needs free documentation: a free program should come with manuals providing the same freedoms that the software does. But this License is not limited to software manuals; it can be used for any textual work, regardless of subject matter or whether it is published as a printed book. We recommend this License principally for works whose purpose is instruction or reference.
This License applies to any manual or other work, in any medium, that contains a notice placed by the copyright holder saying it can be distributed under the terms of this License. Such a notice grants a world-wide, royalty-free license, unlimited in duration, to use that work under the conditions stated herein. The “Document”, below, refers to any such manual or work. Any member of the public is a licensee, and is addressed as “you”. You accept the license if you copy, modify or distribute the work in a way requiring permission under copyright law.
A “Modified Version” of the Document means any work containing the Document or a portion of it, either copied verbatim, or with modifications and/or translated into another language.
A “Secondary Section” is a named appendix or a front-matter section of the Document that deals exclusively with the relationship of the publishers or authors of the Document to the Document’s overall subject (or to related matters) and contains nothing that could fall directly within that overall subject. (Thus, if the Document is in part a textbook of mathematics, a Secondary Section may not explain any mathematics.) The relationship could be a matter of historical connection with the subject or with related matters, or of legal, commercial, philosophical, ethical or political position regarding them.
The “Invariant Sections” are certain Secondary Sections whose titles are designated, as being those of Invariant Sections, in the notice that says that the Document is released under this License. If a section does not fit the above definition of Secondary then it is not allowed to be designated as Invariant. The Document may contain zero Invariant Sections. If the Document does not identify any Invariant Sections then there are none.
The “Cover Texts” are certain short passages of text that are listed, as Front-Cover Texts or Back-Cover Texts, in the notice that says that the Document is released under this License. A Front-Cover Text may be at most 5 words, and a Back-Cover Text may be at most 25 words.
A “Transparent” copy of the Document means a machine-readable copy, represented in a format whose specification is available to the general public, that is suitable for revising the document straightforwardly with generic text editors or (for images composed of pixels) generic paint programs or (for drawings) some widely available drawing editor, and that is suitable for input to text formatters or for automatic translation to a variety of formats suitable for input to text formatters. A copy made in an otherwise Transparent file format whose markup, or absence of markup, has been arranged to thwart or discourage subsequent modification by readers is not Transparent. An image format is not Transparent if used for any substantial amount of text. A copy that is not “Transparent” is called “Opaque”.
Examples of suitable formats for Transparent copies include plain ASCII without markup, Texinfo input format, LaTeX input format, SGML or XML using a publicly available DTD, and standard-conforming simple HTML, PostScript or PDF designed for human modification. Examples of transparent image formats include PNG, XCF and JPG. Opaque formats include proprietary formats that can be read and edited only by proprietary word processors, SGML or XML for which the DTD and/or processing tools are not generally available, and the machine-generated HTML, PostScript or PDF produced by some word processors for output purposes only.
The “Title Page” means, for a printed book, the title page itself, plus such following pages as are needed to hold, legibly, the material this License requires to appear in the title page. For works in formats which do not have any title page as such, “Title Page” means the text near the most prominent appearance of the work’s title, preceding the beginning of the body of the text.
The “publisher” means any person or entity that distributes copies of the Document to the public.
A section “Entitled XYZ” means a named subunit of the Document whose title either is precisely XYZ or contains XYZ in parentheses following text that translates XYZ in another language. (Here XYZ stands for a specific section name mentioned below, such as “Acknowledgements”, “Dedications”, “Endorsements”, or “History”.) To “Preserve the Title” of such a section when you modify the Document means that it remains a section “Entitled XYZ” according to this definition.
The Document may include Warranty Disclaimers next to the notice which states that this License applies to the Document. These Warranty Disclaimers are considered to be included by reference in this License, but only as regards disclaiming warranties: any other implication that these Warranty Disclaimers may have is void and has no effect on the meaning of this License.
You may copy and distribute the Document in any medium, either commercially or noncommercially, provided that this License, the copyright notices, and the license notice saying this License applies to the Document are reproduced in all copies, and that you add no other conditions whatsoever to those of this License. You may not use technical measures to obstruct or control the reading or further copying of the copies you make or distribute. However, you may accept compensation in exchange for copies. If you distribute a large enough number of copies you must also follow the conditions in section 3.
You may also lend copies, under the same conditions stated above, and you may publicly display copies.
If you publish printed copies (or copies in media that commonly have printed covers) of the Document, numbering more than 100, and the Document’s license notice requires Cover Texts, you must enclose the copies in covers that carry, clearly and legibly, all these Cover Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on the back cover. Both covers must also clearly and legibly identify you as the publisher of these copies. The front cover must present the full title with all words of the title equally prominent and visible. You may add other material on the covers in addition. Copying with changes limited to the covers, as long as they preserve the title of the Document and satisfy these conditions, can be treated as verbatim copying in other respects.
If the required texts for either cover are too voluminous to fit legibly, you should put the first ones listed (as many as fit reasonably) on the actual cover, and continue the rest onto adjacent pages.
If you publish or distribute Opaque copies of the Document numbering more than 100, you must either include a machine-readable Transparent copy along with each Opaque copy, or state in or with each Opaque copy a computer-network location from which the general network-using public has access to download using public-standard network protocols a complete Transparent copy of the Document, free of added material. If you use the latter option, you must take reasonably prudent steps, when you begin distribution of Opaque copies in quantity, to ensure that this Transparent copy will remain thus accessible at the stated location until at least one year after the last time you distribute an Opaque copy (directly or through your agents or retailers) of that edition to the public.
It is requested, but not required, that you contact the authors of the Document well before redistributing any large number of copies, to give them a chance to provide you with an updated version of the Document.
You may copy and distribute a Modified Version of the Document under the conditions of sections 2 and 3 above, provided that you release the Modified Version under precisely this License, with the Modified Version filling the role of the Document, thus licensing distribution and modification of the Modified Version to whoever possesses a copy of it. In addition, you must do these things in the Modified Version:
If the Modified Version includes new front-matter sections or appendices that qualify as Secondary Sections and contain no material copied from the Document, you may at your option designate some or all of these sections as invariant. To do this, add their titles to the list of Invariant Sections in the Modified Version’s license notice. These titles must be distinct from any other section titles.
You may add a section Entitled “Endorsements”, provided it contains nothing but endorsements of your Modified Version by various parties — for example, statements of peer review or that the text has been approved by an organization as the authoritative definition of a standard.
You may add a passage of up to five words as a Front-Cover Text, and a passage of up to 25 words as a Back-Cover Text, to the end of the list of Cover Texts in the Modified Version. Only one passage of Front-Cover Text and one of Back-Cover Text may be added by (or through arrangements made by) any one entity. If the Document already includes a cover text for the same cover, previously added by you or by arrangement made by the same entity you are acting on behalf of, you may not add another; but you may replace the old one, on explicit permission from the previous publisher that added the old one.
The author(s) and publisher(s) of the Document do not by this License give permission to use their names for publicity for or to assert or imply endorsement of any Modified Version.
You may combine the Document with other documents released under this License, under the terms defined in section 4 above for modified versions, provided that you include in the combination all of the Invariant Sections of all of the original documents, unmodified, and list them all as Invariant Sections of your combined work in its license notice, and that you preserve all their Warranty Disclaimers.
The combined work need only contain one copy of this License, and multiple identical Invariant Sections may be replaced with a single copy. If there are multiple Invariant Sections with the same name but different contents, make the title of each such section unique by adding at the end of it, in parentheses, the name of the original author or publisher of that section if known, or else a unique number. Make the same adjustment to the section titles in the list of Invariant Sections in the license notice of the combined work.
In the combination, you must combine any sections Entitled “History” in the various original documents, forming one section Entitled “History”; likewise combine any sections Entitled “Acknowledgements”, and any sections Entitled “Dedications”. You must delete all sections Entitled “Endorsements”.
You may make a collection consisting of the Document and other documents released under this License, and replace the individual copies of this License in the various documents with a single copy that is included in the collection, provided that you follow the rules of this License for verbatim copying of each of the documents in all other respects.
You may extract a single document from such a collection, and distribute it individually under this License, provided you insert a copy of this License into the extracted document, and follow this License in all other respects regarding verbatim copying of that document.
A compilation of the Document or its derivatives with other separate and independent documents or works, in or on a volume of a storage or distribution medium, is called an “aggregate” if the copyright resulting from the compilation is not used to limit the legal rights of the compilation’s users beyond what the individual works permit. When the Document is included in an aggregate, this License does not apply to the other works in the aggregate which are not themselves derivative works of the Document.
If the Cover Text requirement of section 3 is applicable to these copies of the Document, then if the Document is less than one half of the entire aggregate, the Document’s Cover Texts may be placed on covers that bracket the Document within the aggregate, or the electronic equivalent of covers if the Document is in electronic form. Otherwise they must appear on printed covers that bracket the whole aggregate.
Translation is considered a kind of modification, so you may distribute translations of the Document under the terms of section 4. Replacing Invariant Sections with translations requires special permission from their copyright holders, but you may include translations of some or all Invariant Sections in addition to the original versions of these Invariant Sections. You may include a translation of this License, and all the license notices in the Document, and any Warranty Disclaimers, provided that you also include the original English version of this License and the original versions of those notices and disclaimers. In case of a disagreement between the translation and the original version of this License or a notice or disclaimer, the original version will prevail.
If a section in the Document is Entitled “Acknowledgements”, “Dedications”, or “History”, the requirement (section 4) to Preserve its Title (section 1) will typically require changing the actual title.
You may not copy, modify, sublicense, or distribute the Document except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, or distribute it is void, and will automatically terminate your rights under this License.
However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice.
Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, receipt of a copy of some or all of the same material does not give you any rights to use it.
The Free Software Foundation may publish new, revised versions of the GNU Free Documentation License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. See Copyleft.
Each version of the License is given a distinguishing version number. If the Document specifies that a particular numbered version of this License “or any later version” applies to it, you have the option of following the terms and conditions either of that specified version or of any later version that has been published (not as a draft) by the Free Software Foundation. If the Document does not specify a version number of this License, you may choose any version ever published (not as a draft) by the Free Software Foundation. If the Document specifies that a proxy can decide which future versions of this License can be used, that proxy’s public statement of acceptance of a version permanently authorizes you to choose that version for the Document.
“Massive Multiauthor Collaboration Site” (or “MMC Site”) means any World Wide Web server that publishes copyrightable works and also provides prominent facilities for anybody to edit those works. A public wiki that anybody can edit is an example of such a server. A “Massive Multiauthor Collaboration” (or “MMC”) contained in the site means any set of copyrightable works thus published on the MMC site.
“CC-BY-SA” means the Creative Commons Attribution-Share Alike 3.0 license published by Creative Commons Corporation, a not-for-profit corporation with a principal place of business in San Francisco, California, as well as future copyleft versions of that license published by that same organization.
“Incorporate” means to publish or republish a Document, in whole or in part, as part of another Document.
An MMC is “eligible for relicensing” if it is licensed under this License, and if all works that were first published under this License somewhere other than this MMC, and subsequently incorporated in whole or in part into the MMC, (1) had no cover texts or invariant sections, and (2) were thus incorporated prior to November 1, 2008.
The operator of an MMC Site may republish an MMC contained in the site under CC-BY-SA on the same site at any time before August 1, 2009, provided the MMC is eligible for relicensing.
To use this License in a document you have written, include a copy of the License in the document and put the following copyright and license notices just after the title page:
Copyright © YEAR YOUR NAME Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled “GNU Free Documentation License”.
If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, replace the “with… Texts.” line with this:
with the Invariant Sections being LIST THEIR TITLES, with the Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.
If you have Invariant Sections without Cover Texts, or some other combination of the three, merge those two alternatives to suit the situation.
If your document contains nontrivial examples of program code, we recommend releasing these examples in parallel under your choice of free software license, such as the GNU General Public License, to permit their use in free software.