# mergemaster error after updating jails



## csimon (Dec 26, 2013)

Good *e*vening everyone.

*I* have an issue with mergemaster and my jails, long story short, *I* upgraded my server from 9.1 to 9.2 without issue, now *I*  have 3 jails that *I* have upgraded with `ezjail-admin update -U -s 9.1-RELEASE`. After that all *I* needed to do was merge the configuration files, right? *P*reviously *I* used to do `mergemaster -iUF -D /usr/jail/jailname`, that was pretty easy but here's the catch, when *I* try to run `mergemaster` *I* get this FATAL ERROR:


```
# mergemaster -iUF -D /usr/jails/jailname

*** Creating the temporary root environment in /var/tmp/temproot
 *** /var/tmp/temproot ready for use
 *** Creating and populating directory structure in /var/tmp/temproot

mtree: /usr/jails/jailname/usr/include: No such file or directory
install: illegal option -- l
usage: install [-bCcMpSsv] [-B suffix] [-f flags] [-g group] [-m mode]
               [-o owner] file1 file2
       install [-bCcMpSsv] [-B suffix] [-f flags] [-g group] [-m mode]
               [-o owner] file1 ... fileN directory
       install -d [-v] [-g group] [-m mode] [-o owner] directory ...

  *** FATAL ERROR: Cannot 'cd' to /usr/src and install files to
      the temproot environment
```

*I'm* complet*e*ly lost here and could use some insight. I a*l*ways have upgraded my jails this way on freebsd FreeBSD 8 but this is the first time *I* upgrade jails on 9, *I* must be missing something. Note: *I* have read /usr/src/UPDATING about the new -l option for INSTALL but hav*en'*t found anything usefu*l* to solve this error.

Thanks for you time.


----------



## csimon (Dec 26, 2013)

Well,

*A*fter some trials and errors, it looks like the -D parameter (_Specify the destination directory for the installed files._)  of mergemaster doe*sn'*t work very well atm at the moment or *I* missed something.

I updated my jail's configuration files by copying the src tree to my basejail /usr/jails/basejail/usr/src then logged into each of my jails and run mergemaster from there. 

`mergemaster -p` and then `mergemaster -iUF`. Everything looks up to date now.


----------



## junovitch@ (Dec 31, 2013)

Actually, since include symlinks to /basejail/usr/include, which was updated when you ran `ezjail-admin update -U -s 9.1-RELEASE`, that was why mergemaster() woulnd't have found it.  This is what I did for each jail on the same upgrade.  Without the -i flag to automatically install files it worked out just fine. 


```
mergemaster -p /usr/jails/newjail
mergemaster -UF -D /usr/jails/newjail
```


----------



## alexus (Jan 3, 2014)

I'm not sure what I'm doing wrong, but I keep getting this:


```
f9# mergemaster -iUF

*** The directory specified for the temporary root environment,
    /var/tmp/temproot, exists.  This can be a security risk if untrusted
    users have access to the system.

  Use 'd' to delete the old /var/tmp/temproot and continue
  Use 't' to select a new temporary root directory
  Use 'e' to exit mergemaster

  Default is to use /var/tmp/temproot as is

How should I deal with this? [Use the existing /var/tmp/temproot] 

   *** Leaving /var/tmp/temproot intact

*** Creating the temporary root environment in /var/tmp/temproot
 *** /var/tmp/temproot ready for use
 *** Creating and populating directory structure in /var/tmp/temproot

install: illegal option -- l
usage: install [-bCcMpSsv] [-B suffix] [-f flags] [-g group] [-m mode]
               [-o owner] file1 file2
       install [-bCcMpSsv] [-B suffix] [-f flags] [-g group] [-m mode]
               [-o owner] file1 ... fileN directory
       install -d [-v] [-g group] [-m mode] [-o owner] directory ...

  *** FATAL ERROR: Cannot 'cd' to /usr/src and install files to
      the temproot environment

f9#
```

*A*ny ideas?


----------



## trh411 (Jan 3, 2014)

It is hard to tell you what is going wrong if you don't tell us what you are trying to do and what you have done to get to this point. I guess I could assume you are building FreeBSD from source and running `mergemaster` after doing a `make installworld`, but are you? Are you running `mergemaster` in a jail like the OP?

Some context to your problem would be good.


----------



## alexus (Jan 3, 2014)

I apologize for not being clear at the first place, I guess let me try again.

I used `freebsd-update` to update my freebsd FreeBSD to 9.2 (from 9.1), and tried running mergemaster right after the update.


----------



## trh411 (Jan 3, 2014)

alexus said:
			
		

> I apologize for not being clear at the first place, I guess let me try again..
> I used `freebsd-update` to update my freebsd to 9.2 (from 9.1), and tried running mergemaster right after update



Why are you running `mergemaster` in conjunction with `freebsd-update`? `mergemaster` should only be used in conjunction with a build from source, not as part of a binary update/upgrade (i.e. `freebsd-update`). I typically build from source so I've only used `freebsd-update` once or twice, but if you just do what it tells you, you should be okay.

Did freebsd-update upgrade your system correctly. What does `uname-a` show?


----------



## alexus (Jan 3, 2014)

`freebsd-update` went through fine.


```
f9# uname -a
FreeBSD f9.XXX.org 9.2-RELEASE FreeBSD 9.2-RELEASE #0 r255898: Thu Sep 26 22:50:31 UTC 2013     root@bake.isc.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64
f9#
```

I think you're right, mergemaster isn't needed). I'm just a bit concerned with this error, somehow I don't think *I* should ignore it though).


----------



## trh411 (Jan 3, 2014)

Then you are done. Your upgrade is complete. Nothing left to do, especially not `mergemaster`. 

Ignore the `mergemaster` error. Since you ran it out of context, it is meaningless.


----------

