Re: Optimising pxeboot disk size

2008-12-30 Thread Bernard Dugas

Wojciech Puchar wrote:
I couldn't find the hostname sent by dhcp, but found a way to find the 
ip address.


just use hostname command.


I did, but the answer is empty (remember this is before /etc/rc is run). 
Where is kept the data received by dhcp_client during pxe boot ?


The only problem i have is that the echo done and other standard 
outputs are not visible in /var/log/messages. How can i keep them 
either in dmesg or /var/log/messages ?


add second echo to /var/log/messages ;)


Hope not to forget one  ;-)

But is there a system call or configuration to do that automatically ? I 
can see some echo in /etc/rc without any , and their result seems to 
go to /var/messages.


I wish to learn to do clean scripting :-)

Best regards,
--
Bernard DUGAS Mobile +33 615 333 770
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Optimising pxeboot disk size

2008-12-30 Thread Wojciech Puchar

add second echo to /var/log/messages ;)


Hope not to forget one  ;-)

But is there a system call or configuration to do that automatically ? I can 
see some echo in /etc/rc without any , and their result seems to go to 
/var/messages.


I wish to learn to do clean scripting :-)


actually i don't know how it's done in stardard rc scripts
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Optimising pxeboot disk size

2008-12-29 Thread Bernard Dugas

Hello,

Wojciech Puchar wrote:

i already did such things but with NetBSD 1.5 for my Xterminal distro.
it's simple: 
mount / readonly, put everything here.

in /etc put /etc/rc consisting only
#!/bin/sh
exec /systemrc

in /systemrc put something like that:
#!/bin/sh
echo -n Mounting workstation config directory...
#get your IP or MAC address using ifconfig,grep,cut,awk,how you like
#put to to say MYIP
/sbin/mount_nfs yournfsserver:/clients/etc/MYIP /etc
echo done
exec /etc/rc


Thank you very much, it is now running well after some hardware adventure.

I couldn't find the hostname sent by dhcp, but found a way to find the 
ip address.


The only problem i have is that the echo done and other standard 
outputs are not visible in /var/log/messages. How can i keep them either 
in dmesg or /var/log/messages ?


Best regards,
--
Bernard DUGAS Mobile +33 615 333 770
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Optimising pxeboot disk size

2008-12-29 Thread Wojciech Puchar

Thank you very much, it is now running well after some hardware adventure.

I couldn't find the hostname sent by dhcp, but found a way to find the ip 
address.


just use hostname command.



The only problem i have is that the echo done and other standard outputs 
are not visible in /var/log/messages. How can i keep them either in dmesg or 
/var/log/messages ?


add second echo to /var/log/messages ;)
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Optimising pxeboot disk size

2008-12-16 Thread Paul B. Mahol
On 12/16/08, Wojciech Puchar woj...@wojtek.tensor.gdynia.pl wrote:
 it's simple:

 More simple when you tell it ;-) Thanks a lot, i will try it tonight !

 it doesn't have chance - must work :)


 I wish it's helpful, doing this doesn't just save space but saves time -
 you have to upgrade software once.

 So preserving consistency, which is the most important when you have lot
 of
 diskless stations !

 exactly. i'm using just NetBSD 1.5 (uses LITTLE memory) + Xserver, so
 there are almost no updates, but anyway - it's stored once.

 you may like to make /etc-common directory and put most of files there,
 and
 symlinks in each station's /etc

 In fact, it makes me think that we miss a concept in mount, or at least i
 don't know it currently :
 imagine a -tl (TransparentLayer) option for mount, allowing to mount
 multiple
 source to the same directory, for instance /etc :

 there is already such think - mount_unionfs

 but i don't use it.

 if you mount over some directory - it's original contents (like my /etc/rc
 doing exec /systemrc) gets hidden.


 mount -r yournfsserver:/basic/etc /etc
 mount -tl -r yournfsserver:/TypeX/etc /etc
 mount -tl -r yournfsserver:/StationY/etc /etc

 mount_unionfs

 but i don't know how stable it is.

 When you want to change something, you add a rw TransparentLayer :
 mount -tl yournfsserver:/StationYchanges/etc /etc

 So that changed or added files are only stored in this rw partition, thus
 very small and easy to manage.

 This would be a kind of partition inheritance, like in object languages...

 Dreams are allowed :-)

 try mount_unionfs

and mount_nullfs

-- 
Paul
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Optimising pxeboot disk size

2008-12-16 Thread Bernard Dugas

Wojciech Puchar wrote:

mount_unionfs

but i don't know how stable it is.


Thanks to fill my dreams :-) The dream is close, but still a dream :-(

http://www.freebsd.org/cgi/man.cgi?query=mount_unionfssektion=8apropos=0manpath=FreeBSD+7.0-RELEASE
BUGS
 THIS FILE SYSTEM TYPE IS NOT YET FULLY SUPPORTED (READ: IT DOESN'T 
WORK)AND USING IT MAY, IN FACT, DESTROY DATA ON YOUR SYSTEM.  USE AT 
YOUR OWN RISK.  BEWARE OF DOG.  SLIPPERY WHEN WET.


Sad not to be a coder...

Best regards,
--
Bernard DUGAS Mobile +33 615 333 770
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Optimising pxeboot disk size

2008-12-16 Thread Wojciech Puchar

on NFS server.

Lot of root directories can be shared and mounted in fstab, after booting 
process : /usr, /home...


In current solution, the minimum root directories i had to keep for managing 
to boot are :

bin libexec sbin boot etc lib


i already did such things but with NetBSD 1.5 for my Xterminal distro.

it's simple:


mount / readonly, put everything here.

in /etc put /etc/rc consisting only

#!/bin/sh
exec /systemrc

in /systemrc put something like that:

#!/bin/sh
echo -n Mounting workstation config directory...
#get your IP or MAC address using ifconfig,grep,cut,awk,how you like
#put to to say MYIP
/sbin/mount_nfs yournfsserver:/clients/etc/MYIP /etc
echo done
exec /etc/rc



please then add:

/tmp, /var/tmp, /var/run, possibly /var/log as tmpfs in fstab

OR

mount it with per-station directory the same way as /etc



I wish it's helpful, doing this doesn't just save space but saves time - 
you have to upgrade software once.



you may like to make /etc-common directory and put most of files there, 
and symlinks in each station's /etc

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Optimising pxeboot disk size

2008-12-16 Thread Bernard Dugas

Hi,

I'm working on a project to have many diskless clients PXEbooting on 1 
nfs server.


This works now, but i would like to have a more efficient use of disk 
space on NFS server.


Lot of root directories can be shared and mounted in fstab, after 
booting process : /usr, /home...


In current solution, the minimum root directories i had to keep for 
managing to boot are :

bin libexec sbin boot etc lib

But it appears that only /etc is really specific to each diskless 
clientX, having basically fstab and rc.conf inside.


All other directories could be shared, and specifically /boot which is 
more that 100MO : i would prefer not to duplicate it, as 10 servers 
would mean 1GO for nothing.


Please would anybody help find a way to share all what we can during 
boot process ?


Another way to ask the question is : how can we mount / and then /etc at 
the begining of boot process instead of mounting only / with etc inside ?


I have tried to do links, but no way to make the boot process follow them...

Thanks a lot,
Best regards,

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Optimising pxeboot disk size

2008-12-16 Thread Wojciech Puchar

it's simple:


More simple when you tell it ;-) Thanks a lot, i will try it tonight !


it doesn't have chance - must work :)



I wish it's helpful, doing this doesn't just save space but saves time - 
you have to upgrade software once.


So preserving consistency, which is the most important when you have lot of 
diskless stations !


exactly. i'm using just NetBSD 1.5 (uses LITTLE memory) + Xserver, so 
there are almost no updates, but anyway - it's stored once.


you may like to make /etc-common directory and put most of files there, and 
symlinks in each station's /etc


In fact, it makes me think that we miss a concept in mount, or at least i 
don't know it currently :
imagine a -tl (TransparentLayer) option for mount, allowing to mount multiple 
source to the same directory, for instance /etc :


there is already such think - mount_unionfs

but i don't use it.

if you mount over some directory - it's original contents (like my /etc/rc 
doing exec /systemrc) gets hidden.




mount -r yournfsserver:/basic/etc /etc
mount -tl -r yournfsserver:/TypeX/etc /etc
mount -tl -r yournfsserver:/StationY/etc /etc


mount_unionfs

but i don't know how stable it is.


When you want to change something, you add a rw TransparentLayer :
mount -tl yournfsserver:/StationYchanges/etc /etc

So that changed or added files are only stored in this rw partition, thus 
very small and easy to manage.


This would be a kind of partition inheritance, like in object languages... 
Dreams are allowed :-)


try mount_unionfs
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Optimising pxeboot disk size

2008-12-16 Thread Bernard Dugas

Wojciech Puchar wrote:

i already did such things but with NetBSD 1.5 for my Xterminal distro.

it's simple:


More simple when you tell it ;-) Thanks a lot, i will try it tonight !

I wish it's helpful, doing this doesn't just save space but saves time - 
you have to upgrade software once.


So preserving consistency, which is the most important when you have lot 
of diskless stations !


you may like to make /etc-common directory and put most of files there, 
and symlinks in each station's /etc


In fact, it makes me think that we miss a concept in mount, or at least 
i don't know it currently :
imagine a -tl (TransparentLayer) option for mount, allowing to mount 
multiple source to the same directory, for instance /etc :


mount -r yournfsserver:/basic/etc /etc
mount -tl -r yournfsserver:/TypeX/etc /etc
mount -tl -r yournfsserver:/StationY/etc /etc

A file is first look for in yournfsserver:/StationY/etc,
then in yournfsserver:/TypeX/etc
and finally in yournfsserver:/basic/etc.

This means that StationX will see in its /etc firts its specific files, 
then the files dedicated to TypeX station (webserver, dns server, 
workstation,...) and then all basic files unchanged from standard 
distribution.


When you want to change something, you add a rw TransparentLayer :
mount -tl yournfsserver:/StationYchanges/etc /etc

So that changed or added files are only stored in this rw partition, 
thus very small and easy to manage.


This would be a kind of partition inheritance, like in object 
languages... Dreams are allowed :-)


Thanks a lot,
Best regards,
--
Bernard DUGAS Mobile +33 615 333 770
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Optimising pxeboot disk size

2008-12-16 Thread Bernard Dugas

Paul B. Mahol wrote:


On 12/16/08, Wojciech Puchar woj...@wojtek.tensor.gdynia.pl wrote:



When you want to change something, you add a rw TransparentLayer :
mount -tl yournfsserver:/StationYchanges/etc /etc

So that changed or added files are only stored in this rw partition, thus
very small and easy to manage.

This would be a kind of partition inheritance, like in object languages...

Dreams are allowed :-)


try mount_unionfs


and mount_nullfs


Thanks Paul, FreeBSD has always hidden treasures :-)

MOUNT_NULLFS(8) doc is very detailled, but i can't find how to use it 
for my problem : being able to go from common shared configuration to 
specific private configuration.


unionfs looks very close to my dream, but it is currently not available 
for production :-(


Best regards,
--
Bernard DUGAS Mobile +33 615 333 770
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Optimising pxeboot disk size

2008-12-16 Thread Wojciech Puchar


MOUNT_NULLFS(8) doc is very detailled, but i can't find how to use it for my 
problem : being able to go from common shared configuration to specific 

you can't - nullfs doesn't do this.

use symlinks

/etc containing tons of links to /sharedetc and few files instead of 
symlink - for those that are different.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Optimising pxeboot disk size

2008-12-16 Thread Da Rock
On Tue, 2008-12-16 at 15:02 +0100, Bernard Dugas wrote:
 Wojciech Puchar wrote:
  i already did such things but with NetBSD 1.5 for my Xterminal distro.
  
  it's simple:
 
 More simple when you tell it ;-) Thanks a lot, i will try it tonight !
 
  I wish it's helpful, doing this doesn't just save space but saves time - 
  you have to upgrade software once.
 
 So preserving consistency, which is the most important when you have lot 
 of diskless stations !
 
  you may like to make /etc-common directory and put most of files there, 
  and symlinks in each station's /etc
 
 In fact, it makes me think that we miss a concept in mount, or at least 
 i don't know it currently :
 imagine a -tl (TransparentLayer) option for mount, allowing to mount 
 multiple source to the same directory, for instance /etc :
 
 mount -r yournfsserver:/basic/etc /etc
 mount -tl -r yournfsserver:/TypeX/etc /etc
 mount -tl -r yournfsserver:/StationY/etc /etc
 
 A file is first look for in yournfsserver:/StationY/etc,
 then in yournfsserver:/TypeX/etc
 and finally in yournfsserver:/basic/etc.
 
 This means that StationX will see in its /etc firts its specific files, 
 then the files dedicated to TypeX station (webserver, dns server, 
 workstation,...) and then all basic files unchanged from standard 
 distribution.
 
 When you want to change something, you add a rw TransparentLayer :
 mount -tl yournfsserver:/StationYchanges/etc /etc
 
 So that changed or added files are only stored in this rw partition, 
 thus very small and easy to manage.
 
 This would be a kind of partition inheritance, like in object 
 languages... Dreams are allowed :-)

Apparently that sort of thing is available on plan9 OS. Everything is a
file so you can mount remote and local devices- plus merge them in a
single directory. Check it out on wikipedia...

Dreams can come true! :)

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Optimising pxeboot disk size

2008-12-16 Thread Paul B. Mahol
On 12/16/08, Bernard Dugas bern...@dugas-family.org wrote:
 Paul B. Mahol wrote:

 On 12/16/08, Wojciech Puchar woj...@wojtek.tensor.gdynia.pl wrote:

When you want to change something, you add a rw TransparentLayer :
mount -tl yournfsserver:/StationYchanges/etc /etc

So that changed or added files are only stored in this rw partition, thus
very small and easy to manage.

This would be a kind of partition inheritance, like in object
 languages...

Dreams are allowed :-)

try mount_unionfs

 and mount_nullfs

 Thanks Paul, FreeBSD has always hidden treasures :-)

 MOUNT_NULLFS(8) doc is very detailled, but i can't find how to use it
 for my problem : being able to go from common shared configuration to
 specific private configuration.

 unionfs looks very close to my dream, but it is currently not available
 for production :-(

Well, I tested unionfs on CURRENT and it did not crashed on me. Feel
free to test it on 7 STABLE and report results to developers.

-- 
Paul
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Optimising pxeboot disk size

2008-12-16 Thread Bernard Dugas

Paul B. Mahol wrote:

Well, I tested unionfs on CURRENT and it did not crashed on me. Feel
free to test it on 7 STABLE and report results to developers.


Thanks for the feed-back, i will no more be afraid to test :-)
I will tell you later,

Best regards,
--
Bernard DUGAS Mobile +33 615 333 770
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org