Menu

PXE boot with 2 NICs?

DaiXiTrum
2009-12-04
2013-04-05
  • DaiXiTrum

    DaiXiTrum - 2009-12-04

    I'm trying to PXE boot Clonezilla Live on a machine with 2 NICs. It's a Dell blade with NIC1 is reserved for other purpose and NIC2 connect to the DHCP server for PXE.
    Is there a way to force clonzilla to use eth1 instead of eth0.

    This is what I have in my pxelinux.cfg/default

    kernel vmlinuz1
    append initrd=initrd1.img boot=live union=aufs netboot=nfs nfsroot=xx.xx.xx.xx:/export/clonezilla_20091127_karmic
    --
    I tried to add ksdevice=eth1 and live-netdev=eth1 , but it did not seem to work.

    It's loading the initrd1.img and vnlinuz1 fine. I can see that it recognizes 2 NIC cards as eth0 and eth1, but look like it's waiting for the DHCP response on eth0 after these lines:

    Begin: Running /scripts/live-premount …
    Done.
    IP-Config: eth0 hardware address XX:XX:XX:XX:XX mtu 1500 DHCP RARP
    --

    I'm using the 20091127_Karmic version because the 1.2.2.31 doesn't recognize my NIC cards.

     
  • Steven Shiau

    Steven Shiau - 2009-12-07

    So both of your network cards eth1 and eth0 are connected?

    Actually during the boot, live-initramfs patched by Clonezilla will try to find the linked NIC and use it.

    Steven.

     
  • DaiXiTrum

    DaiXiTrum - 2009-12-07

    Yes, both of my NIC are connected, eth1 to my PXE's DHCP Server and eth0 to another network.

    After some search on Ubuntu bugs website and stumble upon this one:
    https://bugs.launchpad.net/ubuntu/+source/initramfs-tools/+bug/182940
    so I added "ip=all" my "append" line
    kernel vmlinuz1
    append initrd=initrd1.img boot=nfs union=aufs netboot=nfs nfsroot=xx.xx.xx.xx:/export/clonezilla_20091127_karmic ip=all

    And now it was able to guess and use eth1 to get an IP address from my DHCP server. But right after that, it died with a "Kernel Panic"

    … message showing IP Config infomation from eth1…
    /init: .: line 1: Can't open /tmp/net-eth0.conf
    Kernel Panic - not syncing. Attempted to kill init!
    Pid: 1, comm: init Not tainted 2.6.31-15-generic #50-Ubuntu
    … some trace message…

     
  • DaiXiTrum

    DaiXiTrum - 2009-12-08

    I got passed the net-eth0.conf problem by modifying the /conf/initramfs.conf (of the initrd1.img) to change the value of DEVICE from eth0 to eth1.
    I think there should be a parameter to set the value for DEVICE so we don't have to rebuild the initrd1.img.

    It was able to mount the clonezilla NFS share to /root and there were some errors when it tried to move /dev, /sys, and /proc to /root (probably my nfs share is read-only). I got over it by adding the /dev, /sys, and /proc to the clonezilla NFS share.

    But then I got the following messages and it drop to BusyBox version message and initramfs shell:

    Target filesystem doesn't have /sbin/init
    No init found. Try passing init=bootarg.

    Any suggestion?

     
  • Steven Shiau

    Steven Shiau - 2009-12-09

    It's very weird… If you assign live-netdev=eth1, the /scripts/live-premount/select\_eth\_device in the live-initramfs should write that to /conf/param.conf for you. You should not have to modify the initrd1.img.

    As for the NFS mouting, I have little experience about that with Clonezilla live. Do you have any reason not to use http or tftp to download the filesystem.squashfs, as shown in:

        http://clonezilla.org/clonezilla-live/livepxe.php

    ?

    Steven.

     
  • DaiXiTrum

    DaiXiTrum - 2009-12-09

    For the NFS, I was just trying all the options to see if it make any different to the NIC selection.

    I did try the live-netdev=eth1, but it did not work. Is this parameter for debian version only?

    I finally got it working with my modified version of initrd1.img and using tftp for the filesystem.squashfs.

    Thanks for your help.

     
  • Steven Shiau

    Steven Shiau - 2009-12-09

    Both Debian-based and Ubuntu-based share the same live-initramfs, so live-netdev=eth1 should work for both of them.

    Steven.

     
  • DaiXiTrum

    DaiXiTrum - 2009-12-18

    Thanks for fixing the live-netdev. I used the 20091214-karmic version and was able to PXE boot clonezilla on eth1 and manually restored my machine.

    However I have problem with automating the restore process.

    First, I added the ocs_prerun parameter to download the script from my tftp server and that worked fine.

    These are my pxelinux.cfg/default and custom-ocs-2 script:

    kernel vmlinuz
    append initrd=initrd.img boot=live union=aufs noswap noprompt vga=788 live-netdev=eth1 fetch=tftp://192.168.1.100/filesystem.squashfs ocs_prerun="sudo busybox tftp -g -b 10240 -r custom-ocs-2 -l /tmp/custom-ocs-2 192.168.1.100"

    sudo mount -t nfs 192.168.1.100:/czk/home/partimag /home/partimag
    sudo /opt/drbl/sbin/ocs-sr -g auto -e1 auto -e2 -c -r -j2 -p true restoredisk "2009-11-12-14-img" "sda"

    However, when I tried to add parameters to skip the first couple key-map and language screens as below, the custom-ocs-2 file in the /tmp directory have the size of 0 and I did not see the request for it in my tftp server. So the ocs_prerun script ran and the custom-ocs-2 file got created but the tftp call never get to the tftp server.

    kernel vmlinuz
    append initrd=initrd.img boot=live union=aufs noswap noprompt vga=788 live-netdev=eth1 fetch=tftp://192.168.1.100 ocs_live_keymap=NONE ocs_lang=en_US.UTF-8

    I don't know if this is related to the problem above, but I also saw some messages being displayed after the filesystem.squashfs is loaded.  Probably from another process because sometimes they showed up right after the squashfs version is displayed, and some other times,  during the clonezilla/console selection or even after I drop out to the console.

    * Starting init crypto disks …
    * Starting iSCSI initiator service iscsid
    * Setting up iSCSI target

     
  • DaiXiTrum

    DaiXiTrum - 2009-12-18

    Oop, my final pxelinux.cfg/default should be this:

    kernel vmlinuz
    append initrd=initrd.img boot=live union=aufs noswap noprompt vga=788 live-netdev=eth1 fetch=tftp://192.168.1.100/filesystem.squashfs ocs_prerun="sudo busybox tftp -g -b 10240 -r custom-ocs-2 -l /tmp/custom-ocs-2 192.168.1.100" ocs_live_keymap=NONE ocs_lang=en_US.UTF-8

     
  • DaiXiTrum

    DaiXiTrum - 2009-12-22

    Thanks Steven,

    I got clonezilla to do PXE boot and fully automated. I do have to changed the custom-ocs-2 to do an NFS mount (in step #1) instead of calling prep-ocsroot.

    However the system sometimes hang after a "Starting init crypto disks…" message. But I think this is a Ubuntu Karmic bug https://bugs.launchpad.net/ubuntu/+source/cryptsetup/+bug/450620

     
  • Steven Shiau

    Steven Shiau - 2009-12-23

    Yes, it's the issue for Ubuntu Karmic.
    Since that service is not really required for Clonezilla, I will think about to disable the startup service in the next release.

    Steven.

     
  • Steven Shiau

    Steven Shiau - 2009-12-23

    Oops… this service is actually in the initrd… Therefore I think it's better to wait for it to be fixed in Ubuntu karmic…

    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.