Re: Reading a text file with BTX

1999-02-04 Thread Ugo Paternostro
On 04-Feb-99 Robert Nordier wrote about Re: Reading a text file with BTX:
  Right on the mark. BTW, my BIOS is set so the cd drive is searched
  before the hd on boot. Could that be the cause?
  
  Seems a reasonable assumption, but I don't know for sure.
 
 It is.
 
 Proof?

I simply meant that it happened to me once on a 586 FX M/B: it disappeared when
I selected C/CDROM/A as the drive to boot from in the BIOS. I cannot remember
the version of the BootManager I tried, if that means anything.

 Robert Nordier

Bye, UP


To Unsubscribe: send mail to majord...@freebsd.org
with unsubscribe freebsd-current in the body of the message


Re: Reading a text file with BTX

1999-02-03 Thread Ugo Paternostro
On 30-Jan-99 Robert Nordier wrote about Re: Reading a text file with BTX:
 Daniel C. Sobral wrote:
 Robert Nordier wrote:
  
  Daniel C. Sobral wrote:
  
   Y'know, in my computer that F5 is Drive 0, and the system will not
   boot unless I select it first. Selecting it, makes the OSes boot and
   F5 disappear.
 
 Right on the mark. BTW, my BIOS is set so the cd drive is searched
 before the hd on boot. Could that be the cause?
 
 Seems a reasonable assumption, but I don't know for sure.

It is.

 Robert Nordier

Bye, UP


To Unsubscribe: send mail to majord...@freebsd.org
with unsubscribe freebsd-current in the body of the message


Re: Reading a text file with BTX

1999-02-03 Thread Robert Nordier
Ugo Paternostro wrote:
 On 30-Jan-99 Robert Nordier wrote about Re: Reading a text file with BTX:
  Daniel C. Sobral wrote:
  Robert Nordier wrote:
   
   Daniel C. Sobral wrote:
   
Y'know, in my computer that F5 is Drive 0, and the system will not
boot unless I select it first. Selecting it, makes the OSes boot and
F5 disappear.
  
  Right on the mark. BTW, my BIOS is set so the cd drive is searched
  before the hd on boot. Could that be the cause?
  
  Seems a reasonable assumption, but I don't know for sure.
 
 It is.

Proof?

-- 
Robert Nordier

To Unsubscribe: send mail to majord...@freebsd.org
with unsubscribe freebsd-current in the body of the message


Re: Reading a text file with BTX

1999-01-31 Thread Mike Smith
 Is there a way to view the contents of a text file (specifically,
 /boot/loader.rc) with BTX?  Now that there are all these nifty new modules,
 my kernel is a lot smaller and my /boot/loader.rc is a lot longer.  The way
 I have my /boot/loader.rc setup is such that it unloads everythin
 automatically loaded if I drop to the BTX prompt instead of autobooting.
 This is fairly convenient except when I want to boot an alternate kernel but
 still load all the same modules that I use in my default kernel.  If there
 isn't such a feature, it would be really nice if there were a 'cat' command
 or something along those lines so that I could read the contents of
 /boot/loader.rc and get everything properly reloaded by hand.  Could it be
 added or could I just make my own somehow?  Thanks a bunch.

Perhaps try something like:

@set kernelname=kernel
@read -t 5 -p Enter kernel name [kernel] :  kernelname
@load $kernelname
@include /boot/modules.default
-include /boot/modules.$kernelname
@autoboot 5

The 'include' commands make it easier to keep your module sets 
organised, should you want to do that.

-- 
\\  Sometimes you're ahead,   \\  Mike Smith
\\  sometimes you're behind.  \\  m...@smith.net.au
\\  The race is long, and in the  \\  msm...@freebsd.org
\\  end it's only with yourself.  \\  msm...@cdrom.com



To Unsubscribe: send mail to majord...@freebsd.org
with unsubscribe freebsd-current in the body of the message


Re: Reading a text file with BTX

1999-01-31 Thread Daniel C. Sobral
I'd like to suggest that nobody depends on the exact syntax below.
Using @ at the beginning of the lines is EVIL, and has to go away.
Well, for *this* purpose, at least. Likewise, - at the beginning of
the line is also very evil. Very, very evil.

I have now, at last, a fully working version of include for forth
source code. With that, we are finally able to actually *use* ficl
in loader.rc and the likes. The down side, of course, is that we
ought to stop treating things included as special cases of builtin
only with special semantics. We get more power, but a few
concessions must be mude. Specifically, @, # and -.

Mike Smith wrote:
 
 Perhaps try something like:
 
 @set kernelname=kernel
 @read -t 5 -p Enter kernel name [kernel] :  kernelname
 @load $kernelname
 @include /boot/modules.default
 -include /boot/modules.$kernelname
 @autoboot 5
 
 The 'include' commands make it easier to keep your module sets
 organised, should you want to do that.

And include is also recursive. Or, at least, it should be. :-) There
is something smelly with the way errors are being treated, though it
might not show up in the current version because it's recursive
chain doesn't include bf_run().

Anyway, the above could be coded like this in my current version of
loader:

\ loader.rc
\ -- This is the new character for comments
set kernelname=kernel   \ Don't echo is now default
read -t 5 -p Enter kernel name [kernel] :  kernelname
load ${kernelname}  \ I thought {} was required
include /boot/modules.default
~ include /boot/modules.$kernelname \ And this is the new way 
\ of ignoring errors
autoboot 5

But the bottom line is that @#- are evil and must go away. :-) I
even thought of preemptively removing then from loader.help, so
nobody would get used to them... :-)

--
Daniel C. Sobral(8-DCS)
d...@newsguy.com

Would you mind not shooting at the thermonuclear weapons?



To Unsubscribe: send mail to majord...@freebsd.org
with unsubscribe freebsd-current in the body of the message


Re: Reading a text file with BTX

1999-01-31 Thread Patrick Hartling
Mike Smith m...@smith.net.au wrote:

}  Is there a way to view the contents of a text file (specifically,
}  /boot/loader.rc) with BTX?  Now that there are all these nifty new modules,
}  my kernel is a lot smaller and my /boot/loader.rc is a lot longer.  The way
}  I have my /boot/loader.rc setup is such that it unloads everythin
}  automatically loaded if I drop to the BTX prompt instead of autobooting.
}  This is fairly convenient except when I want to boot an alternate kernel but
}  still load all the same modules that I use in my default kernel.  If there
}  isn't such a feature, it would be really nice if there were a 'cat' command
}  or something along those lines so that I could read the contents of
}  /boot/loader.rc and get everything properly reloaded by hand.  Could it be
}  added or could I just make my own somehow?  Thanks a bunch.
} 
} Perhaps try something like:
} 
} @set kernelname=kernel
} @read -t 5 -p Enter kernel name [kernel] :  kernelname
} @load $kernelname
} @include /boot/modules.default
} -include /boot/modules.$kernelname
} @autoboot 5
} 
} The 'include' commands make it easier to keep your module sets 
} organised, should you want to do that.

That looks great to me.  I was thinking that something like the above would
probably be necessary, but I haven't learned Forth yet.  This should be just
what I need though.  Thanks!

 -Patrick


Patrick L. Hartling | Research Assistant, ICEMT
myst...@friley-184-92.res.iastate.edu   | Carver Lab - 0095E Black Engineering
http://www.public.iastate.edu/~oz/  | http://www.icemt.iastate.edu/

To Unsubscribe: send mail to majord...@freebsd.org
with unsubscribe freebsd-current in the body of the message


Re: Reading a text file with BTX

1999-01-31 Thread Daniel C. Sobral
Patrick Hartling wrote:
 
 } @set kernelname=kernel
 } @read -t 5 -p Enter kernel name [kernel] :  kernelname
 } @load $kernelname
 } @include /boot/modules.default
 } -include /boot/modules.$kernelname
 } @autoboot 5
 
 That looks great to me.  I was thinking that something like the above would
 probably be necessary, but I haven't learned Forth yet.  This should be just
 what I need though.  Thanks!

As it happens, none of the above include forth... :-) Include
hasn't been taught forth yet. Well, not on -current, anyway.

--
Daniel C. Sobral(8-DCS)
d...@newsguy.com

Would you mind not shooting at the thermonuclear weapons?


To Unsubscribe: send mail to majord...@freebsd.org
with unsubscribe freebsd-current in the body of the message


Re: Reading a text file with BTX

1999-01-30 Thread Robert Nordier
Daniel C. Sobral wrote:
 Robert Nordier wrote:
  
  The boot manager menu, for example
  
  F1   FreeBSD
  F2   UNIX
  F5   Drive 1
  
  Default: F1
 
 Y'know, in my computer that F5 is Drive 0, and the system will not
 boot unless I select it first. Selecting it, makes the OSes boot and
 F5 disappear.

Try the following patch.  You can use the utility

http://www.freebsd.org/~rnordier/boot0inst-1.0.2.tar.gz

to install it.

Index: boot0.s
===
RCS file: /home/ncvs/src/sys/boot/i386/boot0/boot0.s,v
retrieving revision 1.6
diff -u -r1.6 boot0.s
--- boot0.s 1998/12/05 11:58:33 1.6
+++ boot0.s 1999/01/30 08:45:58
@@ -60,7 +60,8 @@
incb1(-0xe,_di_)# Sector number
jmpnwi(main-LOAD+ORIGIN)# To relocated code
 
-main:  movbr1(_dl,_FAKE,_bp_)  # Save drive number
+main:  movb $0x80,%dl  # Set drive number
+   movbr1(_dl,_FAKE,_bp_)  # Save drive number
callwi(putn)# To new line
movwir(partbl,_bx)  # Partition table
xorl %edx,%edx  # Item

-- 
Robert Nordier

To Unsubscribe: send mail to majord...@freebsd.org
with unsubscribe freebsd-current in the body of the message


Re: Reading a text file with BTX

1999-01-30 Thread Daniel C. Sobral
Robert Nordier wrote:
 
 Daniel C. Sobral wrote:
 
  Y'know, in my computer that F5 is Drive 0, and the system will not
  boot unless I select it first. Selecting it, makes the OSes boot and
  F5 disappear.
 
 Try the following patch.  You can use the utility
[...]

Right on the mark. BTW, my BIOS is set so the cd drive is searched
before the hd on boot. Could that be the cause?

--
Daniel C. Sobral(8-DCS)
d...@newsguy.com

Would you mind not shooting at the thermonuclear weapons?



To Unsubscribe: send mail to majord...@freebsd.org
with unsubscribe freebsd-current in the body of the message


Re: Reading a text file with BTX

1999-01-30 Thread Robert Nordier
Daniel C. Sobral wrote:
 Robert Nordier wrote:
  
  Daniel C. Sobral wrote:
  
   Y'know, in my computer that F5 is Drive 0, and the system will not
   boot unless I select it first. Selecting it, makes the OSes boot and
   F5 disappear.
  
  Try the following patch.  You can use the utility
 [...]
 
 Right on the mark. BTW, my BIOS is set so the cd drive is searched
 before the hd on boot. Could that be the cause?

Seems a reasonable assumption, but I don't know for sure.

-- 
Robert Nordier

To Unsubscribe: send mail to majord...@freebsd.org
with unsubscribe freebsd-current in the body of the message


Re: Reading a text file with BTX

1999-01-29 Thread Daniel C. Sobral
Robert Nordier wrote:
 
 The boot manager menu, for example
 
 F1   FreeBSD
 F2   UNIX
 F5   Drive 1
 
 Default: F1

Y'know, in my computer that F5 is Drive 0, and the system will not
boot unless I select it first. Selecting it, makes the OSes boot and
F5 disappear.

--
Daniel C. Sobral(8-DCS)
d...@newsguy.com

If you sell your soul to the Devil and all you get is an MCSE from
it, you haven't gotten market rate.

To Unsubscribe: send mail to majord...@freebsd.org
with unsubscribe freebsd-current in the body of the message


Re: Reading a text file with BTX

1999-01-28 Thread Daniel C. Sobral
Patrick Hartling wrote:
 
 Is there a way to view the contents of a text file (specifically,
 /boot/loader.rc) with BTX?  Now that there are all these nifty new modules,
 my kernel is a lot smaller and my /boot/loader.rc is a lot longer.  The way
 I have my /boot/loader.rc setup is such that it unloads everythin
 automatically loaded if I drop to the BTX prompt instead of autobooting.
 This is fairly convenient except when I want to boot an alternate kernel but
 still load all the same modules that I use in my default kernel.  If there
 isn't such a feature, it would be really nice if there were a 'cat' command
 or something along those lines so that I could read the contents of
 /boot/loader.rc and get everything properly reloaded by hand.  Could it be
 added or could I just make my own somehow?  Thanks a bunch.

You might be refering to the loader prompt, not the btx prompt. If
you type something as soon as the first | is shown, that's btx. If
you wait a little, or enter /boot/loader, then you get loader.
Specifically, if it has processed loader.rc, then you are inside
loader, not btx.

Loader has a command called autoboot, which runs by default with
10 seconds wait. This one shows a countdown of seconds. If you
interrupt here, you are in loader.

Now, I don't know about btx, but here is what is in for you with
loader...

Conditional loading is possible, though Mike committed it to
RELENG_3 instead of -current, and has not corrected that yet.
bin/9662, in case you want. You can put that code inside
/boot/boot.4th, and it will be loaded before loader.rc, so you
*could* use it inside loader.rc. Unfortunately, *that* still doesn't
work. I have it almost working on my system. I think I'm down to the
last bug (I think that because it works perfectly as long as no
error happens inside the script).

Showing contents of a file happens to be possible too, as soon as
bin/9753 gets in. Jordan promised cat and more for us, but since he
is too busy with his update targets, I decided to get more in. :-)

--
Daniel C. Sobral(8-DCS)
d...@newsguy.com

If you sell your soul to the Devil and all you get is an MCSE from
it, you haven't gotten market rate.


To Unsubscribe: send mail to majord...@freebsd.org
with unsubscribe freebsd-current in the body of the message


Re: Reading a text file with BTX

1999-01-28 Thread Patrick Hartling
Daniel C. Sobral d...@newsguy.com wrote:

} Patrick Hartling wrote:
}  
}  Is there a way to view the contents of a text file (specifically,
}  /boot/loader.rc) with BTX?  Now that there are all these nifty new modules,
}  my kernel is a lot smaller and my /boot/loader.rc is a lot longer.  The way
}  I have my /boot/loader.rc setup is such that it unloads everythin
}  automatically loaded if I drop to the BTX prompt instead of autobooting.
}  This is fairly convenient except when I want to boot an alternate kernel but
}  still load all the same modules that I use in my default kernel.  If there
}  isn't such a feature, it would be really nice if there were a 'cat' command
}  or something along those lines so that I could read the contents of
}  /boot/loader.rc and get everything properly reloaded by hand.  Could it be
}  added or could I just make my own somehow?  Thanks a bunch.
} 
} You might be refering to the loader prompt, not the btx prompt. If
} you type something as soon as the first | is shown, that's btx. If
} you wait a little, or enter /boot/loader, then you get loader.
} Specifically, if it has processed loader.rc, then you are inside
} loader, not btx.

Ah, I see.  Sorry for using the wrong name, but you did figure out what I
meant which is good.  :)

} Showing contents of a file happens to be possible too, as soon as
} bin/9753 gets in. Jordan promised cat and more for us, but since he
} is too busy with his update targets, I decided to get more in. :-)

Cool beans, that's what I was curious about.  Thanks for the info.

 -Patrick


Patrick L. Hartling | Research Assistant, ICEMT
myst...@friley-184-92.res.iastate.edu   | Carver Lab - 0095E Black Engineering
http://www.public.iastate.edu/~oz/  | http://www.icemt.iastate.edu/

To Unsubscribe: send mail to majord...@freebsd.org
with unsubscribe freebsd-current in the body of the message


Re: Reading a text file with BTX

1999-01-28 Thread Mike Smith
 Patrick Hartling wrote:
  
  Is there a way to view the contents of a text file (specifically,
  /boot/loader.rc) with BTX?  Now that there are all these nifty new modules,
...
 You might be refering to the loader prompt, not the btx prompt. If
 you type something as soon as the first | is shown, that's btx. If
 you wait a little, or enter /boot/loader, then you get loader.
 Specifically, if it has processed loader.rc, then you are inside
 loader, not btx.

Ugh.  No.  BTX is the kernel that boot2 and the loader use.  

boot0 is the module that gives you the F? prompt
boot1 is invisible, it just loads boot2
boot2 spins the | to begin with, and if you hit a key while it's paused,
  you get it's prompt 'boot:', it starts the loader.

 Conditional loading is possible, though Mike committed it to
 RELENG_3 instead of -current, and has not corrected that yet.

Gah.  Thanks for the PR reference.

-- 
\\  Sometimes you're ahead,   \\  Mike Smith
\\  sometimes you're behind.  \\  m...@smith.net.au
\\  The race is long, and in the  \\  msm...@freebsd.org
\\  end it's only with yourself.  \\  msm...@cdrom.com



To Unsubscribe: send mail to majord...@freebsd.org
with unsubscribe freebsd-current in the body of the message


Re: Reading a text file with BTX

1999-01-28 Thread Daniel C. Sobral
Mike Smith wrote:
 
 Ugh.  No.  BTX is the kernel that boot2 and the loader use.

Well, that much I knew... It's just that I took to calling boot2 as
btx... :-)

 boot0 is the module that gives you the F? prompt

What F? prompt???

 boot1 is invisible, it just loads boot2
 boot2 spins the | to begin with, and if you hit a key while it's paused,
   you get it's prompt 'boot:', it starts the loader.

Thanks. I have a clearer idea of it now. In which part of the disk
each one of these resides?

--
Daniel C. Sobral(8-DCS)
d...@newsguy.com

If you sell your soul to the Devil and all you get is an MCSE from
it, you haven't gotten market rate.

To Unsubscribe: send mail to majord...@freebsd.org
with unsubscribe freebsd-current in the body of the message


Re: Reading a text file with BTX

1999-01-28 Thread Robert Nordier
Daniel C. Sobral wrote:

 Mike Smith wrote:

  boot0 is the module that gives you the F? prompt
 
 What F? prompt???

The boot manager menu, for example

F1   FreeBSD
F2   UNIX
F5   Drive 1

Default: F1

  boot1 is invisible, it just loads boot2
  boot2 spins the | to begin with, and if you hit a key while it's paused,
you get it's prompt 'boot:', it starts the loader.
 
 Thanks. I have a clearer idea of it now. In which part of the disk
 each one of these resides?

boot0 occupies the master boot record (sector 0 of the disk).  Only
sliced disks (not dangerously dedicated) have a proper mbr.

boot1 and boot2 occupy the boot blocks (the first 8K sectors of a ufs
partition) with the default being the 'a' partition.

-- 
Robert Nordier

To Unsubscribe: send mail to majord...@freebsd.org
with unsubscribe freebsd-current in the body of the message