Re: Editing the boot menu

2005-06-09 Thread Hanspeter Roth
  On Jun 08 at 17:42, Jos de Paula Rodrigues spoke:

 Did you try using Grub instead? It now supports UFS2, and is a great
 bootloader, with lots of features. You can find it in your ports tree.

Grub is heavy. The FreeBsd boot selector is much more efficient. It
is more suited for an old laptop.

The FreeBsd boot selector allows a one keystroke selection.
Grub forces you to press arrow keys until the curser is over the
desired option.

I put the FreeBsd boot selector into the MBR and for Linux Grub or
Lilo into a primary or extended slice (partition).

-Hanspeter
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Editing the boot menu

2005-06-08 Thread Alejandro Pulver
On Wed, 08 Jun 2005 14:17:37 -0500
Paul Schmehl [EMAIL PROTECTED] wrote:

 When you use FreeBSD's boot manager, you get a menu like this at
 bootup:
 
 F1 DOS
 F2 FreeBSD
 F3 Linux
 F4 ??
 F5 Drive 1
 
 Default: F2
 
 Is there a way to edit the list?  Or is that fixed when boot manager
 is  installed and not configurable?
 
 By edit, I mean, for example, change F4 ?? to F4 MyOS.
 

Hello,

You can try using GAG, a Graphical Boot Loader which does not need a
slice or partition for installing (it uses a special part of the disk,
reserved for things like that), it can be configured while booting,
self uninstalled (restoring the previous bootloader) and supports a lot
of operating systems. Of course, it is free and open-source.

http://gag.sourceforge.net/

It is the *best* bootloader (for booting more than one operating
systems) I have found (I have tried BootMagic, Lilo and Grub).

Best Regards,
Ale
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Editing the boot menu

2005-06-08 Thread José de Paula Rodrigues
On 6/8/05, Paul Schmehl [EMAIL PROTECTED] wrote:
 --On Wednesday, June 08, 2005 16:29:22 -0300 José de Paula Rodrigues
 [EMAIL PROTECTED] wrote:
 
  On 6/8/05, Paul Schmehl [EMAIL PROTECTED] wrote:
  When you use FreeBSD's boot manager, you get a menu like this at bootup:
 
  F1 DOS
  F2 FreeBSD
  F3 Linux
  F4 ??
  F5 Drive 1
 
  Default: F2
 
  Is there a way to edit the list?  Or is that fixed when boot manager is
  installed and not configurable?
 
  By edit, I mean, for example, change F4 ?? to F4 MyOS.
 
 
  man boot0cfg
 
 I *thought* it would go without saying that I had already read man boot0cfg.
 
 Obviously, I missed the part where you edit the menu.  Wanna give me a hint?
 

I'm really sorry I underestimated you, I misunderstood your question
in the first place.

From what I gather, these labels come straight from /boot/boot0, not
from boot0cfg. Looking at the boot0 source code (found at
/usr/src/sys/boot/i386/boot0/boot0.S), you can see that the OS options
are hard-coded into the boot0 program, so there is no way to edit that
other than by changing the source code and recompiling.

Did you try using Grub instead? It now supports UFS2, and is a great
bootloader, with lots of features. You can find it in your ports tree.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Editing the boot menu

2005-06-08 Thread Paul Schmehl
--On Wednesday, June 08, 2005 17:38:36 -0300 Alejandro Pulver 
[EMAIL PROTECTED] wrote:


You can try using GAG, a Graphical Boot Loader which does not need a
slice or partition for installing (it uses a special part of the disk,
reserved for things like that), it can be configured while booting,
self uninstalled (restoring the previous bootloader) and supports a lot
of operating systems. Of course, it is free and open-source.

http://gag.sourceforge.net/

It is the *best* bootloader (for booting more than one operating
systems) I have found (I have tried BootMagic, Lilo and Grub).

I'm not interested in using GAG.  (I have used it before, but don't want to 
in this instance.)


Paul Schmehl ([EMAIL PROTECTED])
Adjunct Information Security Officer
University of Texas at Dallas
AVIEN Founding Member
http://www.utdallas.edu/ir/security/
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Editing the boot menu

2005-06-08 Thread Alex Zbyslaw

Paul Schmehl wrote:


When you use FreeBSD's boot manager, you get a menu like this at bootup:

F1 DOS
F2 FreeBSD
F3 Linux
F4 ??
F5 Drive 1

Default: F2

Is there a way to edit the list?  Or is that fixed when boot manager 
is installed and not configurable?


You have to edit the source.  If you know the hex for the partition type 
then it's reasonably easy.  Below is a simple patch that adds 0x7 (my 
NTFS/Windows) and recognises it as DOS.  Done out of curiosity, more 
than anything.


(From memory...)

cd /usr/src
patch  {patchname}
cd sys/boot/i386/boot0/
make
make install
boot0cfg -B -o packet /dev/{your disk}

Be warned that the final boot0cfg has to be 512 bytes so if you add a 
string it may become longer.  I haven't tested my patch for the serial 
console boot.  The patch incorporates taking out the bell on 
non-serial-console boots as well (pinched from somewhere else, now 
forgotten) -- it was just annoying.  The patch comes with no warranties, 
but it's working for me.  (I don't promise either that including it here 
won't bu**er up the spaces/tabs).


Of course, once you applied and rebuilt you have to write it to your 
boot sector.  Man boot0cfg and don't forget -o packet if your partitions 
go past cylinder 1024.  And have a FreebSD boot CD handy so you can 
rewrite with a standard one if this doesn't work!


The final problem is that if you use cvsup it will trash all over any 
source changes you make when you next run it.  Doing anything about that 
seems more complicated than can be justified for a small number of 
patches so I just keep them in a separate dir an re-apply them whenever 
I need to.  In this case, it will be just after I reaslise that I've 
installed a beeping boot manager again :-)


--Alex

PS just spotted the -m flag to boo0cfg for the first time.  Amazing what 
you find when you read the man pages :-)




--- sys/boot/i386/boot0/boot0.S.origWed Jan 26 19:11:21 2005
+++ sys/boot/i386/boot0/boot0.S Thu May 26 00:51:34 2005
@@ -29,7 +29,7 @@
.set PRT_OFF,0x1be  # Partition table
 
.set TBL0SZ,0x3 # Table 0 size
-   .set TBL1SZ,0xb # Table 1 size
+   .set TBL1SZ,0xc # Table 1 size
 
.set MAGIC,0xaa55   # Magic: bootable
.set B0MAGIC,0xbb66 # Identification
@@ -201,9 +201,13 @@
 /*
  * Start of input loop.  Beep and take note of time
  */
+#ifdef SIO
 main.10:   movb $ASCII_BEL,%al # Signal
callw putchr#  beep!
xorb %ah,%ah# BIOS: Get
+#else
+main.10:   xorb %ah,%ah# BIOS: Get
+#endif /* SIO */
int $0x1a   #  system time
movw %dx,%di# Ticks when
addw _TICKS(%bp),%di#  timeout
@@ -409,7 +413,7 @@
 /*
  * These values indicate bootable types we know the names of.
  */
-   .byte 0x1, 0x4, 0x6, 0xb, 0xc, 0xe, 0x83
+   .byte 0x1, 0x4, 0x6, 0x7, 0xb, 0xc, 0xe, 0x83
.byte 0x9f, 0xa5, 0xa6, 0xa9
 /*
  * These are offsets that match the known names above and point to the strings
@@ -419,6 +423,7 @@
.byte os_dos-.  # DOS
.byte os_dos-.  # DOS
.byte os_dos-.  # DOS
+   .byte os_dos-.  # Windows
.byte os_dos-.  # Windows
.byte os_dos-.  # Windows
.byte os_dos-.  # Windows
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]

Re: Editing the boot menu

2005-06-08 Thread Hanspeter Roth
  On Jun 08 at 14:17, Paul Schmehl spoke:

 When you use FreeBSD's boot manager, you get a menu like this at bootup:
 
 F1 DOS
 F2 FreeBSD
 F3 Linux
 F4 ??
 F5 Drive 1
 
 Default: F2
 
 Is there a way to edit the list?  Or is that fixed when boot manager is 
 installed and not configurable?
 
 By edit, I mean, for example, change F4 ?? to F4 MyOS.

This boot selector has no configuration file. It resides within the
512 Byte MBR.
You may change Lables by editing
/usr/src/sys/boot/i386/boot0/boot0.S.
It's probably easier if you don't touch the length of the label.
After making boot0 copy it to /boot and run boot0cfg.

-Hanspeter
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Editing the boot menu

2005-06-08 Thread Paul Schmehl
--On Wednesday, June 08, 2005 17:42:44 -0300 José de Paula Rodrigues 
[EMAIL PROTECTED] wrote:



From what I gather, these labels come straight from /boot/boot0, not

from boot0cfg. Looking at the boot0 source code (found at
/usr/src/sys/boot/i386/boot0/boot0.S), you can see that the OS options
are hard-coded into the boot0 program, so there is no way to edit that
other than by changing the source code and recompiling.


I see that now.  Thanks for pointing that out.


Did you try using Grub instead? It now supports UFS2, and is a great
bootloader, with lots of features. You can find it in your ports tree.


It's not that big of an issue.  It's just my workstation, and I know what 
?? means.  I was just being anal.  I like to straighten out twisted phone 
cords too.


Paul Schmehl ([EMAIL PROTECTED])
Adjunct Information Security Officer
University of Texas at Dallas
AVIEN Founding Member
http://www.utdallas.edu/ir/security/
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Editing the boot menu

2005-06-08 Thread Remington L
Just use grub, much easier and more flexible

On 6/8/05, Paul Schmehl [EMAIL PROTECTED] wrote:
 
 --On Wednesday, June 08, 2005 17:42:44 -0300 José de Paula Rodrigues
 [EMAIL PROTECTED] wrote:
 
  From what I gather, these labels come straight from /boot/boot0, not
  from boot0cfg. Looking at the boot0 source code (found at
  /usr/src/sys/boot/i386/boot0/boot0.S), you can see that the OS options
  are hard-coded into the boot0 program, so there is no way to edit that
  other than by changing the source code and recompiling.
 
 I see that now. Thanks for pointing that out.
 
  Did you try using Grub instead? It now supports UFS2, and is a great
  bootloader, with lots of features. You can find it in your ports tree.
 
 It's not that big of an issue. It's just my workstation, and I know what
 ?? means. I was just being anal. I like to straighten out twisted phone
 cords too.
 
 Paul Schmehl ([EMAIL PROTECTED])
 Adjunct Information Security Officer
 University of Texas at Dallas
 AVIEN Founding Member
 http://www.utdallas.edu/ir/security/
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to 
 [EMAIL PROTECTED]

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Editing the boot menu

2005-06-08 Thread Paul Schmehl

When you use FreeBSD's boot manager, you get a menu like this at bootup:

F1 DOS
F2 FreeBSD
F3 Linux
F4 ??
F5 Drive 1

Default: F2

Is there a way to edit the list?  Or is that fixed when boot manager is 
installed and not configurable?


By edit, I mean, for example, change F4 ?? to F4 MyOS.

Paul Schmehl ([EMAIL PROTECTED])
Adjunct Information Security Officer
University of Texas at Dallas
AVIEN Founding Member
http://www.utdallas.edu/ir/security/
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Editing the boot menu

2005-06-08 Thread José de Paula Rodrigues
On 6/8/05, Paul Schmehl [EMAIL PROTECTED] wrote:
 When you use FreeBSD's boot manager, you get a menu like this at bootup:
 
 F1 DOS
 F2 FreeBSD
 F3 Linux
 F4 ??
 F5 Drive 1
 
 Default: F2
 
 Is there a way to edit the list?  Or is that fixed when boot manager is
 installed and not configurable?
 
 By edit, I mean, for example, change F4 ?? to F4 MyOS.


man boot0cfg

HTH
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Editing the boot menu

2005-06-08 Thread Paul Schmehl
--On Wednesday, June 08, 2005 16:29:22 -0300 José de Paula Rodrigues 
[EMAIL PROTECTED] wrote:



On 6/8/05, Paul Schmehl [EMAIL PROTECTED] wrote:

When you use FreeBSD's boot manager, you get a menu like this at bootup:

F1 DOS
F2 FreeBSD
F3 Linux
F4 ??
F5 Drive 1

Default: F2

Is there a way to edit the list?  Or is that fixed when boot manager is
installed and not configurable?

By edit, I mean, for example, change F4 ?? to F4 MyOS.



man boot0cfg


I *thought* it would go without saying that I had already read man boot0cfg.

Obviously, I missed the part where you edit the menu.  Wanna give me a hint?

uname -imr
5.4-RELEASE i386 GENERIC

boot0cfg -v /dev/ad4
#   flag start chs   type   end chs   offset size
1   0x00  0:  1: 1   0x07   1023:254:63   63204796557
2   0x80   1023:255:63   0xa5   1023:254:63204796620283482990

version=1.0  drive=0x80  mask=0xf  ticks=182
options=packet,update,nosetdrv
default_selection=F2 (Slice 2)

The options for boot0cfg are:

-B  Install the `boot0' boot manager.  This option causes MBR code 
to

be replaced, without affecting the embedded slice table.

I don't need to install it.

-b boot0
Specify which `boot0' image to use.  The default is /boot/boot0
which will use the video card as output, alternatively
/boot/boot0sio can be used for output to the COM1 port.  (Be
aware that nothing will be output to the COM1 port unless the
modem signals DSR and CTS are active.)

I don't need to specify the boot image.

-d drive
Specify the drive number used by the PC BIOS in referencing the
drive which contains the specified disk.  Typically this will 
be

0x80 for the first hard drive, 0x81 for the second hard drive,
and so on; however any integer between 0 and 0xff is acceptable
here.

I don't need to specify the drive.

-f file
Specify that a backup copy of the preexisting MBR should be 
writ-

ten to file.  This file is created if it does not exist, and
replaced if it does.

I don't need to make a backup copy.

-m mask
Specify slices to be enabled/disabled, where mask is an integer
between 0 (no slices enabled) and 0xf (all four slices 
enabled).


The correct slices are already enabled.  The system boots fine to either OS.

-o options
A comma-separated string of any of the following options may be
specified (with ``no'' prepended as necessary):

The default options are being used, and I see no reason to change them.

packet  Use the disk packet (BIOS INT 0x13 extensions) 
interface,
as opposed to the legacy (CHS) interface, when doing 
disk

I/O.  This allows booting above cylinder 1023, but
requires specific BIOS support.  The default is
`nopacket'.

setdrv  Forces the drive containing the disk to be referenced
using drive number definable by means of the -d option.
The default is `nosetdrv'.

update  Allow the MBR to be updated by the boot manager.  (The

update  Allow the MBR to be updated by the boot manager.  (The
MBR may be updated to flag slices as `active', and to
save slice selection information.)  This is the 
default;
a `noupdate' option causes the MBR to be treated as 
read-

only.

-s slice
Set the default boot selection to slice.  Values between 1 and 
4

refer to slices; a value of 5 refers to the option of booting
from a second disk.

The default slice is determined by the last boot.  I see no reason to 
change that.


-t ticks
Set the timeout value to ticks.  (There are approximately 18.2
ticks per second.)

The timeout is set to 10, and I see no reason to change that.

-v  Verbose: display information about the slices defined, etc.

Self-explanatory.

So where is the switch that I use to edit the menu?

Paul Schmehl ([EMAIL PROTECTED])
Adjunct Information Security Officer
University of Texas at Dallas
AVIEN Founding Member
http://www.utdallas.edu/ir/security/
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]