Bug 164131 - freebsd-update(8) does not check for failed install commands
Summary: freebsd-update(8) does not check for failed install commands
Status: Closed DUPLICATE of bug 185676
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 9.0-RELEASE
Hardware: Any Any
: Normal Affects Only Me
Assignee: Colin Percival
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-15 00:30 UTC by jsellens
Modified: 2019-01-14 20:43 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jsellens 2012-01-15 00:30:11 UTC
In freebsd-update the shell function install_from_index does not appear to check whether the install command succeeds or fails (this seems to apply in other functions as well).

If there is a write error (e.g. file system full) the update process fails but freebsd-update says "go ahead and continue", so you can end up with a corrupted or unbootable system.

I was updating from an 8.x system, with a too small / partition.  Since the 9.0 (and default 8.x I think) amd64 kernels seem to have debugging/symbols enabled, they are larger than kernels used to be.  So my / partition filled up when freebsd-update was installing the kernel.  But it told me to continue right on and reboot, which would have failed.

/: write failed, filesystem is full
install: ///boot/INS@zUqD: No space left on device
install: ///boot/userboot.so: No space left on device
install: ///boot/INS@R4jN: No space left on device
install: ///boot/INS@5aZb: No space left on device
rmdir: ///boot/kernel: Directory not empty

/: write failed, filesystem is full

/: write failed, filesystem is full

/: write failed, filesystem is full

Kernel updates have been installed.  Please reboot and run
"/usr/sbin/freebsd-update install" again to finish installing updates.
#  echo $status
0

Fix: 

I suspect someone needs to go through the freebsd-update script and check for failing commands (and I'm sorry, but I'm not currently able to do that).
How-To-Repeat: Have a too small (or too full) / partition and update to a new release on amd64, and watch it fail.
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2012-01-19 17:44:25 UTC
Responsible Changed
From-To: freebsd-bugs->cperciva

Over to maintainer.
Comment 2 Eitan Adler freebsd_committer freebsd_triage 2018-05-28 19:43:08 UTC
batch change:

For bugs that match the following
-  Status Is In progress 
AND
- Untouched since 2018-01-01.
AND
- Affects Base System OR Documentation

DO:

Reset to open status.


Note:
I did a quick pass but if you are getting this email it might be worthwhile to double check to see if this bug ought to be closed.
Comment 3 Mark Johnston freebsd_committer freebsd_triage 2019-01-14 20:43:18 UTC

*** This bug has been marked as a duplicate of bug 185676 ***