* Re: [d-kernel] Загрузка по NFS
2004-04-14 20:18 [d-kernel] Загрузка по NFS Vitaly Lipatov
@ 2004-04-15 9:04 ` Sergey Vlasov
2004-04-15 12:02 ` [d-kernel] úÁÇÒÕÚËÁ ÐÏ NFS Ed V. Bartosh
2004-04-22 6:30 ` [d-kernel] Загрузка по NFS Vitaly Lipatov
0 siblings, 2 replies; 5+ messages in thread
From: Sergey Vlasov @ 2004-04-15 9:04 UTC (permalink / raw)
To: ALT Linux kernel packages development
[-- Attachment #1.1: Type: text/plain, Size: 1901 bytes --]
On Thu, Apr 15, 2004 at 12:18:37AM +0400, Vitaly Lipatov wrote:
> Хотелось бы обсудить возможность использования std-up ядер (2.4.х
> или 2.6.х) для загрузки по сети (root на NFS)
> По поводу 2.4.х читал слухи, что всё связанное с сетью, nts,
> вплоть до драйвера сетевой карты, должно быть вкомпилировано в
> ядро. Не представляю, зачем это нужно при наличии initrd.
> Вопрос в том, что мешает добавить CONFIG_NFS_ROOT в std-up ядро,
> чтобы обеспечить возможность загрузки корня с NFS и ядро какой
> ветки лучше использовать для этих целей.
CONFIG_NFS_ROOT - это старый способ, который как раз требует, чтобы
nfs и все необходимые сетевые драйверы были вкомпилированы в ядро.
По сути дела это BOOTP-клиент, который запускается при инициализации
ядра, получает сетевые параметры, после чего монтирует указанную
файловую систему по nfs как корневую. После завершения
инициализации ядра этот код удаляется из памяти, поэтому
воспользоваться им при модульных сетевых драйверах не получится.
Вместо этого нужно сформировать initrd, в котором есть модули
сетевых драйверов и nfs, а также DHCP-клиент. Это даже уже делалось
(на основе busybox), но не было доведено до автоматизированного
состояния.
Вот что сейчас есть:
net-initrd-0.0.1.tar.bz2 - скелет initrd (нужно доложить туда
собранный /bin/busybox, заполнить /lib/modules и вписать команды
загрузки модулей в /sbin/init.modules, после чего собрать образ
через genromfs). Загрузка модулей сделана довольно тупо - просто
грузится всё подряд с расчётом на то, что модули для несуществующих
устройств просто не загрузятся (в 2.6 это не пройдёт, и лишние
модули так и останутся занимать память - нужно делать определение
устройств).
busybox-1.00-pre3-netboot.patch - патч для busybox, добавляющий в
udhcpc запрос опции root-path, через которую задаётся nfs root для
монтирования.
.config - файл конфигурации для сборки busybox (1.00-pre3).
[-- Attachment #1.2: net-initrd-0.0.1.tar.bz2 --]
[-- Type: application/x-bzip2, Size: 1618 bytes --]
[-- Attachment #1.3: busybox-1.00-pre3-netboot.patch --]
[-- Type: text/plain, Size: 1096 bytes --]
diff -ur busybox-1.00-pre3-orig/Makefile busybox-1.00-pre3/Makefile
--- busybox-1.00-pre3-orig/Makefile 2003-09-12 08:34:26 +0400
+++ busybox-1.00-pre3/Makefile 2003-11-13 15:18:20 +0300
@@ -45,7 +45,7 @@
include $(patsubst %,%/Makefile.in, $(DIRS))
busybox: .depend include/config.h $(libraries-y)
- $(CC) $(LDFLAGS) -o $@ $(libraries-y) $(LIBRARIES)
+ $(CC) $(LDFLAGS) -o $@ $(libraries-y) $(LIBRARIES) -lc_stubs
$(STRIPCMD) $@
busybox.links: applets/busybox.mkll include/config.h
diff -ur busybox-1.00-pre3-orig/networking/udhcp/options.c busybox-1.00-pre3/networking/udhcp/options.c
--- busybox-1.00-pre3-orig/networking/udhcp/options.c 2003-06-10 21:22:49 +0400
+++ busybox-1.00-pre3/networking/udhcp/options.c 2003-11-13 19:06:21 +0300
@@ -28,7 +28,7 @@
{"bootsize", OPTION_U16, 0x0d},
{"domain", OPTION_STRING | OPTION_REQ, 0x0f},
{"swapsvr", OPTION_IP, 0x10},
- {"rootpath", OPTION_STRING, 0x11},
+ {"rootpath", OPTION_STRING | OPTION_REQ, 0x11},
{"ipttl", OPTION_U8, 0x17},
{"mtu", OPTION_U16, 0x1a},
{"broadcast", OPTION_IP | OPTION_REQ, 0x1c},
[-- Attachment #1.4: .config --]
[-- Type: text/plain, Size: 7802 bytes --]
#
# Automatically generated make config: don't edit
#
HAVE_DOT_CONFIG=y
#
# General Configuration
#
# CONFIG_FEATURE_BUFFERS_USE_MALLOC is not set
CONFIG_FEATURE_BUFFERS_GO_ON_STACK=y
# CONFIG_FEATURE_BUFFERS_GO_IN_BSS is not set
# CONFIG_FEATURE_VERBOSE_USAGE is not set
# CONFIG_FEATURE_INSTALLER is not set
# CONFIG_LOCALE_SUPPORT is not set
CONFIG_FEATURE_DEVFS=y
CONFIG_FEATURE_DEVPTS=y
# CONFIG_FEATURE_CLEAN_UP is not set
# CONFIG_FEATURE_SUID is not set
# CONFIG_SELINUX is not set
#
# Build Options
#
CONFIG_STATIC=y
# CONFIG_LFS is not set
# USING_CROSS_COMPILER is not set
EXTRA_CFLAGS_OPTIONS=""
#
# Installation Options
#
# CONFIG_INSTALL_NO_USR is not set
PREFIX="./_install"
#
# Archival Utilities
#
# CONFIG_AR is not set
# CONFIG_BUNZIP2 is not set
# CONFIG_CPIO is not set
# CONFIG_DPKG is not set
# CONFIG_DPKG_DEB is not set
# CONFIG_GUNZIP is not set
# CONFIG_GZIP is not set
# CONFIG_RPM2CPIO is not set
# CONFIG_RPM is not set
# CONFIG_TAR is not set
# CONFIG_UNCOMPRESS is not set
# CONFIG_UNZIP is not set
#
# Coreutils
#
# CONFIG_BASENAME is not set
# CONFIG_CAL is not set
# CONFIG_CAT is not set
# CONFIG_CHGRP is not set
# CONFIG_CHMOD is not set
# CONFIG_CHOWN is not set
# CONFIG_CHROOT is not set
# CONFIG_CMP is not set
# CONFIG_CP is not set
CONFIG_CUT=y
# CONFIG_DATE is not set
# CONFIG_DD is not set
# CONFIG_DF is not set
# CONFIG_DIRNAME is not set
# CONFIG_DOS2UNIX is not set
# CONFIG_DU is not set
CONFIG_ECHO=y
CONFIG_FEATURE_FANCY_ECHO=y
# CONFIG_ENV is not set
# CONFIG_EXPR is not set
# CONFIG_FALSE is not set
# CONFIG_FOLD is not set
# CONFIG_HEAD is not set
# CONFIG_HOSTID is not set
# CONFIG_ID is not set
# CONFIG_LENGTH is not set
# CONFIG_LN is not set
# CONFIG_LOGNAME is not set
# CONFIG_LS is not set
# CONFIG_MD5SUM is not set
# CONFIG_MKDIR is not set
# CONFIG_MKFIFO is not set
# CONFIG_MKNOD is not set
# CONFIG_MV is not set
# CONFIG_OD is not set
# CONFIG_PRINTF is not set
# CONFIG_PWD is not set
# CONFIG_REALPATH is not set
# CONFIG_RM is not set
# CONFIG_RMDIR is not set
# CONFIG_SHA1SUM is not set
CONFIG_SLEEP=y
# CONFIG_FEATURE_FANCY_SLEEP is not set
# CONFIG_SORT is not set
# CONFIG_STTY is not set
# CONFIG_SYNC is not set
# CONFIG_TAIL is not set
# CONFIG_TEE is not set
CONFIG_TEST=y
#
# test (forced enabled for use with shell)
#
# CONFIG_TOUCH is not set
# CONFIG_TR is not set
# CONFIG_TRUE is not set
# CONFIG_TTY is not set
# CONFIG_UNAME is not set
# CONFIG_UNIQ is not set
# CONFIG_USLEEP is not set
# CONFIG_UUDECODE is not set
# CONFIG_UUENCODE is not set
# CONFIG_WATCH is not set
# CONFIG_WC is not set
# CONFIG_WHO is not set
# CONFIG_WHOAMI is not set
# CONFIG_YES is not set
#
# Console Utilities
#
# CONFIG_CHVT is not set
# CONFIG_CLEAR is not set
# CONFIG_DEALLOCVT is not set
# CONFIG_DUMPKMAP is not set
# CONFIG_LOADACM is not set
# CONFIG_LOADFONT is not set
# CONFIG_LOADKMAP is not set
# CONFIG_OPENVT is not set
# CONFIG_RESET is not set
# CONFIG_SETKEYCODES is not set
#
# Debian Utilities
#
# CONFIG_MKTEMP is not set
# CONFIG_READLINK is not set
# CONFIG_RUN_PARTS is not set
# CONFIG_START_STOP_DAEMON is not set
# CONFIG_WHICH is not set
#
# Editors
#
# CONFIG_AWK is not set
# CONFIG_PATCH is not set
# CONFIG_SED is not set
# CONFIG_VI is not set
#
# Finding Utilities
#
# CONFIG_FIND is not set
# CONFIG_GREP is not set
# CONFIG_XARGS is not set
#
# Init Utilities
#
# CONFIG_INIT is not set
# CONFIG_HALT is not set
# CONFIG_POWEROFF is not set
# CONFIG_REBOOT is not set
# CONFIG_MINIT is not set
# CONFIG_MESG is not set
#
# Login/Password Management Utilities
#
# CONFIG_USE_BB_PWD_GRP is not set
# CONFIG_ADDGROUP is not set
# CONFIG_DELGROUP is not set
# CONFIG_ADDUSER is not set
# CONFIG_DELUSER is not set
# CONFIG_GETTY is not set
# CONFIG_LOGIN is not set
# CONFIG_PASSWD is not set
# CONFIG_SU is not set
# CONFIG_SULOGIN is not set
# CONFIG_VLOCK is not set
#
# Miscellaneous Utilities
#
# CONFIG_ADJTIMEX is not set
# CONFIG_CROND is not set
# CONFIG_CRONTAB is not set
# CONFIG_DC is not set
# CONFIG_LAST is not set
# CONFIG_HDPARM is not set
# CONFIG_MAKEDEVS is not set
# CONFIG_MT is not set
# CONFIG_STRINGS is not set
# CONFIG_TIME is not set
# CONFIG_WATCHDOG is not set
#
# Linux Module Utilities
#
CONFIG_INSMOD=y
# CONFIG_FEATURE_OLD_MODULE_INTERFACE is not set
CONFIG_FEATURE_NEW_MODULE_INTERFACE=y
#
# Support new (post 2.1) Linux kernels (Forced enabled)
#
# CONFIG_FEATURE_INSMOD_VERSION_CHECKING is not set
CONFIG_FEATURE_INSMOD_KSYMOOPS_SYMBOLS=y
# CONFIG_FEATURE_INSMOD_LOADINKMEM is not set
# CONFIG_FEATURE_INSMOD_LOAD_MAP is not set
# CONFIG_LSMOD is not set
# CONFIG_MODPROBE is not set
# CONFIG_RMMOD is not set
CONFIG_FEATURE_CHECK_TAINTED_MODULE=y
#
# Networking Utilities
#
# CONFIG_FEATURE_IPV6 is not set
# CONFIG_ARPING is not set
# CONFIG_FTPGET is not set
# CONFIG_FTPPUT is not set
CONFIG_HOSTNAME=y
# CONFIG_HTTPD is not set
CONFIG_IFCONFIG=y
CONFIG_FEATURE_IFCONFIG_STATUS=y
# CONFIG_FEATURE_IFCONFIG_SLIP is not set
# CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ is not set
# CONFIG_FEATURE_IFCONFIG_HW is not set
CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS=y
# CONFIG_IFUPDOWN is not set
# CONFIG_INETD is not set
# CONFIG_IP is not set
# CONFIG_IPCALC is not set
# CONFIG_IPADDR is not set
# CONFIG_IPLINK is not set
# CONFIG_IPROUTE is not set
# CONFIG_IPTUNNEL is not set
# CONFIG_NAMEIF is not set
# CONFIG_NC is not set
# CONFIG_NETSTAT is not set
# CONFIG_NSLOOKUP is not set
# CONFIG_PING is not set
CONFIG_ROUTE=y
# CONFIG_TELNET is not set
# CONFIG_TELNETD is not set
# CONFIG_TFTP is not set
# CONFIG_TRACEROUTE is not set
# CONFIG_VCONFIG is not set
# CONFIG_WGET is not set
#
# udhcp Server/Client
#
# CONFIG_UDHCPD is not set
CONFIG_UDHCPC=y
# CONFIG_FEATURE_UDHCP_SYSLOG is not set
# CONFIG_FEATURE_UDHCP_DEBUG is not set
#
# Process Utilities
#
# CONFIG_FREE is not set
# CONFIG_KILL is not set
# CONFIG_PIDOF is not set
# CONFIG_PS is not set
# CONFIG_RENICE is not set
# CONFIG_TOP is not set
# CONFIG_UPTIME is not set
#
# Another Bourne-like Shell
#
CONFIG_FEATURE_SH_IS_ASH=y
# CONFIG_FEATURE_SH_IS_HUSH is not set
# CONFIG_FEATURE_SH_IS_LASH is not set
# CONFIG_FEATURE_SH_IS_MSH is not set
# CONFIG_FEATURE_SH_IS_NONE is not set
CONFIG_ASH=y
#
# Ash Shell Options
#
# CONFIG_ASH_JOB_CONTROL is not set
# CONFIG_ASH_ALIAS is not set
# CONFIG_ASH_MATH_SUPPORT is not set
# CONFIG_ASH_GETOPTS is not set
# CONFIG_ASH_CMDCMD is not set
# CONFIG_ASH_MAIL is not set
CONFIG_ASH_OPTIMIZE_FOR_SIZE=y
# CONFIG_HUSH is not set
# CONFIG_LASH is not set
# CONFIG_MSH is not set
#
# Bourne Shell Options
#
# CONFIG_FEATURE_COMMAND_EDITING is not set
# CONFIG_FEATURE_COMMAND_SAVEHISTORY is not set
# CONFIG_FEATURE_COMMAND_TAB_COMPLETION is not set
# CONFIG_FEATURE_COMMAND_USERNAME_COMPLETION is not set
CONFIG_FEATURE_COMMAND_HISTORY=15
# CONFIG_FEATURE_SH_STANDALONE_SHELL is not set
# CONFIG_FEATURE_SH_FANCY_PROMPT is not set
# CONFIG_FEATURE_SH_EXTRA_QUIET is not set
#
# System Logging Utilities
#
# CONFIG_SYSLOGD is not set
# CONFIG_LOGGER is not set
#
# Linux System Utilities
#
# CONFIG_DMESG is not set
# CONFIG_FBSET is not set
# CONFIG_FDFLUSH is not set
# CONFIG_FDFORMAT is not set
# CONFIG_FDISK is not set
# CONFIG_FREERAMDISK is not set
# CONFIG_FSCK_MINIX is not set
# CONFIG_MKFS_MINIX is not set
# CONFIG_GETOPT is not set
# CONFIG_HEXDUMP is not set
# CONFIG_HWCLOCK is not set
# CONFIG_LOSETUP is not set
# CONFIG_MKSWAP is not set
# CONFIG_MORE is not set
CONFIG_PIVOT_ROOT=y
# CONFIG_RDATE is not set
# CONFIG_SWAPONOFF is not set
CONFIG_MOUNT=y
CONFIG_NFSMOUNT=y
CONFIG_UMOUNT=y
# CONFIG_FEATURE_MOUNT_FORCE is not set
#
# Common options for mount/umount
#
# CONFIG_FEATURE_MOUNT_LOOP is not set
# CONFIG_FEATURE_MTAB_SUPPORT is not set
#
# Debugging Options
#
# CONFIG_DEBUG is not set
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread