FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu User

 
 
LinkBack Thread Tools
 
Old 11-07-2008, 07:55 PM
David Cantrell
 
Default Load FCP modules early for CD/DVD install (#184648)

Load the SCSI modules earlier for CD/DVD installs on s390. Also,
always set up the network interface because you still need that
to ssh in and run loader.
---
loader2/linuxrc.s390 | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/loader2/linuxrc.s390 b/loader2/linuxrc.s390
index c75010d..ec85340 100644
--- a/loader2/linuxrc.s390
+++ b/loader2/linuxrc.s390
@@ -257,8 +257,6 @@ if [ -n "$CMSDASD" -a -n "$CMSCONFFILE" ]; then
source /tmp/$CMSCONFFILE #2>/dev/null
fi

-do_net_install="yes"
-
if [ -r /sys/firmware/ipl/ipl_type ]; then
if [ "`cat /sys/firmware/ipl/ipl_type`" = "fcp" ]; then
while [ 1 ]; do
@@ -268,17 +266,19 @@ if [ -r /sys/firmware/ipl/ipl_type ]; then
case $do_cd_install in
y|Y|[Yy][Ee][Ss])
# set up FCP cdrom here
+ insert_module qdio$LO
+ insert_module scsi_mod$LO
+ insert_module scsi_transport_fc$LO
+ insert_module zfcp$LO
CD_DEVICE="`cat /sys/firmware/ipl/device`"
WWPN="`cat /sys/firmware/ipl/wwpn`"
LUN="`cat /sys/firmware/ipl/lun`"
echo 1 > /sys/bus/ccw/drivers/zfcp/$CD_DEVICE/online
echo $WWPN > /sys/bus/ccw/drivers/zfcp/$CD_DEVICE/port_add
echo $LUN > /sys/bus/ccw/drivers/zfcp/$CD_DEVICE/$WWPN/unit_add
- do_net_install="no"
break
;;
n|N|[Nn][Oo])
- do_net_install="yes"
break
;;
*)
@@ -292,7 +292,6 @@ if [ -r /sys/firmware/ipl/ipl_type ]; then
fi
fi

-if [ "$do_net_install" = "yes" ]; then
# Perform a network installation
# Check for missing parameters, prompt for them if necessary
while [ -z "$NETTYPE" ]; do
@@ -566,7 +565,6 @@ if [ "$do_net_install" = "yes" ]; then
if [ ! -z "$HOSTNAME" -a ! -z "$IPADDR" ]; then
echo -e "$IPADDR $HOSTNAME `echo $HOSTNAME | cut -d '.' -f 1`" >> /etc/hosts
fi
-fi

if [ -z "$DASD" ]; then
echo
--
1.6.0.2

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 11-07-2008, 08:10 PM
Hans de Goede
 
Default Load FCP modules early for CD/DVD install (#184648)

David Cantrell wrote:

Load the SCSI modules earlier for CD/DVD installs on s390. Also,
always set up the network interface because you still need that
to ssh in and run loader.


Looks sane to me.

Regards,

Hans

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 12-01-2008, 09:03 PM
David Cantrell
 
Default Load FCP modules early for CD/DVD install (#184648)

Load the SCSI modules earlier for CD/DVD installs on s390. Also,
always set up the network interface because you still need that
to ssh in and run loader.
---
loader/linuxrc.s390 | 536 +++++++++++++++++++++++++--------------------------
1 files changed, 267 insertions(+), 269 deletions(-)

diff --git a/loader/linuxrc.s390 b/loader/linuxrc.s390
index 08d5755..2643ffe 100644
--- a/loader/linuxrc.s390
+++ b/loader/linuxrc.s390
@@ -254,8 +254,6 @@ if [ -n "$CMSDASD" -a -n "$CMSCONFFILE" ]; then
source /tmp/$CMSCONFFILE #2>/dev/null
fi

-do_net_install="yes"
-
if [ -r /sys/firmware/ipl/ipl_type ]; then
if [ "`cat /sys/firmware/ipl/ipl_type`" = "fcp" ]; then
while [ 1 ]; do
@@ -265,17 +263,19 @@ if [ -r /sys/firmware/ipl/ipl_type ]; then
case $do_cd_install in
y|Y|[Yy][Ee][Ss])
# set up FCP cdrom here
+ insert_module qdio$LO
+ insert_module scsi_mod$LO
+ insert_module scsi_transport_fc$LO
+ insert_module zfcp$LO
CD_DEVICE="`cat /sys/firmware/ipl/device`"
WWPN="`cat /sys/firmware/ipl/wwpn`"
LUN="`cat /sys/firmware/ipl/lun`"
echo 1 > /sys/bus/ccw/drivers/zfcp/$CD_DEVICE/online
echo $WWPN > /sys/bus/ccw/drivers/zfcp/$CD_DEVICE/port_add
echo $LUN > /sys/bus/ccw/drivers/zfcp/$CD_DEVICE/$WWPN/unit_add
- do_net_install="no"
break
;;
n|N|[Nn][Oo])
- do_net_install="yes"
break
;;
*)
@@ -289,273 +289,271 @@ if [ -r /sys/firmware/ipl/ipl_type ]; then
fi
fi

-if [ "$do_net_install" = "yes" ]; then
- # Perform a network installation
- # Check for missing parameters, prompt for them if necessary
- while [ -z "$NETTYPE" ]; do
- echo $"Which kind of network device do you intend to use"
- echo $" (e.g. ctc, iucv, qeth, lcs)."
- echo $"Enter 'qeth' for OSA-Express Fast Ethernet, Gigabit Ethernet"
- echo $" (including 1000Base-T), High Speed Token Ring, and ATM "
- echo $" (running Ethernet LAN emulation) features in QDIO mode."
- echo $"Enter 'lcs' for OSA┬*2 Ethernet/Token Ring, OSA-Express Fast Ethernet in"
- echo $" non-QDIO mode, OSA-Express High Speed Token Ring in non-QDIO mode and"
- echo $" Gigabit Ethernet in non-QDIO mode."
- read NETTYPE
- done
- if [ "$NETTYPE" != "iucv" ]; then # iucv is the only interface without ccw config
- if [ -n "$CHANDEV" ]; then
- echo
- echo $"The CHANDEV variable isn't used anymore, please update your "
- echo $".parm or the .conf file"
- echo
- fi
- while [ -z "$SUBCHANNELS" ]; do
- echo $"Enter the bus ID and the device number of your CCW devices."
- echo $"CTC/ESCON and LCS need two subchannels:"
- echo $"(e.g. "0.0.0600,0.0.0601" will configure the CTC or ESCON interface"
- echo $"with the subchannels 0x600 and 0x601)"
- echo $"QETH needs three subchannels p.e. 0.0.0300,0.0.0301,0.0.0302"
- read SUBCHANNELS
- done
- SUBCHANNELS=`echo $SUBCHANNELS | /sbin/busybox tr ABCDEF abcdef`
- if [ "$NETTYPE" = "qeth" ]; then
- if [ -z "$PORTNAME" ]; then
- echo $"Portname of the OSA-Express feature in QDIO mode and z/VM Guest LAN"
- echo $"This parameter is optional with z/VM 4.4.0 or z/VM 4.3.0 with"
- echo $"APARs VM63308 and PQ73878"
- echo $"Press enter if you don't want to enter a portname"
- read PORTNAME
- fi
- if [ -z "$LAYER2" ]; then
- echo $"Enter the mode of operation for the OSA device"
- echo $"0 for layer 3 mode (default)"
- echo $"1 for layer 2 mode"
- read LAYER2
- fi
- if [ "$LAYER2" == 1 ]; then
- if [ -z "$VSWITCH" -o "$VSWITCH" == 0 ]; then
- if [ -z "$MACADDR" ]; then
- echo $"Enter a unique MAC address (eg. 02:00:00:00:00:00)."
- echo $"Leave this blank and press enter if connecting to a"
- echo $"Layer 2 VSWITCH, as this is automatically assigned"
- read MACADDR
- fi
- fi
- fi
- fi
+# Perform a network installation
+# Check for missing parameters, prompt for them if necessary
+while [ -z "$NETTYPE" ]; do
+ echo $"Which kind of network device do you intend to use"
+ echo $" (e.g. ctc, iucv, qeth, lcs)."
+ echo $"Enter 'qeth' for OSA-Express Fast Ethernet, Gigabit Ethernet"
+ echo $" (including 1000Base-T), High Speed Token Ring, and ATM "
+ echo $" (running Ethernet LAN emulation) features in QDIO mode."
+ echo $"Enter 'lcs' for OSA┬*2 Ethernet/Token Ring, OSA-Express Fast Ethernet in"
+ echo $" non-QDIO mode, OSA-Express High Speed Token Ring in non-QDIO mode and"
+ echo $" Gigabit Ethernet in non-QDIO mode."
+ read NETTYPE
+done
+if [ "$NETTYPE" != "iucv" ]; then # iucv is the only interface without ccw config
+ if [ -n "$CHANDEV" ]; then
+ echo
+ echo $"The CHANDEV variable isn't used anymore, please update your "
+ echo $".parm or the .conf file"
+ echo
fi
-
- while [ -z "$HOSTNAME" -o "$HOSTNAME" = "(none)" ]; do
- echo $"Enter the FQDN of your new Linux guest (e.g. s390.redhat.com):"
- read HOSTNAME
- done
- while [ -z "$IPADDR" ]; do
- echo $"Enter a valid IP address of your new Linux guest:"
- read IPADDR
- checkip $IPADDR
- ret=$?
- if [ $ret -eq 1 ]; then
- echo -n "Invalid IP address format. "
- unset IPADDR
- fi
- done
- while [ -z "$NETWORK" ]; do
- echo $"Enter a valid network address of the new Linux guest:"
- read NETWORK
- checkip $NETWORK
- ret=$?
- if [ $ret -eq 1 ]; then
- echo -n "Invalid network address format. "
- unset NETWORK
- fi
- done
- if [ "$NETTYPE" = "qeth" ] || [ "$NETTYPE" = "lcs" ]; then
- while [ -z "$NETMASK" ]; do
- echo $"Enter the netmask for the new Linux guest (e.g. 255.255.255.0):"
- read NETMASK
- checkip $NETMASK
- ret=$?
- if [ $ret -eq 1 ]; then
- echo -n "Invalid netmask format. "
- unset NETMASK
- fi
- done
- while [ -z "$BROADCAST" ]; do
- echo $"Enter the broadcast address for the new Linux guest:"
- read BROADCAST
- checkip $BROADCAST
- ret=$?
- if [ $ret -eq 1 ]; then
- echo -n "Invalid broadcast address format. "
- unset BROADCAST
- fi
- done
- while [ -z "$GATEWAY" ]; do
- echo $"Enter your default gateway:"
- read GATEWAY
- checkip $GATEWAY
- ret=$?
- if [ $ret -eq 1 ]; then
- echo -n "Invalid gateway address format. "
- unset GATEWAY
- fi
- done
- if [ ":$NETTYPE" = ":lcs" ]; then
- if [ -n "$RUNKS" -a -z "$PORTNAME" ]; then
- PORTNAME=0
- fi
- while [ -z "$PORTNAME" ]; do
- echo $"Enter the relative port number of your LCS device"
- echo $"(required for OSA-Express ATM cards only):"
- read PORTNAME
- done
- fi
- else # ctc0, iucv0
- if [ -z "$NETMASK" ]; then
- # If the user did not supply netmask, we add the right one.
- NETMASK="255.255.255.255"
+ while [ -z "$SUBCHANNELS" ]; do
+ echo $"Enter the bus ID and the device number of your CCW devices."
+ echo $"CTC/ESCON and LCS need two subchannels:"
+ echo $"(e.g. "0.0.0600,0.0.0601" will configure the CTC or ESCON interface"
+ echo $"with the subchannels 0x600 and 0x601)"
+ echo $"QETH needs three subchannels p.e. 0.0.0300,0.0.0301,0.0.0302"
+ read SUBCHANNELS
+ done
+ SUBCHANNELS=`echo $SUBCHANNELS | /sbin/busybox tr ABCDEF abcdef`
+ if [ "$NETTYPE" = "qeth" ]; then
+ if [ -z "$PORTNAME" ]; then
+ echo $"Portname of the OSA-Express feature in QDIO mode and z/VM Guest LAN"
+ echo $"This parameter is optional with z/VM 4.4.0 or z/VM 4.3.0 with"
+ echo $"APARs VM63308 and PQ73878"
+ echo $"Press enter if you don't want to enter a portname"
+ read PORTNAME
+ fi
+ if [ -z "$LAYER2" ]; then
+ echo $"Enter the mode of operation for the OSA device"
+ echo $"0 for layer 3 mode (default)"
+ echo $"1 for layer 2 mode"
+ read LAYER2
+ fi
+ if [ "$LAYER2" == 1 ]; then
+ if [ -z "$VSWITCH" -o "$VSWITCH" == 0 ]; then
+ if [ -z "$MACADDR" ]; then
+ echo $"Enter a unique MAC address (eg. 02:00:00:00:00:00)."
+ echo $"Leave this blank and press enter if connecting to a"
+ echo $"Layer 2 VSWITCH, as this is automatically assigned"
+ read MACADDR
+ fi
+ fi
+ fi
+ fi
+fi
+
+while [ -z "$HOSTNAME" -o "$HOSTNAME" = "(none)" ]; do
+ echo $"Enter the FQDN of your new Linux guest (e.g. s390.redhat.com):"
+ read HOSTNAME
+done
+while [ -z "$IPADDR" ]; do
+ echo $"Enter a valid IP address of your new Linux guest:"
+ read IPADDR
+ checkip $IPADDR
+ ret=$?
+ if [ $ret -eq 1 ]; then
+ echo -n "Invalid IP address format. "
+ unset IPADDR
+ fi
+done
+while [ -z "$NETWORK" ]; do
+ echo $"Enter a valid network address of the new Linux guest:"
+ read NETWORK
+ checkip $NETWORK
+ ret=$?
+ if [ $ret -eq 1 ]; then
+ echo -n "Invalid network address format. "
+ unset NETWORK
+ fi
+done
+if [ "$NETTYPE" = "qeth" ] || [ "$NETTYPE" = "lcs" ]; then
+ while [ -z "$NETMASK" ]; do
+ echo $"Enter the netmask for the new Linux guest (e.g. 255.255.255.0):"
+ read NETMASK
+ checkip $NETMASK
+ ret=$?
+ if [ $ret -eq 1 ]; then
+ echo -n "Invalid netmask format. "
+ unset NETMASK
+ fi
+ done
+ while [ -z "$BROADCAST" ]; do
+ echo $"Enter the broadcast address for the new Linux guest:"
+ read BROADCAST
+ checkip $BROADCAST
+ ret=$?
+ if [ $ret -eq 1 ]; then
+ echo -n "Invalid broadcast address format. "
+ unset BROADCAST
+ fi
+ done
+ while [ -z "$GATEWAY" ]; do
+ echo $"Enter your default gateway:"
+ read GATEWAY
+ checkip $GATEWAY
+ ret=$?
+ if [ $ret -eq 1 ]; then
+ echo -n "Invalid gateway address format. "
+ unset GATEWAY
+ fi
+ done
+ if [ ":$NETTYPE" = ":lcs" ]; then
+ if [ -n "$RUNKS" -a -z "$PORTNAME" ]; then
+ PORTNAME=0
+ fi
+ while [ -z "$PORTNAME" ]; do
+ echo $"Enter the relative port number of your LCS device"
+ echo $"(required for OSA-Express ATM cards only):"
+ read PORTNAME
+ done
+ fi
+else # ctc0, iucv0
+ if [ -z "$NETMASK" ]; then
+ # If the user did not supply netmask, we add the right one.
+ NETMASK="255.255.255.255"
+ fi
+ while [ -z "$GATEWAY" ]; do
+ echo $"Enter the IP of your CTC / ESCON / IUCV point-to-point partner:"
+ read GATEWAY
+ done
+
+ if [ "$NETTYPE" = "ctc" ]; then
+ if [ -z "$MTU" ]; then
+ MTU="1500"
+ fi
+ if [ -z "$RUNKS" ]; then
+ if [ -n "$CTCPROT" ]; then
+ validprot=1
+ else
+ validprot=0
+ fi
+ while [ "$validprot" = "0" ]; do
+ echo $"Select which protocol should be used for the CTC interface"
+ echo $"0 for compatibility with p.e. VM TCP service machine (default)"
+ echo $"1 for enhanced package checking for Linux peers"
+ echo $"3 for compatibility with OS/390 or z/OS peers"
+ read CTCPROT
+ case "x$CTCPROT" in
+ x|x0)
+ validprot=1
+ unset CTCPROT
+ ;;
+ x1|x3)
+ validprot=1
+ ;;
+ x2)
+ echo $"CTC tty's are not usable for this installation"
+ ;;
+ *)
+ echo $"Invalid selection"
+ ;;
+ esac
+ done
fi
- while [ -z "$GATEWAY" ]; do
- echo $"Enter the IP of your CTC / ESCON / IUCV point-to-point partner:"
- read GATEWAY
- done
-
- if [ "$NETTYPE" = "ctc" ]; then
- if [ -z "$MTU" ]; then
- MTU="1500"
- fi
- if [ -z "$RUNKS" ]; then
- if [ -n "$CTCPROT" ]; then
- validprot=1
- else
- validprot=0
- fi
- while [ "$validprot" = "0" ]; do
- echo $"Select which protocol should be used for the CTC interface"
- echo $"0 for compatibility with p.e. VM TCP service machine (default)"
- echo $"1 for enhanced package checking for Linux peers"
- echo $"3 for compatibility with OS/390 or z/OS peers"
- read CTCPROT
- case "x$CTCPROT" in
- x|x0)
- validprot=1
- unset CTCPROT
- ;;
- x1|x3)
- validprot=1
- ;;
- x2)
- echo $"CTC tty's are not usable for this installation"
- ;;
- *)
- echo $"Invalid selection"
- ;;
- esac
- done
- fi
- fi
- if [ ":$NETTYPE" = ":iucv" ]; then
- while [ -z "$PEERID" ]; do
- echo $"Enter the peer id of the VM guest you want to"
- echo $"connect to (in capital letters)."
- read PEERID
- done
- fi
- fi
- # don't ask for MTU, but use it if it has been set in the .parm file
- # don't overwrite MMTU if it has been set for CTC
- if [ -n "$MTU" -a -z "$MMTU" ]; then
- MMTU="mtu $MTU"
- fi
-
- # configure network-interface
- if [ ":$NETTYPE" = ":ctc" ]; then
- insmod ccwgroup$LO
- insmod cu3088$LO
- insmod fsm$LO
- insmod ctc$LO
- setupdevice
- DEVICE=${NETTYPE}0
- ifconfig $DEVICE $IPADDR $MMTU pointopoint $GATEWAY
- echo "alias $DEVICE ctc" >> /tmp/modprobe.conf
- elif [ ":$NETTYPE" = ":iucv" ]; then
- insmod fsm$LO
- insmod iucv$LO
- insmod netiucv$LO
- sysecho /sys/bus/iucv/drivers/netiucv/connection $PEERID
- DEVICE=${NETTYPE}0
- ifconfig $DEVICE $IPADDR $MMTU pointopoint $GATEWAY
- echo "alias $DEVICE netiucv" >> /tmp/modprobe.conf
- elif [ "$NETTYPE" = "lcs" ]; then
- insmod ccwgroup$LO
- insmod cu3088$LO
- insmod lcs$LO
- setupdevice
- # KH FIXME: Workaround for missing sysfs interface
- # DEVICE=`cat /sys/devices/lcs/${SUBCHANNELS//,*/}/if_name`
- DEVICE=eth0
- ifconfig $DEVICE $IPADDR $MMTU netmask $NETMASK broadcast $BROADCAST
- route add -net $NETWORK netmask $NETMASK dev $DEVICE 2>/dev/null
- echo "alias $DEVICE lcs" >> /tmp/modprobe.conf
- elif [ "$NETTYPE" = "qeth" ]; then
- insmod ccwgroup$LO
- insmod crypto_api$LO
- insmod xfrm_nalgo$LO
- insmod qdio$LO
- insmod ipv6$LO
- insmod qeth$LO
- setupdevice
- DEVICE=`cat /sys/devices/qeth/${SUBCHANNELS//,*/}/if_name`
- if [ -n "$LAYER2" -a -n "$MACADDR" ]; then
- ifconfig $DEVICE hw ether $MACADDR
- fi
- ifconfig $DEVICE $IPADDR $MMTU netmask $NETMASK broadcast $BROADCAST
- route add -net $NETWORK netmask $NETMASK dev $DEVICE 2>/dev/null
- echo "alias $DEVICE qeth" >> /tmp/modprobe.conf
- else
- echo $"Unknown network device, aborting installation"
- exit 1
- fi
-
- route add default gw $GATEWAY dev $DEVICE 2>/dev/null
- # BH FIXME: Workaround for manual MACADDR, need ping to update arp table
- ping -c 1 $GATEWAY > /dev/null
-
- if [ -z "$DNS" ]; then
- echo $"Enter your DNS server(s), separated by colons (:"
- read DNS
- fi
- if [ -z "$DNS" ]; then
- echo $"You might encounter problems without a nameserver, especially"
- echo $"with FTP installs"
- fi
-
- if [ -n "$DNS" -a -z "$SEARCHDNS" ]; then
- echo $"Enter your DNS search domain(s) (if any), separated by colons (:"
- read SEARCHDNS
- fi
-
- [ -n "$HOSTNAME" ] && hostname $HOSTNAME
-
- # show interfaces and routing table
- ifconfig -a
- route -n
-
- # convert to space-separated lists
- if [ -n "$SEARCHDNS" ]; then
- SEARCHDNS=`echo $SEARCHDNS |sed -e 's/:/ /g'`
- for i in "$SEARCHDNS"; do echo "search $i"; done >> /etc/resolv.conf
- fi
- if [ -n "$DNS" ]; then
- RESOLVDNS=`echo $DNS |sed -e 's/:/ /g'`
- for i in $RESOLVDNS; do echo "nameserver $i"; done >> /etc/resolv.conf
- fi
-
- # make sure we have an /etc/hosts file (required for telnetd)
- if [ ! -z "$HOSTNAME" -a ! -z "$IPADDR" ]; then
- echo -e "$IPADDR $HOSTNAME `echo $HOSTNAME | cut -d '.' -f 1`" >> /etc/hosts
- fi
+ fi
+ if [ ":$NETTYPE" = ":iucv" ]; then
+ while [ -z "$PEERID" ]; do
+ echo $"Enter the peer id of the VM guest you want to"
+ echo $"connect to (in capital letters)."
+ read PEERID
+ done
+ fi
+fi
+# don't ask for MTU, but use it if it has been set in the .parm file
+# don't overwrite MMTU if it has been set for CTC
+if [ -n "$MTU" -a -z "$MMTU" ]; then
+ MMTU="mtu $MTU"
+fi
+
+# configure network-interface
+if [ ":$NETTYPE" = ":ctc" ]; then
+ insmod ccwgroup$LO
+ insmod cu3088$LO
+ insmod fsm$LO
+ insmod ctc$LO
+ setupdevice
+ DEVICE=${NETTYPE}0
+ ifconfig $DEVICE $IPADDR $MMTU pointopoint $GATEWAY
+ echo "alias $DEVICE ctc" >> /tmp/modprobe.conf
+elif [ ":$NETTYPE" = ":iucv" ]; then
+ insmod fsm$LO
+ insmod iucv$LO
+ insmod netiucv$LO
+ sysecho /sys/bus/iucv/drivers/netiucv/connection $PEERID
+ DEVICE=${NETTYPE}0
+ ifconfig $DEVICE $IPADDR $MMTU pointopoint $GATEWAY
+ echo "alias $DEVICE netiucv" >> /tmp/modprobe.conf
+elif [ "$NETTYPE" = "lcs" ]; then
+ insmod ccwgroup$LO
+ insmod cu3088$LO
+ insmod lcs$LO
+ setupdevice
+# KH FIXME: Workaround for missing sysfs interface
+# DEVICE=`cat /sys/devices/lcs/${SUBCHANNELS//,*/}/if_name`
+ DEVICE=eth0
+ ifconfig $DEVICE $IPADDR $MMTU netmask $NETMASK broadcast $BROADCAST
+ route add -net $NETWORK netmask $NETMASK dev $DEVICE 2>/dev/null
+ echo "alias $DEVICE lcs" >> /tmp/modprobe.conf
+elif [ "$NETTYPE" = "qeth" ]; then
+ insmod ccwgroup$LO
+ insmod crypto_api$LO
+ insmod xfrm_nalgo$LO
+ insmod qdio$LO
+ insmod ipv6$LO
+ insmod qeth$LO
+ setupdevice
+ DEVICE=`cat /sys/devices/qeth/${SUBCHANNELS//,*/}/if_name`
+ if [ -n "$LAYER2" -a -n "$MACADDR" ]; then
+ ifconfig $DEVICE hw ether $MACADDR
+ fi
+ ifconfig $DEVICE $IPADDR $MMTU netmask $NETMASK broadcast $BROADCAST
+ route add -net $NETWORK netmask $NETMASK dev $DEVICE 2>/dev/null
+ echo "alias $DEVICE qeth" >> /tmp/modprobe.conf
+else
+ echo $"Unknown network device, aborting installation"
+ exit 1
+fi
+
+route add default gw $GATEWAY dev $DEVICE 2>/dev/null
+# BH FIXME: Workaround for manual MACADDR, need ping to update arp table
+ping -c 1 $GATEWAY > /dev/null
+
+if [ -z "$DNS" ]; then
+ echo $"Enter your DNS server(s), separated by colons (:"
+ read DNS
+fi
+if [ -z "$DNS" ]; then
+ echo $"You might encounter problems without a nameserver, especially"
+ echo $"with FTP installs"
+fi
+
+if [ -n "$DNS" -a -z "$SEARCHDNS" ]; then
+ echo $"Enter your DNS search domain(s) (if any), separated by colons (:"
+ read SEARCHDNS
+fi
+
+[ -n "$HOSTNAME" ] && hostname $HOSTNAME
+
+# show interfaces and routing table
+ifconfig -a
+route -n
+
+# convert to space-separated lists
+if [ -n "$SEARCHDNS" ]; then
+ SEARCHDNS=`echo $SEARCHDNS |sed -e 's/:/ /g'`
+ for i in "$SEARCHDNS"; do echo "search $i"; done >> /etc/resolv.conf
+fi
+if [ -n "$DNS" ]; then
+ RESOLVDNS=`echo $DNS |sed -e 's/:/ /g'`
+ for i in $RESOLVDNS; do echo "nameserver $i"; done >> /etc/resolv.conf
+fi
+
+# make sure we have an /etc/hosts file (required for telnetd)
+if [ ! -z "$HOSTNAME" -a ! -z "$IPADDR" ]; then
+ echo -e "$IPADDR $HOSTNAME `echo $HOSTNAME | cut -d '.' -f 1`" >> /etc/hosts
fi

if [ -z "$DASD" ]; then
--
1.6.0.3

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 12-02-2008, 07:47 AM
Hans de Goede
 
Default Load FCP modules early for CD/DVD install (#184648)

David Cantrell wrote:

Load the SCSI modules earlier for CD/DVD installs on s390. Also,
always set up the network interface because you still need that
to ssh in and run loader.
---
loader/linuxrc.s390 | 536 +++++++++++++++++++++++++--------------------------
1 files changed, 267 insertions(+), 269 deletions(-)



<Ugh> this one is large, I can not find anything obviously wrong, but I'm no
expert on this area


Regards,

Hans



diff --git a/loader/linuxrc.s390 b/loader/linuxrc.s390
index 08d5755..2643ffe 100644
--- a/loader/linuxrc.s390
+++ b/loader/linuxrc.s390
@@ -254,8 +254,6 @@ if [ -n "$CMSDASD" -a -n "$CMSCONFFILE" ]; then
source /tmp/$CMSCONFFILE #2>/dev/null
fi

-do_net_install="yes"

-
if [ -r /sys/firmware/ipl/ipl_type ]; then
if [ "`cat /sys/firmware/ipl/ipl_type`" = "fcp" ]; then
while [ 1 ]; do
@@ -265,17 +263,19 @@ if [ -r /sys/firmware/ipl/ipl_type ]; then
case $do_cd_install in
y|Y|[Yy][Ee][Ss])
# set up FCP cdrom here
+ insert_module qdio$LO
+ insert_module scsi_mod$LO
+ insert_module scsi_transport_fc$LO
+ insert_module zfcp$LO
CD_DEVICE="`cat /sys/firmware/ipl/device`"
WWPN="`cat /sys/firmware/ipl/wwpn`"
LUN="`cat /sys/firmware/ipl/lun`"
echo 1 > /sys/bus/ccw/drivers/zfcp/$CD_DEVICE/online
echo $WWPN > /sys/bus/ccw/drivers/zfcp/$CD_DEVICE/port_add
echo $LUN > /sys/bus/ccw/drivers/zfcp/$CD_DEVICE/$WWPN/unit_add
- do_net_install="no"
break
;;
n|N|[Nn][Oo])
- do_net_install="yes"
break
;;
*)
@@ -289,273 +289,271 @@ if [ -r /sys/firmware/ipl/ipl_type ]; then
fi
fi

-if [ "$do_net_install" = "yes" ]; then

- # Perform a network installation
- # Check for missing parameters, prompt for them if necessary
- while [ -z "$NETTYPE" ]; do
- echo $"Which kind of network device do you intend to use"
- echo $" (e.g. ctc, iucv, qeth, lcs)."
- echo $"Enter 'qeth' for OSA-Express Fast Ethernet, Gigabit Ethernet"
- echo $" (including 1000Base-T), High Speed Token Ring, and ATM "
- echo $" (running Ethernet LAN emulation) features in QDIO mode."
- echo $"Enter 'lcs' for OSA┬*2 Ethernet/Token Ring, OSA-Express Fast Ethernet in"
- echo $" non-QDIO mode, OSA-Express High Speed Token Ring in non-QDIO mode and"
- echo $" Gigabit Ethernet in non-QDIO mode."
- read NETTYPE
- done
- if [ "$NETTYPE" != "iucv" ]; then # iucv is the only interface without ccw config
- if [ -n "$CHANDEV" ]; then
- echo
- echo $"The CHANDEV variable isn't used anymore, please update your "
- echo $".parm or the .conf file"
- echo
- fi
- while [ -z "$SUBCHANNELS" ]; do
- echo $"Enter the bus ID and the device number of your CCW devices."
- echo $"CTC/ESCON and LCS need two subchannels:"
- echo $"(e.g. "0.0.0600,0.0.0601" will configure the CTC or ESCON interface"
- echo $"with the subchannels 0x600 and 0x601)"
- echo $"QETH needs three subchannels p.e. 0.0.0300,0.0.0301,0.0.0302"
- read SUBCHANNELS
- done
- SUBCHANNELS=`echo $SUBCHANNELS | /sbin/busybox tr ABCDEF abcdef`
- if [ "$NETTYPE" = "qeth" ]; then
- if [ -z "$PORTNAME" ]; then
- echo $"Portname of the OSA-Express feature in QDIO mode and z/VM Guest LAN"
- echo $"This parameter is optional with z/VM 4.4.0 or z/VM 4.3.0 with"
- echo $"APARs VM63308 and PQ73878"
- echo $"Press enter if you don't want to enter a portname"
- read PORTNAME
- fi
- if [ -z "$LAYER2" ]; then
- echo $"Enter the mode of operation for the OSA device"
- echo $"0 for layer 3 mode (default)"
- echo $"1 for layer 2 mode"
- read LAYER2
- fi
- if [ "$LAYER2" == 1 ]; then
- if [ -z "$VSWITCH" -o "$VSWITCH" == 0 ]; then
- if [ -z "$MACADDR" ]; then
- echo $"Enter a unique MAC address (eg. 02:00:00:00:00:00)."
- echo $"Leave this blank and press enter if connecting to a"
- echo $"Layer 2 VSWITCH, as this is automatically assigned"
- read MACADDR
- fi
- fi
- fi
- fi
+# Perform a network installation
+# Check for missing parameters, prompt for them if necessary
+while [ -z "$NETTYPE" ]; do
+ echo $"Which kind of network device do you intend to use"
+ echo $" (e.g. ctc, iucv, qeth, lcs)."
+ echo $"Enter 'qeth' for OSA-Express Fast Ethernet, Gigabit Ethernet"
+ echo $" (including 1000Base-T), High Speed Token Ring, and ATM "
+ echo $" (running Ethernet LAN emulation) features in QDIO mode."
+ echo $"Enter 'lcs' for OSA┬*2 Ethernet/Token Ring, OSA-Express Fast Ethernet in"
+ echo $" non-QDIO mode, OSA-Express High Speed Token Ring in non-QDIO mode and"
+ echo $" Gigabit Ethernet in non-QDIO mode."
+ read NETTYPE
+done
+if [ "$NETTYPE" != "iucv" ]; then # iucv is the only interface without ccw config
+ if [ -n "$CHANDEV" ]; then
+ echo
+ echo $"The CHANDEV variable isn't used anymore, please update your "
+ echo $".parm or the .conf file"
+ echo
fi
-
- while [ -z "$HOSTNAME" -o "$HOSTNAME" = "(none)" ]; do

- echo $"Enter the FQDN of your new Linux guest (e.g. s390.redhat.com):"
- read HOSTNAME
- done
- while [ -z "$IPADDR" ]; do
- echo $"Enter a valid IP address of your new Linux guest:"
- read IPADDR
- checkip $IPADDR
- ret=$?
- if [ $ret -eq 1 ]; then
- echo -n "Invalid IP address format. "
- unset IPADDR
- fi
- done
- while [ -z "$NETWORK" ]; do
- echo $"Enter a valid network address of the new Linux guest:"
- read NETWORK
- checkip $NETWORK
- ret=$?
- if [ $ret -eq 1 ]; then
- echo -n "Invalid network address format. "
- unset NETWORK
- fi
- done
- if [ "$NETTYPE" = "qeth" ] || [ "$NETTYPE" = "lcs" ]; then
- while [ -z "$NETMASK" ]; do
- echo $"Enter the netmask for the new Linux guest (e.g. 255.255.255.0):"
- read NETMASK
- checkip $NETMASK
- ret=$?
- if [ $ret -eq 1 ]; then
- echo -n "Invalid netmask format. "
- unset NETMASK
- fi
- done
- while [ -z "$BROADCAST" ]; do
- echo $"Enter the broadcast address for the new Linux guest:"
- read BROADCAST
- checkip $BROADCAST
- ret=$?
- if [ $ret -eq 1 ]; then
- echo -n "Invalid broadcast address format. "
- unset BROADCAST
- fi
- done
- while [ -z "$GATEWAY" ]; do
- echo $"Enter your default gateway:"
- read GATEWAY
- checkip $GATEWAY
- ret=$?
- if [ $ret -eq 1 ]; then
- echo -n "Invalid gateway address format. "
- unset GATEWAY
- fi
- done
- if [ ":$NETTYPE" = ":lcs" ]; then
- if [ -n "$RUNKS" -a -z "$PORTNAME" ]; then
- PORTNAME=0
- fi
- while [ -z "$PORTNAME" ]; do
- echo $"Enter the relative port number of your LCS device"
- echo $"(required for OSA-Express ATM cards only):"
- read PORTNAME
- done
- fi
- else # ctc0, iucv0
- if [ -z "$NETMASK" ]; then
- # If the user did not supply netmask, we add the right one.
- NETMASK="255.255.255.255"
+ while [ -z "$SUBCHANNELS" ]; do
+ echo $"Enter the bus ID and the device number of your CCW devices."
+ echo $"CTC/ESCON and LCS need two subchannels:"
+ echo $"(e.g. "0.0.0600,0.0.0601" will configure the CTC or ESCON interface"
+ echo $"with the subchannels 0x600 and 0x601)"
+ echo $"QETH needs three subchannels p.e. 0.0.0300,0.0.0301,0.0.0302"
+ read SUBCHANNELS
+ done
+ SUBCHANNELS=`echo $SUBCHANNELS | /sbin/busybox tr ABCDEF abcdef`
+ if [ "$NETTYPE" = "qeth" ]; then
+ if [ -z "$PORTNAME" ]; then
+ echo $"Portname of the OSA-Express feature in QDIO mode and z/VM Guest LAN"
+ echo $"This parameter is optional with z/VM 4.4.0 or z/VM 4.3.0 with"
+ echo $"APARs VM63308 and PQ73878"
+ echo $"Press enter if you don't want to enter a portname"
+ read PORTNAME
+ fi
+ if [ -z "$LAYER2" ]; then
+ echo $"Enter the mode of operation for the OSA device"
+ echo $"0 for layer 3 mode (default)"
+ echo $"1 for layer 2 mode"
+ read LAYER2
+ fi
+ if [ "$LAYER2" == 1 ]; then
+ if [ -z "$VSWITCH" -o "$VSWITCH" == 0 ]; then
+ if [ -z "$MACADDR" ]; then
+ echo $"Enter a unique MAC address (eg. 02:00:00:00:00:00)."
+ echo $"Leave this blank and press enter if connecting to a"
+ echo $"Layer 2 VSWITCH, as this is automatically assigned"
+ read MACADDR
+ fi
+ fi
+ fi
+ fi
+fi
+
+while [ -z "$HOSTNAME" -o "$HOSTNAME" = "(none)" ]; do

+ echo $"Enter the FQDN of your new Linux guest (e.g. s390.redhat.com):"
+ read HOSTNAME
+done
+while [ -z "$IPADDR" ]; do
+ echo $"Enter a valid IP address of your new Linux guest:"
+ read IPADDR
+ checkip $IPADDR
+ ret=$?
+ if [ $ret -eq 1 ]; then
+ echo -n "Invalid IP address format. "
+ unset IPADDR
+ fi
+done
+while [ -z "$NETWORK" ]; do
+ echo $"Enter a valid network address of the new Linux guest:"
+ read NETWORK
+ checkip $NETWORK
+ ret=$?
+ if [ $ret -eq 1 ]; then
+ echo -n "Invalid network address format. "
+ unset NETWORK
+ fi
+done
+if [ "$NETTYPE" = "qeth" ] || [ "$NETTYPE" = "lcs" ]; then
+ while [ -z "$NETMASK" ]; do
+ echo $"Enter the netmask for the new Linux guest (e.g. 255.255.255.0):"
+ read NETMASK
+ checkip $NETMASK
+ ret=$?
+ if [ $ret -eq 1 ]; then
+ echo -n "Invalid netmask format. "
+ unset NETMASK
+ fi
+ done
+ while [ -z "$BROADCAST" ]; do
+ echo $"Enter the broadcast address for the new Linux guest:"
+ read BROADCAST
+ checkip $BROADCAST
+ ret=$?
+ if [ $ret -eq 1 ]; then
+ echo -n "Invalid broadcast address format. "
+ unset BROADCAST
+ fi
+ done
+ while [ -z "$GATEWAY" ]; do
+ echo $"Enter your default gateway:"
+ read GATEWAY
+ checkip $GATEWAY
+ ret=$?
+ if [ $ret -eq 1 ]; then
+ echo -n "Invalid gateway address format. "
+ unset GATEWAY
+ fi
+ done
+ if [ ":$NETTYPE" = ":lcs" ]; then
+ if [ -n "$RUNKS" -a -z "$PORTNAME" ]; then
+ PORTNAME=0
+ fi
+ while [ -z "$PORTNAME" ]; do
+ echo $"Enter the relative port number of your LCS device"
+ echo $"(required for OSA-Express ATM cards only):"
+ read PORTNAME
+ done
+ fi
+else # ctc0, iucv0
+ if [ -z "$NETMASK" ]; then
+ # If the user did not supply netmask, we add the right one.
+ NETMASK="255.255.255.255"
+ fi
+ while [ -z "$GATEWAY" ]; do
+ echo $"Enter the IP of your CTC / ESCON / IUCV point-to-point partner:"
+ read GATEWAY
+ done
+
+ if [ "$NETTYPE" = "ctc" ]; then
+ if [ -z "$MTU" ]; then
+ MTU="1500"
+ fi
+ if [ -z "$RUNKS" ]; then
+ if [ -n "$CTCPROT" ]; then
+ validprot=1
+ else
+ validprot=0
+ fi
+ while [ "$validprot" = "0" ]; do
+ echo $"Select which protocol should be used for the CTC interface"
+ echo $"0 for compatibility with p.e. VM TCP service machine (default)"
+ echo $"1 for enhanced package checking for Linux peers"
+ echo $"3 for compatibility with OS/390 or z/OS peers"
+ read CTCPROT
+ case "x$CTCPROT" in
+ x|x0)
+ validprot=1
+ unset CTCPROT
+ ;;
+ x1|x3)
+ validprot=1
+ ;;
+ x2)
+ echo $"CTC tty's are not usable for this installation"
+ ;;
+ *)
+ echo $"Invalid selection"
+ ;;
+ esac
+ done
fi
- while [ -z "$GATEWAY" ]; do
- echo $"Enter the IP of your CTC / ESCON / IUCV point-to-point partner:"
- read GATEWAY
- done
-
- if [ "$NETTYPE" = "ctc" ]; then
- if [ -z "$MTU" ]; then
- MTU="1500"
- fi
- if [ -z "$RUNKS" ]; then
- if [ -n "$CTCPROT" ]; then
- validprot=1
- else
- validprot=0
- fi
- while [ "$validprot" = "0" ]; do
- echo $"Select which protocol should be used for the CTC interface"
- echo $"0 for compatibility with p.e. VM TCP service machine (default)"
- echo $"1 for enhanced package checking for Linux peers"
- echo $"3 for compatibility with OS/390 or z/OS peers"
- read CTCPROT
- case "x$CTCPROT" in
- x|x0)
- validprot=1
- unset CTCPROT
- ;;
- x1|x3)
- validprot=1
- ;;
- x2)
- echo $"CTC tty's are not usable for this installation"
- ;;
- *)
- echo $"Invalid selection"
- ;;
- esac
- done
- fi
- fi
- if [ ":$NETTYPE" = ":iucv" ]; then
- while [ -z "$PEERID" ]; do
- echo $"Enter the peer id of the VM guest you want to"
- echo $"connect to (in capital letters)."
- read PEERID
- done
- fi
- fi
- # don't ask for MTU, but use it if it has been set in the .parm file
- # don't overwrite MMTU if it has been set for CTC
- if [ -n "$MTU" -a -z "$MMTU" ]; then
- MMTU="mtu $MTU"
- fi
-
- # configure network-interface
- if [ ":$NETTYPE" = ":ctc" ]; then
- insmod ccwgroup$LO
- insmod cu3088$LO
- insmod fsm$LO
- insmod ctc$LO
- setupdevice
- DEVICE=${NETTYPE}0
- ifconfig $DEVICE $IPADDR $MMTU pointopoint $GATEWAY
- echo "alias $DEVICE ctc" >> /tmp/modprobe.conf
- elif [ ":$NETTYPE" = ":iucv" ]; then
- insmod fsm$LO
- insmod iucv$LO
- insmod netiucv$LO
- sysecho /sys/bus/iucv/drivers/netiucv/connection $PEERID
- DEVICE=${NETTYPE}0
- ifconfig $DEVICE $IPADDR $MMTU pointopoint $GATEWAY
- echo "alias $DEVICE netiucv" >> /tmp/modprobe.conf
- elif [ "$NETTYPE" = "lcs" ]; then
- insmod ccwgroup$LO
- insmod cu3088$LO
- insmod lcs$LO
- setupdevice
- # KH FIXME: Workaround for missing sysfs interface
- # DEVICE=`cat /sys/devices/lcs/${SUBCHANNELS//,*/}/if_name`
- DEVICE=eth0
- ifconfig $DEVICE $IPADDR $MMTU netmask $NETMASK broadcast $BROADCAST
- route add -net $NETWORK netmask $NETMASK dev $DEVICE 2>/dev/null
- echo "alias $DEVICE lcs" >> /tmp/modprobe.conf
- elif [ "$NETTYPE" = "qeth" ]; then
- insmod ccwgroup$LO
- insmod crypto_api$LO
- insmod xfrm_nalgo$LO
- insmod qdio$LO
- insmod ipv6$LO
- insmod qeth$LO
- setupdevice
- DEVICE=`cat /sys/devices/qeth/${SUBCHANNELS//,*/}/if_name`
- if [ -n "$LAYER2" -a -n "$MACADDR" ]; then
- ifconfig $DEVICE hw ether $MACADDR
- fi
- ifconfig $DEVICE $IPADDR $MMTU netmask $NETMASK broadcast $BROADCAST
- route add -net $NETWORK netmask $NETMASK dev $DEVICE 2>/dev/null
- echo "alias $DEVICE qeth" >> /tmp/modprobe.conf
- else
- echo $"Unknown network device, aborting installation"
- exit 1
- fi
-
- route add default gw $GATEWAY dev $DEVICE 2>/dev/null
- # BH FIXME: Workaround for manual MACADDR, need ping to update arp table
- ping -c 1 $GATEWAY > /dev/null
-
- if [ -z "$DNS" ]; then
- echo $"Enter your DNS server(s), separated by colons (:"
- read DNS
- fi
- if [ -z "$DNS" ]; then
- echo $"You might encounter problems without a nameserver, especially"
- echo $"with FTP installs"
- fi
-
- if [ -n "$DNS" -a -z "$SEARCHDNS" ]; then
- echo $"Enter your DNS search domain(s) (if any), separated by colons (:"
- read SEARCHDNS
- fi
-
- [ -n "$HOSTNAME" ] && hostname $HOSTNAME
-
- # show interfaces and routing table
- ifconfig -a
- route -n
-
- # convert to space-separated lists
- if [ -n "$SEARCHDNS" ]; then
- SEARCHDNS=`echo $SEARCHDNS |sed -e 's/:/ /g'`
- for i in "$SEARCHDNS"; do echo "search $i"; done >> /etc/resolv.conf
- fi
- if [ -n "$DNS" ]; then
- RESOLVDNS=`echo $DNS |sed -e 's/:/ /g'`
- for i in $RESOLVDNS; do echo "nameserver $i"; done >> /etc/resolv.conf
- fi
-
- # make sure we have an /etc/hosts file (required for telnetd)
- if [ ! -z "$HOSTNAME" -a ! -z "$IPADDR" ]; then
- echo -e "$IPADDR $HOSTNAME `echo $HOSTNAME | cut -d '.' -f 1`" >> /etc/hosts
- fi
+ fi
+ if [ ":$NETTYPE" = ":iucv" ]; then
+ while [ -z "$PEERID" ]; do
+ echo $"Enter the peer id of the VM guest you want to"
+ echo $"connect to (in capital letters)."
+ read PEERID
+ done
+ fi
+fi
+# don't ask for MTU, but use it if it has been set in the .parm file
+# don't overwrite MMTU if it has been set for CTC
+if [ -n "$MTU" -a -z "$MMTU" ]; then
+ MMTU="mtu $MTU"
+fi
+
+# configure network-interface
+if [ ":$NETTYPE" = ":ctc" ]; then
+ insmod ccwgroup$LO
+ insmod cu3088$LO
+ insmod fsm$LO
+ insmod ctc$LO
+ setupdevice
+ DEVICE=${NETTYPE}0
+ ifconfig $DEVICE $IPADDR $MMTU pointopoint $GATEWAY
+ echo "alias $DEVICE ctc" >> /tmp/modprobe.conf
+elif [ ":$NETTYPE" = ":iucv" ]; then
+ insmod fsm$LO
+ insmod iucv$LO
+ insmod netiucv$LO
+ sysecho /sys/bus/iucv/drivers/netiucv/connection $PEERID
+ DEVICE=${NETTYPE}0
+ ifconfig $DEVICE $IPADDR $MMTU pointopoint $GATEWAY
+ echo "alias $DEVICE netiucv" >> /tmp/modprobe.conf
+elif [ "$NETTYPE" = "lcs" ]; then
+ insmod ccwgroup$LO
+ insmod cu3088$LO
+ insmod lcs$LO
+ setupdevice
+# KH FIXME: Workaround for missing sysfs interface
+# DEVICE=`cat /sys/devices/lcs/${SUBCHANNELS//,*/}/if_name`
+ DEVICE=eth0
+ ifconfig $DEVICE $IPADDR $MMTU netmask $NETMASK broadcast $BROADCAST
+ route add -net $NETWORK netmask $NETMASK dev $DEVICE 2>/dev/null
+ echo "alias $DEVICE lcs" >> /tmp/modprobe.conf
+elif [ "$NETTYPE" = "qeth" ]; then
+ insmod ccwgroup$LO
+ insmod crypto_api$LO
+ insmod xfrm_nalgo$LO
+ insmod qdio$LO
+ insmod ipv6$LO
+ insmod qeth$LO
+ setupdevice
+ DEVICE=`cat /sys/devices/qeth/${SUBCHANNELS//,*/}/if_name`
+ if [ -n "$LAYER2" -a -n "$MACADDR" ]; then
+ ifconfig $DEVICE hw ether $MACADDR
+ fi
+ ifconfig $DEVICE $IPADDR $MMTU netmask $NETMASK broadcast $BROADCAST
+ route add -net $NETWORK netmask $NETMASK dev $DEVICE 2>/dev/null
+ echo "alias $DEVICE qeth" >> /tmp/modprobe.conf
+else
+ echo $"Unknown network device, aborting installation"
+ exit 1
+fi
+
+route add default gw $GATEWAY dev $DEVICE 2>/dev/null
+# BH FIXME: Workaround for manual MACADDR, need ping to update arp table
+ping -c 1 $GATEWAY > /dev/null
+
+if [ -z "$DNS" ]; then
+ echo $"Enter your DNS server(s), separated by colons (:"
+ read DNS
+fi
+if [ -z "$DNS" ]; then
+ echo $"You might encounter problems without a nameserver, especially"
+ echo $"with FTP installs"
+fi
+
+if [ -n "$DNS" -a -z "$SEARCHDNS" ]; then
+ echo $"Enter your DNS search domain(s) (if any), separated by colons (:"
+ read SEARCHDNS
+fi
+
+[ -n "$HOSTNAME" ] && hostname $HOSTNAME
+
+# show interfaces and routing table
+ifconfig -a
+route -n
+
+# convert to space-separated lists
+if [ -n "$SEARCHDNS" ]; then
+ SEARCHDNS=`echo $SEARCHDNS |sed -e 's/:/ /g'`
+ for i in "$SEARCHDNS"; do echo "search $i"; done >> /etc/resolv.conf
+fi
+if [ -n "$DNS" ]; then
+ RESOLVDNS=`echo $DNS |sed -e 's/:/ /g'`
+ for i in $RESOLVDNS; do echo "nameserver $i"; done >> /etc/resolv.conf
+fi
+
+# make sure we have an /etc/hosts file (required for telnetd)
+if [ ! -z "$HOSTNAME" -a ! -z "$IPADDR" ]; then
+ echo -e "$IPADDR $HOSTNAME `echo $HOSTNAME | cut -d '.' -f 1`" >> /etc/hosts
fi

if [ -z "$DASD" ]; then


_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 12-02-2008, 02:55 PM
Jeremy Katz
 
Default Load FCP modules early for CD/DVD install (#184648)

On Mon, 2008-12-01 at 12:03 -1000, David Cantrell wrote:
> Load the SCSI modules earlier for CD/DVD installs on s390. Also,
> always set up the network interface because you still need that
> to ssh in and run loader.

There's nothing that seems out of place here in a quick look given the
surrounding aspect of linuxrc.s390. Has it been tested in the context
of something more rawhide-ish? Things like insmod instead of modprobe
jump out at me as potentially problematic. I'm going to have to say I
have no clue where the Fedora on s390 efforts stand these days.

But taking a step back to some more general thoughts on linuxrc.s390, is
there an effort to actually get it using the same things we use
everywhere else? There's a lot of manual module probing instead of
letting things be done by udev and then manual network configuration
instead of using NetworkManager. As we've moved more of these bits to
be common, we really probably need to sit down and rework the entire way
that the script works. The goal of it is that it takes the place of
loader/init.c with a few notable and important differences
* Prompting for information on things like network setup if you don't
set it in the parm file. This pretty much has to be "custom" for s390
and doing it with shell is as easy as anything else
* Getting modules loaded. We don't do this until in the loader on other
arches, but we need to do it to get the network up. But we really
probably want to let udev do it as much as we can
* Starting the network. Which we do with spawning NetworkManager in the
"normal" case

Jeremy

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 12-02-2008, 04:46 PM
David Cantrell
 
Default Load FCP modules early for CD/DVD install (#184648)

Hans de Goede wrote:
>
>
> David Cantrell wrote:
>> Load the SCSI modules earlier for CD/DVD installs on s390. Also,
>> always set up the network interface because you still need that
>> to ssh in and run loader.
>> ---
>> loader/linuxrc.s390 | 536
>> +++++++++++++++++++++++++--------------------------
>> 1 files changed, 267 insertions(+), 269 deletions(-)
>>
>
> <Ugh> this one is large, I can not find anything obviously wrong, but
> I'm no expert on this area
>
> Regards,
>
> Hans

I know this one was large. That's primarily because everything had been
indented for some test/check and then that test was changed and
everything moved back to where it was before.

The main motivation for this patch on rawhide is to bring the rawhide
s390 bits in line with the rhel5-branch s390 bits.

>
>> diff --git a/loader/linuxrc.s390 b/loader/linuxrc.s390
>> index 08d5755..2643ffe 100644
>> --- a/loader/linuxrc.s390
>> +++ b/loader/linuxrc.s390
>> @@ -254,8 +254,6 @@ if [ -n "$CMSDASD" -a -n "$CMSCONFFILE" ]; then
>> source /tmp/$CMSCONFFILE #2>/dev/null
>> fi
>>
>> -do_net_install="yes"
>> -
>> if [ -r /sys/firmware/ipl/ipl_type ]; then
>> if [ "`cat /sys/firmware/ipl/ipl_type`" = "fcp" ]; then
>> while [ 1 ]; do
>> @@ -265,17 +263,19 @@ if [ -r /sys/firmware/ipl/ipl_type ]; then
>> case $do_cd_install in
>> y|Y|[Yy][Ee][Ss])
>> # set up FCP cdrom here
>> + insert_module qdio$LO
>> + insert_module scsi_mod$LO
>> + insert_module scsi_transport_fc$LO
>> + insert_module zfcp$LO
>> CD_DEVICE="`cat /sys/firmware/ipl/device`"
>> WWPN="`cat /sys/firmware/ipl/wwpn`"
>> LUN="`cat /sys/firmware/ipl/lun`"
>> echo 1 > /sys/bus/ccw/drivers/zfcp/$CD_DEVICE/online
>> echo $WWPN >
>> /sys/bus/ccw/drivers/zfcp/$CD_DEVICE/port_add
>> echo $LUN >
>> /sys/bus/ccw/drivers/zfcp/$CD_DEVICE/$WWPN/unit_add
>> - do_net_install="no"
>> break
>> ;;
>> n|N|[Nn][Oo])
>> - do_net_install="yes"
>> break
>> ;;
>> *)
>> @@ -289,273 +289,271 @@ if [ -r /sys/firmware/ipl/ipl_type ]; then
>> fi
>> fi
>>
>> -if [ "$do_net_install" = "yes" ]; then
>> - # Perform a network installation
>> - # Check for missing parameters, prompt for them if necessary
>> - while [ -z "$NETTYPE" ]; do
>> - echo $"Which kind of network device do you intend to use"
>> - echo $" (e.g. ctc, iucv, qeth, lcs)."
>> - echo $"Enter 'qeth' for OSA-Express Fast Ethernet, Gigabit
>> Ethernet"
>> - echo $" (including 1000Base-T), High Speed Token Ring, and ATM "
>> - echo $" (running Ethernet LAN emulation) features in QDIO mode."
>> - echo $"Enter 'lcs' for OSA┬*2 Ethernet/Token Ring, OSA-Express
>> Fast Ethernet in"
>> - echo $" non-QDIO mode, OSA-Express High Speed Token Ring in
>> non-QDIO mode and"
>> - echo $" Gigabit Ethernet in non-QDIO mode."
>> - read NETTYPE
>> - done
>> - if [ "$NETTYPE" != "iucv" ]; then # iucv is the only interface
>> without ccw config
>> - if [ -n "$CHANDEV" ]; then
>> - echo
>> - echo $"The CHANDEV variable isn't used anymore, please
>> update your "
>> - echo $".parm or the .conf file"
>> - echo
>> - fi
>> - while [ -z "$SUBCHANNELS" ]; do
>> - echo $"Enter the bus ID and the device number of your CCW
>> devices."
>> - echo $"CTC/ESCON and LCS need two subchannels:"
>> - echo $"(e.g. "0.0.0600,0.0.0601" will configure the CTC
>> or ESCON interface"
>> - echo $"with the subchannels 0x600 and 0x601)"
>> - echo $"QETH needs three subchannels p.e.
>> 0.0.0300,0.0.0301,0.0.0302"
>> - read SUBCHANNELS
>> - done
>> - SUBCHANNELS=`echo $SUBCHANNELS | /sbin/busybox tr ABCDEF abcdef`
>> - if [ "$NETTYPE" = "qeth" ]; then
>> - if [ -z "$PORTNAME" ]; then
>> - echo $"Portname of the OSA-Express feature in QDIO
>> mode and z/VM Guest LAN"
>> - echo $"This parameter is optional with z/VM 4.4.0 or
>> z/VM 4.3.0 with"
>> - echo $"APARs VM63308 and PQ73878"
>> - echo $"Press enter if you don't want to enter a
>> portname"
>> - read PORTNAME
>> - fi
>> - if [ -z "$LAYER2" ]; then
>> - echo $"Enter the mode of operation for the OSA device"
>> - echo $"0 for layer 3 mode (default)"
>> - echo $"1 for layer 2 mode"
>> - read LAYER2
>> - fi
>> - if [ "$LAYER2" == 1 ]; then
>> - if [ -z "$VSWITCH" -o "$VSWITCH" == 0 ]; then
>> - if [ -z "$MACADDR" ]; then
>> - echo $"Enter a unique MAC address (eg.
>> 02:00:00:00:00:00)."
>> - echo $"Leave this blank and press enter if
>> connecting to a"
>> - echo $"Layer 2 VSWITCH, as this is automatically
>> assigned"
>> - read MACADDR
>> - fi
>> - fi
>> - fi
>> - fi
>> +# Perform a network installation
>> +# Check for missing parameters, prompt for them if necessary
>> +while [ -z "$NETTYPE" ]; do
>> + echo $"Which kind of network device do you intend to use"
>> + echo $" (e.g. ctc, iucv, qeth, lcs)."
>> + echo $"Enter 'qeth' for OSA-Express Fast Ethernet, Gigabit Ethernet"
>> + echo $" (including 1000Base-T), High Speed Token Ring, and ATM "
>> + echo $" (running Ethernet LAN emulation) features in QDIO mode."
>> + echo $"Enter 'lcs' for OSA┬*2 Ethernet/Token Ring, OSA-Express
>> Fast Ethernet in"
>> + echo $" non-QDIO mode, OSA-Express High Speed Token Ring in
>> non-QDIO mode and"
>> + echo $" Gigabit Ethernet in non-QDIO mode."
>> + read NETTYPE
>> +done
>> +if [ "$NETTYPE" != "iucv" ]; then # iucv is the only interface
>> without ccw config
>> + if [ -n "$CHANDEV" ]; then
>> + echo
>> + echo $"The CHANDEV variable isn't used anymore, please update
>> your "
>> + echo $".parm or the .conf file"
>> + echo
>> fi
>> - - while [ -z "$HOSTNAME" -o "$HOSTNAME" = "(none)" ]; do
>> - echo $"Enter the FQDN of your new Linux guest (e.g.
>> s390.redhat.com):"
>> - read HOSTNAME
>> - done
>> - while [ -z "$IPADDR" ]; do
>> - echo $"Enter a valid IP address of your new Linux guest:"
>> - read IPADDR
>> - checkip $IPADDR
>> - ret=$?
>> - if [ $ret -eq 1 ]; then
>> - echo -n "Invalid IP address format. "
>> - unset IPADDR
>> - fi
>> - done
>> - while [ -z "$NETWORK" ]; do
>> - echo $"Enter a valid network address of the new Linux guest:"
>> - read NETWORK
>> - checkip $NETWORK
>> - ret=$?
>> - if [ $ret -eq 1 ]; then
>> - echo -n "Invalid network address format. "
>> - unset NETWORK
>> - fi
>> - done
>> - if [ "$NETTYPE" = "qeth" ] || [ "$NETTYPE" = "lcs" ]; then
>> - while [ -z "$NETMASK" ]; do
>> - echo $"Enter the netmask for the new Linux guest (e.g.
>> 255.255.255.0):"
>> - read NETMASK
>> - checkip $NETMASK
>> - ret=$?
>> - if [ $ret -eq 1 ]; then
>> - echo -n "Invalid netmask format. "
>> - unset NETMASK
>> - fi
>> - done
>> - while [ -z "$BROADCAST" ]; do
>> - echo $"Enter the broadcast address for the new Linux
>> guest:"
>> - read BROADCAST
>> - checkip $BROADCAST
>> - ret=$?
>> - if [ $ret -eq 1 ]; then
>> - echo -n "Invalid broadcast address format. "
>> - unset BROADCAST
>> - fi
>> - done
>> - while [ -z "$GATEWAY" ]; do
>> - echo $"Enter your default gateway:"
>> - read GATEWAY
>> - checkip $GATEWAY
>> - ret=$?
>> - if [ $ret -eq 1 ]; then
>> - echo -n "Invalid gateway address format. "
>> - unset GATEWAY
>> - fi
>> - done
>> - if [ ":$NETTYPE" = ":lcs" ]; then
>> - if [ -n "$RUNKS" -a -z "$PORTNAME" ]; then
>> - PORTNAME=0
>> - fi
>> - while [ -z "$PORTNAME" ]; do
>> - echo $"Enter the relative port number of your LCS device"
>> - echo $"(required for OSA-Express ATM cards only):"
>> - read PORTNAME
>> - done
>> - fi
>> - else # ctc0, iucv0
>> - if [ -z "$NETMASK" ]; then
>> - # If the user did not supply netmask, we add the right one.
>> - NETMASK="255.255.255.255"
>> + while [ -z "$SUBCHANNELS" ]; do
>> + echo $"Enter the bus ID and the device number of your CCW
>> devices."
>> + echo $"CTC/ESCON and LCS need two subchannels:"
>> + echo $"(e.g. "0.0.0600,0.0.0601" will configure the CTC or
>> ESCON interface"
>> + echo $"with the subchannels 0x600 and 0x601)"
>> + echo $"QETH needs three subchannels p.e.
>> 0.0.0300,0.0.0301,0.0.0302"
>> + read SUBCHANNELS
>> + done
>> + SUBCHANNELS=`echo $SUBCHANNELS | /sbin/busybox tr ABCDEF abcdef`
>> + if [ "$NETTYPE" = "qeth" ]; then
>> + if [ -z "$PORTNAME" ]; then
>> + echo $"Portname of the OSA-Express feature in QDIO mode
>> and z/VM Guest LAN"
>> + echo $"This parameter is optional with z/VM 4.4.0 or z/VM
>> 4.3.0 with"
>> + echo $"APARs VM63308 and PQ73878"
>> + echo $"Press enter if you don't want to enter a portname"
>> + read PORTNAME
>> + fi
>> + if [ -z "$LAYER2" ]; then
>> + echo $"Enter the mode of operation for the OSA device"
>> + echo $"0 for layer 3 mode (default)"
>> + echo $"1 for layer 2 mode"
>> + read LAYER2
>> + fi
>> + if [ "$LAYER2" == 1 ]; then
>> + if [ -z "$VSWITCH" -o "$VSWITCH" == 0 ]; then
>> + if [ -z "$MACADDR" ]; then
>> + echo $"Enter a unique MAC address (eg.
>> 02:00:00:00:00:00)."
>> + echo $"Leave this blank and press enter if connecting
>> to a"
>> + echo $"Layer 2 VSWITCH, as this is automatically
>> assigned"
>> + read MACADDR
>> + fi
>> + fi
>> + fi
>> + fi
>> +fi
>> + +while [ -z "$HOSTNAME" -o "$HOSTNAME" = "(none)" ]; do
>> + echo $"Enter the FQDN of your new Linux guest (e.g.
>> s390.redhat.com):"
>> + read HOSTNAME
>> +done
>> +while [ -z "$IPADDR" ]; do
>> + echo $"Enter a valid IP address of your new Linux guest:"
>> + read IPADDR
>> + checkip $IPADDR
>> + ret=$?
>> + if [ $ret -eq 1 ]; then
>> + echo -n "Invalid IP address format. "
>> + unset IPADDR
>> + fi
>> +done
>> +while [ -z "$NETWORK" ]; do
>> + echo $"Enter a valid network address of the new Linux guest:"
>> + read NETWORK
>> + checkip $NETWORK
>> + ret=$?
>> + if [ $ret -eq 1 ]; then
>> + echo -n "Invalid network address format. "
>> + unset NETWORK
>> + fi
>> +done
>> +if [ "$NETTYPE" = "qeth" ] || [ "$NETTYPE" = "lcs" ]; then
>> + while [ -z "$NETMASK" ]; do
>> + echo $"Enter the netmask for the new Linux guest (e.g.
>> 255.255.255.0):"
>> + read NETMASK
>> + checkip $NETMASK
>> + ret=$?
>> + if [ $ret -eq 1 ]; then
>> + echo -n "Invalid netmask format. "
>> + unset NETMASK
>> + fi
>> + done
>> + while [ -z "$BROADCAST" ]; do
>> + echo $"Enter the broadcast address for the new Linux guest:"
>> + read BROADCAST
>> + checkip $BROADCAST
>> + ret=$?
>> + if [ $ret -eq 1 ]; then
>> + echo -n "Invalid broadcast address format. "
>> + unset BROADCAST
>> + fi
>> + done
>> + while [ -z "$GATEWAY" ]; do
>> + echo $"Enter your default gateway:"
>> + read GATEWAY
>> + checkip $GATEWAY
>> + ret=$?
>> + if [ $ret -eq 1 ]; then
>> + echo -n "Invalid gateway address format. "
>> + unset GATEWAY
>> + fi
>> + done
>> + if [ ":$NETTYPE" = ":lcs" ]; then
>> + if [ -n "$RUNKS" -a -z "$PORTNAME" ]; then
>> + PORTNAME=0
>> + fi
>> + while [ -z "$PORTNAME" ]; do
>> + echo $"Enter the relative port number of your LCS device"
>> + echo $"(required for OSA-Express ATM cards only):"
>> + read PORTNAME
>> + done
>> + fi
>> +else # ctc0, iucv0
>> + if [ -z "$NETMASK" ]; then
>> + # If the user did not supply netmask, we add the right one.
>> + NETMASK="255.255.255.255"
>> + fi
>> + while [ -z "$GATEWAY" ]; do
>> + echo $"Enter the IP of your CTC / ESCON / IUCV
>> point-to-point partner:"
>> + read GATEWAY
>> + done
>> +
>> + if [ "$NETTYPE" = "ctc" ]; then
>> + if [ -z "$MTU" ]; then
>> + MTU="1500"
>> + fi
>> + if [ -z "$RUNKS" ]; then
>> + if [ -n "$CTCPROT" ]; then
>> + validprot=1
>> + else
>> + validprot=0
>> + fi
>> + while [ "$validprot" = "0" ]; do
>> + echo $"Select which protocol should be used for the CTC
>> interface"
>> + echo $"0 for compatibility with p.e. VM TCP service
>> machine (default)"
>> + echo $"1 for enhanced package checking for Linux peers"
>> + echo $"3 for compatibility with OS/390 or z/OS peers"
>> + read CTCPROT
>> + case "x$CTCPROT" in
>> + x|x0)
>> + validprot=1
>> + unset CTCPROT
>> + ;;
>> + x1|x3)
>> + validprot=1
>> + ;;
>> + x2)
>> + echo $"CTC tty's are not usable for this installation"
>> + ;;
>> + *)
>> + echo $"Invalid selection"
>> + ;;
>> + esac
>> + done
>> fi
>> - while [ -z "$GATEWAY" ]; do
>> - echo $"Enter the IP of your CTC / ESCON / IUCV
>> point-to-point partner:"
>> - read GATEWAY
>> - done
>> -
>> - if [ "$NETTYPE" = "ctc" ]; then
>> - if [ -z "$MTU" ]; then
>> - MTU="1500"
>> - fi
>> - if [ -z "$RUNKS" ]; then
>> - if [ -n "$CTCPROT" ]; then
>> - validprot=1
>> - else
>> - validprot=0
>> - fi
>> - while [ "$validprot" = "0" ]; do
>> - echo $"Select which protocol should be used for the
>> CTC interface"
>> - echo $"0 for compatibility with p.e. VM TCP service
>> machine (default)"
>> - echo $"1 for enhanced package checking for Linux
>> peers"
>> - echo $"3 for compatibility with OS/390 or z/OS peers"
>> - read CTCPROT
>> - case "x$CTCPROT" in
>> - x|x0)
>> - validprot=1
>> - unset CTCPROT
>> - ;;
>> - x1|x3)
>> - validprot=1
>> - ;;
>> - x2)
>> - echo $"CTC tty's are not usable for this
>> installation"
>> - ;;
>> - *)
>> - echo $"Invalid selection"
>> - ;;
>> - esac
>> - done
>> - fi
>> - fi
>> - if [ ":$NETTYPE" = ":iucv" ]; then
>> - while [ -z "$PEERID" ]; do
>> - echo $"Enter the peer id of the VM guest you want to"
>> - echo $"connect to (in capital letters)."
>> - read PEERID
>> - done
>> - fi
>> - fi
>> - # don't ask for MTU, but use it if it has been set in the .parm file
>> - # don't overwrite MMTU if it has been set for CTC
>> - if [ -n "$MTU" -a -z "$MMTU" ]; then
>> - MMTU="mtu $MTU"
>> - fi
>> -
>> - # configure network-interface
>> - if [ ":$NETTYPE" = ":ctc" ]; then
>> - insmod ccwgroup$LO
>> - insmod cu3088$LO
>> - insmod fsm$LO
>> - insmod ctc$LO
>> - setupdevice
>> - DEVICE=${NETTYPE}0
>> - ifconfig $DEVICE $IPADDR $MMTU pointopoint $GATEWAY
>> - echo "alias $DEVICE ctc" >> /tmp/modprobe.conf
>> - elif [ ":$NETTYPE" = ":iucv" ]; then
>> - insmod fsm$LO
>> - insmod iucv$LO
>> - insmod netiucv$LO
>> - sysecho /sys/bus/iucv/drivers/netiucv/connection $PEERID
>> - DEVICE=${NETTYPE}0
>> - ifconfig $DEVICE $IPADDR $MMTU pointopoint $GATEWAY
>> - echo "alias $DEVICE netiucv" >> /tmp/modprobe.conf
>> - elif [ "$NETTYPE" = "lcs" ]; then
>> - insmod ccwgroup$LO
>> - insmod cu3088$LO
>> - insmod lcs$LO
>> - setupdevice
>> - # KH FIXME: Workaround for missing sysfs interface
>> - # DEVICE=`cat /sys/devices/lcs/${SUBCHANNELS//,*/}/if_name`
>> - DEVICE=eth0
>> - ifconfig $DEVICE $IPADDR $MMTU netmask $NETMASK broadcast
>> $BROADCAST
>> - route add -net $NETWORK netmask $NETMASK dev $DEVICE 2>/dev/null
>> - echo "alias $DEVICE lcs" >> /tmp/modprobe.conf
>> - elif [ "$NETTYPE" = "qeth" ]; then
>> - insmod ccwgroup$LO
>> - insmod crypto_api$LO
>> - insmod xfrm_nalgo$LO
>> - insmod qdio$LO
>> - insmod ipv6$LO
>> - insmod qeth$LO
>> - setupdevice
>> - DEVICE=`cat /sys/devices/qeth/${SUBCHANNELS//,*/}/if_name`
>> - if [ -n "$LAYER2" -a -n "$MACADDR" ]; then
>> - ifconfig $DEVICE hw ether $MACADDR
>> - fi
>> - ifconfig $DEVICE $IPADDR $MMTU netmask $NETMASK broadcast
>> $BROADCAST
>> - route add -net $NETWORK netmask $NETMASK dev $DEVICE 2>/dev/null
>> - echo "alias $DEVICE qeth" >> /tmp/modprobe.conf
>> - else
>> - echo $"Unknown network device, aborting installation"
>> - exit 1
>> - fi
>> -
>> - route add default gw $GATEWAY dev $DEVICE 2>/dev/null
>> - # BH FIXME: Workaround for manual MACADDR, need ping to update
>> arp table
>> - ping -c 1 $GATEWAY > /dev/null
>> -
>> - if [ -z "$DNS" ]; then
>> - echo $"Enter your DNS server(s), separated by colons (:"
>> - read DNS
>> - fi
>> - if [ -z "$DNS" ]; then
>> - echo $"You might encounter problems without a nameserver,
>> especially"
>> - echo $"with FTP installs"
>> - fi
>> -
>> - if [ -n "$DNS" -a -z "$SEARCHDNS" ]; then
>> - echo $"Enter your DNS search domain(s) (if any), separated by
>> colons (:"
>> - read SEARCHDNS
>> - fi
>> -
>> - [ -n "$HOSTNAME" ] && hostname $HOSTNAME
>> -
>> - # show interfaces and routing table
>> - ifconfig -a
>> - route -n
>> -
>> - # convert to space-separated lists
>> - if [ -n "$SEARCHDNS" ]; then
>> - SEARCHDNS=`echo $SEARCHDNS |sed -e 's/:/ /g'`
>> - for i in "$SEARCHDNS"; do echo "search $i"; done >>
>> /etc/resolv.conf
>> - fi
>> - if [ -n "$DNS" ]; then
>> - RESOLVDNS=`echo $DNS |sed -e 's/:/ /g'`
>> - for i in $RESOLVDNS; do echo "nameserver $i"; done >>
>> /etc/resolv.conf
>> - fi
>> -
>> - # make sure we have an /etc/hosts file (required for telnetd)
>> - if [ ! -z "$HOSTNAME" -a ! -z "$IPADDR" ]; then
>> - echo -e "$IPADDR $HOSTNAME `echo $HOSTNAME | cut -d '.' -f
>> 1`" >> /etc/hosts
>> - fi
>> + fi
>> + if [ ":$NETTYPE" = ":iucv" ]; then
>> + while [ -z "$PEERID" ]; do
>> + echo $"Enter the peer id of the VM guest you want to"
>> + echo $"connect to (in capital letters)."
>> + read PEERID
>> + done
>> + fi
>> +fi
>> +# don't ask for MTU, but use it if it has been set in the .parm file
>> +# don't overwrite MMTU if it has been set for CTC
>> +if [ -n "$MTU" -a -z "$MMTU" ]; then
>> + MMTU="mtu $MTU"
>> +fi
>> +
>> +# configure network-interface
>> +if [ ":$NETTYPE" = ":ctc" ]; then
>> + insmod ccwgroup$LO
>> + insmod cu3088$LO
>> + insmod fsm$LO
>> + insmod ctc$LO
>> + setupdevice
>> + DEVICE=${NETTYPE}0
>> + ifconfig $DEVICE $IPADDR $MMTU pointopoint $GATEWAY
>> + echo "alias $DEVICE ctc" >> /tmp/modprobe.conf
>> +elif [ ":$NETTYPE" = ":iucv" ]; then
>> + insmod fsm$LO
>> + insmod iucv$LO
>> + insmod netiucv$LO
>> + sysecho /sys/bus/iucv/drivers/netiucv/connection $PEERID
>> + DEVICE=${NETTYPE}0
>> + ifconfig $DEVICE $IPADDR $MMTU pointopoint $GATEWAY
>> + echo "alias $DEVICE netiucv" >> /tmp/modprobe.conf
>> +elif [ "$NETTYPE" = "lcs" ]; then
>> + insmod ccwgroup$LO
>> + insmod cu3088$LO
>> + insmod lcs$LO
>> + setupdevice
>> +# KH FIXME: Workaround for missing sysfs interface
>> +# DEVICE=`cat /sys/devices/lcs/${SUBCHANNELS//,*/}/if_name`
>> + DEVICE=eth0
>> + ifconfig $DEVICE $IPADDR $MMTU netmask $NETMASK broadcast $BROADCAST
>> + route add -net $NETWORK netmask $NETMASK dev $DEVICE 2>/dev/null
>> + echo "alias $DEVICE lcs" >> /tmp/modprobe.conf
>> +elif [ "$NETTYPE" = "qeth" ]; then
>> + insmod ccwgroup$LO
>> + insmod crypto_api$LO
>> + insmod xfrm_nalgo$LO
>> + insmod qdio$LO
>> + insmod ipv6$LO
>> + insmod qeth$LO
>> + setupdevice
>> + DEVICE=`cat /sys/devices/qeth/${SUBCHANNELS//,*/}/if_name`
>> + if [ -n "$LAYER2" -a -n "$MACADDR" ]; then
>> + ifconfig $DEVICE hw ether $MACADDR
>> + fi
>> + ifconfig $DEVICE $IPADDR $MMTU netmask $NETMASK broadcast $BROADCAST
>> + route add -net $NETWORK netmask $NETMASK dev $DEVICE 2>/dev/null
>> + echo "alias $DEVICE qeth" >> /tmp/modprobe.conf
>> +else
>> + echo $"Unknown network device, aborting installation"
>> + exit 1
>> +fi
>> +
>> +route add default gw $GATEWAY dev $DEVICE 2>/dev/null
>> +# BH FIXME: Workaround for manual MACADDR, need ping to update arp table
>> +ping -c 1 $GATEWAY > /dev/null
>> +
>> +if [ -z "$DNS" ]; then
>> + echo $"Enter your DNS server(s), separated by colons (:"
>> + read DNS
>> +fi
>> +if [ -z "$DNS" ]; then
>> + echo $"You might encounter problems without a nameserver,
>> especially"
>> + echo $"with FTP installs"
>> +fi
>> +
>> +if [ -n "$DNS" -a -z "$SEARCHDNS" ]; then
>> + echo $"Enter your DNS search domain(s) (if any), separated by
>> colons (:"
>> + read SEARCHDNS
>> +fi
>> +
>> +[ -n "$HOSTNAME" ] && hostname $HOSTNAME
>> +
>> +# show interfaces and routing table
>> +ifconfig -a
>> +route -n
>> +
>> +# convert to space-separated lists
>> +if [ -n "$SEARCHDNS" ]; then
>> + SEARCHDNS=`echo $SEARCHDNS |sed -e 's/:/ /g'`
>> + for i in "$SEARCHDNS"; do echo "search $i"; done >> /etc/resolv.conf
>> +fi
>> +if [ -n "$DNS" ]; then
>> + RESOLVDNS=`echo $DNS |sed -e 's/:/ /g'`
>> + for i in $RESOLVDNS; do echo "nameserver $i"; done >>
>> /etc/resolv.conf
>> +fi
>> +
>> +# make sure we have an /etc/hosts file (required for telnetd)
>> +if [ ! -z "$HOSTNAME" -a ! -z "$IPADDR" ]; then
>> + echo -e "$IPADDR $HOSTNAME `echo $HOSTNAME | cut -d '.' -f 1`"
>> >> /etc/hosts
>> fi
>>
>> if [ -z "$DASD" ]; then
>
> _______________________________________________
> Anaconda-devel-list mailing list
> Anaconda-devel-list@redhat.com
> https://www.redhat.com/mailman/listinfo/anaconda-devel-list


--
David Cantrell <dcantrell@redhat.com>
Red Hat / Honolulu, HI

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 12-02-2008, 04:52 PM
David Cantrell
 
Default Load FCP modules early for CD/DVD install (#184648)

Jeremy Katz wrote:
> On Mon, 2008-12-01 at 12:03 -1000, David Cantrell wrote:
>> Load the SCSI modules earlier for CD/DVD installs on s390. Also,
>> always set up the network interface because you still need that
>> to ssh in and run loader.
>
> There's nothing that seems out of place here in a quick look given the
> surrounding aspect of linuxrc.s390. Has it been tested in the context
> of something more rawhide-ish? Things like insmod instead of modprobe
> jump out at me as potentially problematic. I'm going to have to say I
> have no clue where the Fedora on s390 efforts stand these days.

Tested on rawhide? No. Tested on rhel5? Yes. These patches are meant
to bring the master branch in line with rhel5-branch. IBM did a lot of
contributions to linuxrc.s390 for 5.3.

Fedora on s390 is progressing, but slowly. There is an F-9 build now
and koji set up, but things are not quite there yet for regular
development. In the mean time, IBM and myself have been doing
development on the 5.3 nightlies. Things are getting closer though.

> But taking a step back to some more general thoughts on linuxrc.s390, is
> there an effort to actually get it using the same things we use
> everywhere else? There's a lot of manual module probing instead of
> letting things be done by udev and then manual network configuration
> instead of using NetworkManager. As we've moved more of these bits to
> be common, we really probably need to sit down and rework the entire way
> that the script works. The goal of it is that it takes the place of
> loader/init.c with a few notable and important differences
> * Prompting for information on things like network setup if you don't
> set it in the parm file. This pretty much has to be "custom" for s390
> and doing it with shell is as easy as anything else
> * Getting modules loaded. We don't do this until in the loader on other
> arches, but we need to do it to get the network up. But we really
> probably want to let udev do it as much as we can
> * Starting the network. Which we do with spawning NetworkManager in the
> "normal" case

This mirrors a conversation I've had with IBM recently. Personally, I'd
like linuxrc.s390 to go entirely. It's a maintenance nightmare and
init.c can just grow to include s390 code where needed. Not only is
there a different init for the s390 initrd, the initrd itself is
significantly different from the other architectures.

IBM is very interested in reworking the linuxrc.s390 system as well.
For 5.x, they have a nice rewrite that improves the input loops and
module loading. For rawhide, I am at least wanting to get away from
having linuxrc.s390 at all. Even if we keep the linuxrc.s390 script,
reducing it to bare minimum and turning things over to the real init
when we are done are better than what we have now. s390 is such a
special case anyway though, it'll take some more planning.

Right now, I am happy with IBM improving the init system we have now.
They are far more knowledgeable about their platform than I am.

--
David Cantrell <dcantrell@redhat.com>
Red Hat / Honolulu, HI

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 12-02-2008, 05:36 PM
Jeremy Katz
 
Default Load FCP modules early for CD/DVD install (#184648)

On Tue, 2008-12-02 at 07:52 -1000, David Cantrell wrote:
> Jeremy Katz wrote:
> > On Mon, 2008-12-01 at 12:03 -1000, David Cantrell wrote:
> >> Load the SCSI modules earlier for CD/DVD installs on s390. Also,
> >> always set up the network interface because you still need that
> >> to ssh in and run loader.
> >
> > There's nothing that seems out of place here in a quick look given the
> > surrounding aspect of linuxrc.s390. Has it been tested in the context
> > of something more rawhide-ish? Things like insmod instead of modprobe
> > jump out at me as potentially problematic. I'm going to have to say I
> > have no clue where the Fedora on s390 efforts stand these days.
>
> Tested on rawhide? No. Tested on rhel5? Yes. These patches are meant
> to bring the master branch in line with rhel5-branch. IBM did a lot of
> contributions to linuxrc.s390 for 5.3.
>
> Fedora on s390 is progressing, but slowly. There is an F-9 build now
> and koji set up, but things are not quite there yet for regular
> development. In the mean time, IBM and myself have been doing
> development on the 5.3 nightlies. Things are getting closer though.

Okay, sounds sane. I know that your intention was largely syncing, I
just wasn't sure how much/if any testing was doable right now. Given
that it's s390, lack of testing doesn't imply that we shouldn't get
things synced

> > But taking a step back to some more general thoughts on linuxrc.s390, is
> > there an effort to actually get it using the same things we use
> > everywhere else? There's a lot of manual module probing instead of
> > letting things be done by udev and then manual network configuration
> > instead of using NetworkManager. As we've moved more of these bits to
> > be common, we really probably need to sit down and rework the entire way
> > that the script works. The goal of it is that it takes the place of
> > loader/init.c with a few notable and important differences
> > * Prompting for information on things like network setup if you don't
> > set it in the parm file. This pretty much has to be "custom" for s390
> > and doing it with shell is as easy as anything else
> > * Getting modules loaded. We don't do this until in the loader on other
> > arches, but we need to do it to get the network up. But we really
> > probably want to let udev do it as much as we can
> > * Starting the network. Which we do with spawning NetworkManager in the
> > "normal" case
>
> This mirrors a conversation I've had with IBM recently. Personally, I'd
> like linuxrc.s390 to go entirely. It's a maintenance nightmare and
> init.c can just grow to include s390 code where needed. Not only is
> there a different init for the s390 initrd, the initrd itself is
> significantly different from the other architectures.

Yep. And now that we've bit the bullet and accept a "larger" initrd for
most cases, there are people that would actually really like the ssh
functionality that we have on s390.

> IBM is very interested in reworking the linuxrc.s390 system as well.
> For 5.x, they have a nice rewrite that improves the input loops and
> module loading. For rawhide, I am at least wanting to get away from
> having linuxrc.s390 at all. Even if we keep the linuxrc.s390 script,
> reducing it to bare minimum and turning things over to the real init
> when we are done are better than what we have now. s390 is such a
> special case anyway though, it'll take some more planning.
>
> Right now, I am happy with IBM improving the init system we have now.
> They are far more knowledgeable about their platform than I am.

100% agreed, and to be honest, that was kind of what I was getting at
without wanting to explicitly call them out and say "hey, come to the
party and let's work to make this suck less"

Jeremy

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 01-16-2009, 12:08 PM
Steffen Maier
 
Default Load FCP modules early for CD/DVD install (#184648)

On 12/02/2008 07:36 PM, Jeremy Katz wrote:
> On Tue, 2008-12-02 at 07:52 -1000, David Cantrell wrote:
>> Jeremy Katz wrote:

>>> But taking a step back to some more general thoughts on linuxrc.s390, is
>>> there an effort to actually get it using the same things we use
>>> everywhere else?

>>> and then manual network configuration
>>> instead of using NetworkManager.

AFAIK, NetworkManager is able to manage network devices such as ethX
if they already exist. On most platforms this is the case after
loading the correct driver kernel module which can be triggered by
udev with the help of modaliases.

In the following, I'd like to point out why s390 looks different. I
only work on s390 since about a year now. Prior to that, I worked with
Linux on x86 for more than a decade. Therefore, I can see the
differences from both "sides" and hopefully shed some light on s390's
specialties without much bias.

On s390, udev may also automatically load (network) driver modules
(except for some hacking required for LCS and CTC).

After loading driver modules, the probing as we are used to on other
platforms does not happen in the same way and _no_ (network) device
kernel structures are allocated at this point. We must not touch
devices which might be meant for another LPAR/VM. Hence, only the user
can decide which one (or few) of all the available devices should be
made available to the local Linux instance. Only then, a (network)
device gets allocated and the remaining configuration (e.g. IP on
layer 3) may very well be done as on any other hardware platform.

Yet, I don't think the steps for an actual allocation of a network
device on s390 should be integrated into NetworkManager. Those steps
are nothing more than a little pre-init we need on s390 to get our
devices going and available for e.g. HAL/NetworkManager. It's best to
code the pre-init at one place in the anaconda package and independent
of any of anaconda's dependencies such as NetworkManager since they
apparently change over the course of time.

Also, NetworkManager relies on DHCP for e.g. auto-configuring network
layer addresses. We cannot assume to have a DHCP server for Linux
guests on System z environments. Therefore, we need a way to manually
configure network addresses in any case. And that is what we already
have in linuxrc.s390 and if I understood it correctly, NetworkManager
may just use the pre-configured devices and everything would just work
out fine.

Above said holds not only true for network devices but also for
e.g. mass storage such as DASD or FCP on s390. S390 might currently be
the only platform requiring such a pre-initialization of devices due
to the fact that there might be thousands of them and allocating a
kernel device structure for each of them just in case is prohibitively
expensive in terms of memory and probing time. I think the huge
difference in number of devices is what s390 currently separates from
other platforms and should be accepted this way. As other platforms
grow they might sooner or later just get into the exact same situation
where they can no longer afford to init and allocate each detected
device just in case. Then they may make use of the current "special"
handling of s390 and platforms will behave similar again.

>>> As we've moved more of these bits to
>>> be common, we really probably need to sit down and rework the entire way
>>> that the script works. The goal of it is that it takes the place of
>>> loader/init.c with a few notable and important differences
>>> * Prompting for information on things like network setup if you don't
>>> set it in the parm file. This pretty much has to be "custom" for s390
>>> and doing it with shell is as easy as anything else
>>> * Getting modules loaded. We don't do this until in the loader on other
>>> arches, but we need to do it to get the network up. But we really
>>> probably want to let udev do it as much as we can
>>> * Starting the network. Which we do with spawning NetworkManager in the
>>> "normal" case
>> This mirrors a conversation I've had with IBM recently. Personally, I'd
>> like linuxrc.s390 to go entirely. It's a maintenance nightmare and
>> init.c can just grow to include s390 code where needed.

Honestly, I fear that much of the necessary s390 code in init.c will
remain so special that still nobody wants to maintain it. We would
wind up in the same situation we already have with
linuxrc.s390. Therefore, a _full_ integration of linuxrc.s390 into
init.c does not seem worth it.

>> Not only is
>> there a different init for the s390 initrd, the initrd itself is
>> significantly different from the other architectures.

I see that point.

> Yep. And now that we've bit the bullet and accept a "larger" initrd for
> most cases, there are people that would actually really like the ssh
> functionality that we have on s390.

OK, this functionality might indeed be interesting for all platforms
and may become non-s390-specific if it was in init.c. In fact, we
would make s390 behave like other platforms by making all platforms
behave like s390 already does. It brings us closer to having almost
the same initrd on s390 as on other platforms. Be aware though, that
loader may then no longer be init's child and they would have to
communicate with each other by means of IPC as is the case for
linuxrc.s390 already. If we used the same IPC interface for all
platforms, we had no problem and everything was fine. But this is a
major change affecting all platforms which requires testing on all
platforms, of course.

>> IBM is very interested in reworking the linuxrc.s390 system as well.
>> For 5.x, they have a nice rewrite that improves the input loops and
>> module loading. For rawhide, I am at least wanting to get away from
>> having linuxrc.s390 at all. Even if we keep the linuxrc.s390 script,
>> reducing it to bare minimum and turning things over to the real init
>> when we are done are better than what we have now.

After digging into F10's init.c (as a more recent/rawhidish version)
and finding some code duplicates between init.c and linuxrc.s390, I
really like that idea and am willing to give it a try. However, I'm
still unsure how to test it. Maybe I can use the preliminary F9 build
on s390.

Anyway, the idea is as follows: Reducing code duplicates and thus
improving maintenance by doing the common environment initialization
in init.c. An example is the function createDevices which also exists
in linuxrc.s390 doing the exactly same thing as in init.c, namely
manually creating some basic device nodes in /dev before firing up
udevd.

At the point where init.c would fork the loader, we would statically
replace this with an #ifdef and instead fork a stripped down
linuxrc.s390 which only contains the s390-specific device pre-init
including the necessary UI. Of course it needs some more glue to
support the IPC between init and the loader, which gets started later
on when the user logs on via ssh.

What do you think?

>> s390 is such a
>> special case anyway though, it'll take some more planning.
>>
>> Right now, I am happy with IBM improving the init system we have now.
>> They are far more knowledgeable about their platform than I am.
>
> 100% agreed, and to be honest, that was kind of what I was getting at
> without wanting to explicitly call them out and say "hey, come to the
> party and let's work to make this suck less"

We're already there and working on that. But maybe we have a slightly
different focus. We try to improve usability and actively contribute
to Fedora on s390 to provide a solid basis for RHEL6. We approach the
latter by getting it to work gradually in small steps without breaking
existing functionality and if necessary reuse working code from RHEL5.

Please correct me if I'm wrong, but your focus seems to be on
improving maintenance by treating all platforms the same way.
This is basically a good thing.

I think we can achieve the best of both worlds by following our
approach until we got something working and after that there's still
the chance to redesign bit by bit if there's need. The big advantage
is that we continually had a working code-base which is very important
for getting Fedora on s390 in the long run IMHO.

Steffen

Linux on System z Development

IBM Deutschland Research & Development GmbH
Vorsitzender des Aufsichtsrats: Martin Jetter
GeschńftsfŘhrung: Erich Baier
Sitz der Gesellschaft: B÷blingen
Registergericht: Amtsgericht Stuttgart, HRB 243294


_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 01-16-2009, 12:47 PM
David Cantrell
 
Default Load FCP modules early for CD/DVD install (#184648)

Steffen Maier wrote:
> On 12/02/2008 07:36 PM, Jeremy Katz wrote:
>> On Tue, 2008-12-02 at 07:52 -1000, David Cantrell wrote:
>>> Jeremy Katz wrote:
>
>>>> But taking a step back to some more general thoughts on linuxrc.s390, is
>>>> there an effort to actually get it using the same things we use
>>>> everywhere else?
>
>>>> and then manual network configuration
>>>> instead of using NetworkManager.
>
> AFAIK, NetworkManager is able to manage network devices such as ethX
> if they already exist. On most platforms this is the case after
> loading the correct driver kernel module which can be triggered by
> udev with the help of modaliases.

Correct.

> In the following, I'd like to point out why s390 looks different. I
> only work on s390 since about a year now. Prior to that, I worked with
> Linux on x86 for more than a decade. Therefore, I can see the
> differences from both "sides" and hopefully shed some light on s390's
> specialties without much bias.
>
> On s390, udev may also automatically load (network) driver modules
> (except for some hacking required for LCS and CTC).

I still don't understand the hacking aspect of setting up an LCS or CTC
device.

> After loading driver modules, the probing as we are used to on other
> platforms does not happen in the same way and _no_ (network) device
> kernel structures are allocated at this point. We must not touch
> devices which might be meant for another LPAR/VM. Hence, only the user
> can decide which one (or few) of all the available devices should be
> made available to the local Linux instance. Only then, a (network)
> device gets allocated and the remaining configuration (e.g. IP on
> layer 3) may very well be done as on any other hardware platform.

Right, which is what's happening now. The direction I'd like to see is
getting rid of the current way we find devices and set them up. Is
there any good reason that it's still all manual on s390? Can this
information not be provided to us by the kernel? The whole point of
linuxrc.s390 is to collect parameters so that we can load the modules
with the right parameters. It seems so outdated. Why can't the system
provide that information for us?

And this isn't a problem that we can solve in anaconda, it's a kernel
thing. If the kernel can provide that information to us, we can really
improve linuxrc.s390 and possibly do away with it entirely.

I've only been working on s390 for a few years, but what I've seen
regarding setting up a VM is very redundant. Set up your devices in
z/VM, then set them up again once we boot up the installer. Perhaps
it's just my environment and/or lack of s390 knowledge.

> Yet, I don't think the steps for an actual allocation of a network
> device on s390 should be integrated into NetworkManager. Those steps
> are nothing more than a little pre-init we need on s390 to get our
> devices going and available for e.g. HAL/NetworkManager. It's best to
> code the pre-init at one place in the anaconda package and independent
> of any of anaconda's dependencies such as NetworkManager since they
> apparently change over the course of time.

The reason we mentioned hal and NetworkManager is that anaconda is using
those pieces now, so the correct location to fix things is always the
dependent component whenever possible. The more special case device
setup knowledge we put in to linuxrc.s390, the more difficult it becomes
to maintain. While we probably can't eliminate linuxrc.s390, it would
be nice to expand hal and other dependent components to perform tasks
that are more appropriate to them. Rather than crawling /sys in
linuxrc.s390, let hal do it (as an example). We can then ask hal for
the information. Maintenance of that information is now in one location
rather than in anaconda AND in hal.

> Also, NetworkManager relies on DHCP for e.g. auto-configuring network
> layer addresses. We cannot assume to have a DHCP server for Linux
> guests on System z environments. Therefore, we need a way to manually
> configure network addresses in any case. And that is what we already
> have in linuxrc.s390 and if I understood it correctly, NetworkManager
> may just use the pre-configured devices and everything would just work
> out fine.

That's not entirely true. NetworkManager does have static IPv4 support
now, but better than that it comes with nm-system-settings. If you look
through loader in rawhide, you'll see that we write out
/etc/sysconfig/network-scripts/ifcfg-DEVICE files and nm-system-settings
manages those and speaks to NetworkManager for us.

> Above said holds not only true for network devices but also for
> e.g. mass storage such as DASD or FCP on s390. S390 might currently be
> the only platform requiring such a pre-initialization of devices due
> to the fact that there might be thousands of them and allocating a
> kernel device structure for each of them just in case is prohibitively
> expensive in terms of memory and probing time. I think the huge
> difference in number of devices is what s390 currently separates from
> other platforms and should be accepted this way. As other platforms
> grow they might sooner or later just get into the exact same situation
> where they can no longer afford to init and allocate each detected
> device just in case. Then they may make use of the current "special"
> handling of s390 and platforms will behave similar again.

We definitely have other technologies that require 'pre-init' before we
can work with them. Things like iSCSI, for instance, which is strange
magical storage technology and fairly complex in terms of wrapping your
head around.

The fact that s390 essentially provides two types of devices to VMs:
disks and network interfaces (apologies to Hans Picht, but I really
haven't worked with the tape device), I really don't see why the kernel
can't be involved for a lot of this pre-initialization. Maybe not all
of it, but some. Again, my knowledge of the architecture is limited and
every time I talk to you guys, I learn something knew. But I think if
we push in the direction of the kernel doing more rather than
linuxrc.s390 doing more, it will make our life easier.

I do understand the s390 is special, but rather than taking that at face
value, it's try top reduce linuxrc.s390 to the bare minimum that needs
to happen.

>>>> As we've moved more of these bits to
>>>> be common, we really probably need to sit down and rework the entire way
>>>> that the script works. The goal of it is that it takes the place of
>>>> loader/init.c with a few notable and important differences
>>>> * Prompting for information on things like network setup if you don't
>>>> set it in the parm file. This pretty much has to be "custom" for s390
>>>> and doing it with shell is as easy as anything else
>>>> * Getting modules loaded. We don't do this until in the loader on other
>>>> arches, but we need to do it to get the network up. But we really
>>>> probably want to let udev do it as much as we can
>>>> * Starting the network. Which we do with spawning NetworkManager in the
>>>> "normal" case
>>> This mirrors a conversation I've had with IBM recently. Personally, I'd
>>> like linuxrc.s390 to go entirely. It's a maintenance nightmare and
>>> init.c can just grow to include s390 code where needed.
>
> Honestly, I fear that much of the necessary s390 code in init.c will
> remain so special that still nobody wants to maintain it. We would
> wind up in the same situation we already have with
> linuxrc.s390. Therefore, a _full_ integration of linuxrc.s390 into
> init.c does not seem worth it.

I think we're looking at this the wrong way. Not necessarily init.c
gaining the capabilities of linuxrc.s390, but loader gaining them when
appropriate. That's where we do everything else.

Additionally, rawhide might lose init soon as we are working on
integrating upstart to replace anaconda's special init process.

>>> Not only is
>>> there a different init for the s390 initrd, the initrd itself is
>>> significantly different from the other architectures.
>
> I see that point.
>
>> Yep. And now that we've bit the bullet and accept a "larger" initrd for
>> most cases, there are people that would actually really like the ssh
>> functionality that we have on s390.
>
> OK, this functionality might indeed be interesting for all platforms
> and may become non-s390-specific if it was in init.c. In fact, we
> would make s390 behave like other platforms by making all platforms
> behave like s390 already does. It brings us closer to having almost
> the same initrd on s390 as on other platforms. Be aware though, that
> loader may then no longer be init's child and they would have to
> communicate with each other by means of IPC as is the case for
> linuxrc.s390 already. If we used the same IPC interface for all
> platforms, we had no problem and everything was fine. But this is a
> major change affecting all platforms which requires testing on all
> platforms, of course.

The less special case stuff we have for s390, the better. If we move to
upstart in anaconda, life becomes easier as well. Especially if loader
takes over doing what linuxrc.s390 has to do.

>>> IBM is very interested in reworking the linuxrc.s390 system as well.
>>> For 5.x, they have a nice rewrite that improves the input loops and
>>> module loading. For rawhide, I am at least wanting to get away from
>>> having linuxrc.s390 at all. Even if we keep the linuxrc.s390 script,
>>> reducing it to bare minimum and turning things over to the real init
>>> when we are done are better than what we have now.
>
> After digging into F10's init.c (as a more recent/rawhidish version)
> and finding some code duplicates between init.c and linuxrc.s390, I
> really like that idea and am willing to give it a try. However, I'm
> still unsure how to test it. Maybe I can use the preliminary F9 build
> on s390.

Speaking of Fedora on s390, who is heading that up? We should really
have that set up as a downstream arch now that pulls in each rawhide
build that gets submitted. Or however it can happen. Working with F-9
is uselsss now.

> Anyway, the idea is as follows: Reducing code duplicates and thus
> improving maintenance by doing the common environment initialization
> in init.c. An example is the function createDevices which also exists
> in linuxrc.s390 doing the exactly same thing as in init.c, namely
> manually creating some basic device nodes in /dev before firing up
> udevd.
>
> At the point where init.c would fork the loader, we would statically
> replace this with an #ifdef and instead fork a stripped down
> linuxrc.s390 which only contains the s390-specific device pre-init
> including the necessary UI. Of course it needs some more glue to
> support the IPC between init and the loader, which gets started later
> on when the user logs on via ssh.
>
> What do you think?

I think this is a reasonable thing to try. Keep an eye out for patches
that may take us to upstart. Rather than putting things in init.c,
might go for loader.c instead.

>>> s390 is such a
>>> special case anyway though, it'll take some more planning.
>>>
>>> Right now, I am happy with IBM improving the init system we have now.
>>> They are far more knowledgeable about their platform than I am.
>> 100% agreed, and to be honest, that was kind of what I was getting at
>> without wanting to explicitly call them out and say "hey, come to the
>> party and let's work to make this suck less"
>
> We're already there and working on that. But maybe we have a slightly
> different focus. We try to improve usability and actively contribute
> to Fedora on s390 to provide a solid basis for RHEL6. We approach the
> latter by getting it to work gradually in small steps without breaking
> existing functionality and if necessary reuse working code from RHEL5.
>
> Please correct me if I'm wrong, but your focus seems to be on
> improving maintenance by treating all platforms the same way.
> This is basically a good thing.

Yes, that's one aspect. The other is actually improving anaconda by
rewriting/reworking/implementing large parts.

> I think we can achieve the best of both worlds by following our
> approach until we got something working and after that there's still
> the chance to redesign bit by bit if there's need. The big advantage
> is that we continually had a working code-base which is very important
> for getting Fedora on s390 in the long run IMHO.

Correct. Another thing to keep in mind is that large projects like this
that we want to do on the Fedora side become basically impossible to
backport to a RHEL release. But that's ok, because the functionality
will land in the next major RHEL release.

--
David Cantrell <dcantrell@redhat.com>
Red Hat / Honolulu, HI

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 10:52 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ę2007 - 2008, www.linux-archive.org