Linux-Development-Sys Digest #399, Volume #8      Mon, 8 Jan 01 19:13:15 EST

Contents:
  Re: Extending /proc filesystem on Solaris 7/8? (Joerg Schilling)
  Re: code language for Linux kernel (Kaz Kylheku)
  Re: Generating core file ("Gene Chang")
  Re: device driver dev
  Re: Disable buffer cache (Philip Armstrong)
  Re: In Kernel 2.4 cdrom mount.. (Philip Armstrong)
  Re: 2.2.18 won't boot diskless (Tom Daley)
  Re: Yamaha CDRW 4416E (Rob King)
  Re: device driver dev (Ionel GARDAIS)
  Linux input and output management (Coconut Ming)
  Re: device driver dev
  Re: Creating a device associated with a SCSI host adapter (Mike DeCesaris)
  advanced routing (Matthew Impett)
  Re: device driver dev ([EMAIL PROTECTED])
  lilo for secondary IDE ("Hung P. Tran")
  Re: GetTickCount() in Linux? (Roland Smith)
  Thanks (Larry Lindstrom)
  Maturity of Bonobo and CORBA ("Edgar F. Hilton")
  Re: lilo for secondary IDE (HomerWelch)
  Re: lilo for secondary IDE (John in SD)
  Re: lilo for secondary IDE (Dave Platt)
  Re: syncing fs from inside a kernel module (Robert Redelmeier)

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

From: [EMAIL PROTECTED] (Joerg Schilling)
Crossposted-To: comp.unix.solaris
Subject: Re: Extending /proc filesystem on Solaris 7/8?
Date: 8 Jan 2001 17:48:43 GMT

In article <[EMAIL PROTECTED]>,
Kaelin Colclasure  <[EMAIL PROTECTED]> wrote:
>[EMAIL PROTECTED] (Joerg Schilling) writes:

>> >The dynamic is one of the advntages Linux's /proc has.  OTOH, Solaris
>> >does have /devices.  Could it go there?  And Linux 2.4 now has /devfs.
>> 
>> NO, /devices is definitely the wrong place. It is only for
>> dynamic nodes referring to drivers.
>
>Uhm, but the module I'm referring to above will be a driver on Solaris.
>Specifically, a char driver that just happens to use memory instead of any
>special hardware. There are plenty of precedents for that. Indeed, Sun's
>own TNF subsystem appears to work this way.
>
>I assume this would remove your objection to OpenTNF using /devices?

I don't Know what you like to do....

If you are satisfied with one or more char/block device node(s) it will work.

-- 
EMail:[EMAIL PROTECTED] (home) J�rg Schilling D-13353 Berlin
      [EMAIL PROTECTED]                (uni)  If you don't have iso-8859-1
      [EMAIL PROTECTED]            (work) chars I am J"org Schilling
URL:  http://www.fokus.gmd.de/usr/schilling    ftp://ftp.fokus.gmd.de/pub/unix

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

From: [EMAIL PROTECTED] (Kaz Kylheku)
Subject: Re: code language for Linux kernel
Reply-To: [EMAIL PROTECTED]
Date: Mon, 08 Jan 2001 17:51:27 GMT

On Mon, 08 Jan 2001 09:05:35 +0000, Kasper Dupont <[EMAIL PROTECTED]> wrote:
>Kaz Kylheku wrote:
>> 
>> On Sun, 07 Jan 2001 08:30:04 -0000, [EMAIL PROTECTED]
>> <[EMAIL PROTECTED]> wrote:
>> >Hi,
>> >
>> >Is the Linux kernel written totally in C language OR some part in assembly
>> >language also?
>> 
>> How would you, for instance, save the registers of the running task and
>> restore ther registers of another task using only C?
>
>That could be possible, I once wrote a scheduler in Turbo Pascal
>using as litle as three inline assembler instructions.

In other words, you weren't programming in Pascal.

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

From: "Gene Chang" <[EMAIL PROTECTED]>
Subject: Re: Generating core file
Date: Mon, 8 Jan 2001 09:46:53 -0800

Thanks for the tips. Please see my comments below. Thanks.


Kasper Dupont <[EMAIL PROTECTED]> wrote in message
news:<[EMAIL PROTECTED]>...
> Gene Chang wrote:
> >
> > Hi there:
> >
> > I am writing an application which uses a shared library(.so). My problem
is
> > this:
> >     If my application has a default, it will create a core file.
> >     If the segfault is in the shared lib, I only get a Segmentation
fault
> > message but not core dump.
> >
> > Anybody has an idea why? I have the source code and build environment
for
> > all the code.
> >
> > Thanks.
>
>
> Here are the posible reasons I now for a segfault
> not causing a core dump:
>
> Current directory not writeable.
The shared lib is in /usr/lib which is normal unwritable. Where do I put it
then?

> core exists and is a directory or not writeable.
I search the whole disk and can't find the core file.

> Core dump larger than the limit.
I run the ulimit and it says unlimited.

> Core dump larger than free disk space.
Lots of free disk space.

> Program is setuid.
The .so is created by root and run by root. Someone said that the suid
program will never produce a core dump. Is this true? If it is, why the
segfault in an app can produce the dump?

> Executable is not readable.
> Segfault occured in kernel space.
In this case is not in kernel space because I tested by access a null
pointer in the .so.

> The last reason mentioned is a bug in the kernel
> or a kernelmodule, that should result in a lot
> of messages in /var/log/messages.
>
> --
> Kasper Dupont



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

From: [EMAIL PROTECTED] ()
Subject: Re: device driver dev
Date: Mon, 08 Jan 2001 18:19:03 -0000

In article <93cs4h$4j6$[EMAIL PROTECTED]>,
Andy Jeffries <[EMAIL PROTECTED]> wrote:

>> Check out gimp-print.  It might support that printer.

>No it doesn't.  Anyone have any more ideas?

Sure, write some code and add it to gimp-print.  That's how new support
happens.

--
http://www.spinics.net/linux

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

From: [EMAIL PROTECTED] (Philip Armstrong)
Subject: Re: Disable buffer cache
Date: 8 Jan 2001 09:25:31 -0000

In article <[EMAIL PROTECTED]>,
Manoj Patil  <[EMAIL PROTECTED]> wrote:
>Hello,
>I need to do disk read and writes bypassing the buffer cache. (i.e I
>want raw interface). It is a known fact that linux does not support raw
>interface.

Wrong. There is a raw device interface in 2.4.0

>Does any one know some trick/hack so that all read and write results
>into a guarenteed disk actiivity.

use fsync()?

Oh, and you can't get guarentees anyway, because the drive will cache
your writes and report back to the OS before its actually written
anything to the platter. And if you try and stop them + enforce write
order and reporting, most IDE drives will lie to you and cache+reorder
writes anyway (better benchmarks...). SCSI ones generally don't do
this. There was something about this by one of the people writing a
jounaling FS for linux. They tested the guarentees offered by standard
hds and were *not* pleased with the results. Most HW cannot be trusted
was the conclusion :) Unless you've got a RAID array backed up with
non-volatile RAM you're SOL...

>please reply at [EMAIL PROTECTED]

Post to newsgroup; get reply to newsgroup. That's the way it works...

Phil


-- 
http://www.kantaka.co.uk/ .oOo. public key: http://www.kantaka.co.uk/gpg.txt


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

From: [EMAIL PROTECTED] (Philip Armstrong)
Subject: Re: In Kernel 2.4 cdrom mount..
Date: 8 Jan 2001 09:26:28 -0000

In article <93brgc$h2r$[EMAIL PROTECTED]>,
junwon,Seo <[EMAIL PROTECTED]> wrote:
>My error message is
>'mount: special device /dev/cdrom does not exist'
>
>What's problem?

Read the error message very carefully. That is your problem.

Phil
-- 
http://www.kantaka.co.uk/ .oOo. public key: http://www.kantaka.co.uk/gpg.txt


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

From: [EMAIL PROTECTED] (Tom Daley)
Subject: Re: 2.2.18 won't boot diskless
Date: 8 Jan 2001 18:44:59 GMT

In article <93cmds$ils$[EMAIL PROTECTED]>,
        Uri Schonfeld <[EMAIL PROTECTED]> writes:
> Tom Daley wrote:
> You did compile network support into the kernel and not as a module, right?
> 

It is on my systems at home.  I'll check when I get home tonight.
My face will be red if I overlooked something this simple.

-- 
===================================================================
|         o        Tom Daley                                      |
|   ___ </v        Woodland Park, CO                              |
|  ___  -\         [EMAIL PROTECTED]                            |
| ___    /                                         (719) 785-4227 |
|       (*)        Linux!                                         |
===================================================================

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

From: Rob King <[EMAIL PROTECTED]>
Subject: Re: Yamaha CDRW 4416E
Date: Mon, 08 Jan 2001 14:08:51 -0500

Thank You, it works now

Harry George wrote:

> I have a Yamaha CDRW 8424EZ, running on SUSE 6.4.  My notes:
>              Set /etc/modules.conf:
>
>                alias scsi-adapter ide-scsi
>                options ide-cd ignore=hdc
>
>              Set /etc/lilo.conf:
>
>                label = suse64
>                append = "hdc=ide-scsi"
>
>              Everytime I reboot, I need to do:
>
>                depmod
>                insmod ide-scsi
>
>              Haven't figured out how to get the system to do that on boot.
>
>              Use yast to "install" CDROM as SCSI. This is needed to
>              use it as a normal CDROM (as compared to the
>              reader/writer activity under xcdroast).
>
> So if your system is similar, check to see if "ide-scsi" is insmod'd.
>
> Rob King <[EMAIL PROTECTED]> writes:
>
> > Sadly it doesn't read any sort of cd's, it just hasn't read anything, and i
> > haven't checked those yet, but thanks for the help
> >
> > Kasper Dupont wrote:
> >
> > > Rob King wrote:
> > > >
> > > > Hi i have this burner as my secondary ide slave with a pioneer 16x
> > > > dvd-rom as it's primary, and when i boot in linux, the burner won't read
> > > > anything, i would like to now, if this is a problem with my system, or
> > > > if it is uncommon.
> > >
> > > It definitely should work, what happens when you try to read
> > > something? What messages does the kernel write when detecting
> > > IDE units at bootup. Look in /var/log/messages.
> > >
> > > --
> > > Kasper Dupont
> >
>
> --
> Harry George
> [EMAIL PROTECTED]


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

From: Ionel GARDAIS <[EMAIL PROTECTED]>
Subject: Re: device driver dev
Date: Mon, 08 Jan 2001 20:29:49 +0100
Reply-To: [EMAIL PROTECTED]

Hi,

Actually, i'm new to *Linux* programming. And because everyone have to
contribute to Linux developement, this will be my contribution :o)
I think i'm a good coder in C but I have never progam for Linux yet.

It might take a while before I engage the driver coding. (I plan to buy
a kind of O'Reilly book to learn basic device programming).

As I've seen, you have a huge background in Linux programming and I
might not be helpfull for you, on the contrary !

Thanks for your help indeed,
I've saved your e-mail in my address book, we stay in touch ?

C u for more infos about that !

ionel


Andy Jeffries a �crit :

> >>I have a Canon LBP 460 Laser printer.
> >>
> >>But it only works under Windows OS. Damned !
> >>
> >>I'm looking for some sample code to develop a kind of device driver to
> >>emulate the windows drivers that shape datas before to send them to the
> >>printer.
> >
> > Check out gimp-print.  It might support that printer.
>
> No it doesn't.  Anyone have any more ideas?
>
> If not, Ionel, I have the same printer and would be interested in
> assisting with development effort.
>
> Cheers,
>
> --
> Andy Jeffries
> Lead-developer of Scramdisk for Linux
> Developer of original Scramdisk Delphi Component


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

Date: Tue, 09 Jan 2001 02:42:33 +0800
From: Coconut Ming <[EMAIL PROTECTED]>
Subject: Linux input and output management

Hi,
Same as the title above... Linux input and output management
information.
Where I can acquire this information? I need to produce a report.
Thanks.
Direct email me for answer is more encourageable....
[EMAIL PROTECTED]
Your help is greatly appreciated.


From
Ming


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

From: [EMAIL PROTECTED] ()
Subject: Re: device driver dev
Date: Mon, 08 Jan 2001 19:46:37 -0000

In article <[EMAIL PROTECTED]>, Ionel GARDAIS  <[EMAIL PROTECTED]> wrote:
>Hi,

>I think i'm a good coder in C but I have never progam for Linux yet.
>
>It might take a while before I engage the driver coding. (I plan to buy
>a kind of O'Reilly book to learn basic device programming).

What you need for a print isn't really a driver; it's just a filter and is
done is user space.  You can get the basic idea from the gimp-print source.

--
http://www.spinics.net/photo

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

From: Mike DeCesaris <[EMAIL PROTECTED]>
Subject: Re: Creating a device associated with a SCSI host adapter
Date: Mon, 08 Jan 2001 19:45:16 GMT

In article <93cj26$11q8$[EMAIL PROTECTED]>,
  Uri Schonfeld <[EMAIL PROTECTED]> wrote:
> Hey,
>
> I read the code for the linux iSCSI mid-level rather thorourghly, and
I
> couldn't find what I needed, hope someone can help me.
>
> I am creating a SCSI low-level driver (that acts something like a
virtual
> adapter), and I need to define an ioctl operation for it. I need to
be able
> to perform this ioctl even if there are no devices attached to the
host at
> the moment. This means, there is no /dev/sdX or /dev/scdX to open and
ioctl
> on.
>
> I thought of creating a dummy character device, but that seems not to
be a
> "clean" solution.
>
> Another thought I had was to simulate a dummy device, but then I'd
have to
> simulate all the other operations, wouldn't I?
>
> I cannot be the first one to need this, anyone know of a more
standard
> "clean" solution?
> Thank you very much,
>
> Uri T. Schonfeld
> --
> Uri T. Schonfeld
>

Uri,
I should start by saying I don't know a good answer to your question.
I am working on a similar project here.  I don't like the character
device, either.  The idea that I like the best so far is to create
a /proc file entry, and then with the resulting proc_dir_entry struct,
set the proc_fops->ioctl to your ioctl function. A user-space app can
then open your file, and issue ioctls. This works for me (I also use
read_proc and write_proc functions that you might have to simulate),
but I have no idea if it really should work. I am interested in
a "better" solution...


Sent via Deja.com
http://www.deja.com/

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

From: Matthew Impett <[EMAIL PROTECTED]>
Subject: advanced routing
Date: 8 Jan 2001 20:43:36 GMT

I have a quick question about advanced routing. I have been reading about it
and about how you can have multiple routing table and set rules pointing to
them and all. My question is, is it possible for me to creat a routing
table for packets generated on my machine?? I know I can set the iif in the
rule, but can I set it so only packets that were generated by me go to 
the table??

Matt Impett
University of Maryland


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

From: [EMAIL PROTECTED]
Subject: Re: device driver dev
Date: Mon, 08 Jan 2001 22:00:57 +0100

Ionel GARDAIS wrote:

> I have a Canon LBP 460 Laser printer.
> 
> I'm looking for some sample code to develop a kind of device driver to
> emulate the windows drivers that shape datas before to send them to the
> printer.
> 
> Is this idea suitable ?
> Do you have some infos ?

The first problem will be to find out what the data to be sent to the
printer needs to look like. If it just accepts data from the printer
port like a normal printer, you might be able to integrate this code
with say gimp-print.

It might also turn out that the printer needs some form of real time
control from the parallel port, with stringent timing or other stuff. In
that case you might need a real device driver as well.

But in any case the problem will most likely be to find out what to send
to the printer, not creating the data: that will be mostly
straightforward mangling of bits, that only gets to be really
interesting if you care about quality.


Thomas

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

From: "Hung P. Tran" <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.setup,comp.os.linux.misc
Subject: lilo for secondary IDE
Date: Mon, 08 Jan 2001 21:37:53 GMT

I am trying to make a boot hard drive to boot from a
secondary IDE. My lilo.conf is as followed:

#boot=/dev/fd0
boot=/dev/hdc
map=/mnt/floppy/map
install=/mnt/floppy/boot.b
prompt
timeout=50
default=linux

image=/mnt/floppy/vmlinuz
        label=linux
        root=/dev/hda5


Note that the same lilo.conf works for a floppy (just by replacing
the boot line to /dev/fd0). However, when I mount my secondary
harddrive to the same place (to minimize lilo.conf change) using:

mount /dev/hdc1 /mnt/floppy

The same lilo.conf will not work. All I get is an "L" and then
a bunch of 01 dump onto the screen. I also try to use "linear"
to no avail. Any advice.

Thank you for any help,

hung


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

Crossposted-To: comp.os.linux.development.apps
Subject: Re: GetTickCount() in Linux?
From: Roland Smith <[EMAIL PROTECTED]>
Date: 08 Jan 2001 23:41:54 +0100

"Nils M. Lunde" <[EMAIL PROTECTED]> writes:

> Hi.
> 
> I need to know the time used by a certain part of a program.
> In MS Windows I use the GetTickCount() function.
> This function does not tend to exist in Linux, so I wonder what I should
> do!?

Use the clock(3) function. Devide the value it produces by CLOCKS_PER_SEC
to get a number in seconds.

Beware however, that the actual timer resolution in determined by CLK_TCK
(see /usr/include/bits/time.h)

Roland

-- 
Roland Smith                        "When life hands you a lemon,
r s m i t h @ x s 4 a l l . n l      make lemonade."
http://www.xs4all.nl/~rsmith/

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

From: Larry Lindstrom <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps,linux.redhat.misc
Subject: Thanks
Date: Mon, 08 Jan 2001 14:50:24 -0800

   Your suggestions worked like a charm.

                                                             Thanks
                                                             Larry

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

From: "Edgar F. Hilton" <[EMAIL PROTECTED]>
Subject: Maturity of Bonobo and CORBA
Date: Mon, 08 Jan 2001 18:32:18 -0500

I am  interested in writing some applications in Linux that heavily rely
on CORBA.  Does anybody know how well CORBA and Bonobo work in
Linux? Any caveats that I should be aware of?    My applications are
intended to work in an Enterprise environment, so any comments that are
relevant on the subject would be much appreciated so that I may retain
my job... ;)

-Edgar

--
Edgar F. Hilton                 FSMLabs, Inc.
voice: 850.893.0300             www.fsmlabs.com
fax: 206.350.4EFH               www.rtlinux.com




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

From: HomerWelch <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.setup,comp.os.linux.misc
Subject: Re: lilo for secondary IDE
Date: Mon, 08 Jan 2001 23:32:23 GMT

"Hung P. Tran" wrote:
> 
> I am trying to make a boot hard drive to boot from a
> secondary IDE. My lilo.conf is as followed:
> 
> #boot=/dev/fd0
> boot=/dev/hdc
> map=/mnt/floppy/map
> install=/mnt/floppy/boot.b
> prompt
> timeout=50
> default=linux
> 
> image=/mnt/floppy/vmlinuz
>         label=linux
>         root=/dev/hda5
> 
> Note that the same lilo.conf works for a floppy (just by replacing
> the boot line to /dev/fd0). However, when I mount my secondary
> harddrive to the same place (to minimize lilo.conf change) using:
> 
> mount /dev/hdc1 /mnt/floppy
> 
> The same lilo.conf will not work. All I get is an "L" and then
> a bunch of 01 dump onto the screen. I also try to use "linear"
> to no avail. Any advice.
> 

Did you rerun lilo after changing that parameter?  You have
to install lilo in the MBR of hdc.  Also, lilo creates the
map file and install it.

You may have to change your parameters in your bios to get
it to detect the hdc as a bootable disk.  At least on my
system, it will only look at fd0 and hda for boot
information.

good luck,


-- 

Homer J. Welch        [EMAIL PROTECTED]
Troy, Michigan

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

From: John in SD <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.setup,comp.os.linux.misc
Subject: Re: lilo for secondary IDE
Reply-To: [EMAIL PROTECTED]
Date: Mon, 08 Jan 2001 23:38:37 GMT

On Mon, 08 Jan 2001 21:37:53 GMT, "Hung P. Tran" <[EMAIL PROTECTED]> wrote:

>I am trying to make a boot hard drive to boot from a
>secondary IDE. My lilo.conf is as followed:
>
>#boot=/dev/fd0
>boot=/dev/hdc
>map=/mnt/floppy/map
>install=/mnt/floppy/boot.b
>prompt
>timeout=50
>default=linux
>
>image=/mnt/floppy/vmlinuz
>       label=linux
>       root=/dev/hda5
>
>
>Note that the same lilo.conf works for a floppy (just by replacing
>the boot line to /dev/fd0). However, when I mount my secondary
>harddrive to the same place (to minimize lilo.conf change) using:
>
>mount /dev/hdc1 /mnt/floppy
>
>The same lilo.conf will not work. All I get is an "L" and then
>a bunch of 01 dump onto the screen. I also try to use "linear"
>to no avail. Any advice.
>
>Thank you for any help,

When you boot, the floppy will be read first (device 0x00), then device
(0x80).  I don't know how to get your bios to first read device (0x82), even
if it installs that device.  Older BIOSes will only install 0x80 and 0x81.

--John


>
>hung


LILO version 21.6 (04-Oct-2000) source at
http://www.ibiblio.org/pub/Linux/system/boot/lilo
patches at ftp://brun.dyndns.org/pub/linux/lilo

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

From: [EMAIL PROTECTED] (Dave Platt)
Crossposted-To: comp.os.linux.setup,comp.os.linux.misc
Subject: Re: lilo for secondary IDE
Date: Mon, 08 Jan 2001 23:57:44 -0000

>> I am trying to make a boot hard drive to boot from a
>> secondary IDE. My lilo.conf is as followed:
>> 
>> #boot=/dev/fd0
>> boot=/dev/hdc

#snip

>> The same lilo.conf will not work. All I get is an "L" and then
>> a bunch of 01 dump onto the screen. I also try to use "linear"
>> to no avail. Any advice.
>> 
>
>Did you rerun lilo after changing that parameter?  You have
>to install lilo in the MBR of hdc.  Also, lilo creates the
>map file and install it.

A normal PC BIOS will boot only from the MBR of the primary hard
drive.  It won't even "look" for the secondary hard drive MBR.  The
normal way to boot a Linux system from a secondary hard drive is to
put LILO in the MBR of the primary hard drive (or put the standard MBR
there, and put LILO in the boot block of the active partition on the
primary hard drive).  You can have the kernel itself, and the root
filesystem on the secondary hard drive, but the MBR and active active
partition normally need to be on the primary drive.

There are some BIOSes which can be configured to boot from the
secondary hard drive.  There's a gotcha to enabling this feature,
though.  Most disk-resident MBR and bootloader code isn't written to
be booted from a secondary drive (it "assumes" that the system is on
the primary drive).  In order to cope with this lacking, the BIOS
doesn't just load the MBR etc. from the secondary drive - it actually
*swaps* the two drives at the BIOS level.

In a standard system, the first bootable disk (typically the master on
the IDE primary controller) is referred to as device 0x80 in the I/O
calls to the BIOS.  The second drive is 0x81, and so forth.

If you tell your BIOS to swap controllers, it actually assigns device
ID 0x80 to the master drive on the secondary controller.  Thus, when a
standard MBR is loaded from this drive and executed, it "thinks" that
it's really on the primary drive, and has no difficulty reading the
partition table and the O/S boot blocks.  A similar thing occurs if
you have a SCSI controller, and tell your BIOS to "boot SCSI" - the
0x80 drive ID is assigned to the first disk device on the first SCSI
controller, rather than to the IDE primary master.

When /sbin/lilo is run to install LILO, it has to write information
into the MBR-resident portion of LILO, and into its own boot catalog,
which tells the boot code where to find each portion of the code being
booted.  It must figure out which BIOS disk identifier is used for
each drive, and identify the location of each bootable bit of code by
(drive ID, location, size).

The /sbin/lilo installer normally honors the standard BIOS
conventions... IDE primary master, IDE primary slave, IDE secondary,
SCSI, in that order.  This works just fine for a standard setup.  It
will NOT work if you've told your BIOS to swap drives or controllers
around, because the BIOS ordering will disagree with the ordering that
the LILO installer assumed.

The net result will be the sort of thing you're observing... the first
(MBR-resident) portion of LILO will load, but the subsequent sections
won't load properly, because the MBR-resident portions of LILO will be
using the wrong device IDs.

The way around this problem is to use _explicit_ device IDs in your
/etc/lilo.conf file.  Figure out what device IDs your BIOS is going to
assign at boot time, and then tell LILO to use precisely these IDs.

As an example:  I have a system with two IDE hard drives, and one IDE
hard drive.  In a standard setup, the IDE drive would be 0x80, and the
two SCSI drives would be 0x81 and 0x82.  However, I've told my BIOS
that I want to boot from SCSI (the IDE drive is strictly for bulk
storage), and so it reorganizes the drive IDs (SCSI first, IDE
second).  In my lilo.conf file, I say:

#
# LILO is installed in the boot sector of the extended partition at
# /dev/sda2.  The disk's MBR is standard.  
#
disk = /dev/sda
        bios = 0x80
disk = /dev/sdb
        bios = 0x81
disk = /dev/hda
        bios = 0x82
boot = /dev/sda2
install = /boot/boot.b
delay = 50
        
and so forth.  This gives LILO the information it needs to build the
boot-map files with the correct drive IDs, and the system boots up from
the SCSI drives just fine.

I suspect that you may need to do something similar.  If you're
telling your BIOS to boot from the secondary controller, you'll need to
say something like:

disk = /dev/hda
        bios = 0x81
disk = /dev/hdc
        bios = 0x80

to swap around the BIOS drive IDs for the drives on these two
controllers.

-- 
Dave Platt                                           [EMAIL PROTECTED]
Visit the Jade Warrior home page:  http://www.radagast.org/jade-warrior/
  I do _not_ wish to receive unsolicited commercial email, and I will
     boycott any company which has the gall to send me such ads!

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

Date: Mon, 08 Jan 2001 17:59:18 -0600
From: Robert Redelmeier <[EMAIL PROTECTED]>
Subject: Re: syncing fs from inside a kernel module

Mario Kemper wrote:
> 
> i have written a kernel module that switches the PC off, when an interrupt
> arrives at the parallel port. Now i want to sync the file systems before
> i switch off to avoid data loss. I haven't found any way to do this.
> No userland interaction is allowed so that's no option.

The appropriate sync syscall should be allowed in a module.
Have a look at MagicSysRequest key sources.

-- Robert

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


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