Bug 164094 - bsdinstall(8): installer progress over 100%
Summary: bsdinstall(8): installer progress over 100%
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: Unspecified
Hardware: Any Any
: Normal Affects Only Me
Assignee: Alfonso S. Siciliano
URL:
Keywords: install
Depends on:
Blocks:
 
Reported: 2012-01-13 19:10 UTC by Ariane van der Steldt
Modified: 2022-10-13 17:48 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ariane van der Steldt 2012-01-13 19:10:07 UTC
Installer failed to get the first file in the list (base.tgz from memory) and continued to fetch the next file (kernel.tgz) due to my DNS resolver giving a negative reply, the first fetch.

Subsequently, my overall progress bar quickly overflowed, running over 3000%.

Fix: 

- clamp progress bar rendering to be between 0% and 100% (this will fix the overflown bar only)
- reset progress bar state on failed download (I suspect this only happens for succesful downloads)
How-To-Repeat: Fail to download the first file, progress to the next file.
Comment 1 Eitan Adler freebsd_committer freebsd_triage 2012-01-14 01:15:02 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-sysinstall

assign and fix synopsis
Comment 2 Eitan Adler freebsd_committer freebsd_triage 2012-01-14 02:00:55 UTC
State Changed
From-To: open->feedback

nwhitehorn asked for feedback
Comment 3 Mark Linimon 2012-01-18 15:00:42 UTC
----- Forwarded message from Ariane van der Steldt <ariane@stack.nl> -----

Date: Wed, 18 Jan 2012 06:23:08 +0100
From: Ariane van der Steldt <ariane@stack.nl>
To: Nathan Whitehorn <nwhitehorn@freebsd.org>
Cc: freebsd-bugs@FreeBSD.org, eadler@FreeBSD.org,
	freebsd-sysinstall@FreeBSD.org
Subject: Re: bin/164094: bsdinstall(8): installer progress over 100%
User-Agent: Mutt/1.5.21 (2010-09-15)

Hi Nathan,

On Sat, Jan 14, 2012 at 07:42:24AM +0100, Ariane van der Steldt wrote:
> On Fri, Jan 13, 2012 at 07:49:12PM -0600, Nathan Whitehorn wrote:
> > On 01/13/12 19:16, eadler@FreeBSD.org wrote:
> > > FreeBSD installer changed my MBR-only partition table to MBR+GPT 
> > > partition table.


> > > The other OS does not have GPT logic; I want to be at least warned 
> > > this is happening and prefer to have the option at least. 
> > > Alternatively, the installer may opt not to install a GPT if the disk 
> > > does not require it (as in the case in this machine)
> > 
> > Can you give some more details here? This is something that the 
> > installer is not programmed to do and that I cannot reproduce.
> 
> Sure. I used a VM to reproduce the problem, so I could provide pretty
> screenshots in an attempt to better explain the problem.
> 
> 
> Pre-install:
> only 1 OS installed, windows XP, using MBR partition table.
> 
> Using a live CD, I can instruct fdisk to (pointlessly) alter the active
> partition, as can be seen in attached screenshot 1
> 
> 
> Post-install:
> Both windows XP and FreeBSD are installed.
> Unfortunately, fdisk can no longer be used to alter the active
> partition, gpart is to be used instead.
> As can be seen in attached screenshot 2, fdisk fails.
> 
> After install, only gpart can be used to change the active partition.

Upon rereading the manpage for gpart, I'm wondering if what I concluded
really happened. On closer examination, it's possible the geom logic
blocked fdisk from modifying the partition table. Can you tell me how I
can confirm out what partitioning schemes are present on my harddisk?
I put the output of gpart show at the bottom of the e-mail, which
suggests the mbr scheme is used regardless.

If geom indeed blocks fdisk from altering the partition table, I'm
wondering what the use of the binary is though, as it seems gpart does
everything fdisk does, but without failing.

# gpart show
=>        63  1250263665  ada0  MBR  (596G)
          63   209712447     1  ntfs  [active]  (100G)
   209712510   102398310     2  ntfs  (48G)
   312110820   937426896     3  freebsd  (447G)
  1249537716      726012        - free -  (354M)

=>        0  937426896  ada0s3  BSD  (447G)
          0  929038336       1  freebsd-ufs  (443G)
  929038336    8388559       2  freebsd-swap  (4G)
  937426895          1          - free -  (512B)
-- 
Ariane
_______________________________________________
freebsd-bugs@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscribe@freebsd.org"


----- End forwarded message -----
Comment 4 Mark Linimon 2012-01-18 15:01:18 UTC
----- Forwarded message from Nathan Whitehorn <nwhitehorn@freebsd.org> -----

Date: Tue, 17 Jan 2012 23:57:10 -0600
From: Nathan Whitehorn <nwhitehorn@freebsd.org>
To: Ariane van der Steldt <ariane@stack.nl>
Cc: freebsd-bugs@FreeBSD.org, eadler@FreeBSD.org,
	freebsd-sysinstall@FreeBSD.org
Subject: Re: bin/164094: bsdinstall(8): installer progress over 100%

That implies it's just MBR + BSD label. Why did you think it was GPT?
Geom does prevent many utilities from altering the partition table. I
was under the impression that fdisk had been modified to actually use
geom these days, so it should have worked, but it's possible that
didn't work somehow.
-Nathan

----- End forwarded message -----
Comment 5 Mark Linimon 2012-01-20 15:18:01 UTC
----- Forwarded message from Ariane van der Steldt <ariane@stack.nl> -----

Date: Fri, 20 Jan 2012 10:46:43 +0100
From: Ariane van der Steldt <ariane@stack.nl>
To: Nathan Whitehorn <nwhitehorn@freebsd.org>
Cc: freebsd-bugs@FreeBSD.org, eadler@FreeBSD.org,
	freebsd-sysinstall@FreeBSD.org
Subject: Re: bin/164094: bsdinstall(8): installer progress over 100%

I came under that impression because fdisk didn't work, while before
installing freebsd, it did work. gpart, due to its name and coupled with
a refusing fdisk, made me jump to the conclusion that I had been given a
GPT table.

Is there a technical reason that geom is not automatically activated on
every partition table? It seems to me that unifying these would reduce
complexity and confusion to the end user. And I see no reason why the
boot volume has this recognized and activated automatically, but other
devices don't.
-- 
Ariane

----- End forwarded message -----
Comment 6 Mark Linimon 2012-01-20 15:18:31 UTC
----- Forwarded message from Bruce Cran <bruce@cran.org.uk> -----

Date: Fri, 20 Jan 2012 10:33:49 +0000
From: Bruce Cran <bruce@cran.org.uk>
To: Ariane van der Steldt <ariane@stack.nl>
Cc: freebsd-bugs@FreeBSD.org, eadler@FreeBSD.org,
	Nathan Whitehorn <nwhitehorn@freebsd.org>,
	freebsd-sysinstall@FreeBSD.org
Subject: Re: bin/164094: bsdinstall(8): installer progress over 100%

gpart is just a geom partitioner: its name has nothing to do with GPT.

-- 
Bruce Cran

----- End forwarded message -----
Comment 7 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 08:01:42 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped
Comment 8 Alfonso S. Siciliano freebsd_committer freebsd_triage 2022-01-21 03:23:50 UTC
Same problem some day ago with CURRENT 14, it is an easily reproducible error, review D33978
Comment 9 commit-hook freebsd_committer freebsd_triage 2022-02-23 00:58:25 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=55af0f96d0fb92e49fad0c63e7b062c419197459

commit 55af0f96d0fb92e49fad0c63e7b062c419197459
Author:     Alfonso S. Siciliano <asiciliano@FreeBSD.org>
AuthorDate: 2022-02-23 00:54:51 +0000
Commit:     Alfonso S. Siciliano <asiciliano@FreeBSD.org>
CommitDate: 2022-02-23 00:54:51 +0000

    bsdinstall/distfetch: fix main bar percentage with errors

    UI fix not related to the real fetching process, use 'nfiles'
    (instead of 'total files size') to compute main bar percentage
    if an error occurs:

     - fix: main bar greater than 100%, if an error occurs before fetching
     - fix: main bar less than 100%, if an error occurs during fetching
     - add: last mixedgauge, at least one dialog if a total failure occurs

    PR:             164094, 169748
    Approved by:    bapt (mentor)
    Review:         https://reviews.freebsd.org/D33978

 usr.sbin/bsdinstall/distfetch/distfetch.c | 33 ++++++++++++++++++++++---------
 1 file changed, 24 insertions(+), 9 deletions(-)