Re: New snapshots -> new installer

Previous thread: New Franchise opportunity in the Middle East by Samir Majzoub Group on Thursday, May 7, 2009 - 7:24 pm. (1 message)

Next thread: bgpctl - manpage or code? by Rod Whitworth on Wednesday, May 6, 2009 - 9:52 pm. (8 messages)
From: Theo de Raadt
Date: Wednesday, May 6, 2009 - 2:21 pm

The newest snapshots that are headed out have a new install script based
on heavy modifications by a bunch of developers over the last 3 weeks.

We would like to start getting feedback from people about these changes.

From: patrick keshishian
Date: Wednesday, May 6, 2009 - 7:25 pm

I just grabbed an i386 snapshot and started the install process at
work. I didn't much time to pay too close of an attention to it as I
need to get a sandbox going really quickly for tomorrow. but, I liked
how when presented with the enter a username question it catches the
incorrect "yes" answer by a reply along the lines of "no, really ...
enter a username" :)

Cute!

I also liked the listing of sets better. It takes up less screen space.

Cheers!
--patrick

From: patrick keshishian
Date: Thursday, May 7, 2009 - 9:06 pm

so one thing I noticed after I went to work this morning to the now
finished install (I left it during installing of the sets) is that the
user that was created during installation was added to the "users"
group, and no new group by the same name as username was added to
/etc/group.

i.e., when one does adduser and add a new user say "patrick", by
default adduser wants to add "patrick" to a group "patrick" (or at
least this has been the case every since I've been using obsd). Also,
never have I seen "patrick" added to group "users" via adduser(8).

The installation script didn't add "patrick" to group "patrick" but by
default added "patrick" to "users" group.

Is this expected? desired?

--patrick

From: Theo de Raadt
Date: Thursday, May 7, 2009 - 9:21 pm

useradd really does that?  A new group for every user?  I think that
is stupid behaviour.  But I will think about if we should this in the
script.

I've always thought that that useradd stuff is 2000 lines of crap.
It's larger than bc, and almost a third the size of awk.  And all it
does is add users?

It is junk; it should be rewritten with an eye towards efficiency.

Furthermore, it doesn't even know how to make a chain of directories
properly, and calls a re-written version of system.

user.c:static int asystem(const char *fmt, ...)
user.c:/* a replacement for system(3) */
user.c:asystem(const char *fmt, ...)
user.c: if ((ret = system(buf)) != 0) {
user.c: /* we add the "|| true" to keep asystem() quiet if there is a non-zero exit status. */
user.c: (void) asystem("%s -rf %s > /dev/null 2>&1 || true", RM, dir);
user.c:         (void) asystem("cd %s && %s -rw -pe %s . %s", 
user.c: (void) asystem("%s -R -P %u:%u %s", CHOWN, uid, gid, dir);
user.c: (void) asystem("%s -R u+w %s", CHMOD, dir);
user.c:                 if (asystem("%s -p %s", MKDIR, home) != 0) {
user.c:             asystem("%s %s %s", MV, homedir, pwp->pw_dir) != 0) {

It is disgraceful to see what type of code being written these days.

From: Antoine Jacoutot
Date: Friday, May 8, 2009 - 1:01 am

I agree, it is stupid behaviour.

FWIW, adduser(8) may be doing this, but by default useradd(8) adds a new 
user to the "users" group which is what I would expect from the install 
script too.

-- 
Antoine

From: System Administrator
Date: Friday, May 8, 2009 - 12:30 pm

Patrick,

are you sure you are not confusing this with some Linux system? I've 
found this moronic group=user behavior to be the standard on all Linux 
systems, but have never experienced it in OpenBSD.

-Jacob.

---------------------------------------------------------
System Administrator                    admin@bitwise.net
Bitwise Internet Technologies, Inc.
22 Drydock Avenue                     tel: (617) 737-1837
Boston, MA 02210                      fax: (617) 439-4941

From: Martin Gignac
Date: Friday, May 8, 2009 - 12:35 pm

I don't think he's confusing it. I saw the same behavior on a recent
snapshot installer. It was new to me as well. I'm used to having each
user be part of his own individual group (which shares the same name
as the username) because I use adduser to create new users and I
accept most answers.

-Martin

From: patrick keshishian
Date: Friday, May 8, 2009 - 8:14 pm

Hi Jacob,

As pointed out by Martin Gignac I'm not confusing systems,
as well as suggested by Antoine Jacoutot it is adduser that
behaves this way and not useradd. I have not verified the
latter independently.

Also wanted to note that Slackware distribution of Linux
didn't behave this way. The last version of Slackware I
used was 12.something.

I didn't particularly care for creating a new group with
each user added, but just like Martin Gignac, I didn't
want to deviate from OpenBSD "defaults".

It seems that this behavior isn't desired by obsd developers
either :-)

Cheers,
--patrick

From: frantisek holop
Date: Monday, May 11, 2009 - 4:58 pm

adduser(8) the perl script offers group=$user

but it is possible to change it in /etc/adduser.conf

-f
-- 
i am so open-minded my brain falls out.

From: Jan Johansson
Date: Thursday, May 7, 2009 - 6:33 am

For this test I am using:

OpenBSD 4.5-current (RAMDISK_CD) #127: Tue May  5 21:46:24 MDT 2009
  deraadt@i386.openbsd.org:/usr/src/sys/arch/i386/compile/RAMDISK_CD

For years I have used the following disklabel.

sd0a /
sd0b swap
sd0c unused
sd0d /home
sd0e /usr
sd0f /var

To "upgrade" I have put the sets on sd0d and then used bsd.rd to
make a fresh install of /, /usr and /var. Doing this with the new
installer show two problems.

Problem 1:
In disklabel step I select "Custom" and just do "write" and
"quit". Before I would be asked for mount points but now I
get:

/install[111]: cannot open /tmp/fsstab.sd0: No such file or directory
/install[111]: cannot open /tmp/fsstab.sd0: No such file or directory
/install[111]: cannot open /tmp/fsstab.sd0: No such file or directory
newfs: ....

Ok. So if I don't give any mount points it fails. I can live with
that.

Problem 2:
I disklabel step I select "Custom" and then I specify mount
points for 

sd0a /
sd0e /usr
sd0f /var

so no mount point for sd0d.

Now I exit by "write" and "quit" and here the new installer will
happily newfs my sd0d nulling my mail and my install files.

So how does one keep slices between installations?

Jan J

From: Kenneth R Westerback
Date: Thursday, May 7, 2009 - 2:26 pm

The intent is that sd0d should not be newfs'd. I.e. only partitions
with mount points specified should be newfs'd. I apparently screwed
that up and I will fix it when I get home.

.... Ken

From: Kenneth R Westerback
Date: Thursday, May 7, 2009 - 2:51 pm

I think this is the solution, but I can't test for a few hours at least. So
any test reports before then would be helpful.

.... Ken

Index: install.sh
===================================================================
RCS file: /cvs/src/distrib/miniroot/install.sh,v
retrieving revision 1.186
diff -u -p -r1.186 install.sh
--- install.sh	7 May 2009 03:43:02 -0000	1.186
+++ install.sh	7 May 2009 21:47:47 -0000
@@ -145,7 +145,7 @@ if [[ ! -f /etc/fstab ]]; then
 
 			# Append mount information to $FILESYSTEMS
 			_pp=${_partitions[$_i]}
-			echo "$_pp $_mp" >>$FILESYSTEMS
+			[[ -n $_mp ]] && echo "$_pp $_mp" >>$FILESYSTEMS
 
 			: $(( _i += 1))
 		done

From: Jan Johansson
Date: Monday, May 11, 2009 - 5:23 am

Sorry for not getting back to you earlier.

I now tried the 

OpenBSD 4.5-current (RAMDISK_CD) #140: Sun May 10 22:18:51 MDT 2009

snapshot.

See result below.


This now gives 
grep: fstab.sd0: No such file or directory
'/' must be configured!

And then I get the fdisk stage again.


This now works and all my files are still there after install.

Thank you, I am really starting to like thease updates to the
installer.

From: Theo de Raadt
Date: Monday, May 11, 2009 - 8:11 am

you MUST enter the mountpoints inside disklabel.  The script no longer

It isn't great; you assumed it would work a certain way and it did not.
So I don't understand how it is "great", since it did not work.

From: Jan Johansson
Date: Monday, May 11, 2009 - 11:38 pm

I meant great as in. I assumed it would work in a certain way, it
did not and the installer put me back in the right track without
pain.

From: patrick keshishian
Date: Thursday, May 7, 2009 - 9:01 pm

Good catch! ... and sorry if you lost any data. This would've bit me
as I rely on this.

--patrick

From: Thomas Pfaff
Date: Thursday, May 28, 2009 - 12:04 pm

On Wed, 6 May 2009 15:21:44 -0600 (MDT)

May 20th snapshot.  "Do you expect to run the X Window System?"
If you choose 'no' here then the x*.tgz sets are still selected
when you get to the installation part.  Why?

From: patrick keshishian
Date: Thursday, May 28, 2009 - 12:13 pm

From: Bob Beck
Date: Thursday, May 28, 2009 - 1:04 pm

because you probably want to install libraries and crap without
running X on the console.  The question is only for running X on
the console. 

	I have machines with X installed all the time that I do not
run X on the console of it.

	-Bob

From: Thomas Pfaff
Date: Thursday, May 28, 2009 - 1:59 pm

On Thu, 28 May 2009 14:04:18 -0600


So do I.  I only brought this up because I was trying to save some
space (only 256MB storage) and I noticed the X sets was being tagged
even though I said I was not going to run X.

Oh well, thanks for the feedback.

From: Bryan Linton
Date: Thursday, May 28, 2009 - 7:56 pm

This is a really small nit, but when the install or upgrade script asks
"Choose your keyboard type if it is nationalized" if you type in 6
characters and then hit backspace the screen displays "1234_6" where 
the underscore is the cursor. If you press backspace again it displays 
"123_ 6" etc.

If you press enter when "1234_6" is displayed the error message says
"kbd: unknown encoding 12345" so it seems to only be a display problem.

Also, if you type in 7 or more characters (so it wraps to a new line)
and press backspace to the beginning of the line, the cursor does not
wrap back to the previous line. Like before, it still deletes the 
characters, as evidenced from what the kbd error message displays.

Other than that I think the new installer is awesome. Thanks to all
the people that made it happen.

Previous thread: New Franchise opportunity in the Middle East by Samir Majzoub Group on Thursday, May 7, 2009 - 7:24 pm. (1 message)

Next thread: bgpctl - manpage or code? by Rod Whitworth on Wednesday, May 6, 2009 - 9:52 pm. (8 messages)