Hi,
 
I am trying to get stateless-linux setup with RHEL5(2.6.18-53.el5).

1. I created copy of root on "server1" as following
 
# rsync -a --exclude '/proc/*' --exclude '/sys/*' --exclude
/diskless/rhel5u1/root / /diskless/rhel5u1/root

Then added entry for this directory into /etc/exports on server1
# cat /etc/exports
/diskless/rhel5u1/root/         *(rw,no_root_squash)
# /etc/init.d/nfs restart
...
# exportfs
/diskless/rhel5u1/root
                <world>

2. Made some more changes to the image in /diskless/rhel5u1/root(such as
etc/fstab,etc/hosts, etc/sysconfig/network-scripts/ifcfg-eth0,
etc/sysconfig/network) 

3. Did the following on the test machine.."server2"
 
#mkinitrd -v --with=tg3 --rootdev server1_IP:diskless/rhel5u1/root
--rootfs nfs --net-dev=eth0 --rootopts=rw,nolock /tmp/initrd-NFS
2.6.18-53.el5
Creating initramfs
Looking for deps of module uhci-hcd
Looking for deps of module ohci-hcd
...
Adding module tg3
bootproto not specified for eth0, assuming DHCP

#cp /tmp/initrd-NFS /boot/initrd-NFS.img

Added the entry for this(Stateless Unix Test into menu.lst
 
# cat /boot/grub/menu.lst
...
default=1
title Red Hat Enterprise Linux Server (2.6.18-53.el5)
        root (hd0,0)
        kernel /boot/vmlinuz-2.6.18-53.el5 ro root=LABEL=/ rhgb
console=tty0 console=ttyS0,9600
        initrd /boot/initrd-2.6.18-53.el5.img
title Stateless Unix Test
        kernel /boot/vmlinuz-2.6.18-53.el5 selinux=0
root=server1_IP:/diskless/rhel5u1/root rhgb console=tty0
console=ttyS0,9600
        initrd /boot/initrd-NFS.img

#reboot
 
When server2 comes up from read-write NFS root, what is the
devt(filp->f_dentry->d_inode->i_sb->s_dev) expected from an open on
"/"(now NFS-mounted) - where filp is the "file" structure returned by a
call to filp_open().

Here is what my code does
 
filp = filp_open("/", O_RDONLY, 0600);
if (IS_ERR(filp)) {
        printk("Error");
} else {
...
        do something with filp->f_dentry->d_inode->i_sb->s_dev
}

On server2, it returns 0x12 - I am not sure what is expected. There is
no entry for /dev/nfs or /dev/nfsroot on server1 or server2.
 
On server1, i couldnt find entries for nfs in /proc/devices(same for
server2)
# cat /proc/devices|grep nfs
#

Upon reboot, following is the mount output on server2
]# mount
rootfs on / type rootfs (rw)
10.182.102.98:/diskless/rhel5u1/root on / type nfs
(rw,vers=3,rsize=32768,wsize=32768,hard,nolock,proto=udp,timeo=7,retrans
=3,sec=sys,addr=10.182.102.98)
/dev on /dev type tmpfs (rw)
/proc on /proc type proc (rw)
/sys on /sys type sysfs (rw)
/proc/bus/usb on /proc/bus/usb type usbfs (rw)
none on /dev/pts type devpts (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
tmpfs on /dev/vx type tmpfs (rw)
/etc/auto.misc on /misc type autofs
(rw,fd=6,pgrp=3261,timeout=300,minproto=5,maxproto=5,indirect)
-hosts on /net type autofs
(rw,fd=11,pgrp=3261,timeout=300,minproto=5,maxproto=5,indirect)

Thanks!!

_______________________________________________
Stateless-list mailing list
[email protected]
http://www.redhat.com/mailman/listinfo/stateless-list

Reply via email to