Hi Kees, Kees Cook [2008-03-09 17:20 -0700]: > Additionally, I have some changes to the fsck script I'd like to get you > to look at. I've attached it to bug 200391. It contains several > changes in the usplash behavior: > > 1:does not use "CLEAR" any more -- this is wrong when booting without > "quiet", and seems like a problem for people trying to report issues > in the fsck stage (the screen would get cleared after it finishes). Makes sense. > 2:only performs usplash clean-up if output was started (in the case that > you don't like change #1, this keeps the text log from being cleared > when all the filesystems are clean and you've booted without "quiet"). That too. > 3:fixes needless spin while waiting for fsck to start up Ah, thanks. > 4:uses usplash progress bar instead of status line to report percentage. > I personally think this is much more user-friendly, as they can see > the progress much more clearly. Once the fsck finishes, the progress > bar will return to the expected percentage when rcS.d continues. That was in fact my first implementation, but after discussion with mpt I changed it back to always keep the overall boot status in the progress bar and report the fsck progress textually (IRC log below FYI). Primary reason is that we cannot use a different color or other indication that this is a 'sub'progressbar. Thanks, Martin 2008 Feb 12 11:30:19 I currently hijack the progress bar to show the fsck progress 2008 Feb 12 11:30:25 which means that it'll jump around a little 2008 Feb 12 11:30:39 (i. e. used for init script progress, then fsck progress, then again init script progress 2008 Feb 12 11:30:52 I'd like to use a different colour for fsck, but usplash currently doesn't allow that 2008 Feb 12 11:30:55 Better than nothing. 2008 Feb 12 11:31:03 it's probably good enough for a first upload 2008 Feb 12 11:31:08 hrm 2008 Feb 12 11:31:15 mpt: WDYT? should I use the progress bar or output some text 2008 Feb 12 11:31:19 pitti: ooh, congratulations 2008 Feb 12 11:31:19 (like percentage) 2008 Feb 12 11:31:24 pitti: which fsck backends does it support? 2008 Feb 12 11:31:43 cjwatson: only ext3 actually provides progress reading 2008 Feb 12 11:31:47 pitti, how soon in the progress bar do/can you find out that you need to do fsck? 2008 Feb 12 11:31:56 I'll check it in a bit how it looks with reiser and xfs 2008 Feb 12 11:32:25 rcS.d/S30checkfs.sh 2008 Feb 12 11:32:36 should be fairly early 2008 Feb 12 11:32:42 I didn't run a complete boot yet 2008 Feb 12 11:32:47 but only when fsck actually starts 2008 Feb 12 11:32:48 pitti, I mean, do you know that you'll have to do a fsck before the progress bar begins? 2008 Feb 12 11:32:49 I just start usplash and checkfs. manually 2008 Feb 12 11:33:02 right, what cjwatson said 2008 Feb 12 11:33:39 mpt: let me test this with a real boot and come back to describe how it looks li ke in the entire boot sequence 2008 Feb 12 11:33:51 ok 2008 Feb 12 11:40:52 mpt: so, it actually looks a bit ugly 2008 Feb 12 11:40:58 pitti, my usual suggestion is to retain one progress bar for overall progress of the task (in this case, starting up), and using text for subtasks 2008 Feb 12 11:41:19 init script progress starts from 0 to 30%, then checkfs kicks in and does 0 to 100, then init script continues from 30 to 100 2008 Feb 12 11:41:30 So it's ok if the progress bar gets stuck for a few minutes, as long as there's a line of text changing regularly underneath 2008 Feb 12 11:41:42 mpt: ok, I I should rather output the percentage? 2008 Feb 12 11:41:46 where "regularly" > 1/second 2008 Feb 12 11:42:12 pitti, is there anything more fine-grained you can report than the percentage? 2008 Feb 12 11:42:26 For a large disk, a single percentage could take many seconds 2008 Feb 12 11:42:28 mpt: fsck has 5 stages, and reports a percentage for each of the stages 2008 Feb 12 11:42:34 but they are fairly meaningless 2008 Feb 12 11:42:51 Is there a MB measurement, for example? 2008 Feb 12 11:42:57 or disk blocks, or something? 2008 Feb 12 11:42:58 no 2008 Feb 12 11:43:05 well, blocks maybe 2008 Feb 12 11:43:12 it outputs some numbers 'cur' and 'max' 2008 Feb 12 11:43:24 Mithrandir: heh 2008 Feb 12 11:43:28 pitti, do they represent a fraction? 2008 Feb 12 11:43:33 i.e. progress = cur/max? 2008 Feb 12 11:43:37 I can output the numbers (stage X/5, cur, max) directly instead of percentages 2008 Feb 12 11:43:40 mpt: yes 2008 Feb 12 11:43:47 mpt: that's the percentage withing a stage 2008 Feb 12 11:43:49 and max > 100? 2008 Feb 12 11:43:58 for a small disk, max < 100 2008 Feb 12 11:44:04 hrm 2008 Feb 12 11:44:04 for a large one I suppose it's much bigger 2008 Feb 12 11:44:23 I have a 6 GB test partition, where it's 94 2008 Feb 12 11:44:37 How long does it take overall? 2008 Feb 12 11:44:49 actually, sorry, wrong question 2008 Feb 12 11:44:56 How long does the slowest stage take? 2008 Feb 12 11:45:10 for that 6 GB 2008 Feb 12 11:45:11 oh, stage 1: 46 (70% of time), stage 2: 473 (20% of time), stages 3 to 5 are very quick 2008 Feb 12 11:45:22 473 seconds? 2008 Feb 12 11:45:28 no, that's the 'max' number reported 2008 Feb 12 11:45:33 oh 2008 Feb 12 11:45:39 an absolute number of files or blocks to check, or so 2008 Feb 12 11:45:40 a different number for each stage 2008 Feb 12 11:45:57 I have a conversion function which accumulates stage, cur, and max to a single percentage 2008 Feb 12 11:46:05 (adapted from fsck.ext3) 2008 Feb 12 11:46:13 The reason I'm asking this, is that it's good for the text to update at least every couple of seconds 2008 Feb 12 11:46:17 so that it never looks frozen 2008 Feb 12 11:46:41 As a (very) last resort we could include the time elapsed, I'm just trying to work out whether that's necessary 2008 Feb 12 11:46:58 mpt: what about including all? 2008 Feb 12 11:47:06 mpt: you don't have any meaningful output that changes every couple of seconds by default, at least. 2008 Feb 12 11:47:19 Checking disc..... 23% (stage 1, 234/437) 2008 Feb 12 11:47:27 well, maybe on a 6G disk, but not on a 1TB disk or thereabouts. 2008 Feb 12 11:47:31 Mithrandir, "by default" as in the existing text display? 2008 Feb 12 11:47:48 mpt: yes. You have a text throbber and a progress bar. 2008 Feb 12 11:47:57 yes, I'm familiar with it 2008 Feb 12 11:48:06 but not familiar with how bad it gets on huge disks 2008 Feb 12 11:48:15 s/bad/sullen/ 2008 Feb 12 11:48:17 (I currently mimic that text mode progress bar behaviour in usplash) 2008 Feb 12 11:48:20 it just throbs slower. 2008 Feb 12 11:48:45 I think the numbers (cur/max) will get higher, so I could output those 2008 Feb 12 11:48:53 fsck seems to update progress several times a second 2008 Feb 12 11:49:13 What makes it spin the throbber? 2008 Feb 12 11:49:25 mpt: the text mode has a certain threshold for the percentage 2008 Feb 12 11:49:28 I mean, what has it finished when it rotates one segment 2008 Feb 12 11:49:38 e. g. if one "=" represents 2.3%, it updates the progress bar every 2.3% 2008 Feb 12 11:50:14 oh, it has that rotating thingy, too 2008 Feb 12 11:50:27 pitti: "throbber". :-) 2008 Feb 12 11:50:53 Mithrandir: I think I just learned a new word :) 2008 Feb 12 11:50:54 So, if we can assume that (a) fsck will usually take more than a couple of minutes, and (b) for most disks max > 100, then I think it's better to show cur & max 2008 Feb 12 11:51:16 mpt: maybe the percentage in addition, to give a feeling for an ETA? 2008 Feb 12 11:51:28 throbber, I think comes from Netscape 1.1, where it actually throbbed 2008 Feb 12 11:51:46 since stage 1 takes 70% and stages 2 to 5 together 30%, it would look less intimidating 2008 Feb 12 11:52:10 pitti, you're right 2008 Feb 12 11:52:17 mpt: WDYT about "23% (stage 1/5, block 234/437)" 2008 Feb 12 11:52:21 Your suggestion above is perfect 2008 Feb 12 11:52:39 except three dots, not five :-) -- Martin Pitt | http://www.piware.de Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org) My 5 today: #198753 (libxfce4mcs), #198129 (tzdata), #146230 (ps3-kboot), #153152 (hplip), #177382 (postgresql-8.3) Do 5 a day - every day! https://wiki.ubuntu.com/5-A-Day