View Single Post
  #6   (View Single Post)  
Old 5th August 2013
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 4,125
Default Methods to get the Makefile to the FreeBSD live CD session

  • Download or copy the Makefile to an USB stick and copy from the stick to the /tmp directory of the FreeBSD live CD.
  • Create your own Live USB stick by doing a simple install on USB stick. Configure elementary network connectivity and ssh so you can use scp.

    Then you also have the advantage to add your favourite shell, running script(1) to produce and keep a log of your installation efforts.
  • Use the script from http://mfsbsd.vx.sk to create a more versatile FreeBSD live CD than the official FreeBSD installer.
  • Transfer the Makefile and the rc.conf template with nc(1) :
    • If you are on a network with DHCP you can issue an 'ifconfig' to see which network card you have:
      Code:
      bge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
              options=c019b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,
                             VLAN_HWTSO,LINKSTATE>
              ether 98:4b:e1:10:08:6b
              nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
              media: Ethernet autoselect (1000baseT <full-duplex>)
              status: active
    • Then run dhclient:
      Code:
      # dhclient bge0
      DHCPREQUEST on bge0 to 255.255.255.255 port 67
      DHCPACK from 192.168.222.10
      bound to 192.168.222.240 -- renewal in 43200 seconds
    • Read the 'nc' man page:

      Code:
      DATA TRANSFER
           The example in the previous section can be expanded to build a basic data
           transfer model.  Any information input into one end of the connection
           will be output to the other end, and input and output can be easily cap-
           tured in order to emulate file transfer.
      
           Start by using nc to listen on a specific port, with output captured into
           a file:
      
                 $ nc -l 1234 > filename.out
      
           Using a second machine, connect to the listening nc process, feeding it
           the file which is to be transferred:
      
                 $ nc host.example.com 1234 < filename.in
      
           After the file has been transferred, the connection will close automati-
           cally.
      So on the machine with the FreeBSD live CD: # nc -l 1234 >Makefile
      On the second machine : $ nc 192.168.222.240 1234 <Makefile

      If you have to move multiple files, it will be easier to pack all these files into a single tar(1) archive first.
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump

Last edited by J65nko; 6th August 2013 at 01:05 PM.
Reply With Quote