Subject: sysinst config file
To: None <tech-install@netbsd.org>
From: Manuel Bouyer <bouyer@antioche.lip6.fr>
List: tech-install
Date: 11/26/1999 21:35:26
Hi,
In the last few days I've needed to automatically fdisk a HD under
NetBSD (to install NT from a network server on a pool of machines; it seems to
be easier to use NetBSD to setup the HD and get all the needed bits before
install :). For this I use a floppy with a diskless kernel, mounting its
root from a NFS server. Then /etc/rc starts custom script which
uses fdisk to setup the MBR and install a partition table. But there are a few
improvements I need:
- fdisk can't install the boot selector in a non-interactive way
- fdisk can't get the BIOS geometry by itself
- I have to give starts/size of partitions in sectors and they have to be
aligned on cylinder boundaries; but it would be nice to be able to
give sizes in a more user-friendly unit and let fdisk find the start by
itself, and round the size.
- eventually it would be nice if fdisk could create a partition with all the
free space.
Because of this I've though about adding a config file to fdisk, which could
give it all the needed infos to setup a HD (command line options would not
be really suited for this :) After more though I though it would be better
to add this functionality to sysinst itself. This wouldn't be much more work
and could avoid some code duplication. This way we could do fully automatised
NetBSD installs from the network (something similar to RedHat's kickstart).
The syntax of the config file I propose would be like dhcpd.conf,
with blocks. Example:
disk wd0 {
mbr {
biosdisk 0;
partition 0 {
type "MSDOS";
size 2000M;
};
partition 1 {
type 0x83;
size 2000M;
};
partition 2 {
type 0x82;
size 128M;
partition 3 {
type "NetBSD";
fill;
};
active 3;
bootselect {
entry 0 "DOS";
entry 1 "Linux"
entry 2 "";
entry 3 "NetBSD";
timeout 10;
default active;
};
};
disklabel {
a {
type FFS;
size 128M;
mntpoint "/";
};
b {
type swap;
size 128M;
};
e {
type FFS;
size 1000M;
mntpoint "/usr";
};
f {
type FFS;
fill;
mntpoint "/home";
};
};
};
I think the syntax is quite obvious :) Of course some of the keywords are
machine-dependant. The keyword "bootsect" (exclusive with "bootselect") would
be the equivalent of 'fdisk -i'. If neither bootsect or bootselect are present
the boot code would be updated only if needed.
"biosdisk" is optionnal, if not here BIOS geometry will be taken from the
in-core disklabel or existing MBR. "biosdisk auto" would attempt to
match by itself the bios disk.
Other blocks could be made for network config, sets to install, etc ...
My priority for now is to get the MBR part working (I could start hacking
on this next week).
This is not a complete proposal, I still need to think about it.
However we can start talking about the base idea. Any comments, suggestions
or proposal are welcome.
--
Manuel Bouyer <bouyer@antioche.eu.org>
--