BSDInstall ISO images

Garrett Cooper gcooper at FreeBSD.org
Sun Jan 23 19:55:20 UTC 2011


On Sun, Jan 23, 2011 at 11:23 AM, Nathan Whitehorn
<nwhitehorn at freebsd.org> wrote:
> On 01/23/11 12:59, Garrett Cooper wrote:
>>
>> On Sat, Jan 8, 2011 at 2:54 PM, Nathan Whitehorn<nwhitehorn at freebsd.org>
>>  wrote:
>>>
>>> I've spent some time integrating bsdinstall into startup of install CDs,
>>> mostly related to building useful live-CD-based installers. An i386 image
>>> can be found here (other architectures may follow, as my very slow DSL
>>> line
>>> permits):
>>>
>>> http://people.freebsd.org/~nwhitehorn/bsdinstall-i386-20110108.iso.bz2
>>>
>>> The source for this can be found at:
>>>
>>> svn://svn.freebsd.org/base/user/nwhitehorn/bsdinstall
>>>
>>> The bits related to live CD usage are the testsystem.sh and rc.local
>>> files.
>>> Instead of running sysinstall as an init replacement, I have written a
>>> small
>>> rc.local script that gives the user the option to either start the
>>> installer, open a single-user-mode style shell, or to continue to boot to
>>> a
>>> multi-user live CD. Also, instead of the md root used by sysinstall, this
>>> just boots from the CD directly. This prevents the need for sysinstall's
>>> media selection, since the distribution files are in the mounted root
>>> file
>>> system.
>>>
>>> I would appreciate any comments or test results.
>>
>> Not sure if it matters anymore, but here are my comments:
>
> It does very much matter. And all the CD environment stuff and the
> bsdinstall UI (which most of your comments are about) will be extremely
> similar to a merged pc-sysinstall installer. There is also a chance we will
> end up with bsdinstall basically as-is as the 9.0 installer if we can't get
> the merge done in time.

Ok.

>> NOTE: this was using
>> http://people.freebsd.org/~nwhitehorn/bsdinstall-i386-20110118.iso.bz2
>> .
>>
>> 1. The i386 image (apparently) isn't compiled with ATACAM, etc support
>> so opening /dev/cd0 always fails with ENODEV.
>
> Yes. But it will fall back to acd0. This is for people with SCSI or USB CD
> drives. The real problem is if the CD ends up in [a]cd1, so cdboot needs a
> more robust mechanism here.

I'm not so much worried about the failure as I am about the noise
visible to the end user. A lot of stuff fails today silently, that
should fail silently, and that's ok as long as it makes sense in the
overall design of things.

So again, printing that stuff is fine in verbose mode but doesn't make
sense in a more polished / quiet mode that will be packaged as an
install distribution to lots of users.

>> 2. There's a lot of noise at bootup related to missing files. Putting
>> in a dummy /etc/fstab, adding hostid_enable="NO", and setting
>> hostname="" to a dummy value in rc.conf will help weed out some noise.
>
> That's a good point. I've followed your suggestions.

Thanks!

>> 3. The initial dialog beeped when I first pressed the right key on my
>> keyboard. Maybe hw.syscons.bell=0 would help?
>
> Interesting.

I didn't run in to this the second time, so it might be a bug with
libdialog / the app. There's an option to have libdialog beep when you
move the cursor, etc; I disabled the bell on the second go-around via
the terminal, because I was getting tired of my PC speaker `cursing'
at me when I hit tab / the arrow keys in the shell :P...

>> 4. Splitting up the Keyboard Menu into regions and providing human
>> readable names would help.
>
> The keyboard menu just calls kbdmap, which is where the GUI comes from. The
> suggestion is good, but the change should be made there.

Ok.

>> Partition Editor (I used Manual for the first try):
>> 1. It would be helpful if the cursor was at the end of the textbox so
>> that I didn't have to position the cursor at the end or press the
>> delete key.
>
> I'll see if there's a way to change this.

Much appreciated :). If anything this should be done in libdialog, not
in bsdinstall as it's more intuitive behavior that belongs there.

>> 2. K is a bogus suffix for kilo-; k is correct.
>
> This comes from humanize_number() in libutil, and would need to be changed
> there.

Ugh. Annoying... I can see what needs to be fixed next.

>> 3. Having a mountpoint for a bsdlabel partition doesn't make sense and
>> is confusing.
>
> That is true. Since the same form with the mountpoint also has the partition
> type, I could not find a clean way to make the last line go away. The same
> issue applies to swap. Ideas for this part of the UI would be very much
> appreciated.

Maybe graying out some fields would be helpful in the meantime? Not
sure if that's possible with the new libdialog in an easy manner.

>> 4. Backing out of the Partition Manager and going back to the previous
>> dialogs is impossible.
>
> Which previous dialogs do you mean? Do you want to back out of the partition
> manager to use the auto paritioner? If you press "Abort", you can restart
> the installation, which isn't so far off from that. There wasn't a whole lot
> of room at the bottom of the partitioner screen for a sysinstall-like "Auto
> Defaults" button.

If I do into the manual partitioner and use the standard buttons
(don't hit ^c, etc), then I couldn't get back to setting the hostname,
going back and choosing the guided partitioner, etc.

>> 5. Noting that the values (freebsd-ufs, etc) map back to gpart driven
>> values would be helpful.
>
> There's a help line at the bottom of the screen with this information. Do
> you have a suggestion for making it more intuitive? Dialog doesn't support
> drop-down menus, which is what I would ordinarily use on this field.

I'll look at that again in my next run-through. Before what was nice
about sysinstall is that it placed the help diags further up on the
screen, so visually I had to parse the text at the top first before I
proceeded downward. [Most?] humans do top-down reading so I think that
that concern should be pushed back to libdialog upstream.

>> I exited the install and tried again on the command line. Couldn't
>> conjure up the right gpart commands (manpage sucks for what I was
>> looking for -- creating a new partition), I went back into the
>> partedit command that was in /usr/libexec/ and entered in data
>> manually . Committed my changes which threw me back into the prompt
>> and then hit ^d to get back into the installer proper. The first run
>> around failed for some odd reason (claimed it couldn't create
>> boot/kernel.gz, or whatever, so there might be some error checking
>> missing with mount, mkdir, etc).
>
> Interesting. Let me know if you find out how this happened.

Will do.

>> Chose restart, walked through the process again and chose manual, made
>> sure the slice was properly configured for / and swap was setup, then
>> continued. This time the install went through properly.
>>
>> Progress bar:
>> I think you're on the right track by simplifying the install, but it
>> could be polished to say:
>>
>> kernel
>> world
>> distribution (in what context is distribution? Is it configuration
>> files, etc from `make distribution' ?)
>
> That is exactly what "distribution" is. What goes in which files, and how
> many parts there are, is an interesting question. I think sysinstall splits
> up the base system a little too much.

Agreed. But saying "Configuration files", etc is a bit easier for
end-users to understand.

> You suggest dropping the ".tgz" suffixes?

Yup. It's just noise and people will ask questions if you switch to
bzip2, lzma, 7z, etc.

>> Configuring Network (etc)
>>
>> Seems like this could have been done earlier on to shrink the CD size
>> down a bit.
>
> Why would that shrink the CD size? It is done earlier if you need it to
> download the distfiles. I had placed it towards the end because it's part of
> a series of optional system configuration steps.

Today I can download a bootonly ISO and pull down the package chunks I
want instead of downloading a fat CD/DVD to do that. Network installs
are nice.

>> Add Users (YAY! something that finally works)
>>
>> - Prompts seem ok.
>> - Login class - getting too specific IMO; this should be done after
>> the first boot.
>> - Home directory - /usr/home was the traditional home directory root
>> for BSD I thought.
>> - Home directory permissions - as an aside, what are the default?
>> - Use password-based authentication - what other options are there
>> other than not having a password or using a non-master.passwd backend
>> like LDAP, etc?
>> - Lock out account after creation - I would remove this; again, it
>> seems like something that an admin can do after first boot.
>
> As you probably noticed, all this does (like the root password screen) is to
> run adduser in a chroot in the new system, so this is just the set of
> questions adduser asks. This could probably be prettified (and maybe
> simplified) somewhat.

Hmmm.. ok.

>> In general:
>>
>> Some of the dialogs are a bit small (like the DHCP status dialog).
>> Enlarging them might help.
>
> All the dialogs just use the automatic sizing option in dialog. I think that
> its autosizing algorithm may be a little wonky, but I haven't looked too
> much at changing it.

Agreed. The new libdialog's algorithm for sizing windows is overly
liberal in vertical space, but conservative in horizontal space, which
is kind of annoying because 60 columns should be ok for an autosized
line, and I hate scrolling up and down looking for what I need to
read.

>> Hopefully this feedback is helpful.
>
> It is! Please keep sending it.

Ok :). Uh... lol. For starters I don't think that /usr/home should be 0700:

$ ls -l /usr/home/
total 0
ls: /usr/home/: Permission denied
$ ls -l /usr/
total 50
drwxr-xr-x   2 root  wheel   7680 Jan 16 13:56 bin
drwxr-xr-x   2 root  wheel    512 Jan 16 13:56 games
drwx------   3 root  wheel    512 Jan 23 02:58 home
drwxr-xr-x  50 root  wheel   5632 Jan 16 13:56 include
drwxr-xr-x   6 root  wheel  12800 Jan 16 13:56 lib
drwxr-xr-x   5 root  wheel    512 Jan 16 13:56 libdata
drwxr-xr-x   5 root  wheel   1536 Jan 16 13:56 libexec
drwxr-xr-x   2 root  wheel    512 Jan 16 13:56 local
drwxr-xr-x   2 root  wheel    512 Jan 16 13:56 obj
drwxr-xr-x   2 root  wheel   5120 Jan 16 13:56 sbin
drwxr-xr-x  26 root  wheel    512 Jan 16 13:56 share
drwxr-xr-x   2 root  wheel    512 Jan 16 13:56 src

I punched in 0700 for the directory permission in the bsdinstall Add
User dialog. So something like chmod 0755 "$(dirname $userhome)"
should probably be done.

Thanks,
-Garrett


More information about the freebsd-arch mailing list