# Upgrade step running for long time



## rraj (Apr 11, 2022)

Hi

I am trying to upgrade from release 12.2 to 12.3, the first step i.e. `freebsd-update fetch` is running from last 19 hours & has not completed!

Is this OK?

Thanks
Ravi


----------



## richardtoohey2 (Apr 11, 2022)

No, that’s not normal.

Should be minutes or tens of minutes depending on your hardware and connection.


----------



## SirDice (Apr 11, 2022)

It can take a while but 19 hours seems excessive.



rraj said:


> I am trying to upgrade from release 12.2 to 12.3, the first step i.e. `freebsd-update fetch` is running from last 19 hours & has not completed!


Note that this won't upgrade your system, this will only fetch the latest patches for your current version (12.2?).


----------



## rraj (Apr 11, 2022)

Hi

So, have to wait? because the second step won't start until this one completes.

May be a re-run can fix the issue?

Thanks
Ravi


----------



## SirDice (Apr 11, 2022)

Just break it off and try starting it again.


----------



## rraj (Apr 11, 2022)

Hi

After break-off & then re-run still stuck at the same point.

Thanks
Ravi


----------



## rraj (Apr 11, 2022)

Hi

Pasting the command output:


```
root@localhost:/usr/sbin # [CMD]freebsd-update fetch[/CMD]
Looking up update.FreeBSD.org mirrors... 2 mirrors found.
Fetching metadata signature for 12.2-RELEASE from update1.freebsd.org... done.
Fetching metadata index... done.
Inspecting system... done.
Preparing to download files... done.
The following files will be added as part of updating to
12.2-RELEASE-p15:
/usr/share/zoneinfo/Pacific/Kanton
/usr/src/contrib/tzdata/SECURITY
(END)
```
Any clues?

Thanks
Ravi


----------



## SirDice (Apr 11, 2022)

Dude, it's waiting for you. It's showing some output through less(1) and is waiting for you to exit it. (The "(END)" is a dead giveaway you're looking at less(1)).


----------



## rraj (Apr 11, 2022)

SirDice said:


> Dude, it's waiting for you. It's showing some output through less(1) and is waiting for you to exit it. (The "(END)" is a dead giveaway you're looking at less(1)).


----------



## rraj (Apr 11, 2022)

Hi

I did not get you! Ctrl+Z suspends it.

Or

Do you mean the command has completed?

Thanks
Ravi


----------



## SirDice (Apr 11, 2022)

```
q or Q or :q or :Q or ZZ
              Exits less.
```
less(1)


----------



## rraj (Apr 11, 2022)

SirDice said:


> ```
> q or Q or :q or :Q or ZZ
> Exits less.
> ```
> less(1)


Done!

May be should have searched the forum first, see: https://forums.freebsd.org/threads/freebsd-update-fetch-and-job-never-ends.77550/.

Have done release upgrade many times previously, faced this output for the first time!


----------



## richardtoohey2 (Apr 11, 2022)

rraj said:


> Have done release upgrade many times previously, faced this output for the first time!


freebsd-update has always used a pager - it used to be more but think from 12.0 onwards it switched to less.  But after a page of output it always stopped, waiting for user input.

For some updates there wouldn't have been a page of output so it wouldn't have stopped.

It's one of those ones that seems very obvious once you know, but does seem to trip people up every now and then!

Also did you notice SirDice advising you that what you are doing will NOT upgrade you to 12.3?  The command you are using will just upgrade 12.2.


----------



## Vull (Apr 11, 2022)

To bypass pager, you can redirect output to a file: `freebsd-update fetch > freebsd-update_fetch.txt`

Then to display the output without invoking a pager: `cat freebsd-update_fetch.txt`

Running `freebsd-update install` does not invoke any pager.

To upgrade to a new release use `freebsd-update upgrade -r newrelease` as specified in the manual: freebsd-update(8).


----------



## SirDice (Apr 12, 2022)

Vull said:


> To bypass pager, you can redirect output to a file:


`env PAGER=cat freebsd-update fetch`


```
ENVIRONMENT
     PAGER  The	pager program used to present various reports during the exe-
	    cution.  (Default: "/usr/bin/less".)

	    PAGER can be set to	"cat" when a non-interactive pager is desired.
```


----------



## Geezer (Apr 12, 2022)

Less is more. (Ludwig Mies Van Der Rohe)


----------



## SirDice (Apr 12, 2022)

Geezer said:


> Less is more.


On FreeBSD it's actually the same executable:

```
root@molly:~ # ls -li /usr/bin/more /usr/bin/less
445455 -r-xr-xr-x  2 root  wheel  198432 Apr 10 17:37 /usr/bin/less
445455 -r-xr-xr-x  2 root  wheel  198432 Apr 10 17:37 /usr/bin/more
```


----------



## Erichans (Apr 12, 2022)

rraj said:


> [...]
> I did not get you! Ctrl+Z suspends it.


After suspending a job with Ctlr+Z you can have a look at what job you actually suspended. See for example the section on _Jobs_ in tcsh(1) or FreeBSD : Job management with the command `jobs`; or refer to the section on job control with your favourite shell. After you have suspended a job on your terminal, you can also have a look at `ps -aux | grep <username>` to see what user <username> (=you) has actually running.


----------



## grahamperrin@ (Apr 13, 2022)

rraj said:


> Have done release upgrade many times previously, faced this output for the first time!



Yeah, I was totally confused the first few times.


----------

