Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 308244 Details for
Bug 368941
mkdumprd gives error to stderr with nfs root
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
new patch to enable transparent NFS root on kdump
mkdumprd.patch (text/plain), 6.79 KB, created by
Neil Horman
on 2008-06-03 14:42:11 UTC
(
hide
)
Description:
new patch to enable transparent NFS root on kdump
Filename:
MIME Type:
Creator:
Neil Horman
Created:
2008-06-03 14:42:11 UTC
Size:
6.79 KB
patch
obsolete
>? kexec-tools-1.102pre-23.el5.src.rpm >? kexec-tools-testing-20070330 >Index: mkdumprd >=================================================================== >RCS file: /cvs/dist/rpms/kexec-tools/RHEL-5/mkdumprd,v >retrieving revision 1.77 >diff -u -r1.77 mkdumprd >--- mkdumprd 23 May 2008 18:33:36 -0000 1.77 >+++ mkdumprd 3 Jun 2008 14:40:53 -0000 >@@ -66,7 +66,6 @@ > fstab="/etc/fstab" > > vg_list="" >-net_list="" > USING_METHOD="" > SAVE_PATH=/var/crash > bin="" >@@ -728,14 +727,7 @@ > > rootdev=$(awk '/^[ \t]*[^#]/ { if ($2 == "/") { print $1; }}' $fstab) > # check if it's nfsroot >- if [ "$rootfs" == "nfs" ]; then >- remote=$(echo $rootdev | cut -d : -f 1) >- # FIXME: this doesn't handle ips properly >- remoteip=$(getent hosts $remote | cut -d ' ' -f 1) >- netdev=`/sbin/ip route get to $remoteip |sed 's|.*dev \(.*\).*|\1|g' |awk {'print $1;'} |head -n 1` >- net_list="$net_list $netdev" >- # check if it's root by label >- elif echo $rootdev | cut -c1-6 | grep -q "LABEL=" ; then >+ if echo $rootdev | cut -c1-6 | grep -q "LABEL=" ; then > rootopts=$(echo $rootopts | sed -e 's/^r[ow],//' -e 's/,r[ow],$//' -e 's/,r[ow],/,/' \ > -e 's/^r[ow]$/defaults/' -e 's/$/,ro/') > majmin=$(get_numeric_dev dec /dev/root) >@@ -845,7 +837,7 @@ > emitdm "$NAME" > ;; > part) >- emit /sbin/kpartx.static -pp -a \"/dev/mapper/$NAME\" >+ emit "/sbin/kpartx.static -pp -a \"/dev/mapper/$NAME\"" > ;; > esac > done >@@ -1505,6 +1497,7 @@ > mknod /dev/ptmx c 5 2 > mknod /dev/rtc c 10 135 > mknod /dev/urandom c 1 9 >+export NETWORK_STATUS=down > EOF > > # XXX really we need to openvt too, in case someting changes the >@@ -1570,9 +1563,6 @@ > done > EOF > >-# HACK: module loading + device creation isn't necessarily synchronous... >-# this will make sure that we have all of our devices before trying >-# things like RAID or LVM > emit "echo Creating Block Devices" > emit "mkdir /dev/cciss" > emit "mkdir /dev/ida" >@@ -1621,14 +1611,6 @@ > emit "mknod /dev/mapper/control b \$DM_MAJ \$DM_MIN" > fi > >-if [ -n "$net_list" ]; then >- for netdev in $net_list; do >- emit "echo Bringing up $netdev" >- handle_netdev $netdev >- #emit $network >- done >-fi >- > emitdms > > if [ -n "$raiddevices" ]; then >@@ -1775,6 +1757,7 @@ > fi > emit " $FINAL_ACTION" > emit "fi" >+ emit "export NETWORK_STATUS=up" > #grab remote host and xlate into numbers > rhost=`echo $config_val | sed 's/.*@//' | cut -d':' -f1` > need_dns=`echo $rhost|grep [a-zA-Z]` >@@ -2064,45 +2047,75 @@ > fi > > emit "echo Creating root device." >+ROOT_MOUNT=`mount | grep "on / "` >+ROOT_MOUNT_TYPE=`echo $ROOT_MOUNT | awk '{print $5}'` >+ROOT_MOUNT_EXPORT=`echo $ROOT_MOUNT | awk '{print $1}'` >+ROOT_MOUNT_OPTS=`echo $ROOT_MOUNT | awk '{print $4}'` > emit "#check to see if we have root= on the command line" >-emit "ROOTDEV=\`cat /proc/cmdline | grep root=\`" >-emit "if [ -n \"\$ROOTDEV\" ]" >-emit "then" >-emit " ROOTDEV=\`cat /proc/cmdline | sed 's/^.*root=//' | cut -d\" \" -f1\`" >-emit " IS_LABEL=\`echo \$ROOTDEV | grep LABEL\`" >-emit " IS_UUID=\`echo \$ROOTDEV | grep UUID\`" >-emit " if [ -n \"\$IS_LABEL\" -o -n \"\$IS_UUID\" ] " >-emit " then" >-emit " ROOTDEV=\`findfs \$ROOTDEV\`" >-emit " fi" >-emit "else" >-emit " #we need to get the root major/minor from real-root-dev" >-emit " ROOT_DEV_NR=\`cat /proc/sys/kernel/real-root-dev\`" >-emit " ROOT_MIN=\`echo \$ROOT_DEV_NR | sed -e's/\\([0-9a-f]\\{1,2\\}\\)\\([0-9a-f]\\{2\\}\\)/\\2/'\`" >-emit " ROOT_MAJ=\`echo \$ROOT_DEV_NR | sed -e's/\\([0-9a-f]\\{1,2\\}\\)\\([0-9a-f]\\{2\\}\\)/\\1/'\`" >-emit " mknod /dev/rootdev b 0x\$ROOT_MAJ 0x\$ROOT_MIN" >-emit " ROOTDEV=/dev/rootdev" >-emit "fi" >+if [ "$ROOT_MOUNT_TYPE" != "nfs" ] >+then >+ emit "ROOTDEV=\`cat /proc/cmdline | grep root=\`" >+ emit "if [ -n \"\$ROOTDEV\" ]" >+ emit "then" >+ emit " ROOTDEV=\`cat /proc/cmdline | sed 's/^.*root=//' | cut -d\" \" -f1\`" >+ emit " IS_LABEL=\`echo \$ROOTDEV | grep LABEL\`" >+ emit " IS_UUID=\`echo \$ROOTDEV | grep UUID\`" >+ emit " if [ -n \"\$IS_LABEL\" -o -n \"\$IS_UUID\" ] " >+ emit " then" >+ emit " ROOTDEV=\`findfs \$ROOTDEV\`" >+ emit " fi" >+ emit "else" >+ emit " #we need to get the root major/minor from real-root-dev" >+ emit " ROOT_DEV_NR=\`cat /proc/sys/kernel/real-root-dev\`" >+ emit " ROOT_MIN=\`echo \$ROOT_DEV_NR | sed -e's/\\([0-9a-f]\\{1,2\\}\\)\\([0-9a-f]\\{2\\}\\)/\\2/'\`" >+ emit " ROOT_MAJ=\`echo \$ROOT_DEV_NR | sed -e's/\\([0-9a-f]\\{1,2\\}\\)\\([0-9a-f]\\{2\\}\\)/\\1/'\`" >+ emit " mknod /dev/rootdev b 0x\$ROOT_MAJ 0x\$ROOT_MIN" >+ emit " ROOTDEV=/dev/rootdev" >+ emit "fi" > >-emit "echo Checking root filesystem." >-emit "fsck \$ROOTDEV" >-emit "echo Mounting root filesystem." >-emit "for FSTYPE in ext3 ext2 minix" >-emit "do" >-emit " echo Trying mount -t \$FSTYPE \$ROOTDEV /sysroot" >-emit " mount -t \$FSTYPE \$ROOTDEV /sysroot >/dev/null 2>&1 " >-emit " if [ \$? == 0 ]" >-emit " then" >-emit " echo Using \$FSTYPE on root filesystem" >-emit " ROOT_MOUNT_GOOD=1" >-emit " break;" >-emit " fi" >-emit "done" >-emit "if [ -z \"\$ROOT_MOUNT_GOOD\" ]" >-emit "then" >-emit " echo unable to mount rootfs. Dropping to shell" >-emit " /bin/msh" >-emit "fi" >+ emit "echo Checking root filesystem." >+ emit "fsck \$ROOTDEV" >+ emit "echo Mounting root filesystem." >+ emit "for FSTYPE in ext3 ext2 minix" >+ emit "do" >+ emit " echo Trying mount -t \$FSTYPE \$ROOTDEV /sysroot" >+ emit " mount -t \$FSTYPE \$ROOTDEV /sysroot >/dev/null 2>&1 " >+ emit " if [ \$? == 0 ]" >+ emit " then" >+ emit " echo Using \$FSTYPE on root filesystem" >+ emit " ROOT_MOUNT_GOOD=1" >+ emit " break;" >+ emit " fi" >+ emit "done" >+ emit "if [ -z \"\$ROOT_MOUNT_GOOD\" ]" >+ emit "then" >+ emit " echo unable to mount rootfs. Dropping to shell" >+ emit " /bin/msh" >+ emit "fi" >+else >+ # Its an NFS root, mount it as such >+ emit "if [ \"\$NETWORK_STATUS\" == \"down\" ]" >+ emit "then" >+ emit " echo \"I need to bring up the network\"" >+ emit " for i in \`ls /etc/ifcfg-*\`" >+ emit " do" >+ emit " NETDEV=\`echo \$i | cut -d\"-\" -f2\`" >+ emit " map_interface \$NETDEV" >+ emit " done" >+ emit " rename_interfaces" >+ emit " IFACE=\`cat /etc/iface_to_activate\`" >+ emit " ifup \$IFACE" >+ emit "fi" >+ emit "Mounting NFS root Filesystem" >+ emit "mount -t nfs -o $ROOT_MOUNT_OPTS $ROOT_MOUNT_EXPORT /sysroot" >+ emit "if [ \$? != 0 ]" >+ emit "then" >+ emit " echo unable to mount rootfs. dropping to shell. exit to reboot" >+ emit " /bin/msh" >+ emit " /sbin/reboot -f" >+ emit "fi" >+ >+fi > > emit "#move various filesystems and prime the rootfs to boot properly" > emit "umount /proc"
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 368941
:
289925
|
289946
|
306796
| 308244 |
308358
|
313279
|
313280
|
313281
|
313282
|
313283