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 260491 Details for
Bug 385801
initrd created by mayflower does not allow pxe boot with nfsroot
[?]
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]
Preliminary patch, needs cleanup
385801.patch (text/plain), 4.05 KB, created by
Carlo de Wolf
on 2007-11-15 22:13:52 UTC
(
hide
)
Description:
Preliminary patch, needs cleanup
Filename:
MIME Type:
Creator:
Carlo de Wolf
Created:
2007-11-15 22:13:52 UTC
Size:
4.05 KB
patch
obsolete
>--- mayflower.orig 2007-10-29 19:08:21.000000000 +0100 >+++ mayflower 2007-11-15 17:51:20.000000000 +0100 >@@ -8,14 +8,17 @@ > # Inspired by similar programs from a bunch of other distributions. > # > >+set -e >+ > usage() { >- echo "$0 [--help] <out-initrd-image> <kernel-version>" >+ echo "$0 [--help] [--config <dir>] <out-initrd-image> <kernel-version>" > echo > echo "example: $0 /boot/myinitramfs.img \`uname -r\`" > } > > opt_allow_overwrite=0 > opt_verbose=0 >+CONFIG_DIR="" > INITRAMFS_TARGET="" > KERNEL="" > while [ $# -gt 0 ] ; do >@@ -30,6 +33,10 @@ > --allow-missing) > echo "Ignore option $1 for /sbin/mkinitrd compatibility" > ;; >+ --config) >+ shift >+ CONFIG_DIR=$1 >+ ;; > -v|--verbose) > opt_verbose=1 > ;; >@@ -52,7 +59,7 @@ > shift > done > >-if [ -z "$INITRAMFS_TARGET" -o -z "$KERNEL" ] ; then >+if [ -z "$INITRAMFS_TARGET" -o -z "$KERNEL" -o ! -d "$CONFIG_DIR/" ] ; then > usage > exit 1 > fi >@@ -73,6 +80,7 @@ > > # Make directory structure > mkdir bin sbin dev sys proc lib lib/udev sysroot etc etc/udev etc/udev/rules.d >+mkdir -p var/lib/dhclient > > cp /sbin/losetup sbin > cp /sbin/blockdev sbin >@@ -83,8 +91,8 @@ > # we explicitly load these, so should be sure they're present > MODULES="loop dm_snapshot " > >-if [ -e /etc/mayflower.conf ] ; then >- source /etc/mayflower.conf >+if [ -e $CONFIG_DIR/etc/mayflower.conf ] ; then >+ source $CONFIG_DIR/etc/mayflower.conf > fi > > # TODO: right now we only recognize MODULES... add support for more >@@ -118,7 +126,7 @@ > done > > for m in $MODS ; do >- /sbin/modprobe --set-version $KERNEL --show-depends $m >> modules 2>/dev/null >+ /sbin/modprobe --set-version $KERNEL --show-depends --ignore-install $m >> modules 2>/dev/null > done > > cat modules | awk '{ print $2 }' | sort -u > modules2 >@@ -144,19 +152,20 @@ > fi > > # Copy /etc/fstab over >-cp /etc/fstab etc >+cp $CONFIG_DIR/etc/fstab etc > > # Copy modprobe.conf and friends over >-if [ -e /etc/modprobe.conf ] ; then >- cp /etc/modprobe.conf etc >+if [ -e $CONFIG_DIR/etc/modprobe.conf ] ; then >+ cp $CONFIG_DIR/etc/modprobe.conf etc > fi >-cp -R /etc/modprobe.d etc >+cp -R $CONFIG_DIR/etc/modprobe.d etc > > # Copy binaries over > cp /bin/echo bin > cp /bin/sleep bin > cp /bin/bash bin > cp /bin/mount bin >+cp /sbin/mount.nfs sbin > cp /bin/umount bin > [ -x /usr/sbin/eject ] && cp /usr/sbin/eject sbin > cp /bin/ls bin >@@ -365,6 +374,13 @@ > echo "root_rw=\$root_rw" > fi > >+# Modification for PXE boot >+if [ "\$rootfstype" == "nfs" ] ; then >+ nash <<EOF-nash >+network --device eth0 --bootproto dhcp >+EOF-nash >+fi >+ > waitforsymlink=0 > # generate udev rules to generate /dev/root symlink > if [ -z \$root ] ; then >@@ -476,7 +492,8 @@ > fi > > # don't wait for "mtd0" as no device file will appear >-if [ "\$root" != "mtd0" ] ; then >+# don't wait for nfs either >+if [ "\$root" != "mtd0" ] && [ "\$rootfstype" != "nfs" ] ; then > > # If we don't have the /dev/root link.. ask the user to create.. > if [ "\$waitforsymlink" != "1" ] ; then >@@ -608,7 +625,7 @@ > rm -f /dev/root > ln -s /dev/mapper/live-rw /dev/root > >- mount -n -t ext3 /dev/mapper/live-rw /sysroot >+ mount -t ext3 /dev/mapper/live-rw /sysroot > # here you can modify the rw ext3 fs for testing if you don't want to > # respin the entire rootfs (which takes ages). Example > # >@@ -657,6 +674,17 @@ > echo "KERNEL==\"\${BASE_LOOPDEV#/dev/}\" SYMLINK+=\"live-osimg\"" >> /sysroot/etc/udev/rules.d/50-udev* > echo "KERNEL==\"\${OVERLAY_LOOPDEV#/dev/}\" SYMLINK+=\"live-overlay\"" >> /sysroot/etc/udev/rules.d/50-udev* > >+ # hotfix some pxe boot problems >+ rm -rf /sysroot/etc/rc?.d/*nfslock >+ rm -rf /sysroot/etc/rc?.d/*NetworkManager >+ set -x >+ if [ -f /var/lib/dhclient/dhclient.leases ] ; then >+ IPADDRESS=\`cat /var/lib/dhclient/dhclient.leases | grep fixed-address | cut -d' ' -f4 | cut -d';' -f1\` >+ echo >/sysroot/etc/networks default 0.0.0.0 >+ echo >>/sysroot/etc/networks loopback 127.0.0.0 >+ echo >>/sysroot/etc/networks link-local \$IPADDRESS >+ fi >+ > mount -n -o ro,remount /sysroot > } >
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 385801
: 260491 |
260511