[CI] [SSI] Support for UML
Brian J. Watson
Brian.J.Watson@compaq.com
Sun, 19 Aug 2001 07:29:09 -0700
This is a multi-part message in MIME format.
--------------2E2A7A9369BBBF6473FCE76A
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
In case you have trouble with the BinHex attachments my Mac thought best
to use, here are the patchfile and config file as plain text...
==
Kitrick-
These are the latest instructions I've been using to set up CI on UML.
They are by no means set in stone, seeing as how I haven't succeeded yet
(due more to lack of trying than any fundamental difficulties).
I'll be on the road at Caldera Forum and LinuxWorld until the 31st.
During this time, I'll only be checking my work e-mail, and not
necessarily every day.
I'm sending this e-mail from my home address. If for some reason you
want to reply only to me, please use my work address:
Brian.J.Watson@compaq.com
Thanks. Good luck!
-Brian
==
1) Apply ci-linux-2.4.6-v0.5.6 to vanilla 2.4.6 source:
tar jxvf linux-2.4.6.tar.bz2
tar jxvf ci-linux-2.4.6-v0.5.6.tar.bz2
cp -al linux ci-uml
cd ci-uml
patch -p1 <../ci-linux-2.4.6-v0.5.6/ci-linux-2.4.6-v0.5.6.patch
cd ..
2) Check out tag v_2_4_6_5 from the UML repository:
export CVSROOT=':pserver:anonymous@cvs.user-mode-linux.sf.net:
/cvsroot/user-mode-linux'
cvs login
cvs -z9 co -rv_2_4_6_5 -duml linux
3) Generate a patch against the vanilla 2.4.6 source:
diff -Pru --exclude=CVS linux uml | grep -v '^Only in '
>patch-uml
4) Apply the UML patch against ci-linux:
cd ci-uml
patch -p1 <../patch-uml
(resolve conflicts, if any)
5) Apply the attached patch which adds CI support to UML:
patch -p1 <../patch-ci-uml
6) Copy the attached config file into place and build:
cp ../config-ci-uml .config
make oldconfig bzImage modules ARCH=um
cd ..
7) Get the RedHat 7.0 root image from:
http://prdownloads.sourceforge.net/user-mode-linux/
root_fs_redhat_7.0_big.bz2
8) Make a copy of the root image for node 1:
mkdir 1
cp root_fs_redhat_7.0_big.bz2 1/root_fs
9) Mount the root:
mkdir mnt
mount ../1/root_fs mnt -o loop
10) Install your modules into the root:
cd ci-uml
make modules_install INSTALL_MOD_PATH=`pwd`/../mnt
cd ..
11) Install Cluster Tools 0.5.6 or later into the root. Follow the
instructions for Cluster Tools to do this. Be sure to add a line
like the following to cmd/Makefile and libcluster/Makefile:
PREFIX = ../mnt
12) Edit the /etc/cluster.conf to specify whatever virtual network
addresses you want, then unmount the root:
umount mnt
13) Copy the root for node 2:
mkdir 2
cp 1/root_fs 2
You'll need to change node 2's /etc/cluster.conf accordingly.
14) Install the UML tools, which includes the uml_router networking
daemon. Start the daemon. As an alternative, UML supports a virtual
network using multicast. Play around.
15) Bring up CI under UML:
cd 1
../ci-uml/linux eth0=daemon
Last time I tried this, it panicked early in the boot. I haven't
figured out why. Probably something boneheaded. ;)
16) Once you get a prompt for node 1, try running the cluster_start
command. It'll set up your network interface, as well as
initializing ICS and CLMS.
17) When you got this far, bring up node 2 in a similar fashion. Once
you run cluster_start on node 2, you should see messages on node
1's console about it joining. Run the following on either node:
clusternode_setstate 1 UP
clusternode_setstate 2 UP
Now try running 'cluster -v' on either node, and you should see
that both nodes are up. They should also be able to ping each
other.
18) Declare success with CI. Please let us know how you did it.
19) Tackle SSI. There's more new system calls for which to add entries
to UML. Adrian Cox will have a recipe for how to use GFS over UML.
SSI requires the use of a ramdisk to join the cluster and mount
the GFS shared root. This will have to be faked somehow. There's
probably other issues, as well.
--------------2E2A7A9369BBBF6473FCE76A
Content-Type: text/plain; charset=us-ascii;
name="patch-ci-uml"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="patch-ci-uml"
diff -Nur ci-uml/arch/um/config.in ci-uml-test/arch/um/config.in
--- ci-uml/arch/um/config.in Tue Jul 31 11:58:10 2001
+++ ci-uml-test/arch/um/config.in Tue Jul 31 16:44:54 2001
@@ -97,3 +97,17 @@
dep_bool 'Enable gprof support' CONFIG_GPROF $CONFIG_DEBUGSYM
dep_bool 'Enable gcov support' CONFIG_GCOV $CONFIG_DEBUGSYM
endmenu
+
+mainmenu_option next_comment
+comment 'Clustering'
+define_bool CONFIG_X86_CMPXCHG y
+bool 'Clustering' CONFIG_CLUSTER
+if [ "$CONFIG_CLUSTER" = "y" ]; then
+ bool 'CLuster Membership Service (CLMS)' CONFIG_CLMS
+ if [ "$CONFIG_CLMS" = "y" ]; then
+ comment 'Internode Communication Subsystem (ICS) is required for CLMS'
+ define_bool CONFIG_ICS y
+ fi
+fi
+
+endmenu
diff -Nur ci-uml/arch/um/include/sysdep-i386/syscalls.h ci-uml-test/arch/um/include/sysdep-i386/syscalls.h
--- ci-uml/arch/um/include/sysdep-i386/syscalls.h Tue Jul 31 11:58:10 2001
+++ ci-uml-test/arch/um/include/sysdep-i386/syscalls.h Tue Jul 31 18:28:11 2001
@@ -39,9 +39,12 @@
[ __NR_setfsgid32 ] = sys_setfsgid, \
[ __NR_pivot_root ] = sys_pivot_root, \
[ __NR_mincore ] = sys_mincore, \
- [ __NR_madvise ] = sys_madvise,
+ [ __NR_madvise ] = sys_madvise, \
+ [ __NR_fcntl64 + 1 ... __NR_ssisys - 1 ] = \
+ (syscall_handler_t *) sys_ni_syscall, \
+ [ __NR_ssisys ] = sys_ssisys,
-#define LAST_SYSCALL __NR_fcntl64
+#define LAST_SYSCALL __NR_ssisys
/*
* Overrides for Emacs so that we follow Linus's tabbing style.
diff -Nur ci-uml/arch/um/kernel/sys_call_table.c ci-uml-test/arch/um/kernel/sys_call_table.c
--- ci-uml/arch/um/kernel/sys_call_table.c Tue Jul 31 11:58:11 2001
+++ ci-uml-test/arch/um/kernel/sys_call_table.c Tue Jul 31 16:55:05 2001
@@ -217,6 +217,7 @@
extern syscall_handler_t sys_madvise;
extern syscall_handler_t sys_fcntl64;
extern syscall_handler_t sys_getdents64;
+extern syscall_handler_t sys_ssisys;
extern syscall_handler_t um_mount;
extern syscall_handler_t um_time;
--------------2E2A7A9369BBBF6473FCE76A
Content-Type: text/plain; charset=us-ascii;
name="config-ci-uml"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="config-ci-uml"
#
# Automatically generated make config: don't edit
#
CONFIG_USERMODE=y
# CONFIG_ISA is not set
# CONFIG_SBUS is not set
# CONFIG_PCI is not set
CONFIG_UID16=y
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
#
# Code maturity level options
#
CONFIG_EXPERIMENTAL=y
#
# General Setup
#
CONFIG_STDIO_CONSOLE=y
CONFIG_NET=y
CONFIG_SYSVIPC=y
CONFIG_BSD_PROCESS_ACCT=y
CONFIG_SYSCTL=y
CONFIG_BINFMT_AOUT=y
CONFIG_BINFMT_ELF=y
CONFIG_BINFMT_MISC=y
CONFIG_UNIX98_PTYS=y
CONFIG_UNIX98_PTY_COUNT=256
CONFIG_SSL=y
CONFIG_HOSTFS=m
# CONFIG_MCONSOLE is not set
#
# Loadable module support
#
CONFIG_MODULES=y
CONFIG_KMOD=y
#
# Devices
#
CONFIG_BLK_DEV_UBD=y
# CONFIG_BLK_DEV_UBD_SYNC is not set
CONFIG_BLK_DEV_LOOP=y
CONFIG_BLK_DEV_NBD=y
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_SIZE=4096
CONFIG_BLK_DEV_INITRD=y
# CONFIG_MMAPPER is not set
#
# Networking options
#
# CONFIG_PACKET is not set
# CONFIG_NETLINK is not set
# CONFIG_NETFILTER is not set
# CONFIG_FILTER is not set
CONFIG_UNIX=y
CONFIG_INET=y
# CONFIG_IP_MULTICAST is not set
# CONFIG_IP_ADVANCED_ROUTER is not set
# CONFIG_IP_PNP is not set
# CONFIG_NET_IPIP is not set
# CONFIG_NET_IPGRE is not set
# CONFIG_INET_ECN is not set
# CONFIG_SYN_COOKIES is not set
# CONFIG_IPV6 is not set
# CONFIG_KHTTPD is not set
# CONFIG_ATM is not set
#
#
#
# CONFIG_IPX is not set
# CONFIG_ATALK is not set
# CONFIG_DECNET is not set
# CONFIG_BRIDGE is not set
# CONFIG_X25 is not set
# CONFIG_LAPB is not set
# CONFIG_LLC is not set
# CONFIG_NET_DIVERT is not set
# CONFIG_ECONET is not set
# CONFIG_WAN_ROUTER is not set
# CONFIG_NET_FASTROUTE is not set
# CONFIG_NET_HW_FLOWCONTROL is not set
#
# QoS and/or fair queueing
#
# CONFIG_NET_SCHED is not set
#
# Network device support
#
CONFIG_NETDEVICES=y
CONFIG_UML_NET=y
# CONFIG_UML_NET_ETHERTAP is not set
# CONFIG_UML_NET_SLIP is not set
CONFIG_UML_NET_DAEMON=y
# CONFIG_UML_NET_MCAST is not set
# CONFIG_ETHERTAP is not set
# CONFIG_TUN is not set
#
# File systems
#
CONFIG_QUOTA=y
CONFIG_AUTOFS_FS=m
CONFIG_AUTOFS4_FS=m
CONFIG_REISERFS_FS=m
# CONFIG_REISERFS_CHECK is not set
# CONFIG_ADFS_FS is not set
# CONFIG_ADFS_FS_RW is not set
# CONFIG_AFFS_FS is not set
# CONFIG_HFS_FS is not set
# CONFIG_BFS_FS is not set
CONFIG_FAT_FS=m
CONFIG_MSDOS_FS=m
CONFIG_UMSDOS_FS=m
CONFIG_VFAT_FS=m
# CONFIG_EFS_FS is not set
# CONFIG_JFFS_FS is not set
# CONFIG_CRAMFS is not set
# CONFIG_TMPFS is not set
# CONFIG_RAMFS is not set
CONFIG_ISO9660_FS=m
# CONFIG_JOLIET is not set
CONFIG_MINIX_FS=m
# CONFIG_VXFS_FS is not set
# CONFIG_NTFS_FS is not set
# CONFIG_NTFS_RW is not set
# CONFIG_HPFS_FS is not set
CONFIG_PROC_FS=y
CONFIG_DEVFS_FS=y
CONFIG_DEVFS_MOUNT=y
# CONFIG_DEVFS_DEBUG is not set
CONFIG_DEVPTS_FS=y
# CONFIG_QNX4FS_FS is not set
# CONFIG_QNX4FS_RW is not set
# CONFIG_ROMFS_FS is not set
CONFIG_EXT2_FS=y
# CONFIG_SYSV_FS is not set
# CONFIG_UDF_FS is not set
# CONFIG_UDF_RW is not set
# CONFIG_UFS_FS is not set
# CONFIG_UFS_FS_WRITE is not set
#
# Network File Systems
#
# CONFIG_CODA_FS is not set
# CONFIG_NFS_FS is not set
# CONFIG_NFS_V3 is not set
# CONFIG_ROOT_NFS is not set
# CONFIG_NFSD is not set
# CONFIG_NFSD_V3 is not set
# CONFIG_SUNRPC is not set
# CONFIG_LOCKD is not set
# CONFIG_SMB_FS is not set
# CONFIG_NCP_FS is not set
# CONFIG_NCPFS_PACKET_SIGNING is not set
# CONFIG_NCPFS_IOCTL_LOCKING is not set
# CONFIG_NCPFS_STRONG is not set
# CONFIG_NCPFS_NFS_NS is not set
# CONFIG_NCPFS_OS2_NS is not set
# CONFIG_NCPFS_SMALLDOS is not set
# CONFIG_NCPFS_NLS is not set
# CONFIG_NCPFS_EXTRAS is not set
#
# Partition Types
#
# CONFIG_PARTITION_ADVANCED is not set
CONFIG_MSDOS_PARTITION=y
# CONFIG_SMB_NLS is not set
CONFIG_NLS=y
#
# Native Language Support
#
CONFIG_NLS_DEFAULT="iso8859-1"
# CONFIG_NLS_CODEPAGE_437 is not set
# CONFIG_NLS_CODEPAGE_737 is not set
# CONFIG_NLS_CODEPAGE_775 is not set
# CONFIG_NLS_CODEPAGE_850 is not set
# CONFIG_NLS_CODEPAGE_852 is not set
# CONFIG_NLS_CODEPAGE_855 is not set
# CONFIG_NLS_CODEPAGE_857 is not set
# CONFIG_NLS_CODEPAGE_860 is not set
# CONFIG_NLS_CODEPAGE_861 is not set
# CONFIG_NLS_CODEPAGE_862 is not set
# CONFIG_NLS_CODEPAGE_863 is not set
# CONFIG_NLS_CODEPAGE_864 is not set
# CONFIG_NLS_CODEPAGE_865 is not set
# CONFIG_NLS_CODEPAGE_866 is not set
# CONFIG_NLS_CODEPAGE_869 is not set
# CONFIG_NLS_CODEPAGE_936 is not set
# CONFIG_NLS_CODEPAGE_950 is not set
# CONFIG_NLS_CODEPAGE_932 is not set
# CONFIG_NLS_CODEPAGE_949 is not set
# CONFIG_NLS_CODEPAGE_874 is not set
# CONFIG_NLS_ISO8859_8 is not set
# CONFIG_NLS_CODEPAGE_1251 is not set
# CONFIG_NLS_ISO8859_1 is not set
# CONFIG_NLS_ISO8859_2 is not set
# CONFIG_NLS_ISO8859_3 is not set
# CONFIG_NLS_ISO8859_4 is not set
# CONFIG_NLS_ISO8859_5 is not set
# CONFIG_NLS_ISO8859_6 is not set
# CONFIG_NLS_ISO8859_7 is not set
# CONFIG_NLS_ISO8859_9 is not set
# CONFIG_NLS_ISO8859_13 is not set
# CONFIG_NLS_ISO8859_14 is not set
# CONFIG_NLS_ISO8859_15 is not set
# CONFIG_NLS_KOI8_R is not set
# CONFIG_NLS_KOI8_U is not set
# CONFIG_NLS_UTF8 is not set
#
# Kernel hacking
#
CONFIG_DEBUGSYM=y
CONFIG_PT_PROXY=y
# CONFIG_GPROF is not set
# CONFIG_GCOV is not set
#
# Clustering
#
CONFIG_X86_CMPXCHG=y
CONFIG_CLUSTER=y
CONFIG_CLMS=y
#
# Internode Communication Subsystem (ICS) is required for CLMS
#
CONFIG_ICS=y
--------------2E2A7A9369BBBF6473FCE76A--