Linux-Development-Sys Digest #37, Volume #7 Tue, 10 Aug 99 14:14:05 EDT
Contents:
Re: My first linux program: non-bios boot loader (Etienne Lorrain)
Re: How do I use source RPMs (Richard D. McRoberts)
Re: Device Driver ("Dmitry A. Fedorov")
Problems with interrupt handler (Sven Heursch)
Re: GCC byte alignment flag for structures (Andi Kleen)
nanosleep(), got it (Mogens Dybaek Christensen)
Re: limit ofo processes (Sven Heursch)
Re: RW ATAPI CDROM how to use (Robin Becker)
Re: mmap with Kernel 2.2.5 (Mark Zamonski)
Re: Linux on HP 735 Workstation (Michael Engel)
Linux hangs at reboot after recompiling kernel 2.2.10 (Guilhem Tardy)
Re: Which file systems are write stable on Linux? (Andreas Dilger)
RPC times in Linux (Greg Law)
Re: Linux assembly, etc (Alexander Viro)
Re: Linux hangs at reboot after recompiling kernel 2.2.10 (David T. Blake)
Re: processes (Josef =?iso-8859-1?Q?M=F6llers?=)
Re: the way that users can't move to high directory... (Josef
=?iso-8859-1?Q?M=F6llers?=)
Re: Java (Art Werschulz)
----------------------------------------------------------------------------
From: Etienne Lorrain <[EMAIL PROTECTED]>
Subject: Re: My first linux program: non-bios boot loader
Date: Tue, 10 Aug 1999 10:42:24 +0100
"H. Peter Anvin" wrote:
> Etienne Lorrain <[EMAIL PROTECTED]>
> > By the way, IHMO a bootloader should be able to
> > handle BIOS, EBIOS and IDE interface, and do a checksum
> > of its code to not be modified by a virus, whatever the
> > name of the virus.
>
> Sure, and why not make it make coffee too?
I am not speaking of what "should be nice" here, more on
what "I have done". What is this strange feeling that
absolutely anybody on Internet has read the file "boot.c".
BTW I have read your bootloader software, even if I need
to read it again because I did not understand everything.
> Let's get real here... we're talking about 510 bytes here...
> less if you want to put it in the MBR or on an MS-DOS filesystem.
0x1B6-0x3E=0x178, 376 bytes in decimal.
In this, I have put an simple IDE driver and the BIOS and
EBIOS interface. The IDE driver will not lock if there is
an error, just return with a timeout to restart completely
the execution of the boot sector after displaying an error
message. The software in this 376 bytes can display its
output on the screen or on a serial line using (for the two
cases) the BIOS.
These 376 bytes contains a C structure (see variable "boot1param",
and its type "boot1param_type" in boot.h) to be initialised
by the installer (or automatically created in the "make"
process for one of 1.44M, 720K, 360K, 1.20M, 1.68M, 2.88M floppy),
which will load a list (standart C list with ".next" pointer,
zero terminated) of sector blocks.
Each element of this list is protected by a checksum
(initialised by the "make" process), and if there is a
checksum error the message "CHECKSUM ERROR" is displayed
and the boot process is restarted at its beginning.
The first sector loaded is the (beginning of) the array
containning the sectors to load.
Note that if you are building a floppy boot disk, it will
create an image which is exactly the same as a DOS filesystem,
so once you have done "cat boot.com > /dev/fd0", you can add
files to the floppy with "mcopy some.file a:" or do a
"mdir -a a:" . Any of the disk checking utilities (chkdsk,
scandisk, norton disk doctor, Window NT disk check) see
the floppy as even strange.
If you build the DOS bootloader, you do exactly the same
process but do not load from disk the list of sectors,
that simplify the maintenance.
> Oh... and where would you store the checksum?
For the first sector (376 bytes) at 0x196. This checksum
is just covering the gujin software, not the partition
table (structure bootafter) nor the first bytes of the
first sector (structure bootbefore) to be able to
modify the partitions freely.
The checksums for the different block loaded are stored
in the list, in "header.meaningfull.checksum" of
the pointer (type: bootloader2_type).
> Remember that the virus
> can just as well modify the checksum...
I am afraid, my software is not perfect.
Have a nice day,
Etienne.
------------------------------
From: [EMAIL PROTECTED] (Richard D. McRoberts)
Subject: Re: How do I use source RPMs
Reply-To: [EMAIL PROTECTED]
Date: 10 Aug 1999 06:30:54 -0400
On Tue, 10 Aug 1999 03:25:24 +0100, Robin Becker
<[EMAIL PROTECTED]> wrote:
>I don't understand the source RPM concept. I tried
>rpm -ivh with say the modutils source rpm and get a bunch of files in
>the /usr/src/redhat/SOURCES dir; unfortunately no spec and the tar is
>compressed with bzip2 which wasn't on my RH system originally. How, can
>I get the spec to produce the patched sources? I can use bzip2 ok now I
>just built from my own source, but why the nonsense with this rpm stuff.
The spec file should be in /usr/src/redhat/SPECS. See the RPM-HOWTO
under /usr/doc/HOWTO for lots more information.
The RPM stuff is not nonsense. It's a great way to automate package
building from original sources and the patch files that inevitably
accumulate. And when a Linux system can have 20,000-40,000 files or
more, it's a great way for documenting what files belong to what
packages, managing upgrades and interdependencies, etc.
I have no connection with Red Hat other than as a satisfied user and
admirer of RPM.
--
Richard D. McRoberts
Union, WV USA
[EMAIL PROTECTED]
------------------------------
From: "Dmitry A. Fedorov" <[EMAIL PROTECTED]>
Subject: Re: Device Driver
Date: Tue, 10 Aug 1999 10:30:13 +0000
Adam Meyerowitz wrote:
>
> I am kind of new to linux. I need to grab an interrupt and somehow
> notify the application that the interrupt has occurred. Am I correct
> in thinking that this must be a device driver. How would the device
Yes and such driver already exists:
ftp://ftp.inp.nsk.su/export/fedorov/soft/irq-1.36.tar.gz 15732
(2.0.x kernels only awhile).
> driver communicate with the ring3 app. Under Win 95/98/NT I can
> use events are asynchronous procedure calls. Are these things possible
> in linux. Any help or direction would be appreciated.
Traditional unix has two event delivery mechanisms: good old unix
signals
and select() or poll() system calls. Both of them has some limitations
but
used successfully many years by many programs.
> Is it benefical to use like rtlinux or something like that????
rtlinux is "heavy cannon" and should be used only if other features
are insufficient.
------------------------------
Date: Tue, 10 Aug 1999 12:34:18 +0200
From: Sven Heursch <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Subject: Problems with interrupt handler
Hello,
i have a problem with an interrupt handler. When the interrupt occurs,
I got the following message:
Aiee, killing interrupt handler
Kernel panic: Attempted to kill the idle task!
In interrupt handler - not syncing
I am using the redhat 6.0 distributen with Kernel 2.2.5. The interrupt
handler does nothing else, than sending a sigusr2 to an application.
TIA
S. Heursch
------------------------------
From: Andi Kleen <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: Re: GCC byte alignment flag for structures
Date: 10 Aug 1999 11:38:55 +0200
Michael Meissner <[EMAIL PROTECTED]> writes:
> Matthew Carl Schumaker <[EMAIL PROTECTED]> writes:
>
> > I wish I could except that we have about a dozen apps using this structure
> > distributed to about 600 clients (this problem is server side obviously)
> >
> > recompiling all the apps and distributing them is an absolute last resort
>
> It is still broken to assume a given endian and alignment outside of a given
> system. You really need to think about doing this portably, or your code will
> break for instance when you move it to a 64-bit Merced.
You mean like TCP/IP does with its network order ? <sorry, couldn't resist>
Of course if e.g. all servers/clients are prepared to handle big or little
endian (whatever was chosen) on the wire that is not broken at all, but
a valid design.
He just has to make sure that the programs running on hosts with different
byte sex always convert.
-Andi
--
This is like TV. I don't like TV.
------------------------------
From: Mogens Dybaek Christensen <[EMAIL PROTECTED]>
Subject: nanosleep(), got it
Date: Tue, 10 Aug 1999 13:02:20 +0200
Sorry, it was a typo causing the compilation problem...
--
Mogens Dybaek Christensen | http://www.adtranz-signal.dk
ABB Daimler-Benz Transportation Signal A/S | mailto:[EMAIL PROTECTED]
Stamholmen 193, DK-2650 Hvidovre, Denmark | Phone: +45 3639 0267
------------------------------
Date: Tue, 10 Aug 1999 13:23:01 +0200
From: Sven Heursch <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Crossposted-To: linux.dev.kernel
Subject: Re: limit ofo processes
Robert Nichols wrote:
> In article <[EMAIL PROTECTED]>,
> Sven Heursch <[EMAIL PROTECTED]> wrote:
> :Torbjorn Tallroth wrote:
> :
> :> On Sat, 7 Aug 1999, Sven Heursch wrote:
> :> > in linux kernel the limits of processes on a i386 machine is defined as
> :> > 999. I need more! How can I make the kernel accept that wish?
> :> > (Or: How can I destroy a Zombie process?)
> :> Kill it's parent?
> :>
> :> --
> :> tth
> :
> :no, I can't. The parent creates lot's of processes for a measurement of
> :systemcall fork. Put the zombies increment the count of existing processes.
> :So I need the parent to create more than 2000 processes in a few seconds.
>
> In the parent just do:
>
> signal(SIGCHLD,SIG_IGN);
>
> That tells the kernel you don't care about your children (so much for
> "family values") and it will free up the process table slot as soon as
> each child process terminates.
>
>
I have no idea, but the zombies still exists,
thanx
S. Heursch
------------------------------
From: Robin Becker <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.misc
Subject: Re: RW ATAPI CDROM how to use
Date: Tue, 10 Aug 1999 10:18:10 +0100
In article <[EMAIL PROTECTED]>, Robin Becker
<[EMAIL PROTECTED]> writes
>
>>>Aaron
>>thanks. I got the CDRW ATAPI going with my old homebrew and eventually
>>burned a CD with most (if not all of my stuff). Bridges are now burned
>>and the RH 6.0 is installed. It crashed during the X11 configuration
>>and twice since so I'm a bit unhappy with RH. I see large numbers of
>>rpms in the errata section at www.redhat.com; is there any way to tell
>>what bugs features etc these are intended to replace?
>>
>>And as for the image testing; in the end I made an ext2 loopback file
>>system and shoved everything into that.
>I'm now having trouble with my new RH 6.0 system. I'm using exactly the
>same technique, but during the boot of 2.2.10 I see that the kernel
>still thinks it has access to the cd's as hdc & hdd
>
>I have
>IDE2/ATAPI CDROM off
>SCSI support m
>SCSI emulation m
>SCSI CDROM m
>SCSI GENERIC m
>
>and I can't mount with either device hdc/d or sr0/1; I think the BIOS is
>being used to grab info about the cdroms. This isn't the same as in
>2.0.36.
this is probably related to SCSI support as a module. It works ok if all
are in the kernel at boot time. The scsi stuff can be compiled as a
module, but no probing is done if and when it's loaded. How does one use
this as a module?
--
Robin Becker
------------------------------
From: Mark Zamonski <[EMAIL PROTECTED]>
Subject: Re: mmap with Kernel 2.2.5
Date: Tue, 10 Aug 1999 09:07:12 -0400
Thanks, I cant believe I overlooked that!
ellis wrote:
> In article <[EMAIL PROTECTED]>,
> Mark Zamonski <[EMAIL PROTECTED]> wrote:
>
> >I copied this block of code from the
> >/usr/src/linux-2.2.5/drivers/char/mem.c driver, so I can't figure out
> >why "pgprot_noncached' isn't defined.
>
> Because it is defined as static in mem.c:
>
> static inline unsigned long pgprot_noncached(unsigned long prot)
>
> --
> http://www.fnet.net/~ellis/photo/linux.html
------------------------------
From: Michael Engel <[EMAIL PROTECTED]>
Subject: Re: Linux on HP 735 Workstation
Crossposted-To: alt.os.linux,comp.os.linux.hardware
Date: 10 Aug 99 14:49:38 GMT
In comp.os.linux.hardware Waldemar Born <[EMAIL PROTECTED]> wrote:
: Is there any version of Linux for HP Workstations??
It's under development - see http://www.thepuffingroup.com/parisc/
There is also a Mach Microkernel-based Linux version for PA-RISC
(MkLinux) created by the OSF but the bookmark I have no longer seems
to be valid.
regards,
Michael
--
Michael Engel ([EMAIL PROTECTED])
------------------------------
From: Guilhem Tardy <[EMAIL PROTECTED]>
Subject: Linux hangs at reboot after recompiling kernel 2.2.10
Date: Tue, 10 Aug 1999 11:34:31 -0400
Hi!
I got something strange and couldn't sort it out myself. A little help
is very welcome:
I compiled kernel 2.2.10 with "make bzImage", did all the usual stuff to
get it run (aside of the 2.2.5-15 version from Red-Hat which I have been
using for a month) and rebooted.
First, everything was fine, at the exception of the NFS daemon ("nfssvc:
not implemented"), which is strange because other parts of the NFS
daemon started successfully.
Anyway, while trying to fix that, I recompiled the 2.2.10 again (same
config, still a slightly different resulting kernel file) and did the
usual stuff again.
And now, it hangs at the very start of the boot sequence, after
displaying "LIL-".
It looks like something in the /boot/boot.b (still unchanged since I
installed RH 6.0) or /boot/map, but I couldn't figure it out.
Do you have any idea???
--
Guilhem Tardy phone: (613) 993-8232
Communications Research Center email: [EMAIL PROTECTED]
Network Systems and Technologies web: http://www.crc.ca/
------------------------------
From: [EMAIL PROTECTED] (Andreas Dilger)
Subject: Re: Which file systems are write stable on Linux?
Date: 10 Aug 1999 16:18:01 GMT
In article <[EMAIL PROTECTED]>,
Randall Parker <[EMAIL PROTECTED]> wrote:
>I'd really like to avoid that sort of thing but not at the cost of making
>all writes of all files synchronous. I figure if one could just make all
>the directory writes synchronous then one might lose part of a file that
>never got written but that is not such a big deal. The RDBMS files are
>probably already being written synchronously and at most we'd lose the
>last few transactions.
Unless something is totally wonky, databases that I have seen rarely, if
ever change the names of their data files. Depending on the load, the
transaction logs are created every 30 minutes or more. If you have much
more in the direction of transaction logs being created, maybe you should
increase the max size of the log.
If it is other files that are being created on a rapid basis, then that is
a different issue. I don't think many, if any, JFS filesystems guarantee
consistency of data, only consistency of metadata. I think that one of the
BSDs has what you are looking for in terms of sync metadata updates. There
was a big discussion a few months back about this, with *BSD people saying
that sync metadata was the way to go, while Linux people said that if you
are writing out data blocks it doesn't affect metadata, and if you crash
while writing metadata, it doesn't really matter if you are writing those
out first.
Cheers, Andreas
--
Andreas Dilger University of Calgary \"If a man ate a pound of pasta and
Micronet Research Group \ a pound of antipasto, would they
Dept of Electrical & Computer Engineering \ cancel out, leaving him still
http://www-mddsp.enel.ucalgary.ca/People/adilger/ hungry?" -- Dogbert
------------------------------
From: Greg Law <[EMAIL PROTECTED]>
Subject: RPC times in Linux
Date: Tue, 10 Aug 1999 15:36:46 +0100
Does the lm bench RPC test really test *local* RPC? It seems VERY
expensive if it is (I get ~55,000 cycles). Does anyone know approx how
many cycles linux and BSD take to do a local machine null RPC (i.e. call
another processes and return)?
Thanks,
Greg.
------------------------------
From: [EMAIL PROTECTED] (Alexander Viro)
Crossposted-To: comp.os.linux.development.apps,comp.os.linux.misc
Subject: Re: Linux assembly, etc
Date: 10 Aug 1999 12:37:56 -0400
In article <[EMAIL PROTECTED]>,
Johan Kullstam <[EMAIL PROTECTED]> wrote:
>if you mean that i can't just have a stray pointer in a user program
>go off and tinker with kernel data then, yes it's inaccessible. i
>wish shared libs were also inaccessible in this way too. writing to
>internal structures that do not belong to you is usually a mistake
>(which would be nice to have trapped) or bad style.
Protection granularity is one page. And UNIX assumes two protection levels.
Which is all that x86 gives, BTW - 4 rings are there only if you are working
with segments.
--
Two of my imaginary friends reproduced once ... with negative results.
Ben <[EMAIL PROTECTED]> in ASR
------------------------------
From: [EMAIL PROTECTED] (David T. Blake)
Subject: Re: Linux hangs at reboot after recompiling kernel 2.2.10
Date: 10 Aug 1999 16:34:15 GMT
Reply-To: [EMAIL PROTECTED]
Guilhem Tardy <[EMAIL PROTECTED]> wrote:
> Hi!
>
> I got something strange and couldn't sort it out myself. A little help
> is very welcome:
>
> I compiled kernel 2.2.10 with "make bzImage", did all the usual stuff to
> get it run (aside of the 2.2.5-15 version from Red-Hat which I have been
> using for a month) and rebooted.
> First, everything was fine, at the exception of the NFS daemon ("nfssvc:
> not implemented"),
Check "Prompt for development and/or incomplete code/drivers"
under "Code Maturity Options" in make xconfig, and add
nfs server and nfs version 3 to your network file systems
menu. If you want it to work you should also apply HJ Lu's
patches available at VA Linux where he works.
You might consider running the userspace nfs daemon instead of
the somewhat experimental NFS V3 daemon. There have been reports
of improper behavior.
> Anyway, while trying to fix that, I recompiled the 2.2.10 again (same
> config, still a slightly different resulting kernel file) and did the
> usual stuff again.
> And now, it hangs at the very start of the boot sequence, after
> displaying "LIL-".
> It looks like something in the /boot/boot.b (still unchanged since I
> installed RH 6.0) or /boot/map, but I couldn't figure it out.
> Do you have any idea???
It sounds like you didn't run lilo after copying the bzImage into
/boot/
--
Dave Blake
[EMAIL PROTECTED]
------------------------------
From: Josef =?iso-8859-1?Q?M=F6llers?= <[EMAIL PROTECTED]>
Subject: Re: processes
Date: Tue, 10 Aug 1999 07:49:40 +0200
James Stevenson wrote:
> =
> Hi
> =
> is there a system call under linux to find out what processes are runni=
ng
> or do i need to parse the proc filesystem to get information on other p=
rocesses
That's what the proc filesystem is for.
Josef
-- =
PS Die hier dargestellte Meinung ist die persoenliche Meinung des
Autors!
PS This article reflects the autor=B4s personal views only!
------------------------------
From: Josef =?iso-8859-1?Q?M=F6llers?= <[EMAIL PROTECTED]>
Subject: Re: the way that users can't move to high directory...
Date: Tue, 10 Aug 1999 07:49:19 +0200
"=BC=DB=C0=E7=C8=AB" wrote:
> =
> I want to know the way that the users can't move to the high
> directory....Like Proftp..
> =
> It is very hard to know ...like me....beginner.
> =
> I use Redhat Linux 5.1 and 6.0.
> and webhosting server.
use chroot.
Josef
-- =
PS Die hier dargestellte Meinung ist die persoenliche Meinung des
Autors!
PS This article reflects the autor=B4s personal views only!
------------------------------
Subject: Re: Java
From: Art Werschulz <[EMAIL PROTECTED]>
Date: Tue, 10 Aug 1999 17:21:17 GMT
Hi.
imcpy98 <[EMAIL PROTECTED]> writes:
> I've developed a java program on NT, but I can't get it compiled on Linux.
> I just thought that java is platform independent. Is this concept right?
That is correct. However, you need a Java Development Kit for
compiling and running Java programs. The Linux JDK can be obtained
from http://www.blackdown.org.
--
Art Werschulz (8-{)} "Metaphors be with you." -- bumper sticker
GCS/M (GAT): d? -p+ c++ l u+(-) e--- m* s n+ h f g+ w+ t++ r- y?
Net: [EMAIL PROTECTED] <a href="http://www.dsm.fordham.edu/~agw/">WWW</a>
Phone: Fordham U. (212) 636-6325, Columbia U. (212) 939-7061
------------------------------
** FOR YOUR REFERENCE **
The service address, to which questions about the list itself and requests
to be added to or deleted from it should be directed, is:
Internet: [EMAIL PROTECTED]
You can send mail to the entire list (and comp.os.linux.development.system) via:
Internet: [EMAIL PROTECTED]
Linux may be obtained via one of these FTP sites:
ftp.funet.fi pub/Linux
tsx-11.mit.edu pub/linux
sunsite.unc.edu pub/Linux
End of Linux-Development-System Digest
******************************