Re: z/bzImages, shell scripts

1999-08-28 Thread Stephen Pitts
On Thu, Aug 26, 1999 at 08:00:57PM -0600, Tom Lineman wrote:
 NOTE: I sent this message five minutes before I got my mailing list 
 subscription confirmation.  Since the confirmation message said all my 
 submissions would be returned, and I didn't get this mail back, I am 
 assuming that my mail was discarded...HOWEVER if it was, in fact, accepted 
 and you have already read this message before, please ignore this copy as it 
 is just that: a copy (albeit with this note added).
 
 
 
 Hello there.  I have two questions regarding Debian v.1.3.1
 
 First of all, I'm running a 486 that has two partitions, one for MSDOS
 and one for linux.  Currently, my system boots off of the DOS partition.  To 
 boot to linux, I have to insert my custom boot floppy and boot up.  What I 
 would really like to do is use loadlin to boot to linux, but I really have 
 no specific information concerning bzImages or zImages.  If someone could 
 give me some info or a URL, I would really appreciate that.  One question: 
 would it be possible to use a line somewhat like this:
 loadlin linux root=/dev/hda2 /dev/initrd=root.bin
 so that loadlin boots up using the linux and root.bin files?  Or would 
 it be better to use a zImage?
I'm not sure what you are asking. The 'linux' file is a zImage, a
compressed copy of the kernel. A bzImage is a copy of the kernel that is
large enough to warrant special code to get it in memory. Also, you
don't need to specify /dev/initrd=root.bin, because the kernel will load
its root filesystem from /dev/hda2.


 
 My second question has to do with small shell scripts.  I was reading a book 
 on Unix the other day, and it talked about aliases, which it stated only 
 ran under Berkely *nixes.  I'm guessing that means FreeBSD, NetBSD, OpenBSD, 
 or BSDI, but can Debian linux use aliases, too?  
Not to be pedantic, but aliases are a function of the shell (usually
bash, but sometimes tcsh or zsh). AFAIK, bash (or whatever shell you are
trying to use) runs on all of the above operating systems, so you should
have no problem.

 The reason I'm asking is 
 that I wrote some small shell scripts to make life a little bit easier.  For 
 example, let's say I wanted to make a program called delete that would act 
 like this:
 rm -iv
 so that I could delete a file instead of rm'ing it, like so:
 $ls
 deletethis.zzz
 $delete deletethis.zzz
 Are you sure you want to delete deletethis.zzz? y
 deletethis.zzz deleted
 $ls
 $
 I did that, but every time I ran delete I would get something like this:
 $delete deletethis.zzz
 Parameter not good (not verbatim, but it was close to this)
 use 'rm --help' for more details
 The same thing happened if I tried making scripts containing mv -iv and cp 
 -iv.  What is the problem here, and just as importantly, what is a posssible 
 solution?  
What _exact_ commands are you using to set the aliases?

 P.S. I know this is probably a silly question, but if my CD-ROM drive is the 
 second device on my first IDE Controller, would it be /dev/hdb ?
Yup, you're right on the money. BTW, The only silly questions are the ones 
left unasked.


-- 
Stephen Pitts
[EMAIL PROTECTED]
webmaster - http://www.mschess.org


z/bzImages, shell scripts

1999-08-27 Thread Tom Lineman

Hello there.  I have two questions regarding Debian v.1.3.1

First of all, I'm running a 486 that has two partitions, one for MSDOS
and one for linux.  Currently, my system boots off of the DOS partition.  To 
boot to linux, I have to insert my custom boot floppy and boot up.  What I 
would really like to do is use loadlin to boot to linux, but I really have 
no specific information concerning bzImages or zImages.  If someone could 
give me some info or a URL, I would really appreciate that.  One question: 
would it be possible to use a line somewhat like this:

loadlin linux root=/dev/hda2 /dev/initrd=root.bin
so that loadlin boots up using the linux and root.bin files?  Or would 
it be better to use a zImage?


My second question has to do with small shell scripts.  I was reading a book 
on Unix the other day, and it talked about aliases, which it stated only 
ran under Berkely *nixes.  I'm guessing that means FreeBSD, NetBSD, OpenBSD, 
or BSDI, but can Debian linux use aliases, too?  The reason I'm asking is 
that I wrote some small shell scripts to make life a little bit easier.  For 
example, let's say I wanted to make a program called delete that would act 
like this:

rm -iv
so that I could delete a file instead of rm'ing it, like so:
$ls
deletethis.zzz
$delete deletethis.zzz
Are you sure you want to delete deletethis.zzz? y
deletethis.zzz deleted
$ls
$
I did that, but every time I ran delete I would get something like this:
$delete deletethis.zzz
Parameter not good (not verbatim, but it was close to this)
use 'rm --help' for more details
The same thing happened if I tried making scripts containing mv -iv and cp 
-iv.  What is the problem here, and just as importantly, what is a posssible 
solution?  If Debian supports aliases, would this help me?  Any help on 
either of these two subjects would be grately appreciated.


Sincerely,
Tom Lineman

P.S. I know this is probably a silly question, but if my CD-ROM drive is the 
second device on my first IDE Controller, would it be /dev/hdb ?




___
Get Free Email and Do More On The Web. Visit http://www.msn.com


z/bzImages, shell scripts

1999-08-27 Thread Tom Lineman
NOTE: I sent this message five minutes before I got my mailing list 
subscription confirmation.  Since the confirmation message said all my 
submissions would be returned, and I didn't get this mail back, I am 
assuming that my mail was discarded...HOWEVER if it was, in fact, accepted 
and you have already read this message before, please ignore this copy as it 
is just that: a copy (albeit with this note added).




Hello there.  I have two questions regarding Debian v.1.3.1

First of all, I'm running a 486 that has two partitions, one for MSDOS
and one for linux.  Currently, my system boots off of the DOS partition.  To 
boot to linux, I have to insert my custom boot floppy and boot up.  What I 
would really like to do is use loadlin to boot to linux, but I really have 
no specific information concerning bzImages or zImages.  If someone could 
give me some info or a URL, I would really appreciate that.  One question: 
would it be possible to use a line somewhat like this:

loadlin linux root=/dev/hda2 /dev/initrd=root.bin
so that loadlin boots up using the linux and root.bin files?  Or would 
it be better to use a zImage?


My second question has to do with small shell scripts.  I was reading a book 
on Unix the other day, and it talked about aliases, which it stated only 
ran under Berkely *nixes.  I'm guessing that means FreeBSD, NetBSD, OpenBSD, 
or BSDI, but can Debian linux use aliases, too?  The reason I'm asking is 
that I wrote some small shell scripts to make life a little bit easier.  For 
example, let's say I wanted to make a program called delete that would act 
like this:

rm -iv
so that I could delete a file instead of rm'ing it, like so:
$ls
deletethis.zzz
$delete deletethis.zzz
Are you sure you want to delete deletethis.zzz? y
deletethis.zzz deleted
$ls
$
I did that, but every time I ran delete I would get something like this:
$delete deletethis.zzz
Parameter not good (not verbatim, but it was close to this)
use 'rm --help' for more details
The same thing happened if I tried making scripts containing mv -iv and cp 
-iv.  What is the problem here, and just as importantly, what is a posssible 
solution?  If Debian supports aliases, would this help me?  Any help on 
either of these two subjects would be grately appreciated.


Sincerely,
Tom Lineman

P.S. I know this is probably a silly question, but if my CD-ROM drive is the 
second device on my first IDE Controller, would it be /dev/hdb ?




___
Get Free Email and Do More On The Web. Visit http://www.msn.com


Re: z/bzImages, shell scripts

1999-08-27 Thread David Z. Maze
Tom Lineman [EMAIL PROTECTED] writes:
TL My second question has to do with small shell scripts.  I was
TL reading a book on Unix the other day, and it talked about
TL aliases, which it stated only ran under Berkely *nixes.  I'm
TL guessing that means FreeBSD, NetBSD, OpenBSD, or BSDI, but can
TL Debian linux use aliases, too?

Aliases aren't a function of the kernel, but of the shell that's
executing commands.  To my knowledge, at least ksh, bash, zsh, and
tcsh support shell aliases, and I believe traditional csh does as
well.  This means that these shells will provide aliases on *any*
system that runs them; I routinely use aliases under zsh on Debian
i386 Linux, Sun, and SGI machines.

TL The reason I'm asking is that I wrote some small shell scripts to
TL make life a little bit easier.  For example, let's say I wanted to
TL make a program called delete that would act like this:
TL
TL rm -iv
(with a goal of being able to say delete foo and have it DTRT)

Assuming what I quoted is the entire contents of the shell script, it
won't do what you want.  Whenever you tell the shell delete with any 
parameters, it runs rm -iv with no parameters.  The equivalent shell 
script would be

#!/bin/sh
rm -iv $*

(The $* expands to all of the arguments passed on the command line.)
You could also do this with aliases:

alias delete='rm -iv'

Then the shell replaces delete on the command line with rm -iv, so 
delete foo gets replaced with rm -iv foo, which is what you want.

TL P.S. I know this is probably a silly question, but if my CD-ROM
TL drive is the second device on my first IDE Controller, would it be
TL /dev/hdb ?

Yes.  You can forget this if you make a symbolic link called
/dev/cdrom which points to hdb, and then just use /dev/cdrom when you
want your CD-ROM.

-- 
David Maze [EMAIL PROTECTED]  http://donut.mit.edu/dmaze/
Hey, Doug, do you mind if I push the Emergency Booth Self-Destruct Button?
Oh, sure, Dave, whatever...you _do_ know what that does, right?