Booyo LiveCD/Cp Etc Var
BooyoLiveCD/CpEtcVar ¶부여 라이브 CD 는 CDROM 에 모든 파일시스템이 있으므로, 읽기만 할 수 있습니다. 실제로 쓰기가 필요한 파일은 ramdisk 에 cp 를 해 놓아야 쓰기를 할 수 있습니다.
대표적인 부분은 /home 디렉토리 입니다.
이외에 /etc, /var 디렉토리 밑의 파일들 중에 쓰기 기능이 필요한 파일들이 많이 있습니다.
하지만 모든 파일을 ramdisk 에 복사를 해 놓으면 메모리를 많이 차지하므로, 꼭 필요한 파일만 복사를 하는 것이 필요합니다.
이 부분은 CD 를 생성하는 과정과 initrd.img 속의 linuxrc, 그리고 /etc/rc.sysinit 이 모두 같이 처리해야 하는 부분입니다.
CD 를 생성하는 과정에서는 필요 없는 파일은 CD 에 추가되지 않도록하는 작업과, 내용을 null 로 만드는 작업이 있습니다.
linuxrc 에서는 write 가 필요한 파일들을 ramdisk 로 복사하는 과정이 있습니다.
rc.sysinit 에서는 필요한 파일을 생성하는 과정이 있습니다.
Knoppix 의 경우 /KNOPPIX 밑의 파일들만을 복사함으로써 사용할 수 있다는 것은 재미있는 현상입니다. (부여의 경우 가능할지?)
/etc 변경
chane fstab, group, passwd, shadow, inittab
rc.d berry-init, berry-halt, berry-reboot
cp -a /KNOPPIX/etc/ftpusers /KNOPPIX/etc/passwd /KNOPPIX/etc/shadow /KNOPPIX/etc
/group \
/KNOPPIX/etc/ppp /KNOPPIX/etc/isdn /KNOPPIX/etc/ssh \
/KNOPPIX/etc/inittab /KNOPPIX/etc/network /KNOPPIX/etc/sudoers \
/KNOPPIX/sbin/init /KNOPPIX/etc/dhcpc /etc/ 2>/dev/null
618 cp passwd passwd.org
619 cp shadow shadow.org
620 cp group group.org
621 cp -Rp ppp ppp.org
622 cp -Rp isdn isdn.org
624 cp -Rp ssh ssh.org
626 cp inittab inittab.org
628 cp sudoers sudoers.org
629 dhcpc, network not exist
debian
root@1sysconfig# cd /etc/network
root@1network# ls
if-down.d if-pre-up.d ifstate interfaces options
if-post-down.d if-up.d ifstate.hotplug interfaces-
fedora
root@1hda2# find . -name network
./etc/sysconfig/network
./etc/pcmcia/network
./etc/rc.d/init.d/network
root@1network-scripts# ls
ifcfg-eth0 ifdown-ipv6 ifup ifup-isdn ifup-sit
ifcfg-lo ifdown-isdn ifup-aliases ifup-plip ifup-sl
ifdown ifdown-post ifup-ippp ifup-plusb ifup-wireless
ifdown-aliases ifdown-ppp ifup-ipsec ifup-post init.ipv6-global
ifdown-ippp ifdown-sit ifup-ipv6 ifup-ppp network-functions
ifdown-ipsec ifdown-sl ifup-ipx ifup-routes network-functions-ipv6
Debian users can edit the /etc/network/interfaces configuration file. Mandrake users can manually edit NIC configuration scripts under the /etc/sysconfig/network-scripts directory (which are similar to those used by Red Hat Linux), whereas SuSE users will use configuration files under the /etc/sysconfig/network directory.
/var/state 는 없슴.
/etc/dhcpc 도 없슴.
network setting 을 알아야 함.
/var/lib/texmf/ls-R 없슴.
not linked to BERRY
X11, acpi, auto.mnt, bonobo-activation, canna, cron.daily,
cron.weekly,cups, dbus-1, default, filesystems, fonts, fstab,
gconf, gimp, gnome-vfs-2.0, group, shadow, gshadow, gtk, gtk-2.0,
hosts, hotplug, hotplug.d, inittab iproute2, kde, ld.so.cache,
ld.so.conf.d, logrotate.d, mplayer, mtab, netplug, netplug.d,
openldap, openoffice, opt, pam.d, pango, passwd, pcmcia, ppp,
profile.d, rc.d, rc?.d, resolve.conf, resolv.conf.predhclient,
rpm, security, shadow, ssh, sysconfig, xdg, xinetd.d
점검할 파일들
/mnt/hdc5/etc/sysconfig/firstboot: 인스톨이후 첫번째 부팅인가 점검하는데 사용
/mnt/hdc5/etc/sysconfig/hwconf: kudzu 에 의해 생성되는 파일
/mnt/hdc5/etc/X11/xorg.conf: FC3 에서 무엇이 생성하는지 점검 필요
마우스, 키보드, 모니터, video card
/mnt/hdc5/etc/fstab: list of file systems to mount /mnt/hdc5/etc/mtab: mounted file system table
/mnt/hdc5/etc/group /mnt/hdc5/etc/passwd /mnt/hdc5/etc/passwd- /mnt/hdc5/etc/shadow- /mnt/hdc5/etc/shadow /mnt/hdc5/etc/gshadow /mnt/hdc5/etc/passwd.OLD
/mnt/hdc5/etc/sysconfig/clock: 타임존 /mnt/hdc5/etc/localtime /mnt/hdc5/etc/adjtime
/mnt/hdc5/etc/lvm/.cache
/mnt/hdc5/etc/ssh/ssh_host_key /mnt/hdc5/etc/ssh/ssh_host_key.pub /mnt/hdc5/etc/ssh/ssh_host_rsa_key /mnt/hdc5/etc/ssh/ssh_host_rsa_key.pub /mnt/hdc5/etc/ssh/ssh_host_dsa_key /mnt/hdc5/etc/ssh/ssh_host_dsa_key.pub
/mnt/hdc5/etc/aliases.db: sendmail 에서 사용. aliases 파일을 사용하여 만듬
/mnt/hdc5/etc/cups/certs/0 /mnt/hdc5/etc/cups/ppds.dat
/mnt/hdc5/etc/resolv.conf: network 설정시 생성될 것으로 생각됨.
/mnt/hdc5/etc/blkid.tab: block device 에 관한 정보 /mnt/hdc5/etc/smartd.conf
/mnt/hdc5/etc/asound.state: sound card 관련 정보인듯함. 누가 생성하는지 알아야 함.
/mnt/hdc5/etc/prelink.cache
/etc/modprobe.conf 에 누가 언제 쓰는가? sound card, usb-controller eht0
/etc/sysconfig
kernel: bootloader 를 설치하면 생성됨. installer 에서 생성해야 할 것으로 생각됨
desktop: 디폴트 데스크탑
system-config-securitylevel: firewall 설치시 enable, 아닌 경우 --disabled
clock: time zone 과 clock config booyo-init 에서 처리해야 함.
i18n: 언어 선택 sysfont 가 들어감. booyo-init 에서 처리해야 함.
network-scripts/network-scripts/ifcfg-* : network 설정 booyo-init /etc/resolv.conf 역시
network: booyo-init
firstboot: installer 에서 고려할 사항임
pcmcia: booyo-init 에서 pcmcia 처리할 때 생성해야 함.
installinfo: installer 에서 고려할 사항임.
installinfo.rpmsave: installer 에서 고려할 사항임.
/etc
inittab: runlevel 을 적어주는 작업을 함. 그대로 사용하면 됨.
fstab: booyo-init 과 installer 에서 모두 작업 필요.
mdadm.conf: md 사용할 경우에만 해당됨. 고려 필요.
mtab: booyo-init 에서 작업 필요.
rpm/platform: 어디에 필요한 것인지 잘 모르겠슴.
rpm/macros: 어디에 필요한 것인지 잘 모르겠슴.
resolv.conf: booyo-init 에서 처리해야 함.
hosts: network 설정시 처리해야 함. booyo-init
reconfigSys: firstboot 를 위해 필요한 파일임. installer 에서 고려할 사항임.
modprobe.conf: booyo-init 에서 고려해야 함.
/tmp/modprobe.conf
/tmp/zfcp.conf
BERRY 의 경우 ¶# Create common WRITABLE (empty) dirs
mkdir -p /var/lib /var/lock /var/nis /var/preserve /var/run /var/tmp \
/var/spool/cups/tmp \
/mnt/floppy \
/root /home/root /etc/sysconfig /etc/X11 /etc/cups
cp -a ${sysdir}/etc/skel/ /home/berry
chown -R berry.berry /home/berry
# Create empty utmp and wtmp
:> /var/run/utmp
:> /var/run/wtmp
# CUPS wants writable files
cp -a ${sysdir}/etc/cups/*.conf /etc/cups/ 2>/dev/null
# resolv.conf must be writable as well
cp -a ${sysdir}/etc/resolv.conf /etc/ 2>/dev/null
# All files in here should be size zero after BERRY. clean was run
cp -a ${sysdir}/var/local ${sysdir}/var/log ${sysdir}/var/spool ${sysdir}/var/webmin /var/ 2>/dev/null
cp -a ${sysdir}/var/lib/pcmcia ${sysdir}/var/lib/dhcp* /var/lib/ 2>/dev/null
# Problematic directories in /var/lib (lots and lots of inodes)
#ln -s /BERRY/var/lib/dpkg /BERRY/var/lib/apt \
# /var/lib/ 2>/dev/null
# Debian-apt
#ln -s /BERRY/var/cache/apt /var/cache/ 2>/dev/null
ln -s ${sysdir}/etc/skel /etc/ 2>/dev/null
cp -aus ${sysdir}/var/* /var/ 2>/dev/null
cp -aus ${sysdir}/etc/* /etc/ 2>/dev/null
# Make SURE that these are files, not links!
rm -rf /etc/passwd /etc/shadow /etc/group /etc/gshadow /etc/passwd- /etc/shadow- /etc/group- /etc/gshadow-
rm -rf /etc/ppp /etc/ssh
rm -rf /etc/rc.d/rc5.d/* /etc/X11?/XF86Config* /etc/sysconfig/*
rm -rf /etc/rc?.d
ln -s /etc/rc.d/rc?.d /etc/
cp -a ${sysdir}/etc/passwd ${sysdir}/etc/shadow ${sysdir}/etc/group ${sysdir}/etc/gshadow \
${sysdir}/etc/ppp ${sysdir}/etc/ssh \
${sysdir}/etc/sysconfig/ /etc/ 2>/dev/null
# Diet libc bug workaround
#cp -f /BERRY/etc/localtime /etc/localtime
echo "${BLUE}Done.${NORMAL}"
# < modify symbolic link >
rm -rf /etc/sysconfig/network-scripts/ifup /etc/sysconfig/network-scripts/ifdown
cp -aus /sbin/ifup /sbin/ifdown /etc/sysconfig/network-scripts
# < Now tell kernel where the real modprobe lives >
echo "/sbin/modprobe" > /proc/sys/kernel/modprobe
rc5.d ¶
need cp /etc/alternatives/print in linuxrc
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
/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 ?
|
You will be surrounded by luxury. |