Linux-Development-Sys Digest #688, Volume #8      Thu, 3 May 01 12:13:20 EDT

Contents:
  Re: Lilo pble with RH 7.1 (MBR corrupted) (Kasper Dupont)
  Re: Lilo pble with RH 7.1 (MBR corrupted) (Moritz Franosch)
  Re: malloc Bug? (Torsten Blank)
  Re: malloc Bug? (Torsten Blank)
  how to register a pci device? (Ronnie Arosa Carril)
  Re: Startup service ("Darren")
  Re: ???how to get bus-address of the PCI hardware device ("Norm Dresner")
  Re: how to register a pci device? ("Norm Dresner")
  Re: how to register a pci device? (Ronnie Arosa Carril)
  Re: malloc Bug? ([EMAIL PROTECTED])
  Gigabyte GA-6vxdr7 dual p3 barfs on 2.2.17 (Dean Carpenter)
  Is there a limit of the number of kernel modules? ("Pei Zheng")
  How can I get the IP of eth0? ("Andreas Egner")
  Re: how to register a pci device? (Grant Edwards)
  Interprocess Communication...help.... (Karim Atiki)
  Re: Interprocess Communication...help....

----------------------------------------------------------------------------

From: Kasper Dupont <[EMAIL PROTECTED]>
Subject: Re: Lilo pble with RH 7.1 (MBR corrupted)
Date: Thu, 03 May 2001 10:12:48 +0000

buffat wrote:
> 
> I have installed the new Redhat 7.1 on a working linux system running RH
> 7.0  (Athlon 750 , 256 M Ram, 3 IDE disk). During the installation a CDROM
> problem hang the process of the update, and I had to reinstall (update)
> RH 7.1. But this time the MBR record was corrupted and I am unable to
> restore it. My system is now running, but only with a lilo boot floppy.
> Otherwise I get the infamous LI when starting from the 1st ide (15 Giga
> Maxtor UDMA 66). I have try to restore the MBR from window with fdisk /MBR
> but without success. I have try to copy the boot (boot.0300) file save by
> lilo to the MBR with dd, without success. I have even try to fill the MBR
> with 0, but it erase the partition table on my disk, and I have to do a
> recovery. I have try to put all the boot directory on the 1st partition of
> the disk (WIN98 partition), as the Linux root partition is on the 2nd ide
> disk.
> My question is: how can I put a new MBR on my ide0 disk (5 Giga Maxtor UDMA
> 66), in order to boot again directly from disk.
> Any advice will be appreciated.
> --
> Marc BUFFAT, Pr. Universite Claude Bernard LYON I
> tel:  (33) 04/72/43/10/05 (UCBL)
> fax:  (33) 04/72/44/80/54
> [EMAIL PROTECTED] | http://mecapar.univ-lyon1.fr

The MBR has to parts, the first part is code to load next
stage loader, the second part is the primary partition table.

Executing fdisk /MBR under DOS will write some standard code
to the MBR. The standard code will search for ONE active
partition in the table at the end of the MBR, it will then
load and execute the first sector of that partition.

LILO can be installed in different ways, you can install
LILO in the MBR in which case the code written by DOS will
be overwritten. You can also install LILO on a primary
partition, in which case the standard code in the MBR will
run first and load the LILO code which runs next.

If you actually get the L printed to the screen it means
that the first sector of LILO was loaded and executed, this
means that there for sure is no problem with the code in the
MBR. LILO does not use the table in the MBR during boot, but
uses the partition table known by Linux when installing, if
Linux sees partitions correctly there is not a problem with
the partition table either.

Using the original BIOS disk access interface you will get
trouble accessing data beyond some limit. The limit depends
on lots of parameters but will be in the range from 32MB -
8064MB.

If you are using a new BIOS with the extended interface and
a new version of LILO configured to use this interface the
limit will be removed, and CHS geometry will no longer be
used.

The best way to avoid problems is to create a small partiton
at the start of the disk. That could be the first 31MB of
the disk and mounted as /boot. That would require moving any
DOS partition of one such is present. The layout could then
look similar to this:

+-------------------------+
|  31 MB /boot            |
+-------------------------+
|   1 GB C:               |
+-------------------------+
|     Extended            |
|  +-------------------+  |
|  |  512 MB SWAP      |  |
|  +-------------------+  |
|  |    /              |  |
|  +-------------------+  |
+-------------------------+

You can also choose to place /boot on an existing DOS
partion, you just have to notice that moving the files
would make the system unable to boot. After installing
LILO in this way it is a good idea to boot DOS and mark
all the files needed by LILO with the SYSTEM attribute.
(Does anybody know if this can be done directly from
Linux using some ioctl?)

A completely different approach that will work if
everything else fails is to not use LILO at all. Instead
you can use LOADLIN, place the LOADLIN program, your
kernel and optionally a ramdisk on the DOS partition.
Create a DOS boot menu that will offer the options to
start Linux or DOS. In order for this to work you just
have to be able to boot DOS and read files from the DOS
partition.

(Notice that WIN98 is runing on top of DOS, I think it
is version 7.10)

-- 
Kasper Dupont

------------------------------

From: Moritz Franosch <[EMAIL PROTECTED]>
Subject: Re: Lilo pble with RH 7.1 (MBR corrupted)
Date: 03 May 2001 12:14:54 +0200



buffat <[EMAIL PROTECTED]> writes:

> My system is now running, but only with a lilo boot floppy.
> Otherwise I get the infamous LI when starting from the 1st ide (15 Giga 
> Maxtor UDMA 66). 

But once your system booted from hard disk with exactly the same
partitioning and hard disk drives?


> My question is: how can I put a new MBR on my ide0 disk (5 Giga Maxtor UDMA 
> 66), in order to boot again directly from disk.
> Any advice will be appreciated.

Maybe 'lilo -v' does it. Otherwise, the following information could
help to solve the problem.


What is the output of

lilo -v

?

What is in /etc/lilo.conf, /etc/fstab?

What is the output of 

fdisk /dev/hda
p

Same with /dev/hdb (maybe /dev/hdc if your second IDE drive is master on
the second controller).


Moritz

------------------------------

From: Torsten Blank <[EMAIL PROTECTED]>
Subject: Re: malloc Bug?
Date: 03 May 2001 12:26:42 +0200


Kasper Dupont <[EMAIL PROTECTED]> writes:

> Do you have overcommiting enabled?
> cat /proc/sys/vm/overcommit_memory 
> 
> -- 
> Kasper Dupont

No. Thank you for your hint.

        greetings, Torsten

-- 
Torsten Blank
Institut fuer Theoretische Physik der Uni Karlsruhe
Tel: 0721 / 608 6365   Fax: 0721 / 608 3582
Web: http://www-itp.physik.uni-karlsruhe.de/~tb

------------------------------

From: Torsten Blank <[EMAIL PROTECTED]>
Subject: Re: malloc Bug?
Date: 03 May 2001 13:04:21 +0200


Oh, i think i was too fast. Nothing has changed with "echo 1 >
/proc/sys/vm/overcommit_memory".

        Torsten

-- 
Torsten Blank
Institut fuer Theoretische Physik der Uni Karlsruhe
Tel: 0721 / 608 6365   Fax: 0721 / 608 3582
Web: http://www-itp.physik.uni-karlsruhe.de/~tb

------------------------------

From: Ronnie Arosa Carril <[EMAIL PROTECTED]>
Subject: how to register a pci device?
Date: Thu, 03 May 2001 13:41:17 +0200

Hi everyone,

How should I do to register a device driver? I' ve been looking some of
the PCI device driver source codes. They never use the function
register_chrdev() (is the function O'Reilly's book tell to use when
registering char devices). Instead of this, they use other functions
depending on device's characteristics. For example, some ATM cards use
atm_dev_register(), or some ethernet network cards use eth_register().
Do this function call register_chardev() internally? I've tried to find
out more information about this functions, but they guide me always to
.ver files. What kind of files are they? They define all this kind of
functions as a call to _set_ver()y _ver_str(). What does this funtion
do?
Thanks.


------------------------------

From: "Darren" <[EMAIL PROTECTED]>
Subject: Re: Startup service
Date: Thu, 3 May 2001 14:26:20 +0100


Kasper Dupont <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> D. Stimits wrote:
> >
> > Xiaomu Zeng wrote:
> > >
> > > "D. Stimits" wrote:
> > >
> > > > >
> > > > > aha so it is rc.local i am looking for?
> > > >
> > > > If your only concern is to run some command at startup, yes. If it
must
> > > > be controlled for start and stop activity at various runlevels,
you'd
> > > > create a script to go in the init.d subdirectory; then links from
the
> > > > various runlevel directories would determine whether the script is
> > > > called with a start or stop at the given runlevels. inetd is a
sample of
> > > > something controlled at various runlevels, as well as a few other
> > > > daemons. To see a list of what is controlled to start or stop, try
this:
> > > > chkconfig --list
> > > > (chkconfig might not be available under all distributions, I haven't
> > > > checked)
> > > >
> > >
> > > So rc.local will always be ran, at any init level (even single user
mode)?
> > >
> > > Xiaomu
> >
> > I have not actually tested to give you an answer. It does not use the
> > normal runlevel scripting, so I believe it likely does (without looking
> > I am guessing that the rc main init script always calls rc.local once it
> > has finished the last runlevel it is aiming for, aside from shutdown).
> > The way to test it would be to add a line to rc.local such as:
> > echo "rc.local has run" > /tmp/rc.test.txt
> >
> > Make sure that file is empty and try rebooting to single user mode. If
> > the file /tmp/rc.test.txt has "rc.local has run" in it, then it ran;
> > otherwise not. rc.local does definitely run at normal multiuser console
> > and graphics mode.
> >
> > D. Stimits, [EMAIL PROTECTED]
>
> This command will tell you in which runlevels rc.local
> will be executed:
>
> ls -l /etc/rc.d/*/*local*
>
> The sequence of actions during startup is the following:
> the init program /sbin/init will load a configuration
> file from /etc/inittab. The configuration file will tell
> init to execute /etc/rc.d/rc, this script will execute
> all start scripts from the appropriate runlevel directory.

cool. I have been playing and found the files you mention. I even set my
startup script to welcome me to my pc.. Sad huh? :-)






------------------------------

From: "Norm Dresner" <[EMAIL PROTECTED]>
Subject: Re: ???how to get bus-address of the PCI hardware device
Date: Thu, 03 May 2001 13:35:03 GMT

<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]...
> In article <i6_H6.7433$[EMAIL PROTECTED]>,
>  <[EMAIL PROTECTED]> wrote:
>
> >anyone know how...
>
> The kernel source comes with *lots* of PCI device drivers.  You can
> quickly find your answer be reading one.
>
> Here's a sample from lance.c:
>
>         while ((pdev = pci_find_device(PCI_VENDOR_ID_AMD,
PCI_DEVICE_ID_AMD_LANCE, pdev))) {
>             unsigned int pci_ioaddr;
>             unsigned short pci_command;
>
>             pci_irq_line = pdev->irq;
>             pci_ioaddr = pdev->base_address[0] & PCI_BASE_ADDRESS_IO_MASK;
>
> In other words find the device with pci_find_device and extract the
address
> from the PCI into that's returned.
>

    On some systems, depending on the kernel configuration parameters, you
may need to use
        pcibios_find_device()

    Norm




------------------------------

From: "Norm Dresner" <[EMAIL PROTECTED]>
Subject: Re: how to register a pci device?
Date: Thu, 03 May 2001 13:37:48 GMT

Ronnie Arosa Carril <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> Hi everyone,
>
> How should I do to register a device driver? I' ve been looking some of
> the PCI device driver source codes. They never use the function
> register_chrdev() (is the function O'Reilly's book tell to use when
> registering char devices). Instead of this, they use other functions
> depending on device's characteristics. For example, some ATM cards use
> atm_dev_register(), or some ethernet network cards use eth_register().
> Do this function call register_chardev() internally? I've tried to find
> out more information about this functions, but they guide me always to
> .ver files. What kind of files are they? They define all this kind of
> functions as a call to _set_ver()y _ver_str(). What does this funtion
> do?
> Thanks.
>

What kind of device driver are you writing?  If it's a character-device,
you'll need to call register_chrdev().  If it's an ethernet driver,
eth_register(), etc.

    Norm



------------------------------

From: Ronnie Arosa Carril <[EMAIL PROTECTED]>
Subject: Re: how to register a pci device?
Date: Thu, 03 May 2001 16:20:07 +0200

Norm Dresner escribi�:

> Ronnie Arosa Carril <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]...
> > Hi everyone,
> >
> > How should I do to register a device driver? I' ve been looking some of
> > the PCI device driver source codes. They never use the function
> > register_chrdev() (is the function O'Reilly's book tell to use when
> > registering char devices). Instead of this, they use other functions
> > depending on device's characteristics. For example, some ATM cards use
> > atm_dev_register(), or some ethernet network cards use eth_register().
> > Do this function call register_chardev() internally? I've tried to find
> > out more information about this functions, but they guide me always to
> > .ver files. What kind of files are they? They define all this kind of
> > functions as a call to _set_ver()y _ver_str(). What does this funtion
> > do?
> > Thanks.
> >
>
> What kind of device driver are you writing?  If it's a character-device,
> you'll need to call register_chrdev().  If it's an ethernet driver,
> eth_register(), etc.
>
>     Norm

It's a parallel port interface. Which one should I use for this?


------------------------------

From: [EMAIL PROTECTED]
Subject: Re: malloc Bug?
Date: 3 May 2001 14:38:58 GMT

Torsten Blank <[EMAIL PROTECTED]> wrote:

> Oh, i think i was too fast. Nothing has changed with "echo 1 >
> /proc/sys/vm/overcommit_memory".

It looks as if overcommitment was switched on already - try setting it to
0 and run your program again (I assume that you don't really have 2.8 GB
of memory). If the comtent of /proc/sys/vm/overcommit_memory doesn't change
when you echo 1 or 0 into it you may have to recompile your kernel to allow
run time changes of kernel parameter.

                                               Jens
-- 
      _  _____  _____
     | ||_   _||_   _|        [EMAIL PROTECTED]
  _  | |  | |    | |          AG Moebius, Institut fuer Molekuelphysik
 | |_| |  | |    | |          Fachbereich Physik, Freie Universitaet Berlin
  \___/ens|_|homs|_|oerring   Tel: ++49 (0)30 838 - 53394 / FAX: - 56046

------------------------------

From: [EMAIL PROTECTED] (Dean Carpenter)
Subject: Gigabyte GA-6vxdr7 dual p3 barfs on 2.2.17
Date: 3 May 2001 14:30:39 GMT

Hi All -

Just got some eval equipment in today to play with, with the Gigabyte GA-
6vxdr7 motherboards in them.  The NICs show up as EtherExpressPro 10/100 
nics, pretty normal.  These are dual P3 boards with dual 933 cpus and 
512meg memory.

It has RH 6.2 with a custom 2.2.17 kernel on it.  During the boot and init 
of the dual cpus that it barfs ...  It leaves this on screen :

  :
  :
CPU map: 3
Booting processor 1 eip 2000
Setting warm reset code and vector
1.
2.
3.
Asserting INIT.
Deasserting INIT.
Sending STARTUP #1.
After apic_write.
Before start apic_write.
Startup point 1.

And there it sits.

There's some more above the CPU map: 3 there, I can provide that as well.  
I have to run right now, but tomorrow I'll try a non-SMP kernel, see if it 
will actually boot.

Otherwise, any ideas ?

------------------------------

From: "Pei Zheng" <[EMAIL PROTECTED]>
Subject: Is there a limit of the number of kernel modules?
Date: Thu, 3 May 2001 11:12:25 -0400

Hi there,
I am wondering that if there is a limit of the number of loadable kernel
modules for current linux kernel(2.4).
anybody any idea?

-Pei



------------------------------

From: "Andreas Egner" <[EMAIL PROTECTED]>
Subject: How can I get the IP of eth0?
Date: Thu, 3 May 2001 17:30:00 +0200

Hallo,
how can I get the IP of a network device like eth0, ppp0, ... in a C/C++
program?

Thanks
Andreas




------------------------------

From: [EMAIL PROTECTED] (Grant Edwards)
Subject: Re: how to register a pci device?
Date: Thu, 03 May 2001 15:37:28 GMT

In article <[EMAIL PROTECTED]>, Ronnie Arosa Carril wrote:

>> What kind of device driver are you writing?  If it's a character-device,
>> you'll need to call register_chrdev().  If it's an ethernet driver,
>> eth_register(), etc.
>
>It's a parallel port interface. Which one should I use for this?

That depends entirely on what the driver does.  

If it's a low-level SCSI driver, register it as a low-level
SCSI driver. If it's a network driver, register it as a network
driver. If it's a driver that impliments a seekable or
non-seekable byte-stream, register it as character driver.  If
its a driver that impliments randomly accessable blocks of
fixed-length, then register it as a block driver.

I believe that therre are all of the above types of drivers for
the parallel port.

-- 
Grant Edwards                   grante             Yow!  Hello... IRON
                                  at               CURTAIN? Send over a
                               visi.com            SAUSAGE PIZZA! World War
                                                   III? No thanks!

------------------------------

From: Karim Atiki <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: Interprocess Communication...help....
Date: Thu, 03 May 2001 17:50:06 +0200

Hi all,

I have to implement a way to communicate between tow applications.
For some reasons, I've chosen the pipe() function .

Basically, her's what I want to do:

1) I've an application, qt based,named APP1.  this application gets some
parameters from Gfx Widgets.
 Then , user pushes a run button in order to launch another application
(APP2)
I launch it by using fork() and execle()....

2) So the next step is:
to communicate between the 2 application.
I want APP1 gives orders to APP2 such like "RUN", "PAUSE", "RESUME".
For each of these commands, I want APP2 to notifiy APP1 that commands
have been correctly handled.

So, I'm not very experienced with Interprocess-Communication under
Unix/Linux.
I would like to know how should my applications structured in order to
manage such an IPC.
How should I use the fork() and pipe() calls ?

Please let me know if you have an idea.

Regards,


Karim





------------------------------

From: [EMAIL PROTECTED] ()
Crossposted-To: comp.os.linux.development.apps
Subject: Re: Interprocess Communication...help....
Date: Thu, 03 May 2001 16:01:35 GMT

On Thu, 03 May 2001 17:50:06 +0200, Karim Atiki <[EMAIL PROTECTED]> wrote:
>Hi all,
>
>I have to implement a way to communicate between tow applications.
>For some reasons, I've chosen the pipe() function .
>
>Basically, her's what I want to do:
>
>1) I've an application, qt based,named APP1.  this application gets some
>parameters from Gfx Widgets.
> Then , user pushes a run button in order to launch another application
>(APP2)
>I launch it by using fork() and execle()....
>
>2) So the next step is:
>to communicate between the 2 application.
>I want APP1 gives orders to APP2 such like "RUN", "PAUSE", "RESUME".
>For each of these commands, I want APP2 to notifiy APP1 that commands
>have been correctly handled.
>
>So, I'm not very experienced with Interprocess-Communication under
>Unix/Linux.
>I would like to know how should my applications structured in order to
>manage such an IPC.
>How should I use the fork() and pipe() calls ?
>

get a copy of steven's "advanced unix programming" book.

or do a websearch for "unix IPC"

------------------------------


** 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 by posting to the
comp.os.linux.development.system newsgroup.

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
******************************

Reply via email to