Tim Rightnour | 20 Mar 2013 17:56
Gravatar

sshramdisk general information


Recently, I added some code to evbarm to allow installation via sysinst over
sshd.  This allows a user to boot a headless Raspberry PI, ssh into it as
"sysinst" with a password of "netbsd", and have it launch sysinst to begin the
installation.  It also supports the console, so if they don't want to ssh in,
they can still install normally.

There are a few reasons I think this is useful:

1) It's kinda annoying to buy an HDMI cable and USB keyboard just to install
the PI, and then immediately disconnect them and toss them.

2) I envision this could be really useful, on a system like an NSLU2, where our
current install instructions tell the user to solder a serial port onto the
device.  In this instance, they could instead boot the image, and just ssh in
to kick sysinst off.

3) I wouldn't actually mind if other ports had this ability, as I could toss
the cd in, boot, and go back to my desk rather than standing in front of my
machine rack.

How does it work?

The embedded ramdisk contains dhcpcd, and sshd. Once the ramdisk boots, it
fires up dhcpcd, gets an address, and then launches sshd.  The master.passwd
file has a sysinst user, with a homedir of /inst.  /inst contains a profile
that just kicks off sysinst.  The user then installs normally.

Putting sshd on the ramdisk image is a little tricky, as normally sshd pulls in
30-40 libraries.  To cut that down, you need to disable PAM for the sshd build.
(Continue reading)

Tim Rightnour | 8 Mar 2013 17:01
Gravatar

RFC: move md_init() in sysinst


Currently no port uses the md_init() function in sysinst.  I would like to use
this function in evbarm, however, it doesn't do what I want.  Currently this
function is called prior to the menu system being inititalized.  I would like
to ask the user a question before beginning the installation (what kind of eval
board do you have?).

Does anyone object to me moving the call to md_init down in main(), so it is
called immediately after the menu system is initialized, but before the first
menu is presented to the user?

---
Tim Rightnour <root <at> garbled.net>
NetBSD: Free multi-architecture OS http://www.netbsd.org/
Genecys: Open Source 3D MMORPG: http://www.genecys.org/

Marc Balmer | 6 Feb 2013 20:01
Picon
Favicon

A NetBSD system installer with Lua scripting, i18n

NetBSD- and Lua-Users

I am working on NetBSD system installer extentions for sysinst that allows sysinst to be scripted in Lua. 
The basic idea is that an installation script can be shipped with the install media (or put on a netinstall
server) that drives the installation process (or parts thereof).  If no such script is present, the
standard way of the installation procedure will run.  A sample script I wrote, e.g. can install and
configure pkgsrc packages during the install procedure.

It has been particularly "difficult" to deal with sysinst's i18n system, for example message strings
would need a space at the end if the message is continued on the next line.

An earlier version of my sysinst changes used i18n written in C, but I think it could better be done entirely
in Lua.  I am solicitating comments and ideas on this.

Attached are three files (not very elaborate code, just meant as proof of concept): i18n.lua, a "library"
that translates messages, and i18n.de, i18n.fr two sample message catalogs for german and french.

So far it can translate messages and change the order of parameters.  Is that enough? 

- Marc Balmer

Attachment (i18n.fr): application/octet-stream, 393 bytes
Attachment (i18n.de): application/octet-stream, 92 bytes
Attachment (i18n.lua): application/octet-stream, 1233 bytes

Josh Branning | 22 Oct 2012 00:08
Picon

Anyone working on an automated install?

Hello,

I am aware this has been asked several times already, but it really
would be nice to have some way of automating the installation for NetBSD.

If anyone is working on this, please let me know.

Thanks,

Josh.

Julian Djamil Fagir | 22 Sep 2012 21:22
Picon

Adding etcupdate to sysinst's upgrade mechanism

Hi,

split from install/38571. I would like to add the option to run etcupdate(8)
from sysinst when doing an upgrade (after running postinstall).
The patch introduces a new function run_program_nocurses which exits curses,
starts etcupdate, and afterwards goes back to curses. You have to exit curses
for this in order to see the top three lines.

Objections?

Regards, Julian
Attachment (sysinst.diff): text/x-patch, 7107 bytes
Roger Pau Monne | 5 Sep 2012 18:34

Automated install (again)

Hello,

I saw there was a post about having something similar to Debian FAI on
NetBSD, and I'm really interested in that feature. I will explain a
little bit the reason why this feature would be useful in my case.

The Xen.org project has a test system, to assure that each change
committed doesn't break anything. The test system performs automatic
installs of several Linux distributions on bare metal, and tests Xen on
them. Since the number of physical machines is probably lower than the
number of OSes to test, and we always want to perform a clean install
before we start testing, the hosts are installed automatically and
without user interaction (usually by passing a file that contains the
answers to the questions asked by the installer).

Adding NetBSD to this test system will help finding bugs much more
faster, and prevent newer features from breaking NetBSD support.

So, to get to the point, is there any chance to have such a feature
added to sysinst?

I've done a quick look at the code, and it seems it won't be really
difficult to load a file and fill all the necessary global variables
from there, after having all the necessary information it's just a
matter of calling all the functions, md_pre_disklabel, write_disklabel,
and so on... Maybe someone more familiar with sysinst has a better
option about that.

Thanks, Roger.

(Continue reading)

jmitchel | 14 Jul 2012 09:12

NetBSD 6.0Beta and 6.0Beta2 on hpcarm doesn't create a fdisk partition during install

Hello,

I've noticed a slight issue with 6.0BETA and 6.0BETA2. After doing an
install on a new CF card, here's what we get:

--------------
fdisk /dev/wd0
--------------

Disk: /dev/wd0d
NetBSD disklabel disk geometry:
cylinders: 8150, heads: 16, sectors/track: 63 (1008 sectors/cylinder)
total sectors: 8215200

BIOS disk geometry:
cylinders: 512, heads: 255, sectors/track: 63 (16065 sectors/cylinder)
total sectors: 8215200

Partitions aligned to 16065 sector boundaries, offset 63

Partition table:
0: Primary 'big' DOS, 16-bit FAT (> 32MB) (sysid 6)
    start 8192, size 80325 (39 MB, Cyls 0/130/3-5/130/2), Active
1: <UNUSED>
2: <UNUSED>
3: <UNUSED>
First active partition: 0
-----------------

The surprising part is that NetBSD 6.0 BETA & BETA2 can run on this flash
(Continue reading)

Julian Fagir | 18 Jun 2012 21:37
Picon

Feature request: Automatic installation

Hi,

there was a request from a hosting company that are currently providing
NetBSD to their customers, but having to do the installation manually every
time by a technician. So they asked whether there is a way of automatic
installation via network boot.
Apart from that, making NetBSD suitable for larger installations like exactly
that, or having a large number of desktop clients that are to be installed
automatically (like FAI from Debian), would be very nice.

I think, for the beginning a simple script that is started after a network
boot (as would sysinst be), then downloads tarfiles, uses the whole disk,
unpacks tarfiles, runs installboot(8), would be sufficient.
Maybe a script for the user is called in the end, to enable him to set
passwords or standard console (this could be implemented as well).

Is somebody here who already has something like that or has time to write and
test it? If so, please mail me. Maybe we could have an auto installation
script before 6.0 release.

Regards, Julian
Blair Sadewitz | 17 Jun 2012 05:42
Picon

adding newfs_ext2fs and mount_ext2fs to ramdisk flist

Hello,

It's possible to run NetBSD/xen in the DomUs of many hosting providers
which disavow any NetBSD support.  I've added mount_ext2fs and
newfs_ext2fs to my installation ramdisk to create and mount the
disklabel slice where pv-grub looks to find its configuration file and
kernels.  Yes, pv-grub does have some ffs support, but it doesn't seem
to able to cope with filesystems created with -O2 (I was going to
write UFS2, but the whole ffs2 vs ufs2 nomenclature and taxonomy
confuses me).

At any rate, this is an extremely simple change that makes life
easier.  Can we do it?

Regards,

--Blair

Jeremy C. Reed | 27 May 2012 01:35

more strange sysinst behaviour

Today I installed 6.0_BETA2 i386 in qemu. (No pinging enabled.) Here are 
some notes I typed in as I did it:

1) The extracted sets and devices step information was automatic but no 
prompt so could easily be missed. What else did I miss reading?

2) Some failure with pkgin install made it go to configuration menu 
again. So I had to do the configuration for networking all over again.

3) Hung here when I tried to install pkgin:

Status: Running
Command: /sbin/umount /targetroot/

(maybe hung for one minute)

then sysinst terminated. I didn't see why.

So at shell typed "exit" like it said and got the sysinst started all 
over:

Installation messages in English ...
and keyboard
and then at main menu I chose config option (since already installed).

4) Why is "Your host name" already set but DNS domain is not second 
time?

5) Later says re0 is already configured ... use it?
So yes, then dhcp yes, then domain name (and hostname) and no IPv6
(Continue reading)

Jeremy C. Reed | 22 May 2012 18:22

pkgsrc tarball does not exist

The download and extract step for pkgsrc fails because 
http://ftp.netbsd.org/pub/pkgsrc/stable/pkgsrc.tgz  does not exist. See
http://ftp.netbsd.org/pub/pkgsrc/stable/ for other options
like tar.gz , tar.bz2 , and tar.xz

Maybe the menu should allow choosing file name too?

This could be a generic method. fetch and extract


Gmane