· KLDP.org · KLDP.net · KLDP Wiki · KLDP BBS ·
Jin LiveCD/Make Live

커널

  • /boot /lib/modules
  • initrd 의 vmlinuz
  • config 관련 작업
    • ntfs, debug_info
    • loop 는 ?
    • audit
  • bootsplash, squashfs, unionfs
    • module 로 할 것인가 ?
    • config_logo (kernel config 에서 n 으로 변경해야 함)

bootsplash

squashfs

unionfs

artwork

  • icons
  • backgrounds
  • gnome-splash
  • gdm

패키지 설치

/opt/booyo


init


LIVECD.build

  • squashfs 에서 생성한 mksquashfs 복사
  • mkfilesystem.all 수행
    • /BASESQFS 생성
  • BASE.mksqfs 수행
    • LIVECD.Master/LIVECD/base.sqfs
  • 커널 복사
    • LIVECD.Master/boot/vmlinuz
  • mkinitrd 로 이동하여 initrd.gz 생성
    • LIVECD.Master/boot/initrd.gz
  • 이 상태에서 boot emulating 할 수 있음.
    • C 파티션 생성
    • LIVECD.Master/LIVECD 를 / 에 복사
    • LIVECD.Master/boot 를 / 에 복사
    • grub.conf 에 적용

  • message 생성
    • LIVECD.Master/boot/grub/message
  • stage2_eltorito 복사
    • LIVECD.Master/boot/grub/stage2_eltorito
  • LIVECD.Master/boot/grub/menu.lst 생성
  • index.html 생성
    • LIVECD.Master/index.html
    • MS window 상태에서 CD 를 넣었을 때, 보여주는 내용.
  • ISO 파일 생성

mkinitrd

  • 디렉토리 구조는 cloop 를 사용할 때와 squashfs 를 사용할 때가 다르다.
  • unionfs 를 사용할 때 다르다.
  • mkcpio
    • initrd 디렉토리를 이용하여 initrd.gz 생성
  • initrd 밑의 파일들
    • UNIONFS: unionfs file system
    • bootsplash: splash 에 의해 생성된 파일
    • cdrom: cdrom 이 마운트 되는 곳
    • dev: 몇가지 기본적인 것
      • console, loop0-7, null, pts, shm, zero
      • block 디바이스는 init 에서 생성
      • 나머지는 udevstart 가 생성
    • etc
      • 실제로 최소 무엇이 있어야 하나?
      • 생각해 볼 것
      • ld.so.conf
      • mtab
      • rc.d
        • booyo-init, booyo-halt, booyo-services
        • booyo-reboot 는 booyo-halt 에 링크
        • 이름 바꿀 것
    • init
      • loop 를 사용할 경우에는 linuxrc 여야 함.
    • modules
      • 필요한 커널 드라이버들
      • ash-booyo 를 사용할 경우, insmod, rmmod 가 있어야 함.
        • /sbin/insmod.static
        • /sbin/rmmod.static
      • loop.ko, unionfs.ko, squashfs.ko
    • proc, sys, tmp
    • sbin 은 static 의 링크임.
    • bin, lib, usr 은 /base_image/bin,lib,usr 의 링크임.
      • cloop 인 경우
      • 3 개 이상의 레이어를 사용할 경우 달라질 수 있음
    • static
      • busybox 와 링크들
      • unionctl

busybox

gfxboot

단계적 과정

  • A partition 에 Desktop 설치
    • root passwd: livecd
  • B partition 에 Workstation 설치
    • root passwd: livecd
  • grub.conf
    • A, B partition 에 원본 커널로 부팅
    • A, B partition 에 새로운 커널로 부팅
  • A partition 원본 커널로 부팅
    • 나머지 부분 설정
      • user name: livecd
      • userpasswd: livecd
  • B partition 원본 커널로 부팅
    • 나머지 부분 설정
      • user name: livecd
      • userpasswd: livecd
    • 커널 생성
    • opt 생성
    • sysvinit 생성
    • A 파티션에 복사
      • 새로운 커널, modules
      • opt/booyo
      • artwork
      • init
      • etc/bootsplash
    • LIVECD.build 복사
    • make BASESQFS
    • make base.sqfs
    • initrd.gz 생성
      • kernel 복사
      • 디바이스 드라이버 복사
      • unionfs.ko, squash.ko 복사
      • busybox 복사
      • unionctl 복사
  • emulating 시험
  • grub 생성
    • gfxboot, boot/grub/message
    • boot/grub/stage2_eltorito slax 것 복사
      • 이것을 어떻게 만드는지 알아야 함.
      • grub 의 Makefile 을 보면 될 것 같은데...

해야 할 일

  • bootsplash 의 image 에 문구 넣을 것
    • press F2

작업 내용 2005.10.30

  • mkfilesystem.tst 에서 다음을 없앰
mkdir $DEST/dev
mkdir $DEST/media
mkdir $DEST/mnt
mkdir $DEST/proc
mkdir $DEST/sys
mkdir $DEST/tmp
  • init 에 UNIONFS 만든 후 mkdir media, mnt
  • mklivecdfs 생성
    • /livecd.src/artwork/icons/cpicons 수정

  • make base.sqfs
  • cd /mnt/hdb2/LIVECD
  • cp /LIVECD.build/LIVECD.Master/LIVECD/base.sqfs .
  • cd ../boot
  • sh mkcpio
  • reboot

gstreamer

    7  rpm -ivh indent-2.2.9-8.i386.rpm
    8  rpm -ivh libIDL-devel-0.8.5-2.i386.rpm
    9  rpm -ivh ORBit2-devel-2.12.1-3.i386.rpm
   10  rpm -ivh GConf2-devel-2.10.0-4.i386.rpm
   11  rpm -ivh gstreamer-plugins-*
   12  rpm -ivh gstreamer-plugins-devel-0.8.8-6.i386.rpm

  • ainit root start
  • /etc/alsa/ainit.conf
    • overwrite = yes overwrite=no

  • cd /usr/bin
  • ln -s gdk-pixbuf-query-loaders-32 gdk-pixbuf-query-loaders

  • rebuildfstab 볼 것
  • halt 검토할 것

  • inittab 는 살아 있는데, booyo-init, booyo-halt 등은 없어질까?

init, halt, reboot

  • /
SQFS UNIONFS
cdrom dev ramdisk static swap

media mnt proc sys
home -> /ramdisk/home
root -> /ramdisk/root
tmp -> /ramdisk/tmp

bin -> /UNIONFS/bin
boot -> /UNIONFS/boot
etc -> /UNIONFS/etc
lib -> /UNIONFS/lib
misc -> /UNIONFS/misc
opt -> /UNIONFS/opt
sbin -> /UNIONFS/sbin
selinux -> /UNIONFS/selinux
srv -> /UNIONFS/srv
usr -> /UNIONFS/usr
var -> /UNIONFS/var
  • SQFS
    • bin boot etc home lib misc opt root sbin
    • selinux srv usr var
  • UNIONFS
    • bin boot etc home lib misc opt root sbin
    • selinux srv tmp usr var
  • initrd
SQFS UNIONFS bootsplash cdrom init modules
sbin -> static
static
bin -> /SQFS/bin
boot -> /SQFS/boot
lib -> /SQFS/lib
opt -> /SQFS/opt
usr -> /SQFS/usr
dev etc media mnt proc root sys tmp
  • UNIONFS 로 링크되어 있는 것
    • bin, boot, etc, lib, misc, opt, sbin,
    • selinux, srv, usr, var
[root@localhost UNIONFS]# cat /proc/mounts
rootfs / rootfs rw 0 0
none /sys sysfs rw 0 0
/dev/hdb2 /cdrom ext2 ro 0 0
/dev/loop0 /SQFS squashfs ro 0 0
/ramdisk /ramdisk tmpfs rw 0 0
/UNIONFS /UNIONFS unionfs rw,dirs=/ramdisk=rw:/SQFS=ro,debug=0,delete=whiteout,copyup=preserve 0 0
/proc /proc proc rw,nodiratime 0 0
/proc/bus/usb /proc/bus/usb usbfs rw 0 0
none /dev tmpfs rw 0 0
none /dev/pts devpts rw 0 0
none /proc/sys/fs/binfmt_misc binfmt_misc rw 0 0
  • \/dev
    \/ramdisk

[root@localhost root]# cat /etc/mtab
/dev/root / tmpfs rw 0 0
usbfs /proc/bus/usb usbfs rw 0 0
/dev/hdb2 /cdrom ext2 ro 0 0
/ramdisk /ramdisk tmpfs rw 0 0
none /proc/sys/fs/binfmt_misc binfmt_misc rw 0 0

  • etc 를 SQFS 의 상태로 쓸 수 있도록 만들 것
  • ramdisk 가 지워지는 것 같음.
  • 수정해야 할 것
    • init, booyo-halt
    • make process ( /sbin/init 을 /etc 에 복사.
      • /etc/rc.d 밑의 파일들을 SQFS 로 이동
      • SQFS 가 제일 나중에 umount 되도록 해야 한다.

adios

EjectCD()
{
    local EJECT=$1 SQUASHFS

    #just in case they are mounted, umount any squashfs mounts
    for SQUASHFS in `grep squash /proc/mounts | cut -d' ' -f2`; do
        umount $SQUASHFS
    done
    umount $BOOTCD_DIR

    if [ "X${EJECT}" = "Xmessage-only" ]; then
        echo; echo "You may now eject the CD."
    else
        eject /dev/cdrom
    fi
}
Reboot()
{
    Shutdown -r
}
Shutdown()
{
    local HOW=$1

    UnmountAllPartitions
    grep -q cdrom /proc/mounts && EjectCD
    echo
    case $HOW in
        -r) echo "Rebooting system ... "; reboot -f;;
        *) echo "Halting system ... "; halt -f -p;;
    esac
}
{{{
[root@localhost cdrom]# ls -l
합계 24
drwxr-xr-x  1 root root  791  5월 17 10:28 bin
lrwxrwxrwx  1 root root    8  7월 19 12:55 boot -> ../boot/
lrwxrwxrwx  1 root root    7  7월 19 12:55 etc -> ../etc/
lrwxrwxrwx  1 root root    8  7월 19 12:55 home -> ../home/
drwxr-xr-x  1 root root   10  6월 20 11:50 initrd
drwxr-xr-x  1 root root 2127  6월 10 14:29 lib
lrwxrwxrwx  1 root root    9  7월 19 12:55 media -> ../media/
lrwxrwxrwx  1 root root    8  7월 19 12:55 misc -> ../misc/
lrwxrwxrwx  1 root root    7  7월 19 12:55 mnt -> ../mnt/
lrwxrwxrwx  1 root root    7  7월 19 12:55 opt -> ../opt/
lrwxrwxrwx  1 root root    8  7월 19 12:55 proc -> ../proc/
lrwxrwxrwx  1 root root    8  7월 19 12:55 root -> ../root/
drwxr-xr-x  1 root root 2539  7월  4 13:27 sbin
lrwxrwxrwx  1 root root   11  7월 19 12:55 selinux -> ../selinux/
lrwxrwxrwx  1 root root    7  7월 19 12:55 srv -> ../srv/
lrwxrwxrwx  1 root root    7  7월 19 12:55 sys -> ../sys/
lrwxrwxrwx  1 root root   12  7월 19 12:55 tftpboot -> ../tftpboot/
lrwxrwxrwx  1 root root    7  7월 19 12:55 tmp -> ../tmp/
lrwxrwxrwx  1 root root    7  7월 19 12:55 usr -> ../usr/
drwxr-xr-x  1 root root  308  7월 14 13:28 var

initrd

drwxr-xr-x   2 root root  4096  5월 25 15:14 adios
lrwxrwxrwx   1 root root    11 10월 29 23:15 bin -> initrd/bin/
drwxr-xr-x   3 root root  4096  5월 31 17:13 boot
drwxr-xr-x  19 root root  8192  5월 25 15:58 dev
lrwxrwxrwx   1 root root    11 10월 29 23:15 etc -> initrd/etc/
drwxr-xr-x   7 root root  4096 11월  1 20:32 initrd
-rw-r--r--   1 root root   964  8월 15 21:04 kk
lrwxrwxrwx   1 root root    11 10월 29 23:15 lib -> initrd/lib/
-rwxr-xr-x   1 root root 74412  7월 20 12:53 linuxrc
drwxr-xr-x   5 root root  4096  5월 25 16:01 media
drwxr-xr-x   2 root root  4096  5월 25 15:14 misc
drwxr-xr-x  16 root root  4096  7월  8 12:10 mnt
drwxr-xr-x   2 root root  4096  5월 25 15:14 opt
drwxr-xr-x   2 root root  4096  5월 25 15:14 proc
drwxr-xr-x   2 root root  4096  5월 31 17:07 root
lrwxrwxrwx   1 root root    12 10월 29 23:15 sbin -> initrd/sbin/
drwxr-xr-x   2 root root  4096  5월 25 15:14 selinux
drwxr-xr-x   2 root root  4096  5월 25 15:14 srv
drwxr-xr-x   2 root root  4096  5월 25 15:14 sys
drwxrwxrwt   2 root root  4096  5월 25 15:14 tmp
lrwxrwxrwx   1 root root    11 10월 29 23:15 usr -> initrd/usr/
drwxr-xr-x   4 root root  4096  5월 25 16:02 var
}}}
{{{
PrepareRealRootFilesystem()
# This function is called just before we exit the initrd environment.
# It replaces the initrd/busybox files with the real root filesystem files so
# that the kernel can start the init process and so on, as per a normal linux
# session.  Plus a heap of other stuff.
{
    local SQFS SQFS_DIRS DIR

    [ $USE_UNIONFS = TRUE ] && modprobe unionfs >/dev/null

-----
    # special case of loopback files not recommended
        # setup links into /var       
        rm -f etc; rm -rf boot root tmp
        ln -s var/boot var/etc var/home var/root var/tftpboot var/tmp /

        if [ $ADIOSMOUNTED = FALSE ]; then
            MountSquashFS adios /
            ADIOSMOUNTED=TRUE
        fi

        # Replace busybox stuff with the real root files located in /adios and /var
        if [ -f ${BOOTCD_DIR}/usr.sqfs ]; then
            busybox rm -f usr
            busybox mkdir usr
            # allow for ext3 loopback filesystem similar to MountSquashFS usr /
            if busybox [ $USE_UNIONFS = TRUE ]; then
                busybox mkdir -p /mnt/usr /tmp/usr_cow
                /initrd/bin/mount -r -o loop -t squashfs ${BOOTCD_DIR}/usr.sqfs /mnt/usr
                /initrd/bin/mount -t unionfs -o dirs=/tmp/usr_cow:/mnt/usr none /usr
                busybox echo "Mounting usr.sqfs on /usr with unionfs"
            else
                /initrd/bin/mount -r -o loop -t squashfs ${BOOTCD_DIR}/usr.sqfs /usr
                busybox echo "Mounting usr.sqfs on /usr"
            fi
            busybox [ -f /usr/usr.loop ] &&
                ( busybox umount /usr; \
                  busybox mkdir -p /mnt/usr; \
                  /initrd/bin/mount -r -o loop -t squashfs ${BOOTCD_DIR}/usr.sqfs /mnt/usr; \
                  /initrd/bin/mount -r -o loop /mnt/usr/usr.loop /usr )
        else
            busybox rm -f usr
            busybox echo "Linking /usr to /adios/usr"
            busybox ln -s adios/usr /usr
        fi
        busybox rm -f bin lib sbin #remove links
        busybox ln -s adios/bin adios/lib adios/sbin /
        # magic for /mnt for UML children
        busybox ln -s /var /etc /mnt

        USE_UNIONFS=FALSE
        # mount all the sqfs files in /opt (if any)
        [ "$SQFS_DIR" != "$BOOTCD_DIR" ] && SQFS_DIRS="$BOOTCD_DIR $SQFS_DIR" || SQFS_DIRS=$BOOTCD_DIR
        for DIR in $SQFS_DIRS; do
            for SQFS in `ls ${DIR}/opt/*.sqfs`; do
                SQFS=`basename ${SQFS%%.sqfs}`
                mkdir -p /opt/${SQFS}
                MountSquashFS $SQFS /opt/ $DIR
            done
        done
----
    chmod 755 /var

    # Delete files in initrd that are no longer needed.  However we need to
    # keep some files (eg busybox) coz they're used again at shutdown.
    if [ $TRIMINITRD = "TRUE" ]; then
        (rm -f /linuxrc /initrd/info /initrd/harddriveinstall)
        (cd /initrd/sbin; rm -f *fsck *e2fs lvm)
        (cd /initrd/usr; rm -rf share; rm -rf local)
    fi

    # Stuff to do on the *real* root filesystem.  However we can only modify
    # files under /var because the rest are in read-only squashfs files.

    if [ $FIRST_BOOT = TRUE -o $REDETECT_HARDWARE = TRUE ]; then
        cat /initrd/etc/fstab > /etc/fstab
        (cd /etc; rm -f asound.state modprobe.conf* sysconfig/hwconf X11/xorg.conf*)
    fi
    [ $RUNLEVEL_CHANGED -eq 1 ] && sed -i "s#id:.#id:${RUNLEVEL}#" /etc/inittab
    [ $DM_CHANGED -eq 1 ] && sed -i "s#^DISPLAYMANAGER=.*#DISPLAYMANAGER=${DM}#" /etc/sysconfig/desktop
    [ $RHGB_CHANGED -eq 1 ] && sed -i "s#^GRAPHICAL=.*#GRAPHICAL=${RHGB}#" /etc/sysconfig/init
    if [ $AUTOLOGIN_CHANGED -eq 1 ]; then
        sed -i "s/^\(AutoLoginEnable=\).*$/\1${AUTOLOGIN}/" /etc/X11/xdm/kdmrc
        sed -i "s/^\(AutomaticLoginEnable=\).*$/\1${AUTOLOGIN}/" /etc/X11/gdm/gdm.conf
    fi
    if [ $DESKTOP_CHANGED -eq 1 ]; then
        sed -i "s#^DESKTOP=.*#DESKTOP=${DESKTOP}#" /etc/sysconfig/desktop
        sed -i "s#^Session=.*#Session=${DESKTOP}#" /home/adios/.dmrc
        chown adios.users /home/adios/.dmrc
    fi
    if [ $LANG_CHANGED -eq 1 ]; then
        sed -i "s#^LANG=.*#LANG=${LANG}.utf8#" /etc/sysconfig/i18n
        sed -i "s#^SUPPORTED=.*#SUPPORTED=${LANG}.utf8:${LANG}:${LANG%%_??}#" /etc/sysconfig/i18n
    fi
    if [ $KEYTABLE_CHANGED -eq 1 ]; then
        sed -i "s#^KEYTABLE=.*#KEYTABLE=${KEYTABLE}#" /etc/sysconfig/keyboard
    fi
    if [ $UMLBRIDGE = TRUE ]; then
        echo "/usr/local/sbin/umlbridge" >> /etc/rc.d/rc.local
    fi
    if [ $LAB_SERVER = TRUE ]; then
        echo "/usr/local/sbin/labserver" >> /etc/rc.d/rc.local
    fi
    if [ "$CMDS" ]; then
        echo "Executing: ${CMDS}"
        eval "$CMDS"
        sync
    fi

    # Setup X here so we can use rhgb (plus I don't really like the way fedora
    # now runs system-config-display via kudzu)
    if [ $RUNLEVEL -gt 3 -a ! -f $X_CONFIG_FILE ]; then
        echo -n "Configuring X ... "
        case $RESOLUTION in
            system-config-display)
                system-config-display ;;
            Xorg)
                Xorg -configure >/dev/null
                egrep -v "ModulePath|FontPath" /x.conf.new | \
                sed 's#\(.*RgbPath.*$\)#\1\n\tFontPath\t\"unix/:7100\"#g' > $X_CONFIG_FILE
                rm -f /x.conf.new ;;
            *)  system-config-display --set-resolution=$RESOLUTION --set-depth=$DEPTH ;;
        esac
    fi

    # fix init and halt before starting
    # Makefile to add link for /sbin/init to /initrd/sbin/init
    # Makefile to rm /var/etc/init.d/halt; ln -s /initrd/bin/busybox

    # needs to be done before SELinux stuff so it gets labelled correctly
    ln -s $REAL_ROOT_DEVNAME /dev/root
    echo $REAL_ROOT_DEVNUM > /proc/sys/kernel/real-root-dev

    if [ $SECURITY = lids -a $FIRST_BOOT = TRUE ]; then
        echo -n "Updating LIDS dev/inode data ... "
        lidsconf -U >/dev/null
        lidsconf -U BOOT >/dev/null
        lidsconf -U POSTBOOT >/dev/null
        lidsconf -U SHUTDOWN >/dev/null
        lidsconf -C >/dev/null
        echo "Done."
    elif [ $SECURITY = selinux ]; then
        echo -n "Updating SELinux file labels ... "
        if [ $FIRST_BOOT = TRUE ]; then
            # make sure none of the selinux config files have future timestamps
            hwclock --hctosys --localtime
            find /etc/selinux -exec touch {} \;
            # need to create /tmp/uml and give it the correct label
            mkdir /var/tmp/uml
            chown adios.users /var/tmp/uml
        fi
        # files in / are non-persistent and need to be relabelled each time
        setfiles -q /etc/selinux/strict/src/policy/file_contexts/file_contexts /        # and make sure all files in /var have the correct labels
        setfiles -q /etc/selinux/strict/src/policy/file_contexts/file_contexts /var
        sync
        echo "Done."
    fi

    Debug on

    if [ $REAL_ROOTFS_SHELL = TRUE ]; then
        echo
        echo -e "${WHITE}Dropping out to a shell on the real root filesystem."
        echo -e "The init process will start when you exit this shell.${NORMAL}"        echo
        sh
    fi
    echo
}
}}}
{{{
TypicalLinuxrc
FindAdiosCD
PrepareRealRootFilesystem

}}}
 * busybox 의 ash 의 행동은 이해할 수 없음.
 * squashfs 로 SQFS 에 올린 후 절대경로를 사용하여 명령을 수행할 경우 not found 가 나옴.
 * bin 디렉토리를 먼저 /SQFS/bin 으로 링크 시켜놓은 경우는 수행이 됨.

=== 2005. 11. 2 ===
{{{
[root@localhost root]# cat /proc/mounts
rootfs / rootfs rw 0 0
none /sys sysfs rw 0 0
/dev/hdb2 /mnt/hdb2 ext2 ro 0 0
/dev/loop0 /SQFS squashfs ro 0 0
/dev/loop2 /USRFS squashfs ro 0 0
/ramdisk /ramdisk tmpfs rw 0 0
/UNIONFS /UNIONFS unionfs rw,dirs=/ramdisk/base=rw:/SQFS=ro,debug=0,delete=whiteout,copyup=preserve 0 0
none /UNIONFS1 unionfs rw,dirs=/ramdisk/usr=rw:/USRFS=ro,debug=0,delete=whiteout,copyup=preserve 0 0
/proc /proc proc rw,nodiratime 0 0
/proc/bus/usb /proc/bus/usb usbfs rw 0 0
none /dev tmpfs rw 0 0
none /dev/pts devpts rw 0 0
none /proc/sys/fs/binfmt_misc binfmt_misc rw 0 0
/dev/hdb1 /mnt/hdb1 ext2 rw,nosuid,nodev 0 0
}}}
[root@localhost root]# cat /etc/mtab
/dev/root / ext2 rw 0 0
usbfs /proc/bus/usb usbfs rw 0 0
/ramdisk /ramdisk tmpfs rw 0 0
none /proc/sys/fs/binfmt_misc binfmt_misc rw 0 0
/dev/hdb1 /mnt/hdb1 ext2 rw,nosuid,nodev 0 0
[root@localhost root]# cat /etc/fstab
# This file is edited by fstab-sync - see 'man fstab-sync' for details
/dev/root /     ext2    defaults        1 1
none    /proc   proc    defaults        0 0
none    /sys    sysfs   noauto          0 0
none    /dev/pts        devpts  defaults        0 0
/dev/hdb2 /mnt/hdb2 ext2 noauto 0 0
# Added by BOOYO
/dev/hdb1 /mnt/hdb1 ext2 noauto,users,exec 0 0

현 상태

  • 과거의 init 을 initrd/sbin/ 에 복사
  • halt, reboot, poweroff 는 여기에 링크
  • initrd/init 에서는 /sbin/init 를 수행

조사할 것

  • squashfs mount 한 후에 수행.
    • cat /SQFS/etc/ld.so.cache > /etc/ld.so.cache
PATH="/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:."
  • export PATH
  • 이 부분에서 명령어로 링크를 변경하면 이후의 명령어를 찾지 못함.
  • hash -r
  • 명령어로 링크를 바꿀 경우 문제가 있슴.
  • initrd 의 디렉토리를 먼저 링크 시켜 놓은 경우는 수행됨.
  • unionfs 를 mount 한 후에 수행.
 for i in bin etc lib sbin usr; do
  if /USRFS/usr/bin/test -d /$i; then
   mv /$i /$i.old && \
   /SQFS/lib/ld-linux.so.2 --library-path /SQFS/lib /SQFS/bin/ln -snf /UNIONFS/$i /$i && \
   rm -rf /$i.old
  else

   ln -snf /UNIONFS/$i /$i
  fi
 done
  • ld-linux.so.2 이 하는 일이 무엇인가?

adios

  • PutVar "ram"
  • PrepareRealRootFilesystem

==== PutVar ===
  • exec >/dev/null
  • MountSquashFS adios /
  • exec >/dev/console
  • ADIOSMOUNTED=TRUE
  • PutVarInRAM
    • mount -t tmpfs -o size=${VAR_MEM}M none /var
    • cp -af /adios/var/* /var
  • umount /adios
  • umount /mnt/adios
  • ADIOSMOUNTED=FALSE
  • modprobe unionfs >/dev/null
  • rm -f etc; rm -rf boot root tmp
  • ln -s var/boot var/etc var/home var/root var/tftpboot var/tmp /
  • MountSquashFS adios /
  • ADIOSMOUNTED=TRUE
  • busybox rm -f usr
  • busybox mkdir usr
  • busybox mkdir -p /mnt/usr /tmp/usr_cow
  • /initrd/bin/mount -r -o loop -t squashfs ${BOOTCD_DIR}/usr.sqfs /mnt/usr
  • /initrd/bin/mount -t unionfs -o dirs=/tmp/usr_cow:/mnt/usr none /usr
  • busybox rm -f bin lib sbin #remove links
  • busybox ln -s adios/bin adios/lib adios/sbin /
  • busybox ln -s /var /etc /mnt
  • chmod 755 /var
  • cat /initrd/etc/fstab > /etc/fstab
  • ln -s $REAL_ROOT_DEVNAME /dev/root
  • echo $REAL_ROOT_DEVNUM > /proc/sys/kernel/real-root-dev

순서

  • sh mkfilesystem.all
  • sh makelivecdfs
  • cd /ALLSQFS
  • cp packages
  • sh install 각각의 디렉토리에서
  • sh mkfilesystem.live
  • sh mkfilesystem.usr
  • sh USR.mksqfs
  • sh LIVE.mksqfs

morphix

title Morphix
kernel (cd)/boot/vmlinuz lang=us ramdisk_size=100000 init=/etc/init noapic acpi=off apm=power-off  vga=791 splash=silent initrd=miniroot.gz quiet BOOT_IMAGE=morphix

title Morphix | ACPI on
kernel (cd)/boot/vmlinuz lang=us ramdisk_size=100000 init=/etc/init noapic vga=791 splash=silent initrd=miniroot.gz  quiet BOOT_IMAGE=morphix

title Morphix | Failsafe mode
kernel (cd)/boot/vmlinuz lang=us ramdisk_size=100000 init=/etc/init acpi=off vga=normal nosound noapic noscsi nodma noapm nousb nopcmcia nofirewire noagp nomce nodhcp xmodule=vesa initrd=miniroot.gz BOOT_IMAGE=morphix

title Morphix | Expert mode
kernel (cd)/boot/vmlinuz lang=us ramdisk_size=100000 init=/etc/init noapic acpi=off apm=power-off vga=normal initrd=miniroot.gz BOOT_IMAGE=expert

title Morphix | Copy media to ram before booting
kernel (cd)/boot/vmlinuz lang=us ramdisk_size=100000 init=/etc/init noapic acpi=off apm=power-off vga=791 splash=silent initrd=miniroot.gz quiet BOOT_IMAGE=morphix toram

title Morphix | Boot from USB v1 device
kernel (cd)/boot/vmlinuz lang=us usbboot1 ramdisk_size=100000 init=/etc/init noapic acpi=off apm=power-off  vga=791 splash=silent initrd=miniroot.gz quiet BOOT_IMAGE=morphix

title Morphix | Boot from USB v2 device
kernel (cd)/boot/vmlinuz lang=us usbboot2 ramdisk_size=100000 init=/etc/init noapic acpi=off apm=power-off  vga=791 splash=silent initrd=miniroot.gz quiet BOOT_IMAGE=morphix

title Morphix | Boot using persistant home
kernel (cd)/boot/vmlinuz lang=us home=scan ramdisk_size=100000 init=/etc/init noapic acpi=off apm=power-off  vga=791 splash=silent initrd=miniroot.gz quiet BOOT_IMAGE=morphix

title Submenu -> Supported languages
configfile (cd)/boot/grub/lang.lst

title Submenu -> More boot options
configfile (cd)/boot/grub/options.lst

title Memtest | Memory diagnostic tool
kernel (cd)/boot/memtest

ID
Password
Join
Your own qualities will help prevent your advancement in the world.


sponsored by andamiro
sponsored by cdnetworks
sponsored by HP

Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2005-11-06 03:17:56
Processing time 0.0194 sec