· KLDP.org · KLDP.net · KLDP Wiki · KLDP BBS ·
Booyo LiveCD/Misc Note

/etc/fstab, /proc/mounts, /etc/mtab

  • Knoppix3.4 3.7
knoppix@ttyp0[knoppix]$ cat /etc/fstab
/proc      /proc       proc   defaults            0 0
/sys       /sys        sysfs  noauto              0 0
/dev/pts   /dev/pts    devpts mode=0622           0 0
/dev/fd0   /mnt/auto/floppy auto   user,noauto,exec,umask=000    0 0
/dev/cdrom /mnt/auto/cdrom  auto   user,noauto,exec,ro 0 0

knoppix@ttyp0[knoppix]$ cat /proc/mounts
rootfs / rootfs rw 0 0
/dev/root.old / ext2 rw 0 0
/proc /proc proc rw 0 0
/dev/pts /dev/pts devpts rw 0 0
/dev/scd0 /cdrom iso9660 ro 0 0
/dev/cloop /KNOPPIX iso9660 ro 0 0
/ramdisk /ramdisk tmpfs rw 0 0
/proc/bus/usb /proc/bus/usb usbdevfs rw 0 0
automount(pid386) /mnt/auto autofs rw 0 0

knoppix@ttyp0[knoppix]$ cat /etc/mtab
/dev/root / ext2 rw 0 0
/dev/scd0 /cdrom iso9660 ro 0 0
/dev/cloop /KNOPPIX iso9660 ro 0 0
/ramdisk /ramdisk tmpfs rw,size=506368k 0 0
/proc/bus/usb /proc/bus/usb usbdevfs rw,devmode=0666 0 0
automount(pid386) /mnt/auto autofs rw,fd=4,pgrp=386,minproto=2,maxproto=4 0 0


/dev/sda1               48163+  de  Dell Utility
/dev/sda2   *       61440592+   7  HPFS/NTFS
/dev/sda3             2883667+  db  CP/M / CTOS / ...
/dev/sda4            91875735    5  Extended
/dev/sda5             9775521   83  Fedora core 3
/dev/sda6             1020096   82  Linux swap
/dev/sda7             9775521   83  Fedora core 3 desktop
/dev/sda8             5863693+  83  knoppix
/dev/sda9             3911796   83  booyo-live cd fail
/dev/sda10            5855661   83  knoppix 3.7
/dev/sda11            3429846   83  booyo test3 build
/dev/sda12            5863693+  83  booyo test3 build

/dev/hdb1 knoppx live cd 3.7
/dev/hdb2 booyo live cd emul


[root@localhost ~]# yum check-update
Setting up Repos
base                      100% |=========================| 1.1 kB    00:00
updates-released          100% |=========================|  951 B    00:00
Reading repository metadata in from local files
primary.xml.gz            100% |=========================| 797 kB    00:01
MD Read   : ################################################## 2623/2623
base      : ################################################## 2622/2622
primary.xml.gz            100% |=========================| 351 kB    00:00
MD Read   : ################################################## 885/885
updates-re: ################################################## 885/885

alsa-lib.i386                            1.0.6-8.FC3           updates-released
alsa-lib-devel.i386                      1.0.6-8.FC3            updates-released
at.i386                                  3.1.8-70_FC3           updates-released
autofs.i386                              1:4.1.3-114            updates-released
cpp.i386                                 3.4.3-22.fc3           updates-released
curl.i386                                7.12.3-3.fc3           updates-released
curl-devel.i386                          7.12.3-3.fc3           updates-released
dhclient.i386                            7:3.0.1-42_FC3         updates-released
dmraid.i386                              1.0.0.rc6-1_FC3        updates-released
e2fsprogs.i386                           1.36-1.FC3.1           updates-released
e2fsprogs-devel.i386                     1.36-1.FC3.1           updates-released
elinks.i386                              0.9.2-2.1              updates-released
enscript.i386                            1.6.1-28.0.4           updates-released
foomatic.i386                            3.0.2-13.4             updates-released
gaim.i386                                1:1.2.1-1.fc3          updates-released
gcc.i386                                 3.4.3-22.fc3           updates-released
gcc-c++.i386                             3.4.3-22.fc3           updates-released
gcc-g77.i386                             3.4.3-22.fc3           updates-released
gcc-java.i386                            3.4.3-22.fc3           updates-released
gftp.i386                                1:2.0.18-0.FC3         updates-released
gimp.i386                                2:2.2.6-0.fc3.2        updates-released
glibc.i386                               2.3.5-0.fc3.1          updates-released
glibc-common.i386                        2.3.5-0.fc3.1          updates-released
glibc-devel.i386                         2.3.5-0.fc3.1          updates-released
glibc-headers.i386                       2.3.5-0.fc3.1          updates-released
hwbrowser.noarch                         0.20-0.fc3.1           updates-released
initscripts.i386                         7.93.7-1               updates-released
jwhois.i386                              3.2.2-6.FC3.1          updates-released
kernel.i586                              2.6.11-1.14_FC3        updates-released
kernel-smp.i586                          2.6.11-1.14_FC3        updates-released
krb5-devel.i386                          1.3.6-5                updates-released
krb5-libs.i386                           1.3.6-5                updates-released
libexif.i386                             0.5.12-6.fc3           updates-released
libf2c.i386                              3.4.3-22.fc3           updates-released
libgcc.i386                              3.4.3-22.fc3           updates-released
libgcj.i386                              3.4.3-22.fc3           updates-released
libgcj-devel.i386                        3.4.3-22.fc3           updates-released
libpcap.i386                             14:0.8.3-8.FC3         updates-released
libstdc++.i386                           3.4.3-22.fc3           updates-released
libstdc++-devel.i386                     3.4.3-22.fc3           updates-released
libtiff.i386                             3.6.1-10.fc3           updates-released
libtiff-devel.i386                       3.6.1-10.fc3           updates-released
lockdev.i386                             1.0.1-4.1              updates-released
lockdev-devel.i386                       1.0.1-4.1              updates-released
logwatch.noarch                          5.2.2-1.FC3.1          updates-released
lsof.i386                                4.72-2.2               updates-released
nscd.i386                                2.3.5-0.fc3.1          updates-released
openssh.i386                             3.9p1-8.0.1            updates-released
openssh-askpass.i386                     3.9p1-8.0.1            updates-released
openssh-askpass-gnome.i386               3.9p1-8.0.1            updates-released
openssh-clients.i386                     3.9p1-8.0.1            updates-released
openssh-server.i386                      3.9p1-8.0.1            updates-released
perl.i386                                3:5.8.5-12.FC3         updates-released
policycoreutils.i386                     1.18.1-2.12            updates-released
procps.i386                              3.2.3-5.2              updates-released
selinux-policy-targeted.noarch           1.17.30-2.96           updates-released
system-config-samba.noarch               1.2.28-0.fc3.1         updates-released
system-config-services.noarch            0.8.21-0.fc3.1         updates-released
telnet.i386                              1:0.17-32.FC3.2        updates-released
thunderbird.i386                         1.0.2-1.3.2            updates-released
tzdata.noarch                            2005f-1.fc3            updates-released
udev.i386                                039-10.FC3.7           updates-released
urw-fonts.noarch                         2.3-0.FC3.1            updates-released
util-linux.i386                          2.12a-24.2             updates-released
vixie-cron.i386                          1:4.1-33_FC3           updates-released
vte.i386                                 0.11.13-1.fc3          updates-released
words.noarch                             3.0-2.3                updates-released
xloadimage.i386                          4.1-34.FC3             updates-released
xorg-x11.i386                            6.8.2-1.FC3.13         updates-released
xorg-x11-Mesa-libGL.i386                 6.8.2-1.FC3.13         updates-released
xorg-x11-Mesa-libGLU.i386                6.8.2-1.FC3.13         updates-released
xorg-x11-deprecated-libs.i386            6.8.2-1.FC3.13         updates-released
xorg-x11-deprecated-libs-devel.i386      6.8.2-1.FC3.13         updates-released
xorg-x11-devel.i386                      6.8.2-1.FC3.13         updates-released
xorg-x11-font-utils.i386                 6.8.2-1.FC3.13         updates-released
xorg-x11-libs.i386                       6.8.2-1.FC3.13         updates-released
xorg-x11-tools.i386                      6.8.2-1.FC3.13         updates-released
xorg-x11-twm.i386                        6.8.2-1.FC3.13         updates-released
xorg-x11-xauth.i386                      6.8.2-1.FC3.13         updates-released
xorg-x11-xdm.i386                        6.8.2-1.FC3.13         updates-released
xorg-x11-xfs.i386                        6.8.2-1.FC3.13         updates-released[root@localhost ~]#

dwnload from update yum-2.2.0-0.fc3.noarch.rpm libxml2-python-2.6.16-3.i386.rpm

There's one thing I've noticed in the autorun of a lot of CDs that gets overlooked. When an autorun.bat executes from a DOS window in Win9x/Me, it leaves an ugly "Finished - Autorun" window on the screen (I understand that the window closes in 2000/XP) that you have to manually close.

All that's needed to fix it (and make it look a lot more professional) is to include a .PIF file that includes instructions to run the window minimized and to close it when the autorun.bat finishes. Then all you get is a brief appearance of "Start - Autorun" in the taskbar (look quick or you'll miss it) and nothing detracting from the presentation.

Autorun.inf files allow the cd's you create to automatically launch an application when the cd is inserted in the cd player. Simply place the file you create with Autorun.inf maker in the root directory of your cd.

application suite fax telephony office suite image editor Light weight image manipulator vector drawing cad software spam filter calendaring mail lists download manager documentation windows emulation html editor ids jre virus scan/control web browser business logistics

core default filesystem back-up/file-sync utilities .net framework java support for windows client security package shells vpn

developer specific ha software compilers editors version control scripting language project management ide

look and feel desktop environment light weight window manager

management and monitoring cluster management remote management hardware monitoring network monitoring

miscellaneous automatic installer unattended auto installer x-terminal emulator mua news reader irc client

core services network information authentication service location printing spooler file sharing

other services database server web server mta ftp server pop3/imap4 server dns server proxy server java app server terminal serv

grub-install --root-directory=/mnt/hda5 /dev/hda

Keep your Linux system up-to-date! This product contains a daily snapshot of downloadable Fedora Core 4 update/errata. You can save your time and bandwidth by updating your system using your choice of package manager (yum, apt-get or rpm) and this product. You should update your system regularly to keep your computer safe and working at it's best! This product allows you to conveniently install the latest security updates, bug fixes and errata onto your existing Linux system.

Note: Most of the software in this package are governed by the GNU General Public License (GPL). No support is provided. Fedora is a registered trademark of RedHat Linux. Linux is a registered trademark of Linus Torvalds. All other brands and product names are trademarks or registered trademarks of their respective owners.

gnome ubuntu

root@ubuntu:/etc/gdm # diff gdm.conf gdm.conf~
< AutomaticLoginEnable=true
< AutomaticLogin=ubuntu
> AutomaticLoginEnable=false
> AutomaticLogin=
< TimedLoginEnable=true
< TimedLogin=ubuntu
< TimedLoginDelay=10
> TimedLoginEnable=false
> TimedLogin=
> TimedLoginDelay=30
< BackgroundColor=#2A569D
> BackgroundColor=#4E3E29



  • http://www.unionfs.org/
  • modprobe unionfs
  • mount -t unionfs -o dirs=/mnt/cdrom1=ro:/mnt/cdrom2=ro unionfs /mnt/union
  • unionctl /mnt/union --add --after /mnt/cdrom2 --mode ro /mnt/cdrom3
  • unionctl /mnt/union --add --before /mnt/cdrom1 --mode rw /mnt/changes


  • grub or boot prompt
  • before init
  • init
  • x window

  • use busybox
  • module dependence 를 점검하여 필요한 모듈 리스트 작성
  • 이미 로드되어 있는가 점검
  • gzip 이면 풀어서 tmp 에 풀고, insmod
    • load modules: loop, isofs, squashfs, unionfs, nls_cp437, nls_iso8859-1, nls_iso8859-2, vfat, ntfs
  • create block device: mknod
  • setup dma
  • mkdir union, memory
  • mount -t tmpfs -o "size=80%" tmpfs $MEMORY
  • mkdir changes, copy2ram, image under /memory
  • mount -t unionfs -o dirs=$CHANGES=rw unionfs $UNION
  • find live cd
  • fail 이면, modprobe_usb_modules
    • load usb modules
  • toram 이면 copy to ram
  • mkdir -p $UNION/boot
  • mount -o bind $DATA $UNION/boot 알아 볼 것
  • union_insert_modules $UNION $DATA $IMAGES
  • copy_rootchanges $DATA $UNION
  • activate_fstab $UNION
  • mkdir -p $UNION/proc
  • mkdir -p $UNION/sys
  • mkdir -p $UNION/tmp
  • mkdir -p $UNION/dev
  • cd $UNION
  • mkdir -p $INITRAMDISK
  • mknod $UNION/dev/console c 5 1
  • pivot_root . $INITRAMDISK
  • exec $CHROOT . sbin/init <dev/console >dev/console 2>&1

  • It creates an empty union in /union directory
  • it mounts tmpfs to /memory directory
  • it locates SLAX CD by mounting all CDs and disks and by searching for a file livecd.sgn. You may be surprised, but the cdrom is mounted in /union/mnt/!
  • all necessary images (*.mo) from SLAX CD are mounted to directories /memory/images/*.mo and all these mountpoints are, by using unionctl, added to union as an individual read-only branches.
  • Union is then extended by a special directory /memory/changes in read-write mode.
  • When all modules are added to union and one rw branch is at the top of it, pivot_root is executed. That is pretty tricky too, original root is moved to /mnt/live and /union becomes new root. You may explore /mnt/live while running SLAX to see original content of ramdisk.
  • Finally linuxrc executes /sbin/init which will start all system services and display login screen as usual.

  • union_insert_modules $UNION $DATA $IMAGES
Important directories:

boot ....... contains files to boot Live CD

base ....... contains base (essential) modules for filesystem. All .mo files from this directory will be used.
modules .... contains additional modules for filesystem. All .mo files from this directory will be used.
optional ... contains optional modules, which are loaded only with "load=modulename.mo" boot option.
rootcopy ... contains files which are directly copied to root directory / while booting, overwriting originals.

Important files:

make_iso.sh .... script to build new iso in Linux
make_iso.bat ... script to build new iso in DOS/Windows

[root@localhost base]# ls
01_kernel.mo  03_xwindow.mo   05_common.mo    07_kde_apps.mo    09_slax.mo
02_core.mo    04_xap_libs.mo  06_kde_base.mo  08_kde_office.mo

# Insert one single .mo module to the union
# $1 = union absolute path (starting with /)
# $2 = module.mo full path
# $3 = destination folder, where images will be mounted to
   TARGET="$3/`basename $2`"
   while [ -e $TARGET ]; do TARGET=$TARGET.X; done
   mkdir -p $TARGET
   mount_module $2 $TARGET
   if [ $? -ne 0 ]; then echo "can't read module data. corrupted download?" >&2; return 1; fi
   union_insert_dir $1 $TARGET
   if [ $? -ne 0 ]; then echo "can't insert module to union" >&2; return 1; fi
   basename $TARGET

# Mount .mo module to destination directory
# $1 = path to .mo livecd compressed module
# $2 = destination folder
   mount -t squashfs -o loop,ro "$1" "$2"
   echo "$1 $2" >>/tmp/_mounts

# Insert a directory tree $2 to an union specified by $1
# Top-level read-write branch is specified by it's index 0
# $1 = union absolute path (starting with /)
# $2 = path to data directory
   unionctl "$1" --add --after 0 --mode ro "$2"


[root@localhost cdrecorder]# ls -l
합계 538841
-r-xr-xr-x  1 root root     36864 11월 30  2004 Autorun.exe
-r--r--r--  1 root root      1038  7월 14 08:38 README
-r--r--r--  1 root root      2861  7월 20 12:53 TRANS.TBL
-r--r--r--  1 root root  35483648  7월 19 12:55 adios.sqfs
dr-xr-xr-x  2 root root      2048  7월 11 15:55 adk
-r-xr-xr-x  1 root root       609 11월 30  2004 autorun
-r--r--r--  1 root root      1379  7월  5 19:33 autorun.html
-r--r--r--  1 root root        40 11월 30  2004 autorun.inf
lr-xr-xr-x  1 root root         8 12월 21  2004 boot -> isolinux
-r--r--r--  1 root root      1303  7월 20 11:18 grubit.cmd
dr-xr-xr-x  2 root root      2048  7월 20 10:28 isolinux
dr-xr-xr-x  2 root root      2048  7월 19 11:32 opt
-r--r--r--  1 root root 516235264  7월 19 13:19 usr.sqfs
dr-xr-xr-x  3 root root      2048  2월 17 12:48 www
[root@localhost opt]# ls -l
합계 170189
-r--r--r--  1 root root      667  7월 20 12:53 TRANS.TBL
-r--r--r--  1 root root 74838016  7월 19 11:33 openoffice.sqfs
-r--r--r--  1 root root 52039680  7월  8 12:09 uml.sqfs
-r--r--r--  1 root root 47394816  7월 19 08:19 www.sqfs

해야 할 일

  • kernel update
  • busybox


   45  mv squashfs2.2-patch /usr/src/linux/
   46  cd /usr/src/linux
   47  ls
   48  patch -p1 < squashfs2.2-patch
   49  make distclean
   50  make mrproper
   65  make gconfig
[root@localhost linux]# diff .config ../redhat/BUILD/kernel-2.6.12/linux-2.6.12/.config
< # Linux kernel version: 2.6.12-prep
< # Sun Aug  7 09:48:43 2005
> # Linux kernel version:
> # Sun Aug  7 09:32:40 2005
< # CONFIG_AUDIT is not set
< # CONFIG_IP6_NF_QUEUE is not set
< # CONFIG_BNX2 is not set
> # CONFIG_FB_HGA is not set
< # CONFIG_USB_SL811_CS is not set
< # CONFIG_NTFS_DEBUG is not set
< # CONFIG_NTFS_RW is not set
> # CONFIG_NTFS_FS is not set

device drivers ->networking support -> networking support -> networking options -> tcp/ip networking -> IP:advanced router -> IP: equal cost multipath -> IP: equal cost multipath with caching support N

device drivers ->networking support -> networking support -> networking options ->network packet filtering -> IPv6:netfilter configuration -> userspace queing via NETLINK M

device drivers ->networking support -> network device support -> ethernet(1000Mbit) -> Broadcom NetXt.. M

device drivers -> graphics support -> support for framebuffer -> hercules mono graphics support N

device drivers -> USB support -> Support for host side USB -> SL811HS HCD support -> CF/PCMCIA support SL811HS HCD M

device drivers -> USB support -> Support for host side USB -> USB serial converter support -> USB serial converter support -> USB option pcmcia serial driver M

edit Makefile: EXTRAVERSION = -squashfs

make iso

for dir in bin etc home lib opt root usr sbin var; do
    if [ -d $ROOT/$dir ]; then
      echo "base/$dir.mo"
      create_module $ROOT/$dir $CDDATA/base/$dir.mo -keep-as-directory
      if [ $? -ne 0 ]; then exit; fi

echo "creating LiveCD ISO image..."
./make_iso.sh /tmp/livecd.iso

cd /tmp
header "Your ISO is created in /tmp/livecd.iso"

without squashfs module
[root@localhost base]# ls -l
합계 1536444
-rw-------  1 root root    2650112  8월  7 13:51 bin.mo
-rw-------  1 root root    9347072  8월  7 13:52 etc.mo
-rw-------  1 root root       4096  8월  7 13:52 home.mo
-rw-------  1 root root  157302784  8월  7 13:56 lib.mo
-rw-------  1 root root       4096  8월  7 13:56 opt.mo
-rw-------  1 root root   43253760  8월  7 13:57 root.mo
-rw-------  1 root root    7938048  8월  7 14:30 sbin.mo
-rw-------  1 root root 1336991744  8월  7 14:30 usr.mo
-rw-------  1 root root   14254080  8월  7 14:30 var.mo

  • unionfs


adios functions
Currently defined functions:
        [, [[, ash, awk, basename, bunzip2, busybox, bzcat, cat, chgrp,
        chmod, chown, chroot, chvt, clear, cmp, cp, cpio, cut, date, dd,
        deallocvt, df, dirname, dmesg, du, echo, egrep, eject, env, expr,
        false, fdisk, fgrep, find, free, freeramdisk, getopt, grep, gunzip,
        gzip, hdparm, head, hexdump, hostname, id, ifconfig, insmod, kill,
        killall, klogd, length, ln, logger, losetup, ls, lsmod, md5sum,
        mesg, mkdir, mkfifo, mknod, mkswap, mktemp, modprobe, more, mount,
        mv, nameif, nc, netstat, nice, nslookup, od, openvt, patch, pidof,
        ping, pivot_root, printf, ps, pwd, rdate, readlink, renice, reset,
        rm, rmdir, rmmod, route, sed, seq, sh, sleep, sort, stat, strings,
        stty, sum, swapoff, swapon, sync, sysctl, syslogd, tail, tar,
        tee, test, tftp, time, top, touch, tr, traceroute, true, tty,
        udhcpc, umount, uname, uniq, unzip, uptime, usleep, vi, wc, wget,
        which, whoami, xargs, yes, zcat

slax functions
Currently defined functions:
        [, ash, basename, busybox, cat, chmod, chown, chroot, clear, cp,
        cut, dd, df, dirname, du, echo, egrep, expr, false, fdisk, fgrep,
        find, free, grep, gunzip, halt, hdparm, head, insmod, kill, killall,
        last, ln, logger, losetup, ls, lsmod, md5sum, mkdir, mkfifo, mknod,
        mkswap, mktemp, modprobe, more, mount, mv, pivot_root, poweroff,
        ps, pwd, readlink, realpath, reboot, rm, rmdir, rmmod, sed, sh,
        sleep, sort, swapoff, swapon, sync, tail, tar, tee, test, touch,
        tr, true, umount, uname, uniq, vi, wc, xargs, zcat

mandrake move functions
Currently defined functions:
        basename, busybox, cat, chgrp, chmod, chown, chroot, chvt, clear,
        cp, cut, date, dd, df, dirname, dmesg, du, echo, env, false, find,
        free, grep, gunzip, gzip, halt, head, id, init, kill, killall,
        klogd, linuxrc, ln, logger, ls, lsmod, mkdir, mknod, mkswap, more,
        mount, mv, poweroff, ps, pwd, reboot, reset, rm, rmdir, sed, sh,
        sleep, sort, swapoff, swapon, sync, syslogd, tail, tar, touch,
        true, tty, umount, uname, uniq, uptime, wc, which, whoami, xargs,
        yes, zcat

  • make menuconfig


  • ketnel source 중 include 의 몇개 파일을 생성하기 위해서는
  • make prepare0 를 하면 됨.

package 분류


  • official: 297 개
  • non-gnu: 2159
  • gnu package 분류 및 선별

debian 분류 방식

fedora 분류 방식

How sharper than a hound's tooth it is to have a thankless serpent.

sponsored by andamiro
sponsored by cdnetworks
sponsored by HP

Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2005-11-27 04:03:48
Processing time 0.0111 sec