Subject: Automatic interactive Installation _ I am working on one but I need help.
To: None <amiga@sun-lamp.cs.berkeley.edu, amiga-dev@sun-lamp.cs.berkeley.edu>
From: Francis Demierre <francis@hasler.ascom.ch>
List: amiga-dev
Date: 08/15/1994 11:53:42
Hi all Amiga Netizens,
At least for once, I might be able to contribute to the Amiga NetBSD
community but I still need a bit of help ....
Since a few days, I am working on creating a set of floppies and
scripts that would allow automatic installation (well, you still have
to answer a few questions ;-) ).
The general principle is:
- Boot from floppy on which I replaced 'init' by a bourne shell script
- New init will walk thru every (0-15) disk to find a valid swap
partition.
- You will be asked (for each 'b' partitions found) if it can be
used to load a miniroot. At the first positive answer, the loop will
exit an we go further.
- newfs the accepted 'b' partition and mount it
- Copy the boot floppy to there
- Read the rest of the miniroot off floppy tar (multiple volumes, probably
two in the final version)
This contains all possible devices + a bunch of usefull commands such as
various mount commands, dump, restore, rmt, fsck, etc ... and another
/sbin/init to perform the second stage of installation.
- Then see all the questions below !
- Then run the new '/sbin/init' which came from the miniroot tar
to perform the rest of the interactive installation. This as result
of a reboot or by another way (see all the questions below !).
- rebbot the newly (or update) NetBSD !!!
well here is my problem:
I wanted then, to make the 'b' partition look as '/'. I have tried different
solutions which all failed
remount /dev/sdxb on / chokes with 'does not match mounted device'
mount_null /xxx/bin /bin, etc ... does not work
The basic problem I encounter in all these case is the following:
at boot, /dev/fd0a is on /
then I mount /dev/sdxb on /mfs
to untar miniroot, I have to take the diskette away and then tar from
/dev/rfd0a (fd0a is busy).
Then, I tell the user to make sure to put the boot diskette
back in the drive and try 'mount -u -r /dev/fd0a /' in an attempt
to resync with the floppy (all commands after the tar are taken
from /mfs/... to avoid using the floppy)
This always (and other trial I did) end up in a "I/O error" and
most of the time trips to the kernel debugger.
The questions I have are:
1. Would there be any way of reusing fd0a after having removed the floppy,
used /dev/rfd0a for somethging else and then reinserted the floppy ?
2. If yes, what should I use to make my /mfs (/dev/sdxb to look as /);
mount_null seemed a good idea ?
I would really like to avoid booting a second time if possible !
3. If the above is not possible, I could just ask the user to use 'sdxb'
as the the boot device and halt the system but that is not accepted by
the kernel (only 'sdx' allowed).
For this, I want to try the following trick in amiga/swapgeneric.c:
-----------
in setconf(): ( '|' on left for changes)
-------------
setconf()
{
struct dkdevice *dkp;
struct partition *pp;
struct genericconf *gc;
struct bdevsw *bdp;
| int unit, swaponroot, rootonswap;
char name[128];
char *cp;
swaponroot = 0;
| rootonswap = 0;
if (rootdev != NODEV)
goto justdoswap;
unit = 0;
if (boothowto & RB_ASKNAME) {
gc = getgenconf(name);
cp = name + 2;
while (*cp >= '0' && *cp <= '9')
unit = 10 * unit + *cp++ - '0';
if (*cp == '*')
swaponroot = 1;
| else if ( *cp >= 'a' && *cp <= 'p' )
| rootonswap = *cp - 'a';
unit &= 0x7;
goto found;
}
And a bit further:
found:
gc->gc_root = MAKEDISKDEV(major(gc->gc_root), unit, rootonswap);
rootdev = gc->gc_root;
-----------
This would allow trying to boot from ANY partition possible and permit
to boot the miniroot I just created. Kernel gurus out there ?
Would that work?
And if yes, should it integrated in the kernel as such ?
Oh, another note:
I am going on vacation on the 21st of august for three weeks and the work
load is such before leaving that I think I can have something ready before
end of september. I hope you do not mind waiting ???
Any help very much appreciated, please send Email directtly to me, I cant
read the list due to work load, especially with ALL the duplicates !
Cu, Francis
-----------------------------------------------------------------------
Francis Demierre SMTP : francis@hasler.ascom.ch
Ascom Hasler AG, UUCP: ...!mcsun!chsun!hslrswi!francis
Abt. NVEI2, X.400: S=francis/O=ascom/P=eunet/A=arcom/C=ch
Belpstrasse 37,, Tel. : +41 31 999 3503
CH-3000 Bern 14 Fax : +41 31 999 3735
-----------------------------------------------------------------------
------------------------------------------------------------------------------