Re: starting sysinstall at boot time

2008-09-03 Thread joel
Quoting Manolis Kiagias <[EMAIL PROTECTED]>:
Hi Manolis

Thank you very much for you quick and accurate answer.
I had mounted the mfsroot but I did not notice that init was not
present. So now every thins is clear and not magic at all.

Best regards,
Joel Levee

> [EMAIL PROTECTED] wrote:
> > Hi,
> >
> > Something seems magic in freebsd: I am looking for what does start
> > sysinstall at boot time when I boot from the installation CD.
> > The only thing related to systinstall is the setting of the init_path
> variable
> > in the loader.rc file but it is in comment thus the loader should finish
> > by launchinig init as usual so what does make it launch sysinstall instead?
> >
> > I also examined /etc/ttys which is used by init but this file is standard
> > and I do not find anything that could tell init to start sysinstall instead
> > of getty!
> >
> > As you may guess, my goal is to create an customized installation CD in
> > order to install a network appliance wich embedds freebsd.
> >
> > Sincerily,
> > Joel Levee
> >
> >
> >
>
> This is a tricky one, kind of black magic ;)
>
> Seriously, it is quite simple:
>
> You correctly located the init_path variable. This contains the
> following (on a 6.3-RELEASE CD I have handy at the moment):
>
>
#init_path="/sbin/init:/sbin/oinit:/sbin/init.bak:/rescue/init:/stand/sysinstall"
>
> This is commented out, but the values shown are the built-in defaults.
>
> Now, if you take a look at the CD filesystem structure, *there is* an
> /sbin/init and there is *no* /stand/sysinstall. So, you would assume
> that init would run first.
>
> However, here comes the caveat:
>
> The root filesystem when you boot your installation media, is  *not* the
> CD-ROM itself. Look at /boot/loader.conf:
>
> mfsroot_load="YES"
> mfsroot_type="mfs_root"
> mfsroot_name="/boot/mfsroot"
>
> You will find /boot/mfsroot.gz as the file that acts as the root filesystem.
> You can actually examine the contents of this if you mount it using
> mdconfig (assuming you mounted your install CD on /cdrom):
>
> cp /cdrom/boot/mfsroot.gz /tmp
> cd /tmp
> unzip mfsroot.gz (Can probably be mounted compressed(?), did not check)
> mdconfig -f mfsroot md0
> mount /dev/md0 /mnt
>
> Check the contents of /mnt:
>
> bin   boot  dev   etc   mnt   sbin  stand var
>
> sbin is a symbolic link to stand. There is no '/stand/init' in , but
> '/stand/sysinstall' exists. Therefore, sysinstall executes ;)
>


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: starting sysinstall at boot time

2008-09-03 Thread joel
Quoting Artis Caune <[EMAIL PROTECTED]>:
Hi Artis,


Thank you for your quick answer,

/sbin/init is actualy replaced by sysinstall because it is
not present on the mfsroot thus sysinstall is launched instead
of init.

Best regards,
Joel Levee.

> On Tue, Sep 2, 2008 at 12:49 PM,  <[EMAIL PROTECTED]> wrote:
> >
> > Hi,
> >
> > Something seems magic in freebsd: I am looking for what does start
> > sysinstall at boot time when I boot from the installation CD.
> > The only thing related to systinstall is the setting of the init_path
> variable
> > in the loader.rc file but it is in comment thus the loader should finish
> > by launchinig init as usual so what does make it launch sysinstall instead?
>
> I think /sbin/init is replaced with sysinstall.
>
>
> > As you may guess, my goal is to create an customized installation CD in
> > order to install a network appliance wich embedds freebsd.
>
> I also use custom install script, and I replace /etc/rc on mfs image.
>
>
>
>
> --
> regards,
> Artis Caune
>
> <. CCNA
> <|
> <' didii FreeBSD
>


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: starting sysinstall at boot time

2008-09-02 Thread Artis Caune
On Tue, Sep 2, 2008 at 12:49 PM,  <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> Something seems magic in freebsd: I am looking for what does start
> sysinstall at boot time when I boot from the installation CD.
> The only thing related to systinstall is the setting of the init_path variable
> in the loader.rc file but it is in comment thus the loader should finish
> by launchinig init as usual so what does make it launch sysinstall instead?

I think /sbin/init is replaced with sysinstall.


> As you may guess, my goal is to create an customized installation CD in
> order to install a network appliance wich embedds freebsd.

I also use custom install script, and I replace /etc/rc on mfs image.




-- 
regards,
Artis Caune

<. CCNA
<|
<' didii FreeBSD
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: starting sysinstall at boot time

2008-09-02 Thread Manolis Kiagias

[EMAIL PROTECTED] wrote:

Hi,

Something seems magic in freebsd: I am looking for what does start
sysinstall at boot time when I boot from the installation CD.
The only thing related to systinstall is the setting of the init_path variable
in the loader.rc file but it is in comment thus the loader should finish
by launchinig init as usual so what does make it launch sysinstall instead?

I also examined /etc/ttys which is used by init but this file is standard
and I do not find anything that could tell init to start sysinstall instead
of getty!

As you may guess, my goal is to create an customized installation CD in
order to install a network appliance wich embedds freebsd.

Sincerily,
Joel Levee


  


This is a tricky one, kind of black magic ;)

Seriously, it is quite simple:

You correctly located the init_path variable. This contains the 
following (on a 6.3-RELEASE CD I have handy at the moment):


#init_path="/sbin/init:/sbin/oinit:/sbin/init.bak:/rescue/init:/stand/sysinstall"

This is commented out, but the values shown are the built-in defaults.

Now, if you take a look at the CD filesystem structure, *there is* an 
/sbin/init and there is *no* /stand/sysinstall. So, you would assume 
that init would run first.


However, here comes the caveat:

The root filesystem when you boot your installation media, is  *not* the 
CD-ROM itself. Look at /boot/loader.conf:


mfsroot_load="YES"
mfsroot_type="mfs_root"
mfsroot_name="/boot/mfsroot"

You will find /boot/mfsroot.gz as the file that acts as the root filesystem.
You can actually examine the contents of this if you mount it using 
mdconfig (assuming you mounted your install CD on /cdrom):


cp /cdrom/boot/mfsroot.gz /tmp
cd /tmp
unzip mfsroot.gz (Can probably be mounted compressed(?), did not check)
mdconfig -f mfsroot md0
mount /dev/md0 /mnt

Check the contents of /mnt:

bin   boot  dev   etc   mnt   sbin  stand var

sbin is a symbolic link to stand. There is no '/stand/init' in , but   
'/stand/sysinstall' exists. Therefore, sysinstall executes ;)

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


starting sysinstall at boot time

2008-09-02 Thread joel

Hi,

Something seems magic in freebsd: I am looking for what does start
sysinstall at boot time when I boot from the installation CD.
The only thing related to systinstall is the setting of the init_path variable
in the loader.rc file but it is in comment thus the loader should finish
by launchinig init as usual so what does make it launch sysinstall instead?

I also examined /etc/ttys which is used by init but this file is standard
and I do not find anything that could tell init to start sysinstall instead
of getty!

As you may guess, my goal is to create an customized installation CD in
order to install a network appliance wich embedds freebsd.

Sincerily,
Joel Levee




___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"