Re: Why isn't init PID 1?

2001-01-31 Thread Igmar Palsenberg

On Wed, 31 Jan 2001, Paul Powell wrote:

> Hello,
> 
> I have a bootable linux CD that runs a custom init. 
> Under most versions of linux init runs as process ID
> one.  Under my bootable CD, it runs as process ID 15. 
> I need it to run as PID 1 so that I can execute a
> kill(-1,15) without killing init.
> 
> The boot CD uses and initrd image to load drivers. 
> The linuxrc file looks like:
> 
> #!/bin/sash
> 
> aliasall
> 
> echo "Loading aic7xxx module"
> insmod /lib/aic7xxx.o
> echo "Loading ips module"
> insmod /lib/ips.o ips=ioctlsize:512000
> echo "Loading sg module"
> insmod /lib/sg.o
> echo "Loading FAT modules"
> insmod /lib/fat.o
> insmod /lib/vfat.o
> 
> echo "Mounting /proc"
> mount -t proc /proc /proc
> init
> umount /proc
> 
> Does it run as PID 15 because I execute insmod and
> mount before running init?

Yes. First program to run get PID 1. 

Solution : fork() in init and load the modules in the child.



Igmar

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: Why isn't init PID 1?

2001-01-31 Thread H. Peter Anvin

Followup to:  <[EMAIL PROTECTED]>
By author:Igmar Palsenberg <[EMAIL PROTECTED]>
In newsgroup: linux.dev.kernel
> 
> Yes. First program to run get PID 1. 
> 
> Solution : fork() in init and load the modules in the child.
> 

Or finish your script with "exec init".

-hpa
-- 
<[EMAIL PROTECTED]> at work, <[EMAIL PROTECTED]> in private!
"Unix gives you enough rope to shoot yourself in the foot."
http://www.zytor.com/~hpa/puzzle.txt
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: Why isn't init PID 1?

2001-01-31 Thread Patrizio Bruno

Yes, in this situation "sash" is the process with pid '1', you should run this script 
through init and not viceversa, the first process launched takes pid 1.

P.

On Wed, 31 Jan 2001, Paul Powell wrote:

> Hello,
> 
> I have a bootable linux CD that runs a custom init. 
> Under most versions of linux init runs as process ID
> one.  Under my bootable CD, it runs as process ID 15. 
> I need it to run as PID 1 so that I can execute a
> kill(-1,15) without killing init.
> 
> The boot CD uses and initrd image to load drivers. 
> The linuxrc file looks like:
> 
> #!/bin/sash
> 
> aliasall
> 
> echo "Loading aic7xxx module"
> insmod /lib/aic7xxx.o
> echo "Loading ips module"
> insmod /lib/ips.o ips=ioctlsize:512000
> echo "Loading sg module"
> insmod /lib/sg.o
> echo "Loading FAT modules"
> insmod /lib/fat.o
> insmod /lib/vfat.o
> 
> echo "Mounting /proc"
> mount -t proc /proc /proc
> init
> umount /proc
> 
> Does it run as PID 15 because I execute insmod and
> mount before running init?
> 
> Thanks,
> Paul
> 
> __
> Get personalized email addresses from Yahoo! Mail - only $35 
> a year!  http://personal.mail.yahoo.com/
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [EMAIL PROTECTED]
> Please read the FAQ at http://www.tux.org/lkml/
> 

-
Patrizio Bruno
DADA spa / Ed-IT Development Staff
Borgo degli Albizi 37/r
50122 Firenze
Italy
tel +39 05520351
fax +39 0552478143

PGP PublicKey available at: http://www.keyserver.net/en/
-

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Why isn't init PID 1?

2001-01-31 Thread Paul Powell

Hello,

I have a bootable linux CD that runs a custom init. 
Under most versions of linux init runs as process ID
one.  Under my bootable CD, it runs as process ID 15. 
I need it to run as PID 1 so that I can execute a
kill(-1,15) without killing init.

The boot CD uses and initrd image to load drivers. 
The linuxrc file looks like:

#!/bin/sash

aliasall

echo "Loading aic7xxx module"
insmod /lib/aic7xxx.o
echo "Loading ips module"
insmod /lib/ips.o ips=ioctlsize:512000
echo "Loading sg module"
insmod /lib/sg.o
echo "Loading FAT modules"
insmod /lib/fat.o
insmod /lib/vfat.o

echo "Mounting /proc"
mount -t proc /proc /proc
init
umount /proc

Does it run as PID 15 because I execute insmod and
mount before running init?

Thanks,
Paul

__
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Why isn't init PID 1?

2001-01-31 Thread Paul Powell

Hello,

I have a bootable linux CD that runs a custom init. 
Under most versions of linux init runs as process ID
one.  Under my bootable CD, it runs as process ID 15. 
I need it to run as PID 1 so that I can execute a
kill(-1,15) without killing init.

The boot CD uses and initrd image to load drivers. 
The linuxrc file looks like:

#!/bin/sash

aliasall

echo "Loading aic7xxx module"
insmod /lib/aic7xxx.o
echo "Loading ips module"
insmod /lib/ips.o ips=ioctlsize:512000
echo "Loading sg module"
insmod /lib/sg.o
echo "Loading FAT modules"
insmod /lib/fat.o
insmod /lib/vfat.o

echo "Mounting /proc"
mount -t proc /proc /proc
init
umount /proc

Does it run as PID 15 because I execute insmod and
mount before running init?

Thanks,
Paul

__
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: Why isn't init PID 1?

2001-01-31 Thread Patrizio Bruno

Yes, in this situation "sash" is the process with pid '1', you should run this script 
through init and not viceversa, the first process launched takes pid 1.

P.

On Wed, 31 Jan 2001, Paul Powell wrote:

 Hello,
 
 I have a bootable linux CD that runs a custom init. 
 Under most versions of linux init runs as process ID
 one.  Under my bootable CD, it runs as process ID 15. 
 I need it to run as PID 1 so that I can execute a
 kill(-1,15) without killing init.
 
 The boot CD uses and initrd image to load drivers. 
 The linuxrc file looks like:
 
 #!/bin/sash
 
 aliasall
 
 echo "Loading aic7xxx module"
 insmod /lib/aic7xxx.o
 echo "Loading ips module"
 insmod /lib/ips.o ips=ioctlsize:512000
 echo "Loading sg module"
 insmod /lib/sg.o
 echo "Loading FAT modules"
 insmod /lib/fat.o
 insmod /lib/vfat.o
 
 echo "Mounting /proc"
 mount -t proc /proc /proc
 init
 umount /proc
 
 Does it run as PID 15 because I execute insmod and
 mount before running init?
 
 Thanks,
 Paul
 
 __
 Get personalized email addresses from Yahoo! Mail - only $35 
 a year!  http://personal.mail.yahoo.com/
 -
 To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
 the body of a message to [EMAIL PROTECTED]
 Please read the FAQ at http://www.tux.org/lkml/
 

-
Patrizio Bruno
DADA spa / Ed-IT Development Staff
Borgo degli Albizi 37/r
50122 Firenze
Italy
tel +39 05520351
fax +39 0552478143

PGP PublicKey available at: http://www.keyserver.net/en/
-

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: Why isn't init PID 1?

2001-01-31 Thread Igmar Palsenberg

On Wed, 31 Jan 2001, Paul Powell wrote:

 Hello,
 
 I have a bootable linux CD that runs a custom init. 
 Under most versions of linux init runs as process ID
 one.  Under my bootable CD, it runs as process ID 15. 
 I need it to run as PID 1 so that I can execute a
 kill(-1,15) without killing init.
 
 The boot CD uses and initrd image to load drivers. 
 The linuxrc file looks like:
 
 #!/bin/sash
 
 aliasall
 
 echo "Loading aic7xxx module"
 insmod /lib/aic7xxx.o
 echo "Loading ips module"
 insmod /lib/ips.o ips=ioctlsize:512000
 echo "Loading sg module"
 insmod /lib/sg.o
 echo "Loading FAT modules"
 insmod /lib/fat.o
 insmod /lib/vfat.o
 
 echo "Mounting /proc"
 mount -t proc /proc /proc
 init
 umount /proc
 
 Does it run as PID 15 because I execute insmod and
 mount before running init?

Yes. First program to run get PID 1. 

Solution : fork() in init and load the modules in the child.



Igmar

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: Why isn't init PID 1?

2001-01-31 Thread H. Peter Anvin

Followup to:  [EMAIL PROTECTED]
By author:Igmar Palsenberg [EMAIL PROTECTED]
In newsgroup: linux.dev.kernel
 
 Yes. First program to run get PID 1. 
 
 Solution : fork() in init and load the modules in the child.
 

Or finish your script with "exec init".

-hpa
-- 
[EMAIL PROTECTED] at work, [EMAIL PROTECTED] in private!
"Unix gives you enough rope to shoot yourself in the foot."
http://www.zytor.com/~hpa/puzzle.txt
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/