· KLDP.org · KLDP.net · KLDP Wiki · KLDP BBS ·
Booyo LiveCD/Make Initrd/Change Linuxrc

BooyoLiveCD/MakeInitrd/ChangeLinuxrc


1. CD 를 읽기 위한 모듈 로드

knoppix 의 방식을 그대로 사용한다. (단지 expert 옵션을 사용하여 디스크에서 모듈을 로드하는 부분은 없앤다. 없애지 않는다.)

KNOPPIX 의 경우

  • 기본으로 올리는 모듈들
    • iso9660 ext2 vfat 는 커널에 설치
    • ide-cd.o
  • IDECD 가 있으면, ide-scsi.o (CMDLINE in *idecd*|*atapicd*)
  • NOSCSI 가 아니면 scsi 모듈 로드
  • NORAID 가 아니면 *raid* 모듈 로드
  • NOUSB 가 아니면
    • usbcore.o usb-uhci.o usb-ohci.o usb-storage.o (앞의 모듈이 올라와야 뒤의 것을 로드함)
  • NOFIREWIRE 가 아니면
    • ieee1394.o ohci1394.o sbp2.o (앞의 모듈이 올라와야 뒤의 것을 로드함)

BERRY 의 경우

  • 기본으로 올리는 모듈들
    • iso9660 ext2 은 커널에 설치
    • scsi_mod.*o, sr_mod.*o
    • usbcore.ko, ohci-hcd.ko, uhci-hcd.ko, ehci-hcd.ko, usb-storage.*o, sd_mod.*o
    • usbhid.ko
    • loop.*o
    • cdrom.*o, ide-cd.*o, isofs.*o
    • nls_cp437.*o, nls_utf8.*o
    • fat.*o, vfat.*o
    • ntfs.*o
    • jbd.*o, ext3.*o
    • reiserfs.*o
  • NOSCSI 가 아니면 scsi 모듈들 로드
  • NOUSB 는 comment 처리하고 위에서 모듈 모두 올림.
  • NORAID 가 아니면 *raid* 모듈 로드
  • NOFIREWIRE 가 아니면, ieee1394.*o 올리고 sbp2.*o 를 올림.

BOOYO 의 경우

  • iso9660 ext2 은 커널에 설치
  • idecd, usbcore, isofs 커널에 설치
  • nls_cp437 nls_ascii 는 커널에 설치
  • cdrom 은 아예 없음. (no Y M)
SCSI CDROM, ATAPI CDROM, IDE CDROM


The number of machines which boot from a scsi cdrom or even scsi dvd-rom are relative small. It would be more like old 486 and P5 classic server-type machines. These machines are outdated. Any PII, PIII , P4 and AMD based ix86 based machine can boot from ATAPI cd-rom.

커널 옵션에 따라 필요한 모듈 로드 (자동검색이 불가능한가?) 불가능하다. 단지 kernel option 에서 yes 로 준 것만 가능하다. SCSI 옵션을 yes 로 주는 것으로 해결되는 것이 아니라 SCSI host adapter 을 모두 yes 로 주어야 한다. 하지만 이는 문제가 있다. (커널 사이즈, scsi host adapter module 의 bug) 결국 boot option 에서 noscsi 대신 scsi 옵션을 사용하여 scsi 를 사용하는 기기만 scsi host adapter modules 을 올릴 수 있도록 한다. 이 경우 expert 기능도 같이 있는 것이 좋을 듯 함. noscsi 옵션 그대로 사용하기로 함.

udev 를 initrd 에 넣고, 돌리면 어떨까? * udev 는 단지 /dev 파일을 만들뿐 모듈과는 무관하다. * /dev 파일을 점검하여 필요한 모듈을 찾는 것 역시 어렵다. * proc 만으로 점검하는 것도 어렵다.

udev 의 사이즈가 558K 인 것을 생각하면, 안 넣은 것이 바람직해보인다. 속도 문제 역시 없는 것이 좋을 것임. 문제는 어떤 /dev 파일을 초기에 만들어 놓을 것인가를 결정하는 것이 문제다. PC 만을 고려한다면 많은 /dev 파일이 필요하지는 않을 것이다.


이미 사이즈는 1.4M 는 넘었고, 2.8M 로 가능한가? floppy 를 완전히 무시하는 것이 맞는가?

전부를 로드하는 시간과 udev 를 사용하여 검색, 필요한 모듈만 올리는 것과의 시간 차이는? 다른 이유로 udev 를 사용해야 한다.

설치프로그램이 필요한 하드웨어를 점검하여, mkinitrd 의 RCFILE 에 모듈 로드 명령을 준다.

SCSI, USB, firewire, DVD, IDECD, IDERAID

2. enable DMA for FROMHD or TORAM mode

3. try to find LIVE CD or CD image (설치된 디바이스만 검색할 수는 없는가?) 이를 위해 udev 가 먼저 수행되어야 함. udev 를 수행해야 /dev 밑에 hd, scd, pcd, sd 등이 생성될 수 있슴. udev 를 수행하지 않으려면, /dev 밑에 위의 파일들을 만들어 놓아야 함. 몇개나 만들어 놓을 것인가? (knoppix 와 똑같이) 어느 방법이 시간이 더 걸리는가? udev 를 사용하는 방법을 택한다. 단지 udev 가 필요한 /dev 파일들을 모두 생성하기를 바람. /dev/hd, /dev/scd, /dev/pcd, /dev/sd udev 사용 안하는 것으로 변경. 앞에서부터 찾으므로 시간의 문제는 없을 것으로 생각됨.

이 부분에 대한 점검이 필요함. 순서가 hda, hdb, hdc 등으로 안되어 있는 경우 하드디스크 파티션에 /KNOPPIX/KNOPPIX 가 있는 경우 여러개의 파티션에 /KNOPPIX/KNOPPIX 가 있는 경우 무조건 첫번째 /KNOPPIX/KNOPPIX 가 올라오도록 되어 있슴. (fromhd 옵션이 없는 경우, 즉 여러개가 있을 경우에는 fromhd 를 사용해야 함)

/KNOPPIX/KNOPPIX, /BERRY/BERRY, /BOOYO/BOOYO 가 존재하는지 점검

4. mount compressed image using cloop (mount_knoppix)

$INSMOD -f /modules/cloop.o file=$1/$KNOPPIX_DIR/$KNOPPIX_NAME 에 의해 /dev/cloop 가 자동생성되는가? 아니다. 이를 위해 /dev 밑에 cloop 가 존재하여야 하고, /dev/cloop0 에 링크되어 있어야 할 것 같음. 아니면 mountit /dev/cloop /KNOPPIX "-o ro" 을 mountit /dev/cloop0 /KNOPPIX "-o ro" 로 수정할 것

/KNOPPIX/KNOPPIX, /BERRY/BERRY, BOOYO/BOOYO

5. toram, tohd, bootfrom 의 옵션에 따라 필요한 일을 한다.

  • bootfrom 은 /KNOPPIX/KNOPPIX 를 올린후, ntfs 나 reiserfs 에 복사해 놓은 /KNOPPIX/KNOPPIX 를 사용함. 이유는 ntfs 나 reiserfs 의 모듈을 올려야 하기 때문임.
  • 이 경우 cloop 를 rmmod 함. (이 경우 죽을 수 있슴)
  • cdrom 을 사용하기 위한 것임.

6. 압축파일에서 필요한 파일을 initrd 로 복사하거나 링크한다.

7. 메모리의 크기를 점검하여 ramdisk 를 만든다.

8. ramdisk 밑에 필요한 디렉토리를 만들고, 압축파일에서 필요한 파일을 복사하거나 링크한다.

9. udev 를 사용하여 필요한 /dev 파일을 만든다. Knoppix 의 경우는 initrd 밑의 /dev 파일을 링크함. BERRY 의 경우는 devfs 를 사용함. udev 를 사용할 것인지, /dev 파일을 만들어 놓을 것인지 검토 필요. 이 부분은 위로 올렸슴. 10. 루트 디바이스를 /dev/ram0 으로 바꾼다. BERRY 의 경우 하드디스크에 ISO 형태로 있거나, 설치되어 있는 경우, pivot_root 를 사용함. dietlibc 가 2.6 커널을 충분히 지원할 때 다시 고려한다.

기본 방침


initrd 는 knoppix 의 것을 가능한한 그대로 사용하도록 한다. linuxrc 역시 가능한한 조금 고친다. 실제로 고쳐야 할 점 커널, 모듈 /dev 도 그대로 사용하는 것이 좋겠음. (udev 를 사용하지 않는다) sysroot 를 사용하지 않고, cdrom 을 사용한다.

linuxrc 에서 scsi host adapter 를 detect 하는 것은 어렵다. 왜냐하면 비싼 scsi host adapter 카드는 rom 을 내장하고 있어 이에 의하여 detect 가 가능하지만, 싼 가격의 scsi host adapter 는 rom 을 사용하지 않으므로 detect 가 불가능할뿐 아니라, detect 과정에 의해 시스템 자체가 hang 하는 경우도 있다. udev 에 의해 생성되는 /dev 파일은 단지 scsi device 를 나타낼 뿐, scsi host adapter 를 나타내지는 않는다.

/ramdisk 관련 조사 필요. rm and cp 해야 하는 파일들의 목록을 만들어야 함.

knoppix 의 경우 /bin/mount -t tmpfs -o "size=${RAMSIZE}k" /ramdisk /ramdisk && mkdir -p /ramdisk/home /ramdisk/var && ln -s /ramdisk/home /ramdisk/var /

berry 의 경우 /bin/mount -t tmpfs -o "size=${RAMSIZE}k" /dev/shm /ramdisc mkdir -p /ramdisc/home /ramdisc/var mv /etc /ramdisc ln -s /ramdisc/home /ramdisc/var /ramdisc/var/tmp /ramdisc/etc /

/ramdisk 를 사용하는 경우와 /dev/shm 을 사용하는 것의 차이는? mv /etc /ramdisc: initrd.img 밑의 /etc 의 내용을 /ramdisk 로 이동 ln -s /ramdisc/var/tmp / 는 오류를 발생해야 하는 것 같은데... (오류발생하지 않음. 링크도 생성되지 않음)

2005.03.17

  • /dev/cloop 를 /dev/cloop0 로
  • DEVICES="$DEVICES /dev/hd?1-9 /dev/hd?1-90-9" 추가 (emulation on disk)
  • ln -s 에 /ramdisk/etc 추가
  • ls -s /BOOYO/var/lib/scrollkeeper 를 ln -s 로 오류수정
  • rm -rf /etc/sysconfig/network-scripts/ifup /etc/sysconfig/network-scripts/ifdowncp -aus /sbin/ifup /sbin/ifdown /etc/sysconfig/network-scripts 두 줄이 한줄로 붙었슴. 분리
  • umount /proc 추가 (좀 더 생각할 것)

  • mkdir 에서 /var/local 제거 /home/root 추가
  • cp -a /BOOYO/etc/skel/ /home/berry
  • chown -R booyo.booyo /home/booyo
  • ln -s /BOOYO/etc/skel /etc/ 2>/dev/null
  • umount /proc

서비스 관련 오류들

* mDNSResponder
  • need /etc/sysconfig/network
* cups
  • cups (을)를 시작합니다: Traceback (most recent call last):
    • File "/usr/sbin/printconf-backend", line 7, in ?
import backend
  • File "/usr/share/printconf/util/backend.py", line 54, in ?
which = cups_import.which_spooler ()
  • File "/usr/share/printconf/util/cups_import.py", line 191, in which_spooler
which = l.split ('.')1.strip ()
IndexError: list index out of range

  • need cp /etc/alternatives/print in linuxrc
* xfs
  • tcheun@localhost ~$ /usr/sbin/chkfontpath --list Current directories in font path: 1: /usr/X11R6/lib/X11/fonts/korean 2: /usr/X11R6/lib/X11/fonts/misc:unscaled 3: /usr/X11R6/lib/X11/fonts/75dpi:unscaled 4: /usr/X11R6/lib/X11/fonts/100dpi:unscaled 5: /usr/X11R6/lib/X11/fonts/Type1 6: /usr/X11R6/lib/X11/fonts/Speedo 7: /usr/share/fonts/default/Type1 8: 9: /usr/share/fonts/ko/TrueType

  • font.dir 보다 새로 생성된 파일이 있으면, font.dir 을 지우고 새로 만들려고 함. 하지만 read-only 파일 시스템이므로 오류 발생. fond.dir 의 생성 시기를 최신으로 만들면 될 것임.

  • booyo-init 에서 수행하는 것이 가장 적절할 것으로 보임.
for d in $(/usr/sbin/chkfontpath --list | cut -f 2 -d ':' | sort | uniq) ;do
    if [ -d "$d" ]; then
        cd "$d" if [ -e fonts.dir ]; then
        touch fonts.dir
        fi
    fi
done
* sendmail
  • /etc/mail/sendmail.cf: line 94: fileclass: cannot open '/etc/mail/local-host-names': World writable directory
  • /etc/mail/sendmail.cf 91, 588 sm-client /etc/mail/submit.cf 548 class file can't open /etc/mail/local-host-names, trusted-users
  • cp files in linuxrc, but not solved. remove sticky bit from etc in linuxrc, but not solved
  • /etc is softlinked to /ramdisk/etc, thus rw mode is set for group and others. I guess this cause the above problem. how solve this problem ?
  • insert the following line in /etc/mail/sendmail.cf, submit.cf O DontBlameSendmail=ClassFileInUnsafeDirPath


option

  • slax
    • acpi=off nohotplug nopcmcia noagp nodma nohd nocd load=
    • passwd= webconfig= noquest
    • toram copy2ram
    • floppy
    • debug
    • gui guifast guisafe
    • memtest
  • knoppix 3.9
  • knoppix debug failsafe expert memtest fbXXXXxXXX
  • knoppix
    • lang= tz= keyboard= xkeyboard=
    • gmt desktop=
    • screen= vga= vsync= hsync= xvrefresh= xhrefresh= xserver= xmodule=
    • floppyconfig myconf=
    • home=
    • no scsi pcmcia usb agp swap apm apic mce ddc audio ddc dhcp fstab firewire usb2
    • pnpbios=off acpi=off
    • toram
    • pci= ide2= mem= dma
    • myconfig= home=
    • noeject noprompt
    • blind britty
    • no wheelmouse
    • splash
    • toram tohd fromhd bootfrom
    • knoppix_dir= knoppix_name=
  • mandrake move
    • noauto updatemodules patch cleankey formatkey waitkey virtual_key=

  • adios
    • lids m d i586 acpi 1 2 7
    • hda-d1-9 sda-d1-9
    • instance=
    • option=
    • root=

adios functions

  • /initrd/info
  • /initrd/functions
  • /initrd/savestate
  • /initrd/harddriveinstall
  • PutVar, FindVar, PutVarInRAM, PutVarOnPartition, PutLoopfileOnDisk,
  • DeleteLoopfileFromDisk, FindStoragePartition,
  • FindLoopfileStoragePartition, FindAdiosDisk, FindAdiosNet,
  • PutIso, DeleteIso, UpdateVar, PutSwapLoopfileOnDisk,
  • DeleteSwapLoopfileFromDisk, EncryptedVarLoop, PutVarOnUSB,
  • DeleteVarFromUSB, CreateBootableUSB, DeleteBootableUSB,
  • ChangeValue, ChangeLanguage, ChangeResolution, StartNet,
  • LabSetup, RunningInLabs, TypicalLinuxrc, MountSquashFS,
  • GetCDROMDrives, FindAdiosCD, GetHardDisks,
  • MountHardDiskPartitions, GetLogicalVolumes, MountLogicalVolumes,
  • FindSwapPartitions, FindSwapVolumes, FindOptSqfs, EjectCD,
  • Shutdown, Reboot, InstallAdiosIsoPartition,
  • PrepareRealRootFilesystem, DisplayMenu1, DisplayMenu2,
  • DisplayMenu3, DisplayMenu4, DisplayMenu5, HowToRunOnNtfs

adios linuxrc

  • /initrd/info
    • DisplayLicense, DisplayWarranty, HelpPageHeader,
    • HelpPageFooter, DisplayHelp
  • /initrd/functions
    • MenuItem, ReturnToMenu, MountDevice, GetUSBDevice,
    • CheckReadWrite, AvailableDiskSpace, MountCaptiveNTFS,
    • UnmountAllPartitions, RemountAllPartitions, SelectPartition,
    • UnmountPartition, ShowFdiskPartitions, SelectFdiskPartition,
    • Debug, DebugMsg, CleanUp
  • /initrd/savestate
    • PutVarState, SaveState, SaveStateAtShutdown, GetVarState,
    • RestoreState, DeleteVarState
  • /initrd/harddriveinstall
    • CreateAdiosPartition, InstallAdiosOnPartition,
    • CopyAdiosFilesToPartition, InstallGrub, RestoreMBR, UpdateWin,
    • UpdateBootIni, UpdateGrub, UpdateGrubConf,
    • SetActivePartition, CreateFAT32Partition,
    • GetNTFSPartitions, NTFSResize, ResizeIt, IsValidNTFSPartition,
    • Fdisk, IsValidDisk, FindGrubPartitions, FindWindowsPartitions,
    • DisplayMBR, CheckMBR
  • mount proc sys
  • set option
  • MountHardDiskPartitions
  • MountLogicalVolumes
  • FindSwapPartitions || FindSwapVolumes
  • FindOptSqfs: opt 에서 sqfs 를 찾는다.
  • FindAdiosDisk || FindAdiosCD || FindAdiosNet
    • GetCDROMDrives
    • IDE CDROM driver 만 조사함. dmesg 사용


slax linuxrc

  • set PATH
  • mount proc sys
  • check debug
  • set variable
    • UNION=/union
    • MEMORY=/memory
    • MOUNTDIR=mnt
    • CHANGES=$MEMORY/changes
    • COPY2RAM=$MEMORY/copy2ram
    • IMAGES=$MEMORY/images
    • INITRAMDISK=$MOUNTDIR/live
  • modprobe_essential_modules
    • load modules
    • create_block_devices
  • setup_dma
  • mkdir UNION MEMORY
  • CHANGESDEV 가 있으면
    • mount_device $CHANGESDEV $MEMORY
  • mount -t tmpfs -o "size=80%" tmpfs $MEMORY
  • mkdir CHANGES COPY2RAM IMAGES
  • mount -t unionfs -o dirs=$CHANGES=rw unionfs $UNION
  • DATA="find_live_data_dir $MOUNTDIR"
  • 못 찾으면
    • modprobe_usb_modules
    • create_block_devices
    • DATA="find_live_data_dir $MOUNTDIR"
  • toram or copy2ram 이 있으면
    • copy_to_ram $DATA $COPY2RAM
    • cd_autoeject 1
    • umount $DATA
    • DATA=$COPY2RAM
    • cd_autoeject 0
  • mkdir -p $UNION/boot
  • mount -o bind $DATA $UNION/boot (cdrom 의 내용을 boot 로)
  • union_insert_modules $UNION $DATA $IMAGES
    • list_modules $2
    • MODULE=
      • /media/cdrecorder/base/01_kernel.mo
      • /media/cdrecorder/base/02_core.mo
      • /media/cdrecorder/base/03_xwindow.mo
      • /media/cdrecorder/base/04_xap_libs.mo
      • /media/cdrecorder/base/05_common.mo
      • /media/cdrecorder/base/06_kde_base.mo
      • /media/cdrecorder/base/07_kde_apps.mo
      • /media/cdrecorder/base/08_kde_office.mo
      • /media/cdrecorder/base/09_slax.mo
    • union_insert_module $UNION $MODULE $IMAGR
      • TARGET=/memory/images/01_kernel.mo
      • mkdir -p $TARGET
      • mount_module $2 $TARGET
        • mount -t squashfs -o loop,ro "$1" "$2"
      • union_insert_dir $1 $TARGET
        • unionctl "$1" --add --after 0 --mode ro "$2"
  • copy_rootchanges $DATA $UNION
    • cp -a $1/rootcopy/* $2 : 빈 디렉토리임.
  • activate_fstab $UNION ( 좀 더 자세히 볼 것 )
    • mkdir -p $1/etc
    • FSTAB="$1/etc/fstab"
    • make fstab and /mnt 파일들.
      • cdrom, partition, swap, floppy
  • mkdir -p $UNION/proc
  • mkdir -p $UNION/sys
  • mkdir -p $UNION/tmp
  • mkdir -p $UNION/dev
  • cd $UNION
  • mkdir -p $INITRAMDISK
  • umount /sys
  • mknod $UNION/dev/console c 5 1
  • CHROOT=/usr/sbin/chroot or /usr/bin/chroot
  • pivot_root . $INITRAMDISK ( initrd 의 내용을 /mnt/live 밑으로 이동 )
  • exec $CHROOT . sbin/init ( /UNION 을 root file system 으로 )

기본 방침

  • 데스크탑
  • 일반 유저용, expert 용 ( 다른 initrd )
  • 일반 유저용, 개발자용(+교육용) ( 다른 패키지 모음 )
  • webfs: 가능한가? 실용성이 있는가?
  • GNOME 을 기반으로 하는 것은 맞는 방향인가?
  • memory size 및 swap 을 점검하여 desktop 사용 결정.
  • 저장할 경우, 저장 장소를 지정할 수 있도록 한다.
  • booting 한 후에 저장한 내용을 가지고 온다. ( re-login )
  • toram 은 util 로 안되나?

  • 저장 매채
    • cd, usb, scsi, firewire, harddisk
    • cd 만 고려한다. 나머지는 expert 용에서만 취급한다.

new linuxrc option

  • jin debug expert
  • 문제가 있을 때, 물어 볼 수 있는 방법

new linuxrc

  • mount proc and sys
  • option declare
  • modprobe essential modules
  • setup dma
  • find compressed file system
  • not found, usb, firewire, scsi
  • memory check and swap or fail
  • unionfs and link
{{{
#!/bin/ash
export PATH=
mount -t proc proc /proc
mount -t sysfs sysfs /sys
modprobe loop ( check kernel config )
# modprobe isofs (Y in kernel)
modprobe squashfs
modprobe unionfs

# ide-scsi 인 경우
# scsi 인 경우
# usb 인 경우
# firewire 인 경우
# harddisk 인 경우

{{{
# Create block devices to /dev described by /sys entries
#
create_block_devices()
{
   echolog "creating /dev entries for block devices"
   ls -A1d /sys/block/*/dev /sys/block/*/*/dev 2>/dev/null | grep -v loop | while read BLOCK; do
      DEVICE="/dev/`basename \`dirname $BLOCK\``"
      if [ ! -b $DEVICE ]; then
         MINORMAJOR="`head -n 1 $BLOCK | tr ':' ' '`"
         mknod $DEVICE b $MINORMAJOR
      fi
   done
}
# List all CD-ROMs
# by using /proc entries
#
list_cdrom_devices()
{
   if [ "`cmdline_parameter nocd`" != "" ]; then return 1; fi
   for CDDEVICE in `cat /proc/sys/dev/cdrom/info | head -n 3 | tail -n 1 | cut -d ":" -f 2`; do
      echo "/dev/$CDDEVICE"
   done
}

}}}

 * http://bash.cyberciti.biz/diskadmin/rescan-scsi-bus.sh.html

 * busybox 로 initrd 를 만들고 이를 이용하여 device module 이 로드되기 전과 후의 차이를 알아내여야 함. (scsi, usb, ide-scsi, firewire)

=== busybox ===
 * busybox 가 bin 밑에 있으면, ln 을 하지 않아도 수행이 됨.
 * insmod -f 가 문제가 됨.
 * /dev/sda14 만듬
 * /suqash 만듬.
 * adios 밑에
  * bin lib sbin usr
 * var 밑에
  * boot etc home root tmp
 * 나머지
  * media misc net opt selinux srv tmp var 
  * proc sys dev mnt
{{{
adios.sqfs
[root@localhost tmp]# 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

usr.sqfa
[root@localhost tmp]# ls -l
합계 70
drwxr-xr-x  1 root root    48 10월  6  2004 X11R6
drwxr-xr-x  1 root root 19658  7월 13 10:56 bin
drwxr-xr-x  1 root root    13 11월 17  2004 com
drwxr-xr-x  1 root root     0  8월 13  2004 etc
drwxr-xr-x  1 root root     0  8월 13  2004 games
drwxr-xr-x  1 root root  3489  6월  6 10:19 include
drwxr-xr-x  1 root root    31  3월 29 04:06 kerberos
drwxr-xr-x  1 root root 28578  7월 13 10:56 lib
drwxr-xr-x  1 root root   358  5월 16 13:57 libexec
lrwxrwxrwx  1 root root    13  7월 19 13:19 local -> ../var/local/
drwxr-xr-x  1 root root  5917  7월 13 10:56 sbin
drwxr-xr-x  1 root root  2119  6월  7 09:40 share
drwxr-xr-x  1 root root    57 12월 16  2004 sleuthkit
lrwxrwxrwx  1 root root    11  7월 19 13:19 src -> ../var/src/
lrwxrwxrwx  1 root root    10  7월 19 13:19 tmp -> ../var/tmp
drwxr-xr-x  1 root root    28  6월  7 09:21 var

}}}

=== note ===
 * slax 의 linuxrc 방법이 좋기는 한데....
 * linuxrc 에서는 cdrom 의 내용을 읽기만 한다.
 * 나머지 작업은 rc.sysinit 에서 한다.
  * 필요한 파일 복사
  * 하드웨어 설정
  * xorg 설정 
 * 나머지 설정은 rc 에서
 * 이 경우 모듈을 나누어야 시험하기가 좋다.
 * 보다 좋은 방법은 없을까?
 * rc.sysinit 에서 아무것도 하지 않고, rc5.d 의 첫번째에서
   모든 작업을 하게 하면, init 을 이용하여 쉽게 시험할 수 있지
   않은가?
   이 것이 가능한가?
 * init 을 수행하면 rc.sysinit 을 수행하는가?
 * pivot_root . initrd
  * 현재의 root file system 을 initrd 로 복사하고, 현재의 
     위치를 root file system 으로 사용할 준비가 된다.
 * exec chroot . /sbin/init
  * 현재의 위치를 root file system 으로 하고 init 수행.

 * 왜 busybox 가 /bin 밑에 있을때는 ln 을 안해도 수행되는가 알아 볼 것.

=== unionfs ===

 * tar zxvf unionfs-1.0.13.tar.gz
 * edit Makefile
{{{
#LINUXSRC = /lib/modules/$(KVERS)/build
LINUXSRC = /usr/src/linux
#UNIONFS_DEBUG_CFLAG = -g
UNIONFS_DEBUG_CFLAG =
}}}
 * make fistdev.mk 파일
{{{
EXTRACFLAGS=-DUNIONFS_NDEBUG
}}}
 * make
 * make install
 * depmod -a

 * make static unionctl, uniondbg
 * can't make static unionimap
{{{
gcc -o unionimap -luuid unionimap.c usercommon.c -I.  -O2 -Wall -Werror   -DUNIONFS_VERSION=\"1.0.13\" -static
/tmp/ccQ5MWEM.o(.text+0x113): In function `create_forwardmap':
unionimap.c: undefined reference to `uuid_generate'
/tmp/ccQ5MWEM.o(.text+0x377): In function `create_reversemap':
unionimap.c: undefined reference to `uuid_generate'
/tmp/ccQ5MWEM.o(.text+0x622): In function `print_forwardmap':
unionimap.c: undefined reference to `uuid_unparse'
/tmp/ccQ5MWEM.o(.text+0x706):unionimap.c: undefined reference to `uuid_unparse'
/tmp/ccQ5MWEM.o(.text+0x80e): In function `print_reversemap':
unionimap.c: undefined reference to `uuid_unparse'
/tmp/ccQ5MWEM.o(.text+0x832):unionimap.c: undefined reference to `uuid_unparse'
collect2: ld returned 1 exit status
make: *** [unionimap] 오류 1
}}}

=== JIN ===
 * squashfs
 * unionfs
 * username: jin
 * passwd: jinjin
 
 * install
 * login root
 * copy JIN.build
 * relogin jin
 * opt/booyo 는 opt/live 로 수정
 * initrd 에 넣는다.

 * user login 이 안됨. root login 은 됨.
  * tmp 는 unionfs 를 사용하지 않음.
  * chmod 1777 tmp 해야 함.
 * root login 시 firefox 가 동작 안함.
  * .mozilla 복사 후 됨.
 * initrd 에 root 를 /union/root 로 링크 시켜 놓으면,
 *  지워지고 새로운 /root 가 생성됨.
  * init 에서 링크 시킴.
 * totem 안 됨. fedora core 4 의 문제.

ID
Password
Join
He who has imagination without learning has wings but no feet.


sponsored by andamiro
sponsored by cdnetworks
sponsored by HP

Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2005-08-19 19:01:25
Processing time 0.0229 sec