Booyo LiveCD/Rcdot Sysinit
BooyoLiveCD/rc.sysinit ¶To do something instead of anaconda
clock
/usr/share/zoneinfo/Asia/Seoul À» /etc/localtime ·Î º¹»çÇÒ °Í.
Build, or linuxrc or here
rm /etc/X11/xorg.cong /etc/sysconfig/hwconf /etc/sysconfig/mouse
kmodule À» º¯°æÇÏ¿© »ç¿ëÇØ¾ß ÇÔ. initscripts-7.93.2
pcmcia
knoppix-autoconfig
if checkbootparam "nopcmcia"; then echo " ${BLUE}Skipping PCMCIA detection as requested on boot commandline.${NORMAL}" else modprobe pcmcia_core >/dev/null 2>&1 # Try Cardbus or normal PCMCIA socket drivers modprobe yenta_socket >/dev/null 2>&1 || modprobe i82365 >/dev/null 2>&1 || modprobe tcic >/dev/null 2>&1 if [ "$?" = "0" ]; then echo " ${GREEN}PCMCIA found, starting cardmgr.${NORMAL}" modprobe ds >/dev/null 2>&1 cardmgr >/dev/null 2>&1 && sleep 4 fi fianaconda def createPcmciaConfig(path, test = 0): f = open(path, "w") pcic = pcicType(test = test) if (pcic): f.write("PCMCIA=yes\n") f.write("PCIC=%s\n" % (pcic,)) else: f.write("PCMCIA=no\n") f.write("PCIC=\n") f.write("PCIC_OPTS=\n") f.write("CORE_OPTS=\n") f.close() def pcicType(test = 0): devs = kudzu.probe(kudzu.CLASS_SOCKET, kudzu.BUS_PCI, 0) if devs: log("Found a pcic controller of type: yenta_socket") return "yenta_socket" # lets look for non-PCI socket controllers now devs = kudzu.probe(kudzu.CLASS_SOCKET, kudzu.BUS_MISC, 0) if devs and devs[0].driver not in ["ignore", "unknown", "disabled"]: log("Found a pcic controller of type: %s", devs[0].driver) return devs[0].driver log("No pcic controller detected") return Noneknoppix-autoconfig ÀÇ ºÎºÐÀÌ Ãß°¡µÇ¾î¾ß ÇÔ. ¿©±â¿¡ /etc/sysconfig/pcmcia ¿¡ ¾²´Â ºÎºÐÀ» Ãß°¡ÇØ¾ß ÇÔ. kmodule µÚ¿¡ Ãß°¡ÇÏ´Â °ÍÀÌ ¸Â´ÂÁö? berry ÀÇ °æ¿ì °ü·Ã µå¶óÀ̺긦 ¸ðµÎ blacklist ¿¡ ³Ö¾î ³õ¾Ò½¿. kernel
bootloader ¸¦ ¼³Ä¡ÇÏ¸é »ý¼ºµÊ. installer ¿¡¼ °í·ÁÇØ¾ß ÇÔ.
desktop, system-config-securitylevel, firstboot, installinfo, installinfo.rpmsave
network-scripts/ifcfg-*
network
# < Fat-Client-Version: DHCP Broadcast for IP address > if checkbootparam "nodhcp"; then echo " ${BLUE}Skipping DHCP broadcast/network detection as requested on boot commandline.${NORMAL}" elif checkbootparam "ip"; then IP="$(getbootparam ip 2>/dev/null)" DEVICE=eth0 echo " ${GREEN}Network device ${MAGENTA}$DEVICE${GREEN} detected, IP is ${YELLOW}${IP}${GREEN}.${NORMAL}" cat << EOM > /etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE=eth0 ONBOOT=yes BOOTPROTO=static IPADDR=$IP NETMASK=255.255.255.0 EOM sed "s/#GATEWAY=192.168.1.1/GATEWAY=${IP%.*}.1/g" /etc/sysconfig/network > /tmp/network && mv /tmp/network /etc/sysconfig/network ifup eth0 else NETDEVICES="$(awk -F: '/eth.:|tr.:/{print $1}' /proc/net/dev 2>/dev/null)" # for DEVICE in $NETDEVICES for DEVICE in "eth0" do echo -n " ${GREEN}Network device ${MAGENTA}$DEVICE${GREEN} detected, DHCP broadcasting for IP.${NORMAL}" trap 2 3 11 dhclient $DEVICE >/dev/null 2>&1 & trap "" 2 3 11 sleep 1 echo " ${BLUE}(Backgrounding)${NORMAL}" done fi /etc
inittab, fstab, mdadm.conf, mtab, resolv.conf, hosts, reconfigSys, mtab,
arch,
FC3 rc.sysinit ¶
/etc/fstab ¿¡ /, /proc, /sys. /dev/pts °¡ ÀÖ¾î¾ß µÈ´Ù´Â °ÍÀ» ÀǹÌÇÏ´Â °Í °°´Ù. mount -f / mount -f /proc mount -f /sys >/dev/null 2>&1 mount -f /dev/pts [ -f /proc/bus/usb/devices ] && mount -f -t usbfs usbfs /proc/bus/usb [ -e /dev/.devfsd ] && mount -f -t devfs devfs /dev
mkinitrd copies /sbin/udev.static to the initrd /sbin/udev and symlinks it to /sbin/udevstart.
After the kernel boots, it executes the nash script of the initrd. This mounts a tmpfs filesystem on /dev/. Instead of hotplug /sbin/udev is called in the initrd phase. udevstart creates all device nodes for the devices, which are compiled in the kernel and for the modules, which are loaded by nash.
Problems
The whole udev and hotplug infrastructure is not available in initrd. Thus no hotplug scripts, udev rules, and permissions and no /etc/dev.d/ scripts are executed for any hotplug event, which is sent from the kernel.
rc.sysinit
First, if SELinux is loaded and enabled, the context of /dev/ is set. rc.sysinit calls /sbin/start_udev. start_udev mounts a tmpfs filesystem on /dev/, if there is none already mounted. Then it creates some device nodes, which need module autoloading, or where there is no kernel module. After that /sbin/udevstart is called again, which simulates the hotplug events in the initrd phase, to apply the whole udev rules and permissions. After that rc.sysinit parses the ouput of /sbin/kmodule and loads every module. This should provide device nodes for all hardware found on your computer.
Console User Permissions
/etc/dev.d/default/pam_console.dev is called whenever a device node is created and calls /sbin/pam_console_setowner with the filename (and an optional symlink) of the device node. This sets the permissions for console users like specified in /etc/security/console.perms.
/etc/init.d/functions ¶set variable
Àüü È帧 ¶hwsetup Àü¿¡ ÇØ¾ß ÇÒ ÀÏ
|
Generosity and perfection are your everlasting goals. |