Bug 253539 - Network install (using http or ftp) does not work
Network install (using http or ftp) does not work
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: anaconda (Show other bugs)
7
All Linux
medium Severity medium
: ---
: ---
Assigned To: David Cantrell
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-08-20 10:25 EDT by Lorenzo Sartoratti
Modified: 2007-11-30 17:12 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-08-22 14:58:39 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
anaconda-11.2.0.66/loader2/nfsinstall.c patch (510 bytes, patch)
2007-08-20 10:25 EDT, Lorenzo Sartoratti
no flags Details | Diff

  None (edit)
Description Lorenzo Sartoratti 2007-08-20 10:25:05 EDT
Hi,
this problem persists in nfs kickstart installations.
The kickstart file is not retrieved because of a wrong mount path (two leading
slashes for the remote path)
We are using an NFS Netapp Filer and mount paths with double leading slashes
are not permitted (i.e. host://vol/linux/ks.cfg)
In attachment there is a proposed patch.


+++ This bug was initially created as a clone of Bug #243528 +++

Description of problem:

The http and ftp installation methods of the official Fedora 7 for x86 DVD are
unreliable.

If you choose the installation by http, Anaconda adds a spurious slash between
the mirror address and the path to fedora directory 
( http://mirror.xyz.com//path/to/os/directory instead of
http://mirror.xyz.com/path/to/os/directory) and the download of stage2.img fails.

The ftp installation method instead works fine until the package download phase
where it fails with a similar issue (it tries to download from
ftp://mirror.xyz.com/%2F/path/to/os/Fedora/ instead of
ftp://mirror.xyz.com/path/to/os/Fedora )


Version-Release number of selected component (if applicable): 


How reproducible:
Start the installation from the official Fedora 7 i386 dvd and try to install by
http or ftp using any mirror. 

Steps to Reproduce:
1. Launch the installation of Fedora from the Dvd
2. Select any keoboard/language and then try to start second phase of the
installation from http or ftp 
3. put the mirror address and the path to Fedora 7 files and directory then
press return
  
Actual results:
Anaconda does not find the files needed for the installation/upgrade from internet.

Expected results:
Anaconda install Fedora 7 x86 by downloading the proper files from internet. 

Additional info:

-- Additional comment from stian_moltubakk@hotmail.com on 2007-06-17 02:49 EST --
I can confirm the same problem, but on FTP anaconda add // betwen the server and
fedora location instead of only /.

When I try http something seamed to hapend and I left the computer on over the
night. When I got up the next morning nothing had hapend so I gave up and
downoaded the whole DVD iso and used hardisk install. 

I got a 64 bit version.

-- Additional comment from dcantrell@redhat.com on 2007-08-16 17:24 EST --
This has been fixed in rawhide.
Comment 1 Lorenzo Sartoratti 2007-08-20 10:25:05 EDT
Created attachment 161878 [details]
anaconda-11.2.0.66/loader2/nfsinstall.c patch
Comment 2 David Cantrell 2007-08-22 14:58:39 EDT
I modified your patch a bit.  I did this:

Index: loader2/nfsinstall.c
===================================================================
RCS file: /usr/local/CVS/anaconda/loader2/nfsinstall.c,v
retrieving revision 1.46
diff -u -p -r1.46 nfsinstall.c
--- loader2/nfsinstall.c        6 Aug 2007 21:36:52 -0000       1.46
+++ loader2/nfsinstall.c        22 Aug 2007 18:46:59 -0000
@@ -277,6 +277,7 @@ void setKickstartNfs(struct loaderData_s
 int getFileFromNfs(char * url, char * dest, struct loaderData_s * loaderData) {
     char ret[47];
     char * host = NULL, *path = NULL, * file = NULL, * opts = NULL;
+    char * chk = NULL;
     int failed = 0;
     struct networkDeviceConfig netCfg;
     ip_addr_t *tip;
@@ -334,7 +335,12 @@ int getFileFromNfs(char * url, char * de
         file = path;
     } else {
         *file++ ='\0';
-        host = sdupprintf("%s/%s", host, path);
+        chk = host;
+        chk += strlen(host) - 1;
+        if (*chk == '/' || *path == '/')
+            host = sdupprintf("%s%s", host, path);
+        else
+            host = sdupprintf("%s/%s", host, path);
     }
 
     logMessage(INFO, "file location: nfs://%s/%s", host, file);


So only add the slash if host doesn't end with it and path doesn't begin with it.

Thanks.

Note You need to log in before you can comment on or make changes to this bug.