Menu

Cannot assign static IP

Help
Matt Ross
2015-12-03
2016-06-21
  • Matt Ross

    Matt Ross - 2015-12-03

    I am using 2.4.2-61 via PXE and want to specify a static IP for a network interface and not use DHCP. I've tried amending the 'ip=' option to:

    ip=192.168.2.150::192.168.2.1:255.255.255.0:clonezilla1:eno0
    and
    ip=192.168.2.150::192.168.2.1:255.255.255.0:clonezilla1:eth0
    and (using the alternative syntax)
    ip=eno0:192.168.2.150:255.255.255.0:192.168.2.1:192.168.2.1
    and
    ip=eth0:192.168.2.150:255.255.255.0:192.168.2.1:192.168.2.1

    I have additionally tried editing the squashfs filesystem to amend '/etc/network/interfaces' to add the above, and use 'ip=frommedia' as the switch.

    In all cases the interface connection is only ever attempted via DHCP and all my modification attempts are ignored. Am I doing something wrong? Is the documentation accurate?

     
  • Steven Shiau

    Steven Shiau - 2015-12-13

    If you use PXE booting, DHCP is a must.
    If you still want to assign static IP address, you can do that after PXE booting is done. You can use the boot parameters "ocs_prerun*" to make that, like:
    ocs_prerun1="pkill -9 dhclient" ocs_prerun2="ifconfig eth0 192.168.2.150" ocs_prerun3="route add default gw 192.168.2.1 eth0"...
    Ref: http://clonezilla.org/fine-print-live-doc.php?path=./clonezilla-live/doc/99_Misc/00_live-boot-parameters.doc#00_live-boot-parameters.doc

    Steven.

     
    • Li Bing

      Li Bing - 2016-06-12

      Hi, Steven
      I am using clonezilla-live-20160210-wily-amd64. I have lots of systems those can not DHCP to save, I need to set static IP to them, but the device name are not regular ethN(e.g. eno16777736) and different, how can I give the right device name (ethernet port) to ip parameter?

      Thanks,
      Bing

       
      • Steven Shiau

        Steven Shiau - 2016-06-13

        Did you check the boot parameters in syslinux/syslinux.cfg from Clonezilla live iso/zip file?
        It actually uses "net.ifnames=0" to force the Linux kernel to name the ethernet card as the traditiional, fixed name, like eth0, eth1...
        You should use that one, too.

        Steven

         
        • Li Bing

          Li Bing - 2016-06-15

          Thanks for you remind. Just tested pass. But I can not find the parameter "net.ifname" from: http://clonezilla.org/fine-print-live-doc.php?path=clonezilla-live/doc/99_Misc/00_live-boot-parameters.doc, where can I find it?

          Thanks,
          Bing

           
          • Steven Shiau

            Steven Shiau - 2016-06-19
             
            • Li Bing

              Li Bing - 2016-06-21

              Thanks for your message. I will learn it.

              Bing

               
  • Matt Ross

    Matt Ross - 2015-12-15

    Thanks for that, will try it out. Booting is initiated via iPXE from a USB flash drive where the IP information has been entered statically and then chainloaded into our regular PXE menu. This part works. We wanted a way to use Clonezilla on PCs that are not in our corporate DHCP, as it is unreliable sometimes and we have to wait up to an hour for updated records to become effective.

     
  • Matt Ross

    Matt Ross - 2015-12-17

    Steven,

    Just to confirm the instructions you posted above worked well and we can now use Clonezilla via PXE without a DHCP entry. Thanks.

     
  • Steven Shiau

    Steven Shiau - 2015-12-20

    Cool! Thanks for confirming that.

    Steven.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.