summaryrefslogtreecommitdiffstats
path: root/usr.sbin/sysinstall
diff options
context:
space:
mode:
authornyan <nyan@FreeBSD.org>2002-11-03 10:06:22 +0000
committernyan <nyan@FreeBSD.org>2002-11-03 10:06:22 +0000
commit28a2b9046b83430df64a3cf504879f318b725eb9 (patch)
tree5259b287635df95c219b55bc8b9f3ddf5a3d7ec7 /usr.sbin/sysinstall
parent7479c2d936862c1fd87f63df9dc908b2c0044a6b (diff)
downloadFreeBSD-src-28a2b9046b83430df64a3cf504879f318b725eb9.zip
FreeBSD-src-28a2b9046b83430df64a3cf504879f318b725eb9.tar.gz
- Added the MenuIPLType menu for selecting pc98 boot IPL.
- Disabled 'Syscons, Font', 'Syscons, Screenmap' and 'Syscons, Ttys' menus on pc98. - Fixed the MenuMouseType and MenuMousePort menus for pc98. - Fixed some comments for pc98.
Diffstat (limited to 'usr.sbin/sysinstall')
-rw-r--r--usr.sbin/sysinstall/disks.c58
-rw-r--r--usr.sbin/sysinstall/menus.c69
-rw-r--r--usr.sbin/sysinstall/sysinstall.h4
3 files changed, 113 insertions, 18 deletions
diff --git a/usr.sbin/sysinstall/disks.c b/usr.sbin/sysinstall/disks.c
index cabee8b..14bb77d 100644
--- a/usr.sbin/sysinstall/disks.c
+++ b/usr.sbin/sysinstall/disks.c
@@ -182,15 +182,15 @@ getBootMgr(char *dname, u_char **bootipl, size_t *bootipl_size,
cp = variable_get(VAR_BOOTMGR);
if (!cp) {
- /* Figure out what kind of MBR the user wants */
+ /* Figure out what kind of IPL the user wants */
sprintf(str, "Install Boot Manager for drive %s?", dname);
- MenuMBRType.title = str;
- i = dmenuOpenSimple(&MenuMBRType, FALSE);
+ MenuIPLType.title = str;
+ i = dmenuOpenSimple(&MenuIPLType, FALSE);
} else {
if (!strncmp(cp, "boot", 4))
BootMgr = 0;
else
- BootMgr = 2;
+ BootMgr = 1;
}
if (cp || i) {
switch (BootMgr) {
@@ -202,7 +202,7 @@ getBootMgr(char *dname, u_char **bootipl, size_t *bootipl_size,
*bootmenu = boot05;
*bootmenu_size = boot05_size;
return;
- case 2:
+ case 1:
default:
break;
}
@@ -565,19 +565,19 @@ diskPartition(Device *dev)
"Are you absolutely sure you want to do this now?")) {
variable_set2(DISK_PARTITIONED, "yes", 0);
+#ifdef PC98
/*
- * Don't trash the MBR if the first (and therefore only) chunk
+ * Don't trash the IPL if the first (and therefore only) chunk
* is marked for a truly dedicated disk (i.e., the disklabel
* starts at sector 0), even in cases where the user has
- * requested booteasy or a "standard" MBR -- both would be
- * fatal in this case.
+ * requested a FreeBSD Boot Manager -- both would be fatal in
+ * this case.
*/
/*
- * Don't offer to update the MBR on this disk if the first
+ * Don't offer to update the IPL on this disk if the first
* "real" chunk looks like a FreeBSD "all disk" partition,
* or the disk is entirely FreeBSD.
*/
-#ifdef PC98
if ((d->chunks->part->type != freebsd) ||
(d->chunks->part->offset > 1))
getBootMgr(d->name, &bootipl, &bootipl_size,
@@ -590,6 +590,18 @@ diskPartition(Device *dev)
}
Set_Boot_Mgr(d, bootipl, bootipl_size, bootmenu, bootmenu_size);
#else
+ /*
+ * Don't trash the MBR if the first (and therefore only) chunk
+ * is marked for a truly dedicated disk (i.e., the disklabel
+ * starts at sector 0), even in cases where the user has
+ * requested booteasy or a "standard" MBR -- both would be
+ * fatal in this case.
+ */
+ /*
+ * Don't offer to update the MBR on this disk if the first
+ * "real" chunk looks like a FreeBSD "all disk" partition,
+ * or the disk is entirely FreeBSD.
+ */
if ((d->chunks->part->type != freebsd) ||
(d->chunks->part->offset > 1))
getBootMgr(d->name, &mbrContents, &mbrSize);
@@ -625,33 +637,49 @@ diskPartition(Device *dev)
case '\033': /* ESC */
case 'Q':
chunking = FALSE;
+#ifdef PC98
/*
- * Don't trash the MBR if the first (and therefore only) chunk
+ * Don't trash the IPL if the first (and therefore only) chunk
* is marked for a truly dedicated disk (i.e., the disklabel
* starts at sector 0), even in cases where the user has requested
- * booteasy or a "standard" MBR -- both would be fatal in this case.
+ * a FreeBSD Boot Manager -- both would be fatal in this case.
*/
/*
- * Don't offer to update the MBR on this disk if the first "real"
+ * Don't offer to update the IPL on this disk if the first "real"
* chunk looks like a FreeBSD "all disk" partition, or the disk is
* entirely FreeBSD.
*/
if ((d->chunks->part->type != freebsd) ||
(d->chunks->part->offset > 1)) {
if (variable_cmp(DISK_PARTITIONED, "written")) {
-#ifdef PC98
getBootMgr(d->name, &bootipl, &bootipl_size,
&bootmenu, &bootmenu_size);
if (bootipl != NULL && bootmenu != NULL)
Set_Boot_Mgr(d, bootipl, bootipl_size,
bootmenu, bootmenu_size);
+ }
+ }
#else
+ /*
+ * Don't trash the MBR if the first (and therefore only) chunk
+ * is marked for a truly dedicated disk (i.e., the disklabel
+ * starts at sector 0), even in cases where the user has requested
+ * booteasy or a "standard" MBR -- both would be fatal in this case.
+ */
+ /*
+ * Don't offer to update the MBR on this disk if the first "real"
+ * chunk looks like a FreeBSD "all disk" partition, or the disk is
+ * entirely FreeBSD.
+ */
+ if ((d->chunks->part->type != freebsd) ||
+ (d->chunks->part->offset > 1)) {
+ if (variable_cmp(DISK_PARTITIONED, "written")) {
getBootMgr(d->name, &mbrContents, &mbrSize);
if (mbrContents != NULL)
Set_Boot_Mgr(d, mbrContents, mbrSize);
-#endif
}
}
+#endif
break;
case 'Z':
diff --git a/usr.sbin/sysinstall/menus.c b/usr.sbin/sysinstall/menus.c
index 3b6fbae..2e320d0 100644
--- a/usr.sbin/sysinstall/menus.c
+++ b/usr.sbin/sysinstall/menus.c
@@ -265,12 +265,16 @@ DMenu MenuIndex = {
{ " Router", "Select routing daemon (default: routed)", NULL, configRouter, NULL, "router_enable" },
{ " Security", "Configure system security options", NULL, dmenuSubmenu, NULL, &MenuSecurity },
{ " Syscons", "The system console configuration menu.", NULL, dmenuSubmenu, NULL, &MenuSyscons },
+#ifndef PC98
{ " Syscons, Font", "The console screen font.", NULL, dmenuSubmenu, NULL, &MenuSysconsFont },
+#endif
{ " Syscons, Keymap", "The console keymap configuration menu.", NULL, dmenuSubmenu, NULL, &MenuSysconsKeymap },
{ " Syscons, Keyrate", "The console key rate configuration menu.", NULL, dmenuSubmenu, NULL, &MenuSysconsKeyrate },
{ " Syscons, Saver", "The console screen saver configuration menu.", NULL, dmenuSubmenu, NULL, &MenuSysconsSaver },
+#ifndef PC98
{ " Syscons, Screenmap", "The console screenmap configuration menu.", NULL, dmenuSubmenu, NULL, &MenuSysconsScrnmap },
{ " Syscons, Ttys", "The console terminal type menu.", NULL, dmenuSubmenu, NULL, &MenuSysconsTtys },
+#endif
{ " Time Zone", "Set the system's time zone.", NULL, dmenuSystemCommand, NULL, "tzsetup" },
{ " TTYs", "Configure system ttys.", NULL, configEtcTtys, NULL, "ttys" },
{ " Upgrade", "Upgrade an existing system.", NULL, installUpgrade },
@@ -337,6 +341,22 @@ DMenu MenuDocumentation = {
DMenu MenuMouseType = {
DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
+#ifdef PC98
+ "Select a protocol type for your mouse",
+ "If your mouse is attached to the bus mouse port, you should always choose\n"
+ "\"Auto\", regardless of the model and the brand of the mouse. All other\n"
+ "protocol types are for serial mice and should not be used with the bus\n"
+ "mouse. If you have a serial mouse and are not sure about its protocol,\n"
+ "you should also try \"Auto\". It may not work for the serial mouse if the\n"
+ "mouse does not support the PnP standard. But, it won't hurt. Many\n"
+ "2-button serial mice are compatible with \"Microsoft\" or \"MouseMan\".\n"
+ "3-button serial mice may be compatible with \"MouseSystems\" or \"MouseMan\".\n"
+ "If the serial mouse has a wheel, it may be compatible with \"IntelliMouse\".",
+ NULL,
+ NULL,
+ { { "1 Auto", "Bus mouse or PnP serial mouse",
+ dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_TYPE "=auto" },
+#else
"Select a protocol type for your mouse",
"If your mouse is attached to the PS/2 mouse port or the bus mouse port,\n"
"you should always choose \"Auto\", regardless of the model and the brand\n"
@@ -352,6 +372,7 @@ DMenu MenuMouseType = {
NULL,
{ { "1 Auto", "Bus mouse, PS/2 style mouse or PnP serial mouse",
dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_TYPE "=auto" },
+#endif /* PC98 */
{ "2 GlidePoint", "ALPS GlidePoint pad (serial)",
dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_TYPE "=glidepoint" },
{ "3 Hitachi","Hitachi tablet (serial)",
@@ -373,6 +394,24 @@ DMenu MenuMouseType = {
{ NULL } },
};
+#ifdef PC98
+DMenu MenuMousePort = {
+ DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
+ "Select your mouse port from the following menu",
+ "The built-in pointing device of laptop/notebook computers is usually\n"
+ "a BusMouse style device.",
+ NULL,
+ NULL,
+ {
+ { "1 BusMouse", "PC-98x1 bus mouse (/dev/mse0)",
+ dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_PORT "=/dev/mse0" },
+ { "2 COM1", "Serial mouse on COM1 (/dev/cuaa0)",
+ dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_PORT "=/dev/cuaa0" },
+ { "3 COM2", "Serial mouse on COM2 (/dev/cuaa1)",
+ dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_PORT "=/dev/cuaa1" },
+ { NULL } },
+};
+#else
DMenu MenuMousePort = {
DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
"Select your mouse port from the following menu",
@@ -394,6 +433,7 @@ DMenu MenuMousePort = {
dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_PORT "=/dev/mse0" },
{ NULL } },
};
+#endif /* PC98 */
DMenu MenuMouse = {
DMENU_NORMAL_TYPE,
@@ -1199,6 +1239,22 @@ DMenu MenuInstallCustom = {
{ NULL } },
};
+#ifdef PC98
+/* IPL type menu */
+DMenu MenuIPLType = {
+ DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
+ "overwrite me", /* will be disk specific label */
+ "If you want a FreeBSD Boot Manager, select \"BootMgr\". If you would\n"
+ "prefer your Boot Manager to remain untouched then select \"None\".\n\n",
+ "Press F1 to read about drive setup",
+ "drives",
+ { { "BootMgr", "Install the FreeBSD Boot Manager",
+ dmenuRadioCheck, dmenuSetValue, NULL, &BootMgr },
+ { "None", "Leave the IPL untouched",
+ dmenuRadioCheck, dmenuSetValue, NULL, &BootMgr, '(', '*', ')', 1 },
+ { NULL } },
+};
+#else
/* MBR type menu */
DMenu MenuMBRType = {
DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
@@ -1216,14 +1272,13 @@ DMenu MenuMBRType = {
"drives",
{ { "BootMgr", "Install the FreeBSD Boot Manager",
dmenuRadioCheck, dmenuSetValue, NULL, &BootMgr },
-#ifndef PC98
{ "Standard", "Install a standard MBR (no boot manager)",
dmenuRadioCheck, dmenuSetValue, NULL, &BootMgr, '(', '*', ')', 1 },
-#endif
{ "None", "Leave the Master Boot Record untouched",
dmenuRadioCheck, dmenuSetValue, NULL, &BootMgr, '(', '*', ')', 2 },
{ NULL } },
};
+#endif /* PC98 */
/* Final configuration menu */
DMenu MenuConfigure = {
@@ -1861,12 +1916,18 @@ DMenu MenuSyscons = {
"Configure your system console settings",
NULL,
{ { "X Exit", "Exit this menu (returning to previous)", NULL, dmenuExit },
+#ifdef PC98
+ { "2 Keymap", "Choose an alternate keyboard map", NULL, dmenuSubmenu, NULL, &MenuSysconsKeymap },
+ { "3 Repeat", "Set the rate at which keys repeat", NULL, dmenuSubmenu, NULL, &MenuSysconsKeyrate },
+ { "4 Saver", "Configure the screen saver", NULL, dmenuSubmenu, NULL, &MenuSysconsSaver },
+#else
{ "2 Font", "Choose an alternate screen font", NULL, dmenuSubmenu, NULL, &MenuSysconsFont },
{ "3 Keymap", "Choose an alternate keyboard map", NULL, dmenuSubmenu, NULL, &MenuSysconsKeymap },
{ "4 Repeat", "Set the rate at which keys repeat", NULL, dmenuSubmenu, NULL, &MenuSysconsKeyrate },
{ "5 Saver", "Configure the screen saver", NULL, dmenuSubmenu, NULL, &MenuSysconsSaver },
{ "6 Screenmap", "Choose an alternate screenmap", NULL, dmenuSubmenu, NULL, &MenuSysconsScrnmap },
{ "7 Ttys", "Choose console terminal type", NULL, dmenuSubmenu, NULL, &MenuSysconsTtys },
+#endif
{ NULL } },
};
@@ -1954,7 +2015,7 @@ DMenu MenuSysconsKeymap = {
{ " USA UNIX", "US traditional UNIX-workstation", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=us.unix" },
{ NULL } },
};
-#endif
+#endif /* PC98 */
DMenu MenuSysconsKeyrate = {
DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
@@ -2004,6 +2065,7 @@ DMenu MenuSysconsSaver = {
{ NULL } },
};
+#ifndef PC98
DMenu MenuSysconsScrnmap = {
DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
"System Console Screenmap",
@@ -2094,6 +2156,7 @@ DMenu MenuSysconsFont = {
"font8x8=swiss-8x8,font8x14=NO,font8x16=swiss-8x16" },
{ NULL } },
};
+#endif /* PC98 */
DMenu MenuUsermgmt = {
DMENU_NORMAL_TYPE,
diff --git a/usr.sbin/sysinstall/sysinstall.h b/usr.sbin/sysinstall/sysinstall.h
index e712be7..4b47541 100644
--- a/usr.sbin/sysinstall/sysinstall.h
+++ b/usr.sbin/sysinstall/sysinstall.h
@@ -379,7 +379,11 @@ extern int BootMgr; /* Which boot manager to use */
extern int StatusLine; /* Where to print our status messages */
extern DMenu MenuInitial; /* Initial installation menu */
extern DMenu MenuFixit; /* Fixit repair menu */
+#ifdef PC98
+extern DMenu MenuIPLType; /* Type of IPL to write on the disk */
+#else
extern DMenu MenuMBRType; /* Type of MBR to write on the disk */
+#endif
extern DMenu MenuConfigure; /* Final configuration menu */
extern DMenu MenuDocumentation; /* Documentation menu */
extern DMenu MenuFTPOptions; /* FTP Installation options */
OpenPOWER on IntegriCloud