WIDE-DHCP

2013-08-13 Thread s m
hello guys,


does any body use WIDE-DHCP? i installed it on my freebsd 8.2 but don't
know how to configure it. i searched a lot but can not find any useful
documentation.

please let me know if some body configure it or have some application about.
thanks in advance
SAM
___
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: WIDE-DHCP

2013-08-13 Thread s m
yes, unfortunately it's not well enough for me:((


On Tue, Aug 13, 2013 at 1:32 PM, sth...@nethelp.no wrote:

  It seems that the distribution includes a directory called db_sample
  with some tutorials/examples.
 
  But it also seems that the last release of wide-dhcp is 16 years old...

 And I also strongly doubt that he's going to have any better luck
 with his /8 net.

 Steinar Haug, Nethelp consulting, sth...@nethelp.no

___
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: dhcp server returns core dump when i define network with mask 8

2013-07-23 Thread s m
thanks Frank,

192 is just a sample. if i want to define 125.0.0.0 netmask 255.0.0.0, dhcp
server core dump either. you're right, it is better to use just some
limited addresses to avoid possible troubles. but i want to run my dhcp
server for all possible networks.
now my question is: if i define a network with mask 8, the rang should be
like: 126.0.0.0  126.254.255.255?

and thank you jb but if i define my network like below,  server runs
correctly:
log-facility local7;
subnet 192.168.0.0 netmask 255.255.0.0 {
range 192.168.0.1 192.168.255.255;
}

i think 192.168.255.55 is reserved for broadcast too. is it not true? if
yes, why dhcp server works correctly?
please help me to clear my mind.
regards,
SAM


On Tue, Jul 23, 2013 at 12:56 PM, Frank Leonhardt fra...@fjl.co.uk wrote:

 On 23/07/2013 09:03, jb wrote:

 s m sam.gh1986 at gmail.com writes:

  ...
 subnet 192.0.0.0 netmask 255.0.0.0 {
  range 192.0.0.1 192.255.255.255;

 The 'range' denotes IP addresses that can be allocated to clients.
 The IP 192.255.255.255 is a reserved broadcast address for the network.
 jb



 It's definitely bad idea to try to use it, but it doesn't explain the
 core dump.

 Also, using DHCP to dish out addresses that don't belong to you AND aren't
 on a private network (as defined by IANA) will probably lead to trouble.
 Valid private address ranges are:

 10.0.0.0 - 10.255.255.255 (private class A)
 172.16.0.0 - 172.31.255.255 (private class B x 16)
 192.168.0.0 - 192.168.255.255 (private class C x 256)

 Which block you use is really a matter of taste - classes haven't been
 used in routing for quite a while so you can consider them all as straight
 blocks but I (for one) still treat them as classed just to help me
 visualise what's what. For example, I'll use one class C per site to
 prevent conflicts over VPN.

 192.0.0.0/24 addresses are allocated to real hosts on the wider internet,
 although IIRC some of the lower ones are reserved for use in documentation
 (like example.com) - is that where the idea came from?!? :-)

 Regards, Frank.


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

___
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


dhcp server returns core dump when i define network with mask 8

2013-07-23 Thread s m
hello all,
i have a question about dhcpd in freebsd8.2 . when i define my network like
below in dhcpd.conf file, server doesn't run correctly and return core
dump
this is my dhcpd.conf file:

ddns-update-style none;
log-facility local7;
subnet 192.0.0.0 netmask 255.0.0.0 {
range 192.0.0.1 192.255.255.255;
}

 i want to define a network with mask 8. is this config wrong? if yes, how
should i define it?

thanks in advance,
SAM
___
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


does journaling cause DMA-WRITE failure?

2013-07-18 Thread s m
hello all,

i have freebsd8.2 on my system with journaled gpt partitions. occasionally,
i see the below errors in startup and system doesn't boot correctly. if i
restart system, it boot normally and every thing is ok.
these errors are:
ad3: WARNING - WRITE_DMA requeued  due to channel reset LBA=635411
ad3: WARNING - READ_DMA requeued  due to channel reset LBA=635411
ata1: FAILURE - already active DMA on this device
ata1: setting up DMA failed
ad3: WARNING - WRITE_DMA requeued  due to channel reset LBA=635411
ata1: FAILURE - already active DMA on this device

and these errors are shown repeatedly.

i have two question: does journaling cause to happen these errors? and if i
set hw.ata.ata_dma to 0, is it resolve the problem? if yes, has it any side
effect or not?

any comments or hints are really appreciated.
SAM
___
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


find netmask for offered lease in dhclient code

2013-07-15 Thread s m
hello all,
i want to change dhclient code and customize it. in order to do that, i
need to know the netmask for offered ip. i see code and found that struct
client_lease  *offered_leases, keeps information about offered lease such
as ip address but this structure hasn't any field about netmask. i don't
know how i can find the netmak for this offered ip address.

any one has traced dhclient code before? how can i see the netmask for
offered ip?

thanks in advance,
SAM
___
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: find netmask for offered lease in dhclient code

2013-07-15 Thread s m
thank you so much. it is a hint for me to search more in code. i hope to
find something.


On Mon, Jul 15, 2013 at 2:04 PM, Olivier Nicole olivier2...@gmail.comwrote:

  thanks Olivier, but may i ask you to explain it more? i have seen that
  there is a struct option_data in offered_lease in code but when these
  options set, how can i see the netmask value? where is it kept?

 Well, I am afraid I have no more explanation, I just did a dhcp renew
 while running wireshark and check the contents of the dialog. I could
 see that in the DHCP offer, there is an option field with holds the
 netmask. I did not dig any further.

 Olivier

 
 
  On Mon, Jul 15, 2013 at 1:43 PM, Olivier Nicole 
 olivier.nic...@cs.ait.ac.th
  wrote:
 
  Hi,
 
   i want to change dhclient code and customize it. in order to do that,
 i
   need to know the netmask for offered ip. i see code and found that
 struct
   client_lease  *offered_leases, keeps information about offered lease
 such
   as ip address but this structure hasn't any field about netmask. i
 don't
   know how i can find the netmak for this offered ip address.
 
  According to wireshark, it's in option t=1, l=4
 
  Olivier
 
   any one has traced dhclient code before? how can i see the netmask for
   offered ip?
  
   thanks in advance,
   SAM
   ___
   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
  ___
  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
 
 
 
 
  --
  *Sa.M*
  ___
  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

___
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


prevent ip conflict in dhcp client

2013-07-11 Thread s m
hello all

i have a question about dhcp client. i want to know if there is any way to
understand the ip address which is offered by server before it assigned to
the interface.
i have a freebsd system which one of its interfaces should get ip address
from dhcp server whereas other interfaces have ip addresses and their ip
address change many times. so i want to prevent ip conflict.  is there any
way to prevent ip conflict in this situation?
i think the best way is to know the ip address which is offered by dhcp
server before assigning it to interface  and check if it has conflict with
others or not. is it possible? if yes, how i can do this?

any comments or hints are appreciated.
thanks in advance
SAM
___
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: prevent ip conflict in dhcp client

2013-07-11 Thread s m
thanks Eugene,
you're right but i forgot to say that my client acts like a router. i mean
none of interfaces should have ip address in same range (this is conflict
for me). i can manage each interface to get ip address from DHCP or
manually. so one interface may get ip address from dhcp server whereas all
others have ip addresses which are set manually.
for this situation, do you have any ideas to avoid ip conflict?
thanks again for your attention
SAM


On Thu, Jul 11, 2013 at 3:06 PM, Eugene ge...@geniechka.ru wrote:

 Hi Sam,

 Actually I think this is wrong approach. Correctly configured networks
 should be consistent and should not need such 'fixes'. Also you should
 observe the IP provided by upstream DHCP server otherwise it is an
 invitation for trouble (both technical and possibly legal).
 Are the 'other' interfaces in your internal networks? Then you should
 change them to use different address block from that used in your
 provider's network (there are many address blocks for private networks).
 And/or you should talk to your admin and discuss the address policy, maybe
 they can give you a fixed address.

 Best wishes
 Eugene


 -Original Message- From: s m
 Sent: Thursday, July 11, 2013 2:19 PM
 To: freebsd-questions
 Subject: prevent ip conflict in dhcp client


 hello all

 i have a question about dhcp client. i want to know if there is any way to
 understand the ip address which is offered by server before it assigned to
 the interface.
 i have a freebsd system which one of its interfaces should get ip address
 from dhcp server whereas other interfaces have ip addresses and their ip
 address change many times. so i want to prevent ip conflict.  is there any
 way to prevent ip conflict in this situation?
 i think the best way is to know the ip address which is offered by dhcp
 server before assigning it to interface  and check if it has conflict with
 others or not. is it possible? if yes, how i can do this?

 any comments or hints are appreciated.
 thanks in advance
 SAM
 __**_
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/**mailman/listinfo/freebsd-**questionshttp://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to freebsd-questions-**
 unsubscr...@freebsd.org freebsd-questions-unsubscr...@freebsd.org

___
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


already active DMA on this device FAILURE at startup

2013-06-29 Thread s m
hello all,

i have FreeBSD8.2 on my system. occasionally,  i see some strange errors in
startup and freebsd can not boot correctly. when i reset my system
everything is ok and freebsd boot successfully. these are errors which
appear in statrtup:

ata1: setting up DMA failed
ad3: WARNING - READ_DMA requeued due to channel reset LBA=25167888
ata1: FAILURE - already active DMA on this device

these errors repeat more and more.

i don't know what's wrong in my freebsd. i have used freebsd for several
years and have not seen these errors before.
last few days ago, i set a separate partition for etc. can separate etc
partition cause this problem? how can i solve it to never see these errors
again? (i need a separate partition for etc)

thanks in advance,
SAM
___
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


change specified byte in a hex file

2013-06-03 Thread s m
hi folks,

i want to change a specified byte in a hex file. i want to edit my file and
change byte 0x28a content from 0x08 to 0x14.

i try to do it with hex-editor in windows but this file is too big and i
can't transfer it to the other system. i think it should be done by some
commands such as dd but i don't know how to use it.

please help me to edit my file.
thanks in advance,
SAM
___
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: change specified byte in a hex file

2013-06-03 Thread s m
thanks Ayan,

but isn't there any command in freebsd to do it for me??


On Mon, Jun 3, 2013 at 11:06 AM, Ayan George a...@ayan.net wrote:

 On 06/03/2013 02:28 AM, s m wrote:
  hi folks,
 
  i want to change a specified byte in a hex file. i want to edit my file
 and
  change byte 0x28a content from 0x08 to 0x14.
 
  i try to do it with hex-editor in windows but this file is too big and i
  can't transfer it to the other system. i think it should be done by some
  commands such as dd but i don't know how to use it.
 
  please help me to edit my file.
  thanks in advance,
  SAM
 

 Use a decent hex editor or write a small C program to edit the file.

 -ayan


___
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: define more partitions in freebsd

2013-06-02 Thread s m
thanks guys,

i understand another solution is GPT partitioning. but i prefer to have
more partitions in traditional freebsd (with MBR table i think). using GPT
is the last solution for me.

i should create more than 8 partitions with gpart command (flag n which
identifies entries) but i have errors when using it. is there any special
option which should be included in kernel in order to use gpart with flag
n? any one test it before?

thanks in advance,
SAM


On Sat, Jun 1, 2013 at 8:23 PM, Carl Johnson ca...@peak.org wrote:

 s m sam.gh1...@gmail.com writes:

  hello all
 
  i want to install freebsd8.2 on my system. for some reasons, i need
  partitions more than 6. my freebsd just allow me to define partitions
  from a to h, not any more.
 
  i checked FreeBSD handbook, but it doesn't say anything about defining
  more partitions.
 
  my question is: how can i define more partitions on my freebsd? (for
  example, ad3s1a, ..., ad3s1h, ad3s1i, ad3s1j, ...).
 
  any comments or hints are appreciated.
  SAM

 Others have already commented that GPT labels are better, but I think
 that you can have more than 8 partitions.  I remember a posting a while
 back that the maximum had been increased.  You will have to experiment
 if you want to do this, but gpart shows an example that uses 20
 partitions:  '/sbin/gpart create -s BSD -n 20 ada0s1'.  I also don't
 know that bsdlabel will handle these, so you definitely should
 experiment first.
 --
 Carl Johnsonca...@peak.org
 ___
 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

___
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


define more partitions in freebsd

2013-06-01 Thread s m
hello all

i want to install freebsd8.2 on my system. for some reasons, i need
partitions more than 6. my freebsd just allow me to define partitions
from a to h, not any more.

i checked FreeBSD handbook, but it doesn't say anything about defining
more partitions.

my question is: how can i define more partitions on my freebsd? (for
example, ad3s1a, ..., ad3s1h, ad3s1i, ad3s1j, ...).

any comments or hints are appreciated.
SAM
___
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: define more partitions in freebsd

2013-06-01 Thread s m
thanks for your reply,

it is a good news if i can define more partitions with gpart. names
are not so important for me. if i can define more partitions with
gpart, are these partitions work correctly? you know i wan to define a
journal partition for each partition on my freebsd. so if i use these
extra partition as journal provider, do they work correctly?

and another question, how can i define more partitions with gpart? i
searched and some people say to use gpart -n 20. do you mean to use
this command too?

and my last question, some people say to change byte 0x28a of the disk
from 0x08 to 0x14 (which 14 is the number of partitions). do you think
it's a good idea and applicable solution?

thanks for your attention

On 6/1/13, Polytropon free...@edvax.de wrote:
 On Sat, 1 Jun 2013 11:10:32 +0430, s m wrote:
 hello all

 i want to install freebsd8.2 on my system. for some reasons, i need
 partitions more than 6. my freebsd just allow me to define partitions
 from a to h, not any more.

 That's correct and expected for the MBR partitioning approach
 (which is considered mostly outdated today).



 i checked FreeBSD handbook, but it doesn't say anything about defining
 more partitions.

 Because you _cannot_ define more partitions than up to 'h'.
 This is a hard-defined limit of MBR-style partitions (as
 they are initialized with bsdlabel).



 my question is: how can i define more partitions on my freebsd? (for
 example, ad3s1a, ..., ad3s1h, ad3s1i, ad3s1j, ...).

 You cannot. You need to use the GPT partitioning approach
 and repartition your disk. With gpart, you can create more
 than 'h' partitions, but the partitions will have different
 names, such as ad3s1p1, ad3s1p2, ..., ad3s1p10, ad3s1p11, ...
 and so on.




 --
 Polytropon
 Magdeburg, Germany
 Happy FreeBSD user since 4.0
 Andra moi ennepe, Mousa, ...

___
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: define more partitions in freebsd

2013-06-01 Thread s m
thanks Robert,

so i just have one choice: gpart. do you know how to use it? i define
ad3 and ad3s1; after that i run this command: gpart create -s mbr -n
20 ad3s1. but this error happens: GEOM: file exists.
after that i do it again in different way: i create ad3 and after that
run the above command but it says: invalid argument ad3s1. i think
because there is no ad3s1!!!

now how can i use -n flag to set entries number for my partitioning???

you know it is so important for me :(( any comments or hints are
really appreciated.
SAM

On 6/1/13, Robert Huff roberth...@rcn.com wrote:

 s m writes:


  and my last question, some people say to change byte 0x28a of the
  disk from 0x08 to 0x14 (which 14 is the number of partitions). do
  you think it's a good idea and applicable solution?

   Short answer: if you have to ask - no, it isn't.
   :-)
   Respectfully,


   Robert Huff
 ___
 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

___
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


freebsd8.2 with /etc mount point can't run correctly

2013-05-28 Thread s m
hello all,

i want to install freebsd8.2 with different partitions. i want to have
a separated partition for /etc. therefore this is my partitions: / ,
/var, /etc. /tmp, /usr, swap.

but after installing, freebsd can not run correctly and have problem
with fstab. i checked my fstab file (fstab file in /etc partition) and
every thing is ok. i think i should do something in order to use fstab
file in different mount point. is it true? what should i do to have a
freebsd with a separate /etc mount point?

any comments are appreciated.
SAM
___
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: setup journaling for root partition

2013-05-24 Thread s m
thanks Warren, you're right but i want to set journaling in fixit
mode in fixit mode none of my partitions are mounted (mount
command show no partition) but geom returns error yet.

is there any way to tell geom that my partitions are unmounted?

On 5/23/13, Warren Block wbl...@wonkity.com wrote:
 On Thu, 23 May 2013, Torsten Hantzsche wrote:

 On Thu, 23 May 2013, s m wrote:


 thanks,

 i do as you said, but after loading gjournal, dd says operation not
 permitted.
 gjournal clear says operation not permitted too and therefore
 gjournal
 label is not done and say previous error (gjournal cannot clear
 metadata
 on ad3s1a: operation not permitted). and -v return no extra log.

 i don't know why i can not do any thing in fixit mode:(

 is this a true procedure? i mean maybe i should do any thing else
 because
 freebsd handbook set journaling for user partition in single user mode
 not
 in fixit mode. i test it and it works well, but for root partition i can
 not do the same because root partition can not be unmount in single user
 mode.

 any hints or comments are really appreciated.
 thanks in advance


 Hi,

 i remember having similar error messages with glabel some years ago.
 The solution was found in man 4 geom in section DIAGNOSTICS:

 I had to set kern.geom.debugflags=0x10 to enable the foot shooting
 mode.

 Maybe this could help you too?

 For certain values of help. :)

 If geom won't let you write to part of a disk, it's because it thinks
 that part of the disk is already in use, usually by a mounted
 filesystem.  Overwriting part of a filesystem is not guaranteed to lose
 data.  But why take the chance?

 Better to boot from mfsBSD (http://mfsbsd.vx.sk/).  Possibly better yet
 to use SUJ, which can be enabled with tunefs with the root partition
 mounted read-only in single user mode.  SUJ has its own problems,
 though.
 ___
 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

___
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: setup journaling for root partition

2013-05-23 Thread s m
thanks,

i do as you said, but after loading gjournal, dd says operation not
permitted.
gjournal clear says operation not permitted too and therefore gjournal
label is not done and say previous error (gjournal cannot clear metadata
on ad3s1a: operation not permitted). and -v return no extra log.

i don't know why i can not do any thing in fixit mode:(

is this a true procedure? i mean maybe i should do any thing else  because
freebsd handbook set journaling for user partition in single user mode not
in fixit mode. i test it and it works well, but for root partition i can
not do the same because root partition can not be unmount in single user
mode.

any hints or comments are really appreciated.
thanks in advance



On Thu, May 23, 2013 at 10:41 AM, Michael Sierchio ku...@tenebras.comwrote:


 On Wed, May 22, 2013 at 10:53 PM, s m sam.gh1...@gmail.com wrote:

 thanks Michael for your quick reply:)
 yes, i can boot from usb freebsd flash and use fixit mode.
 i have root, var, tmp, usr and swap on my system. i create an extra swap
 partition to use it as journal provider for root partition.

 in fixit mode, first i run two below command in order to abel load
 gjournal:

 ln -s /dist/lib /lib
 ls -s /dist/boot/kernel /boot/modules

 then
 gjournal load

 and after that: gjournal label -f ad3s1a ad3s1g (ad3s1a is root
 partition and ad3s1g is swap partition for journal provider)

 but this error is shown:
 gjournal cannot clear metadata on ad3s1a: operation not permitted
 what is wrong here??? i really don't know how to fix it:


 Try using -v to get more verbose output.  I am at a loss here, too.
  Perhaps you can try

 gjournal load
 dd if=/dev/zero of=/dev/ad3s1g bs=1m
 gjournal clear -v ad3s1a
 gjournal label -vf ad3s1a ad3s1g

 and see what it says, if anything.


___
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: setup journaling for root partition

2013-05-23 Thread s m
thanks Torsten but it can't help me:((

and RW, yes i can boot to single user mode, but i can't do anything
there!!! i mean when i run command gjournal label -f ad3s1a ad3s1g some
errors returned and all my partition disappear!!

what do you do if you want to set a journal partition for your root
partition? can you tell me step by step to compare it with my steps?

i really don't know how to set a journal partition for my root:(( i think
it is so simple but it make me busy more than a week:(


On Thu, May 23, 2013 at 3:34 PM, RW rwmailli...@googlemail.com wrote:

 On Thu, 23 May 2013 09:57:50 +0430
 s m wrote:


  my problem is, i can not run gjournal command for root partition in
  fixit mode nor single user mode.

 Just to check, you did boot into single user mode rather than shut-down
 into single user mode?
 ___
 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

___
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: setup journaling for root partition

2013-05-22 Thread s m
thanks Michael, but in all documentation about journaling, tunefs is used
as below: tunefs -J enable ad3s1X.journal. ad3s1X.journal is created by
gjournal command: gjournal label ad3s1a ad3s1g that assign ad3s1g as
journal provider for ad3s1a and create ad3s1a.journal which contains ad3s1a
as data provider and ad3s1g as journal provider.

my problem is, i can not run gjournal command for root partition in fixit
mode nor single user mode. you mean, i should just use tunefs command on
ad3s1X (root partition)? if yes, then where journal provider for root
partition is located? in root partition?


On Wed, May 22, 2013 at 10:23 AM, Michael Sierchio ku...@tenebras.comwrote:



 On Tue, May 21, 2013 at 10:14 PM, s m sam.gh1...@gmail.com wrote:

 thanks guys for your attentions.

 i want to setup journaling in FreeBSD 8.2. i compare soft-update and
 journaling and choose journaling (it is more suitable for my goals).

 i want to enable journaling for all my partitions. i can do it for all
 partitions except root in single user mode. i can not do it for root
 because i can not unmount root in single user mode.


 No, but you don't need to.  In single user mode, root is mounted
 read-only.  You can run tunefs on the root fs device.

 - M

___
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: setup journaling for root partition

2013-05-22 Thread s m
thanks Michael for your quick reply:)
yes, i can boot from usb freebsd flash and use fixit mode.
i have root, var, tmp, usr and swap on my system. i create an extra swap
partition to use it as journal provider for root partition.

in fixit mode, first i run two below command in order to abel load gjournal:

ln -s /dist/lib /lib
ls -s /dist/boot/kernel /boot/modules

then
gjournal load

and after that: gjournal label -f ad3s1a ad3s1g (ad3s1a is root partition
and ad3s1g is swap partition for journal provider)

but this error is shown:
gjournal cannot clear metadata on ad3s1a: operation not permitted
what is wrong here??? i really don't know how to fix it:



On Thu, May 23, 2013 at 10:12 AM, Michael Sierchio ku...@tenebras.comwrote:


 On Wed, May 22, 2013 at 10:27 PM, s m sam.gh1...@gmail.com wrote:

 thanks Michael, but in all documentation about journaling, tunefs is used
 as below: tunefs -J enable ad3s1X.journal. ad3s1X.journal is created by
 gjournal command: gjournal label ad3s1a ad3s1g that assign ad3s1g as
 journal provider for ad3s1a and create ad3s1a.journal which contains ad3s1a
 as data provider and ad3s1g as journal provider.

 my problem is, i can not run gjournal command for root partition in fixit
 mode nor single user mode. you mean, i should just use tunefs command on
 ad3s1X (root partition)? if yes, then where journal provider for root
 partition is located? in root partition?


 Ah, sorry -  lack of careful reading on my part.  Can you boot from
 installation media and use the fixit mode?  This still won't work if the
 last sector of the partition is in use by the filesystem  You'll need a
 spare partition of some size to be the journal provider, as in the example.

 The very best approach is to create a gjournal and then newfs.  How is
 your disk organized?  One big root partition with everything on it?

 - M

___
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


setup journaling for root partition

2013-05-21 Thread s m
hello everybody

i want to setup a journal partition for my root partition. but i do not
know how to do that. in FreeBSD handbook, it is done in single user mode,
unmount the desired partition and assign the journal partition to it. i
test this procedure and it is done for /usr partition but for root
partition, it can not be unmount in single user mode.

i try to do it in fixiit mode, but i can not load gjournal.

do i use gpart to partitioning my system and enable journaling for root
partition? isn't there any way to setup journaling for my existing root
partition? which command should be used (or is better to used) to enable
journaling? tunefs, gjournal or newfs?

please help me to setup a journal partition for my root.
thanks in advance
SAM
___
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: setup journaling for root partition

2013-05-21 Thread s m
thanks Michael

this is what i've done (based on the FreeBSD handbook): creating a
partition for journal, go to single user mode, unmount desired partition
(for example /usr), load gjournal, add journal partition to /usr partition.
this procedure works well for user and other partitions except root because
i can not unmount it.

should i set up journaling in fixit mode with gpart? how? i try different
ways but none of them work for me:((



On Tue, May 21, 2013 at 10:36 AM, Michael Sierchio ku...@tenebras.comwrote:


 On Mon, May 20, 2013 at 10:59 PM, s m sam.gh1...@gmail.com wrote:

 hello everybody

 i want to setup a journal partition for my root partition. but i do not
 know how to do that. in FreeBSD handbook, it is done in single user mode,
 unmount the desired partition and assign the journal partition to it. i
 test this procedure and it is done for /usr partition but for root
 partition, it can not be unmount in single user mode.


 See the man page on gjournal

  To configure journaling on the UFS file system using gjournal, one
 should
  first create a gjournal provider using the gjournal utility, then run
  newfs(8) or tunefs(8) on it with the -J flag which instructs UFS to
 coop-
  erate with the gjournal provider below.



___
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: setup journaling for root partition

2013-05-21 Thread s m
you mean that journaling is enabled by default i don't think so. i
think i misunderstanding. may i ask you to explain it more clear?


On Tue, May 21, 2013 at 2:09 PM, Julien Cigar jci...@ulb.ac.be wrote:

 gjournal should not be used anymore as it has been implemented in the file
 system code ...


 On 05/21/2013 11:24, s m wrote:

 thanks Michael

 this is what i've done (based on the FreeBSD handbook): creating a
 partition for journal, go to single user mode, unmount desired partition
 (for example /usr), load gjournal, add journal partition to /usr
 partition.
 this procedure works well for user and other partitions except root
 because
 i can not unmount it.

 should i set up journaling in fixit mode with gpart? how? i try different
 ways but none of them work for me:((



 On Tue, May 21, 2013 at 10:36 AM, Michael Sierchio ku...@tenebras.com
 wrote:

  On Mon, May 20, 2013 at 10:59 PM, s m sam.gh1...@gmail.com wrote:

  hello everybody

 i want to setup a journal partition for my root partition. but i do not
 know how to do that. in FreeBSD handbook, it is done in single user
 mode,
 unmount the desired partition and assign the journal partition to it. i
 test this procedure and it is done for /usr partition but for root
 partition, it can not be unmount in single user mode.


  See the man page on gjournal

   To configure journaling on the UFS file system using gjournal, one
 should
   first create a gjournal provider using the gjournal utility, then
 run
   newfs(8) or tunefs(8) on it with the -J flag which instructs UFS to
 coop-
   erate with the gjournal provider below.



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



 --
 No trees were killed in the creation of this message.
 However, many electrons were terribly inconvenienced.

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

___
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: setup journaling for root partition

2013-05-21 Thread s m
thanks guys for your attentions.

i want to setup journaling in FreeBSD 8.2. i compare soft-update and
journaling and choose journaling (it is more suitable for my goals).

i want to enable journaling for all my partitions. i can do it for all
partitions except root in single user mode. i can not do it for root
because i can not unmount root in single user mode.
please let me know how set a journal provider for my root partition in
FreeBSD 8.2.
thank you so much


On Tue, May 21, 2013 at 9:38 PM, Michael Sierchio ku...@tenebras.comwrote:

 On Tue, May 21, 2013 at 8:20 AM, Warren Block wbl...@wonkity.com wrote:

 On Tue, 21 May 2013, Arthur Chance wrote:
 
   On 05/21/13 15:46, Michael Sierchio wrote:
 
  AFAIK Softupdates journaling still breaks snapshot functionality -
 which
  makes it unusable for me. I wouldn't assume that the O.P. doesn't want
 we
  he's asking for.
 
 
  Good point, I'd forgotten that problem as I don't use UFS snapshots. I
  can imagine it would be a killer for some people.
 
 
  It is, especially if you use dump/restore.
 

 Or tarsnap (which is what we use for backups here), or... there are many
 use cases for snapshots.

 - M
 ___
 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

___
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: restore /usr dump on two hard disk parallel y

2013-04-30 Thread s m
thanks Lowell for your reply,

i want to restore my /usr dump on both of my disks (each one has /usr
partition separately).

i try to use TMPDIR in order to prevent this conflict, but restore does not
identify it and use my /tmp dir yet. this is what i do:
first, i create a tmp1 directory in /tmp directory and set its permission
to 777
second, i mount tmp1 into my hard disk number 1

i do these two steps for my hard disk number 2 (create tmp2 in tmp and
mount it to hard disk number 2)

moreover, this is my restore command:

TMPDIR=/tmp/tmp2
restore rf /mnt/dumps/zrdump_usr.dump  TMPDIR

man page for restore command said: if you use -r option, it uses tmp files
with unique name in /tmp directory. as you see, i am using -r in my restore
command but conflict happens yet.
please let me know how to use TMPDIR or any other solution to avoid
conflict in /tmp directory.
thanks in advance
sam



On Wed, Apr 24, 2013 at 4:46 PM, Lowell Gilbert 
freebsd-questions-lo...@be-well.ilk.org wrote:

 s m sam.gh1...@gmail.com writes:

  i'm trying to restore DUMP file for partition /usr on tow hard disk
  parallel y. these two hard are connected to my system (i have
 freebsd8.2).
  i use  restore command and it uses /tmp directory to restore dump. in
  restoring dump process, two hard disks try to use /tmp directory of my
  system. therefore conflict happened and restore command return error.
  i try to use TMPDIR and define another tmp directory for one of my hard
  disk but it does not identify it and use my system tmp directory yet.
  please let me know if using TMPDIR is a good idea and how i can use it.
 if
  not, how i can restore /usr dump file on two hard disk parallel y?

 What do you want to do exactly?

 Do you want both disks together to be your new /usr/partition? In that
 case, you want to set up some kind of RAID system with the two
 disks. Start with the GEOM section in the handbook.

 Do you want to end up with two partitions, each holding part of what the
 /usr backup contains?  If that's what you're after, then the best
 approach is probably to pick one subdirectory of /usr (/usr/local would
 be an obvious choice) and restore everything *but* that to one of your
 disks, then mount the other disk on the subdirectory and restore the
 rest onto there.

 If your problem is just that the two restore operations are stepping on
 each other's temporary files, then TMPDIR *should* take care of
 that. You could show us more detail of how you run the restore
 operations, or just run them one at a time instead of in parallel.

 I hope that helps.

___
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


restore /usr dump on two hard disk parallel y

2013-04-24 Thread s m
hello guys
i'm trying to restore DUMP file for partition /usr on tow hard disk
parallel y. these two hard are connected to my system (i have freebsd8.2).
i use  restore command and it uses /tmp directory to restore dump. in
restoring dump process, two hard disks try to use /tmp directory of my
system. therefore conflict happened and restore command return error.
i try to use TMPDIR and define another tmp directory for one of my hard
disk but it does not identify it and use my system tmp directory yet.
please let me know if using TMPDIR is a good idea and how i can use it. if
not, how i can restore /usr dump file on two hard disk parallel y?
thanks in advance
sam
___
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: Fwd: how access inside from outside when nat is done from inside to outside

2013-04-16 Thread s m
thanks Danny, but i'm using pf to define rules and pfctl to apply them.

first of all it is so important for me to understand what should
exactly happen and what is the correct behavior in freebsd. i mean
when i define nat from inside to outside, should outside system can
access inside systems or not? (for example ping them).
i am so confused what is the correct manner. any hints or comments
that help to clear it for me, is really appreciated.
SAM

On 4/4/13, Daniel O'Callaghan da...@clari.net.au wrote:
 On 4/04/2013 6:41 PM, s m wrote:
 request packets:   src:192.168.2.1 dst: 192.168.1.1
 reply packets:   src: 192.168.2.50 dst:192.168.2.1
 This sort of thing tends to happen when the the packets are not being
 sent via divert socket properly.
 Look carefully, step by step, at your ipfw rules which send packets to
 natd.
 Also, run natd -v in a separate window instead of running it as a
 daemon, and it will show you the packets which go through natd, and what
 is done with them.

 regards,

 Danny
 ___
 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

___
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


Fwd: how access inside from outside when nat is done from inside to outside

2013-04-04 Thread s m
hello guys

i am newbie in nat and have some problem with it.

  i want to nat inside traffic to outside and when i ping outside from
inside, every thing is ok and nat is done perfectly. but when i ping inside
from outside, request packets are sent without any nat translation while
reply packets are nated and therefore outside system can not recognize
reply packets and do not accept them. this is example of packets which are
received in a outside system when pings an inside system.

request packets:   src:192.168.2.1 dst: 192.168.1.1
reply packets:   src: 192.168.2.50 dst:192.168.2.1

is it a correct behavior or not? and if it is correct, it means that when i
configure to nat traffic from inside to outside, i can not access from
outside to inside systems? (in cisco router packets are exactly as mention
above, but outside system identifies reply packets and therefore accepts
them).

please let me know if i am misunderstanding.
thanks
___
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: how run snort in quiet and deamon mode

2013-03-18 Thread s m
great!! snort -q  runs snort in daemon and silent mode as i expected:)

thank you so much

On 3/17/13, Polytropon free...@edvax.de wrote:
 On Sun, 17 Mar 2013 12:15:53 +0330, s m wrote:
 hello guys

 i have a freebsd8.2 and wanna run snort on it. my snort version is
 2.9.3.1. i want to run snort in deamon mode and quietly. man page says
 that D flag is for running snort in deamon mode and q flag is to
 run it quietly(do not show startup message). my problem is, these two
 flag can not work together. when i run snort -q -D or snort -D -q,
 snort run in deamon mode but some startup messages are shown. when i
 run snort -q no message is shown.

 i know it is so simple issue but i do not know how to do that. any
 hints or comments are appreciated.

 Maybe you can start the program as a (quite) background process?

   snort -q 

 If you encounter issues related to controlling terminal disconnect,
 you can use the system's daemon command to basically do what -D
 would do, or use the port detach.

   daemon snort -q

 See man daemon for options you might need to add.



 --
 Polytropon
 Magdeburg, Germany
 Happy FreeBSD user since 4.0
 Andra moi ennepe, Mousa, ...

___
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


how run snort in quiet and deamon mode

2013-03-17 Thread s m
hello guys

i have a freebsd8.2 and wanna run snort on it. my snort version is
2.9.3.1. i want to run snort in deamon mode and quietly. man page says
that D flag is for running snort in deamon mode and q flag is to
run it quietly(do not show startup message). my problem is, these two
flag can not work together. when i run snort -q -D or snort -D -q,
snort run in deamon mode but some startup messages are shown. when i
run snort -q no message is shown.

i know it is so simple issue but i do not know how to do that. any
hints or comments are appreciated.
sam
___
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


backspace shows ^? in serial communication

2013-02-26 Thread s m
hello all,

i have problem with backspace in freebsd 8.2. when i run a serial program to 
communicate via a serial port to the other system, backspace shows ^? in opened 
terminal. 
i use termios and fcntl to open, read, write and close serial port. i set erase 
and erase2 for ttyu2(my serial port) but backspace shows ^? yet.

any body knows what i'm doing wrong? just erase and erase2 should be set to 
backspace works correctly or any other options should be set?

any hints or comments are really appreciated.
nada
___
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: backspace shows ^? in serial communications

2013-02-11 Thread s m
thanks Robert,
i try it before but nothing happened.
do you know how i can set erase and erase2 for stty via termios structure?
and what should be their value to backspace correct well?

On Wed, Feb 6, 2013 at 3:13 PM, Robert Bonomi bon...@mail.r-bonomi.comwrote:

  From owner-freebsd-questi...@freebsd.org  Wed Feb  6 00:19:04 2013
  Date: Wed, 6 Feb 2013 09:44:37 +0330
  Subject: backspace shows ^? in serial communications
  From: s m sam.gh1...@gmail.com
  To: freebsd-questions freebsd-questions@freebsd.org
 
  hi all
 
  i have a problem with backspace in serial communications. i have a
  freebsd8.2 box with a serial card on it. when i connect to other freebsd
  box via serial port backspace does not act as i expected. backspace shows
  ^? on screen. i searched alot and find out that stty has two parameters
  -erase and erase2- to identify erase characters in terminal and they
 should
  be set correctly. i set erase and erase2 to ^? by stty erase \^? and
  stty erase2 \^? commands but nothing happened.
  please let me know how i can fix it. i know it is simple issue but i
 really
  do not know how to do that.

   stty erase {press the backspace key}

 Then hit the enter/return key

___
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: backspace shows ^? in serial communications

2013-02-06 Thread s m
thanks for your answer.
you know, i have a freebsd box (something like router) which i connect to
it by putty or other terminal programs (cu,...). this router has a serial
card and i have a c program to open and manage serial ports. now when i run
this c program and connect to the third freebsd box, backspace shows ^?.
now i don't know where is problem and for which system terminal settings
should be checked.
from you explanation i think that i should check serial settings in c
program in the router box. am i right?
please let me know what should i do to this program (c program in router
box) show backspace correctly when i connect by different serial programs
to router box and run it.

thanks

On Wed, Feb 6, 2013 at 10:20 AM, Polytropon free...@edvax.de wrote:

 On Wed, 6 Feb 2013 09:44:37 +0330, s m wrote:
  hi all
 
  i have a problem with backspace in serial communications. i have a
  freebsd8.2 box with a serial card on it. when i connect to other freebsd
  box via serial port backspace does not act as i expected. backspace shows
  ^? on screen. i searched alot and find out that stty has two parameters
  -erase and erase2- to identify erase characters in terminal and they
 should
  be set correctly. i set erase and erase2 to ^? by stty erase \^? and
  stty erase2 \^? commands but nothing happened.
  please let me know how i can fix it. i know it is simple issue but i
 really
  do not know how to do that.

 If I remember correctly, ^? is delete, ^H is backspace. You
 should check your terminal emulator if it outputs ^? instead
 of ^H when you press the backspace key.

 FreeBSD's default configuration handles keys correctly (if
 you have the proper terminal emulation set, e. g. vt100 or
 vt220 for your serial line), so there's probably something
 wrong with the settings of the terminal program you're using.

 For comparison:

 % echo $TERM
 xterm
 % stty -a
 speed 9600 baud; 24 rows; 80 columns;
 lflags: icanon isig iexten echo echoe echok echoke -echonl echoctl
 -echoprt -altwerase -noflsh -tostop -flusho -pendin -nokerninfo
 -extproc
 iflags: -istrip icrnl -inlcr -igncr ixon -ixoff -ixany -imaxbel -ignbrk
 -brkint -inpck -ignpar -parmrk
 oflags: opost onlcr -ocrnl tab3 -onocr -onlret
 cflags: cread cs8 parenb -parodd hupcl -clocal -cstopb -crtscts -dsrflow
 -dtrflow -mdmbuf
 cchars: discard = ^O; dsusp = ^Y; eof = ^D; eol = undef;
 eol2 = undef; erase = ^H; erase2 = ^H; intr = ^C; kill = ^U;
 lnext = ^V; min = 1; quit = ^\; reprint = ^R; start = ^Q;
 status = ^T; stop = ^S; susp = ^Z; time = 0; werase = ^W;

 And:

 % echo $TERM
 cons25l1
 % stty -a
 speed 9600 baud; 25 rows; 80 columns;
 lflags: icanon isig iexten echo echoe -echok echoke -echonl echoctl
 -echoprt -altwerase -noflsh -tostop -flusho -pendin -nokerninfo
 -extproc
 iflags: -istrip icrnl -inlcr -igncr ixon -ixoff ixany imaxbel -ignbrk
 brkint -inpck -ignpar -parmrk
 oflags: opost onlcr -ocrnl tab0 -onocr -onlret
 cflags: cread cs8 -parenb -parodd hupcl -clocal -cstopb -crtscts -dsrflow
 -dtrflow -mdmbuf
 cchars: discard = ^O; dsusp = ^Y; eof = ^D; eol = undef;
 eol2 = undef; erase = ^H; erase2 = ^H; intr = ^C; kill = ^U;
 lnext = ^V; min = 1; quit = ^\; reprint = ^R; start = ^Q;
 status = ^T; stop = ^S; susp = ^Z; time = 0; werase = ^W;

 If you want the system's C shell to treat ^? (delete) as
 it should be treated (perform delete instead of backspace
 or nothing), add those to your .cshrc:

 bindkey ^? delete-char  # for console
 bindkey ^[[3~ delete-char   # for xterm

 Note that this only affects the C shell.



 --
 Polytropon
 Magdeburg, Germany
 Happy FreeBSD user since 4.0
 Andra moi ennepe, Mousa, ...

___
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


backspace shows ^? in serial communications

2013-02-05 Thread s m
hi all

i have a problem with backspace in serial communications. i have a
freebsd8.2 box with a serial card on it. when i connect to other freebsd
box via serial port backspace does not act as i expected. backspace shows
^? on screen. i searched alot and find out that stty has two parameters
-erase and erase2- to identify erase characters in terminal and they should
be set correctly. i set erase and erase2 to ^? by stty erase \^? and
stty erase2 \^? commands but nothing happened.
please let me know how i can fix it. i know it is simple issue but i really
do not know how to do that.

regards
SAM
___
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


expect doesn't work correctly with cu

2012-12-29 Thread s m
hello every body

i want to run cu via expect shell script. when i run my script, cu is
running and enter its cli. but when i enter a command (like ~s to set
variable) manually , this command doesn't execute and cu cli is closed and
bash return an error that this command is not valid.
this is my shell script:
#!/usr/local/bin/expect
set timeout 20
spawn cu -l /dev/ttyu0 -s 115200 -e
expect Connected
send ~s
expect ~[]
send hardwareflow\n
expect eof

and this is the output:

[root@zharf ~]# /usr/SAM/shell-scripts/runcu.sh
spawn cu -l /dev/ttyu0 -s 115200 -e
Connected
~[set] *all /  *i enter this command manually
[root@zharf ~]# all
bash: all: command not found
[root@zharf ~]#


i don't know what happened when i run cu via expect that doesn't  work
correctly. please let me know if you have any ideas.

yours,
SAM
___
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


modem communication

2012-12-15 Thread s m
hello guys,

please forgive me if my question is not related to this list but i don't
know where i should ask about it.

i have a freebsd8.2 and wanna talk my modem by com port. when i connect my
modem to com port, everything is ok.

for some reasons, i have to communicate with modem, run a command, close
the connection, connect again, run another command, close connection,... .
in the other words, in each communication i have to run just one ati
command and close connection.

my question is: are there any ati commands in modems that should be run
continuously (in the same communication)?  i mean running one command,
close connection, open it again and run another command would make any
wrong?

my program should work with all modems not a specific one.

any hints or comments are really appreciated.
sam
___
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


set connection to a modem

2012-11-28 Thread s m
hello guys,

i want to connect my freebsd system to modem and configure it via my
freebsd. i thought that i should change /etc/ttys file to set speed and
other configuration. in order to check if i am right or not, i comment ttyu
line in ttys file and expect the modem got disconnected but the modem still
works and can access to it.

i googled and found that there are three files in /etc that we can edit
them to configure our devices: /etc/ttys, /etc/gettytab and
/etc/rc.d/serial.sh. moreover we can edit init file for each device in /dev
to set default speed and other configuration by stty command.

now i am confused and don't know which file i should edit to set speed and
flow control and other setting to have a connection to my modem. i mean
from which file i can configure my connection? i know it's too easy but
please clear it for me.

yours,
sam
___
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: set connection to a modem

2012-11-28 Thread s m
thanks guys for your replies,

now i understand two types of connections are available by modem, dial-in
and dial-out.
honestly, i should do it for my boss and don't know what he should want
exactly to do but i am sure that he has an external serial modem and wants
to config it by AT commands via a freebsd system; therefore i think our
connection is dial-out.

now which files i should edit? just ppp.conf? and because our modem
supports specific speed and flow control, is it necessary to set these
parameters in my freebsd? and if yes, how i can do that?  please help me to
do that

thanks

On Wed, Nov 28, 2012 at 7:35 PM, Polytropon free...@edvax.de wrote:

 On Wed, 28 Nov 2012 13:44:18 +0330, s m wrote:
  hello guys,
 
  i want to connect my freebsd system to modem and configure it via my
  freebsd.

 For doing _what_ exactly? I ask because depending on your
 goal there might be different approaches neccessary:

 a) dial out to connect to the Internet
 b) dial out to dial in to something else (e. g. shell access)
 c) dial out to send a fax
 d) dial out to make annoying phone calls :-)
 e) dial in so people can dial your system and log in
 f) dial in so people can send you fax
 g) dial in so you can control something using DTMF
 ...

 There are many possibilities, each requiring a different
 thing to do on FreeBSD (because they are obviously different(.

 And of course: Are you talking about a real modem (external
 serial modem), some modem card (often dysfunctional WinModem),
 or a USB modem? Brand and model?



  i thought that i should change /etc/ttys file to set speed and
  other configuration.

 Wouldn't you better do this with ppp.conf? Just assuming you
 want to dial _out_.



  in order to check if i am right or not, i comment ttyu
  line in ttys file and expect the modem got disconnected but the modem
 still
  works and can access to it.

 The /etc/ttys file doesn't restrict you in controlling the
 modem from your host system.



  i googled and found that there are three files in /etc that we can edit
  them to configure our devices: /etc/ttys, /etc/gettytab and
  /etc/rc.d/serial.sh. moreover we can edit init file for each device in
 /dev
  to set default speed and other configuration by stty command.

 Also depends on _what_ you are going to do.



  now i am confused and don't know which file i should edit to set speed
 and
  flow control and other setting to have a connection to my modem. i mean
  from which file i can configure my connection? i know it's too easy but
  please clear it for me.

 Really, I assume you're talking about dialing out with a serial
 modem in order to connect to the Internet (or some other system),
 and then be networked with it.

 In that case you would add an entry to /etc/ppp/ppp.conf. Allow
 me to provide an example that I've been using on FreeBSD 4 and 5:

 # PPP Configuration File
 # See /usr/share/examples/ppp/ for some examples
 # $FreeBSD: src/etc/ppp/ppp.conf,v 1.8 2001/06/21 15:42:26 brian Exp $

 default:
 set log Phase Chat LCP IPCP CCP tun command
 ident user-ppp VERSION (built COMPILATIONDATE)
 set device /dev/cuaa0
 set speed 115200
 set dial ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \\ AT OK-AT-OK
 ATE1Q0 OK \\dATDT\\T TIMEOUT 40 CONNECT
 set ifaddr 10.0.0.1/0 10.0.0.2/0
 set timeout 180
 enable dns

 papchap:
  # edit the next three lines and replace the items in caps with
  # the values which have been assigned by your ISP.
 set phone PHONE_NUM
 set authname USERNAME
 set authkey PASSWORD
 set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.0 0.0.0.0
 add default HISADDR

 mymodem:
 set phone 01234567890
 set authname myname
 set authkey mypass
 add default HISADDR

 The example name I've chosen here is mymodem. Change it
 to something meaningful. :-)

 The essential authorisation data here is the phone number
 of 01234567890, the username 'myname' and the password 'mypass'

 Note that today it may be required to change the device name!
 I haven't tried to do anything with a modem on current FreeBSD,
 so I can't be more specific, sorry.

 The device name /dev/cuaa0 will probably need a change. And
 then set speed 115200 sets the speed you need.

 If you've done everything properly, you would do something like

 # ppp mymodem
 ppp dial

 Then the modem should dial. With close you close the connection.
 There are options for /etc/rc.conf (the ppp_* variables) that
 allow you to automate things, like dial on demand.





 In contradiction, in /etc/ttys something like

 ttyd0   /usr/libexec/getty std.9600 dialup   on  secure

 would enable you a serial console access (e. g. to connect a
 serial terminal to) at a speed of 9k6 (e. g. a DEC vt100). When
 connected via serial cable, you would receive a login prompt.

 Again, note that ttyd0 might not be valid here.





 --
 Polytropon
 Magdeburg

getting packets on a specific port by pf

2012-11-08 Thread s m
 hello guys

i have a problem with getting packets which are diverted to a specific port
by PF. i mean i diverted my packets to a specific port by IPFW and want to
get these packets by PF to change them.
i used ipfw add 1000 divert 8000 all form any to any command to divert my
packets. how can i get these packets by pf on port number 8000?

pf has divert-reply option. should i use it to get packets? how? any
comments or hints are really appreciated.

thanks,
sam
___
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: getting packets on a specific port by pf

2012-11-08 Thread s m
dear takcoder

maybe you are right but now it is not important for me. i want to get
packets by pf in order to set packet's TOS bit (packets which comes from
IPFW).

have you any suggestion?

thanks for your attention
sam


On Thu, Nov 8, 2012 at 4:11 PM, takCoder tak.offic...@gmail.com wrote:

 hey sam,

 i don't know the exact answer for your question.. but a question occurred
 in my mind..
 what's your final purpose of doing so? what do you exactly mean by the
 phrase to change them??

 and don't you think that this sequence of firewalls has a deep effect on
 your system performance? in my idea this seems just like a throughput
 bottleneck.. isn't it so? or it's not important here?

 any how.. if you tell us more details about what you're looking for, may
 be it become more clear for guys such as me! ;)

 yours,
 takcoder


 On Thu, Nov 8, 2012 at 3:53 PM, s m sam.gh1...@gmail.com wrote:

  hello guys

 i have a problem with getting packets which are diverted to a specific
 port
 by PF. i mean i diverted my packets to a specific port by IPFW and want to
 get these packets by PF to change them.
 i used ipfw add 1000 divert 8000 all form any to any command to divert
 my
 packets. how can i get these packets by pf on port number 8000?

 pf has divert-reply option. should i use it to get packets? how? any
 comments or hints are really appreciated.

 thanks,
 sam
 ___
 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



___
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


marking packets in IPFW and recognize them in PF

2012-11-06 Thread s m
hello every body

i want to mark some of my  packets (by tag, mark, divert or anything else)
in IPFW and recognize these packets in PF in the same system.
please let me know if  it is possible and how i can do that.
i have freebsd 8.2. if it is impossible in freebsd 8.2, what about freebsd
9? can we do it in freebsd 9?

thanks
SAM
___
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


config multiport serial card

2012-11-04 Thread s m
hello everybody

i have a moxa 4-port serial card and installed it on freebsd8.2
successfully. i have ttyu2-5 in /dev that are moxa ports.

my question is how i can use these ports? i add the following lines to ttys
file:
ttyu2 /usr/libexec/getty std.9600 vt100 on secure
ttyu3 /usr/libexec/getty std.9600 vt100 on secure
ttyu4 /usr/libexec/getty std.9600 dialup on secure
ttyu5 /usr/libexec/getty std.9600 dialup on secure

and restart my system. i connect another system to one of my moxa port by a
null modem cable and run putty in both side but i can't see any thing in
putty screens and leds on moxa card doesn't turn on.

please let me know if i should do some configuration else in order to my
ports work correctly. should i use another application instead of putty to
work with these ttyus?

thanks
sam
___
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: find slot number and number of ports for each card

2012-10-01 Thread s m
thanks every body for your answers. now i know my path.

thanks again

On Mon, Oct 1, 2012 at 3:18 PM, Jamie Paul Griffin ja...@kode5.net wrote:

 [ Devin Teske wrote on Sat 29.Sep'12 at 12:32:04 -0700 ]

 
  On Sep 29, 2012, at 7:37 AM, saeedeh motlagh wrote:
 
   hello all
  
   i want to have statistics about my hardware specially the type of card
   that are installed on my system,
 
  Card characteristics are provided by pciconf -l.
  (pciconf -lv for verbose listing).
 
  Two important notes about pciconf -l…
 
  1. It lists more than just cards
  2. The type can't always be determined by FreeBSD
 
  When looking at the output of pciconf -l, each line represents a
  component (this can be an integrated component on the mother-
  board, such as USB port, not necessarily a PCI add-in card).
 
  If the line begins with none@ then a driver has not attached to
  this device (and FreeBSD therefore doesn't know what type it is).
  In this case, you'll want to look at the chip= portion of the line.
  The chip= portion of the line gives you two very important pieces
  of information when it comes to identifying your hardware:
 
  a. The 4-digit hexadecimal identifier for the Model of the device
  b. The 4-digit hexadecimal identifier for the Vendor of the device
 
  (in that order from left-to-right)
 
  Let's look at a sample line:
 
  vgapci0@pci0:2:9:0:   class=0x03 card=0x00081002 chip=0x47521002
 rev=0x27 hdr=0x00
 
  NOTE: That's my graphics card on an ASUSTek P4B533 motherboard
 
  In the above line, see chip=0x47521002.
  In this case, 4752 is the Model identifier
  and 1002 is the Vendor identifier.
 
  If you're a human and you want to know what these numbers are,
  you hop on over to pcidatabase.com and punch in the numbers to
  find out that this is a [particularly ancient] ATI Rage XL graphics card.
 
  If you're not a human (i.e., a script), you'll instead reference a local
  copy of the pci.ids (/usr/local/share/pciids/pci.ids for example):
 
  $ grep '1002 4752' /usr/local/share/pciids/pci.ids
1002 4752  Proliant Rage XL
 
 
 
   the number of ports that each card has
 
  That one is near impossible.
 
  Since every add-in card is going function differently, you really need
  a device-specific enumeration method to (for example) count things
  like PHYs provided by a single NIC.
 
  Imagine if you will, the case of the card for which there is no driver
  loaded in the kernel (where pciconf -l shows a none@ prefix).
  There really is no way to enumerate the number of ports a card
  offers in that circumstance.
 
  However!
 
  You can build logic into your code (if you are scripting something)
  that takes the description from the pci.ids file (or just the raw hex
 IDs)
  and extrapolates based on prior-knowledge how many ports a
  particular device has.
 
 
 
   and the slot number which cards are installed.
 
  That's provided by pciconf.
 
  Also, it's worth mentioning the excellent dmidecode tool from the
  ports tree. This too can enumerate the slots themselves (and tell you
  whether they are PCI, PCI-X, PCIe, etc. including voltage. Search
  for System Slot Information in the dmidecode output for this info.
  --
  Devin

 This is interesting. I'm glad this question was raised, because i've
 noticed i've got two none@ lines listed when using pciconf -lv. I've
 been trying to figure out what these are over the last week but to no
 avail. They must be there for some purpose and I wondered if i'm missing
 some important driver because of this.
 ___
 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

___
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: how restore an unencrypted dump on an encrypted file system?

2012-09-30 Thread s m
thanks saeedeh

OK i try to explain what i have done more in detail.

i want to restore unencrypted dump files on an encrypted file system.
in order to do that, i encrypted my file system by geli command and
sure that is done correctly because when i install base and kernel on
it, freebsd start up successfully.

problem is here: when i restore my dump files and restart my freebsd,
boot PXE menu is shown and i select my freebsd but after that, the
error message invalid format occurs and i see this message:
  FreeBSD/i386 BOOT
 Default: 0:ad(0,a)/boot/loader
 boot:

it selects the default kernel correctly and after some seconds an
error message is shown which consists of some hardware addresses.

i don't know how to fix it.
any hints that might fix my problem are appreciated.


On 9/30/12, saeedeh motlagh saeedeh.motl...@gmail.com wrote:
 hi

 i have a similar problem too.  can you explain in detail what you have
 done step by step? i wanna know if my problem is exactly what you
 have.

 thanks

 On 9/29/12, s m sam.gh1...@gmail.com wrote:
 thanks Fabian for your answer. i don't know what exactly information
 is needed but i tell what i did up to now.

 i have two partition, one is encrypted and the other one is not. the
 unencrypted partition has boot folder. when i copy FreeBSD base system
 files, FreeBSD start up correctly but when i restore dump files,
 FreeBSD doesn't start up correctly.

 i hope this information help to understand what is wrong.
 thanks

 On 9/29/12, Fabian Keil freebsd-lis...@fabiankeil.de wrote:
 s m sam.gh1...@gmail.com wrote:

 I backed up my freeBSD 8.2 box by dump command and now want to restore
 this dump file on an encrypted file system (i used geli to encrypt my
 file system) but do not know how to do that.

 is there any way or command to restore an unencrypted dump on an
 encrypted file system? i tried to restore my dump file as when file
 system is unencrypted.

 Can you read the files after attaching the provider manually?

 this is what i've doe: I decrypted my encrypted file system by geli
 attach command, then mount it and restore dumps. but when i restart
 my system, FreeBSD doesn't start up correctly (PXE boot menu is shown
 and when i select freeBSD, boot.config runs but nothing happend).

 You do not provide enough information to give a meaningful answer.

 One possible mistake would be putting the kernel itself on
 the encrypted file system, but the list of things one can
 do wrong is pretty long.

 Fabian

 ___
 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


___
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


how restore an unencrypted dump on an encrypted file system?

2012-09-29 Thread s m
hello guys,

I backed up my freeBSD 8.2 box by dump command and now want to restore
this dump file on an encrypted file system (i used geli to encrypt my
file system) but do not know how to do that.

is there any way or command to restore an unencrypted dump on an
encrypted file system? i tried to restore my dump file as when file
system is unencrypted.

this is what i've doe: I decrypted my encrypted file system by geli
attach command, then mount it and restore dumps. but when i restart
my system, FreeBSD doesn't start up correctly (PXE boot menu is shown
and when i select freeBSD, boot.config runs but nothing happend).


please let me know how i can fix it or if i do something wrong.
yours,
sam
___
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: how restore an unencrypted dump on an encrypted file system?

2012-09-29 Thread s m
thanks Fabian for your answer. i don't know what exactly information
is needed but i tell what i did up to now.

i have two partition, one is encrypted and the other one is not. the
unencrypted partition has boot folder. when i copy FreeBSD base system
files, FreeBSD start up correctly but when i restore dump files,
FreeBSD doesn't start up correctly.

i hope this information help to understand what is wrong.
thanks

On 9/29/12, Fabian Keil freebsd-lis...@fabiankeil.de wrote:
 s m sam.gh1...@gmail.com wrote:

 I backed up my freeBSD 8.2 box by dump command and now want to restore
 this dump file on an encrypted file system (i used geli to encrypt my
 file system) but do not know how to do that.

 is there any way or command to restore an unencrypted dump on an
 encrypted file system? i tried to restore my dump file as when file
 system is unencrypted.

 Can you read the files after attaching the provider manually?

 this is what i've doe: I decrypted my encrypted file system by geli
 attach command, then mount it and restore dumps. but when i restart
 my system, FreeBSD doesn't start up correctly (PXE boot menu is shown
 and when i select freeBSD, boot.config runs but nothing happend).

 You do not provide enough information to give a meaningful answer.

 One possible mistake would be putting the kernel itself on
 the encrypted file system, but the list of things one can
 do wrong is pretty long.

 Fabian

___
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


freebsd on laptop (len problem)

2007-02-04 Thread S. M. Ibrahim \(Lavlu\)
i installed freebsd 6 on a old laptop, it's p3 600 mhz.
everthing goes fine, but after installation, my len is not working. It's IBM 
10/10 EtherJet CardBus Adapter and connected in pcmci . it's not detected. Any 
idea ?
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]