Been using Clonezilla server for many years, always PXE booting clients in Legacy mode. Tried testing with UEFI boot and found something odd.
I have confirmed that I set the drbl-ocs command correctly but the command that is executed on the clients is wrong. Tried to capture (savedisk) a laptop, the command sent was for restoredisk instead but showed the correct image filename. I noticed this in Clonezilla years ago, was not too concerned because all works correctly in Legacy mode. Windows 11, I hear will only use UEFI.
Has anyone else had this same problem?
Tom
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Clonezilla SE and live works for uEFI machine, unless you hit a bug.
You did not mention what were the wrong commands, and the error messages. Please describe that in detail, and put some photos. It's easier for us to diagnose the issue you have encountered.
Steven
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I recently built a new Clonezilla SC using all the latest versions. I noticed this same problem on older versions. I will rerun a test -- are the commands logged somewhere? is there a debug log?
Basically, I execute a drbl-ocs savedisk command to a new image file. But what I see on the client is a command which is a restoredisk command to the same image file.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Please:
1. Run "drbl-bug-report" and post the generated file
2. What's the complete drbl-ocs command? Please show that.
3. Please attach these 2 files which is generated after you run the drbl-ocs command, too:
/tftpboot/nbi_img/pxelinux.cfg/default
/tftpboot/nbi_img/grub/grub.cfg
Steven
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I tried another test today and of course it worked.
This is the command I have been using: drbl-ocs -nogui -b -q2 -rm-win-swap-hib -p reboot -z1p -i 1000000 -l en_US.UTF-8 startdisk save Dell7530-TEST-20211102-21H1 nvme0n1
I attached the pxelinux default file in the previous post and the grub.cfg here.
Thank you Steven for your help -- I now see where the command is built in the default file. I learned something.
I did some more testing and I think I found something.
So, I first did a UEFI SAVEDISK and then killed it before it completed - let's say I saw no value in completing it. Instead I did a RESTOREDISK to the same UEFI and a Legacy Boot PC. with clients to wait = 2. Legacy boot started correctly, the UEFI PC continued the previous job which I had tried to kill.
I checked the pxelinux default file and it was correct, of course. So, what does this mean? The problem is not with DRBL or TFTPBOOT, it is something within UEFI which messes this up? It seems as if UEFI caches the last [unsuccessful] command and then tries to execute it when I PXE boot it. Have you encountered this before? BTW, I am using the same Dell laptops for all of this.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I somehow can not reproduce this issue here.
I am using Ubuntu 20.04, and installed drbl 4.5.3-drbl1 and clonezilla 4.5.5-drbl1, as what you have.
Using dcs to set to save the client, and use dcs to set to restore the client.
The file /tftpboot/nbi_img/grub/grub.cfg is set as expected.
How did you kill it? Did you use "dcs" to switch them?
Steven
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Some more information from my testing. I have no issues with restores (I believe). But I have this issue when I try to do a capture.
This morning I tried to capture an image from a UEFI laptop - I know that the command is correct because I used it on a Legacy laptop. The command which appeared on the client is a restoredisk (supposed to be a savedisk) with the correct image name. I checked pxelinux.cfg default and the command is correct there. So, the command is definitely getting altered somewhere I just cannot identify where it is happening.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I've actually had this issue for a couple of years. It only appears when I set the PC to UEFI. It does not happen when the PC is set to legacy mode.
I recently built a new PC to use as the Clonezilla server with the expectation that all the latest software (ubuntu, clonezilla,...) would resolve this problem.
My urgency for testing this again and trying to resolve this, is that Windows 11 will not support legacy mode.
Questions: how does the menu in pxelinux.cfg get constructed? Is there a way for me to diagnose this process?
Tom
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
As I mentioned, how did you kill it? Did you use "dcs" to switch them?
The most important is that we can reproduce this issue here. Hence you need to tell us the details so that we can try to fix this issue if it's reproducible.
"Questions: how does the menu in pxelinux.cfg get constructed? Is there a way for me to diagnose this process?" -> For uEFI netboot, the file is /tftpboot/nbi_img/grub/grub.cfg, not pxelinux.cfg.
You can search "GRUB_CONF" in /usr/share/drbl/sbin/drbl-functions, and maybe check the functions add_opt_in_grub_efi_cfg_block and remove_opt_in_grub_efi_cfg_block.
Steven
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Last week, Wednesday, we tested again; we are trying to develop a standard process for our new batch of Dell 7550s. I ran a savedisk on the server and the client showed a restoredisk for the same image file again. After this failed on the client because the image file could not be found, I ran the same savedisk on the server again and this time, the client side executed correctly. Maybe we need to execute the server side twice???
I will try what you suggested in the last post --- For uEFI netboot, the file is /tftpboot/nbi_img/grub/grub.cfg, not pxelinux.cfg.
You can search "GRUB_CONF" in /usr/share/drbl/sbin/drbl-functions, and maybe check the functions add_opt_in_grub_efi_cfg_block and remove_opt_in_grub_efi_cfg_block.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Steven you have been great at helping me with this. I have found something.
This is an example of grub.cfg. I entered the DRBL command and grub.cfg was modified to the following:
menuentry "Clonezilla: save disk nvme0n1 as image Dell7530-TEST-20211102-21H1" --id clonezilla-se-client {
echo "Enter Clonezilla..."
echo 'Loading Linux kernel vmlinuz-pxe...'
$linux_cmd vmlinuz-pxe devfs=nomount drblthincli=off selinux=0 quiet text 1 drbl_bootp=$net_default_next_server edd=on clientdir=\"node_root\" ocs_opt=\"-l en_US.UTF-8 --nogui -g auto -e1 auto -e2 -r -p reboot --skip-set-netboot-first -scr --mcast-port 2232 multicast_restoredisk Dell7530-CNOQC-20210909-21H1 nvme0n1\"
echo 'Loading initial ramdisk initrd-pxe.img...'
$initrd_cmd initrd-pxe.img
}
Notice that the menu entry and the command are different. Now, I run the same command again and the command is modified to match the menu entry. Running the command a second time fixes everything. Now, I have a work-around.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
That's really weird you need to run twice on the server to make the config file correct. I wish I can reproduce this issue here, and this issue can be fixed...
If there is a chance I can remotely login the machine which you encountered this issue, or you can reproduce this issue on a VM, please email me at steven at clonezilla org.
Thanks.
Steven
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
As I mentioned, "/tftpboot/nbi_img/grub/grub.cfg" is the file to be modified when you use "dcs" to switch the uEFI netboot menu of clients. Basically it uses the functions from /usr/share/drbl/sbin/drbl-functions, i.e., add_opt_in_grub_efi_cfg_block and remove_opt_in_grub_efi_cfg_block to update the menu in grub.cfg. If you find where the problem is. Please let us know.
Thank you very much.
Steven
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Been using Clonezilla server for many years, always PXE booting clients in Legacy mode. Tried testing with UEFI boot and found something odd.
I have confirmed that I set the drbl-ocs command correctly but the command that is executed on the clients is wrong. Tried to capture (savedisk) a laptop, the command sent was for restoredisk instead but showed the correct image filename. I noticed this in Clonezilla years ago, was not too concerned because all works correctly in Legacy mode. Windows 11, I hear will only use UEFI.
Has anyone else had this same problem?
Clonezilla SE and live works for uEFI machine, unless you hit a bug.
You did not mention what were the wrong commands, and the error messages. Please describe that in detail, and put some photos. It's easier for us to diagnose the issue you have encountered.
Steven
I recently built a new Clonezilla SC using all the latest versions. I noticed this same problem on older versions. I will rerun a test -- are the commands logged somewhere? is there a debug log?
Basically, I execute a drbl-ocs savedisk command to a new image file. But what I see on the client is a command which is a restoredisk command to the same image file.
Please:
1. Run "drbl-bug-report" and post the generated file
2. What's the complete drbl-ocs command? Please show that.
3. Please attach these 2 files which is generated after you run the drbl-ocs command, too:
/tftpboot/nbi_img/pxelinux.cfg/default
/tftpboot/nbi_img/grub/grub.cfg
Steven
I tried another test today and of course it worked.
This is the command I have been using: drbl-ocs -nogui -b -q2 -rm-win-swap-hib -p reboot -z1p -i 1000000 -l en_US.UTF-8 startdisk save Dell7530-TEST-20211102-21H1 nvme0n1
I attached the pxelinux default file in the previous post and the grub.cfg here.
Thank you Steven for your help -- I now see where the command is built in the default file. I learned something.
Tom
DRBL bug report is here....
I did some more testing and I think I found something.
So, I first did a UEFI SAVEDISK and then killed it before it completed - let's say I saw no value in completing it. Instead I did a RESTOREDISK to the same UEFI and a Legacy Boot PC. with clients to wait = 2. Legacy boot started correctly, the UEFI PC continued the previous job which I had tried to kill.
I checked the pxelinux default file and it was correct, of course. So, what does this mean? The problem is not with DRBL or TFTPBOOT, it is something within UEFI which messes this up? It seems as if UEFI caches the last [unsuccessful] command and then tries to execute it when I PXE boot it. Have you encountered this before? BTW, I am using the same Dell laptops for all of this.
I somehow can not reproduce this issue here.
I am using Ubuntu 20.04, and installed drbl 4.5.3-drbl1 and clonezilla 4.5.5-drbl1, as what you have.
Using dcs to set to save the client, and use dcs to set to restore the client.
The file /tftpboot/nbi_img/grub/grub.cfg is set as expected.
How did you kill it? Did you use "dcs" to switch them?
Steven
Some more information from my testing. I have no issues with restores (I believe). But I have this issue when I try to do a capture.
This morning I tried to capture an image from a UEFI laptop - I know that the command is correct because I used it on a Legacy laptop. The command which appeared on the client is a restoredisk (supposed to be a savedisk) with the correct image name. I checked pxelinux.cfg default and the command is correct there. So, the command is definitely getting altered somewhere I just cannot identify where it is happening.
ok. I just took a look at grub.cfg again and I found the issue but do not know how to fix this:
Notice that the menu entry is correct - this is was the command I entered. But the executed command is wrong; it shows a restore instead of a save!!!!
menuentry "Clonezilla: save disk nvme0n1 as image Dell7530-TEST-20211102-21H1" --id clonezilla-se-client {
echo "Enter Clonezilla..."
echo 'Loading Linux kernel vmlinuz-pxe...'
$linux_cmd vmlinuz-pxe devfs=nomount drblthincli=off selinux=0 quiet text 1 drbl_bootp=$net_default_next_server edd=on clientdir=\"node_root\" ocs_opt=\"-l en_US.UTF-8 --nogui -g auto -e1 auto -e2 -r -p reboot --skip-set-netboot-first -scr --mcast-port 2232 multicast_restoredisk Dell7530-CNOQC-20210909-21H1 nvme0n1\"
echo 'Loading initial ramdisk initrd-pxe.img...'
$initrd_cmd initrd-pxe.img
}
How do I fix this?
I've actually had this issue for a couple of years. It only appears when I set the PC to UEFI. It does not happen when the PC is set to legacy mode.
I recently built a new PC to use as the Clonezilla server with the expectation that all the latest software (ubuntu, clonezilla,...) would resolve this problem.
My urgency for testing this again and trying to resolve this, is that Windows 11 will not support legacy mode.
Questions: how does the menu in pxelinux.cfg get constructed? Is there a way for me to diagnose this process?
Tom
As I mentioned, how did you kill it? Did you use "dcs" to switch them?
The most important is that we can reproduce this issue here. Hence you need to tell us the details so that we can try to fix this issue if it's reproducible.
"Questions: how does the menu in pxelinux.cfg get constructed? Is there a way for me to diagnose this process?" -> For uEFI netboot, the file is /tftpboot/nbi_img/grub/grub.cfg, not pxelinux.cfg.
You can search "GRUB_CONF" in /usr/share/drbl/sbin/drbl-functions, and maybe check the functions add_opt_in_grub_efi_cfg_block and remove_opt_in_grub_efi_cfg_block.
Steven
Thank you for the reply.
I held the power button down to kill the client.
Last week, Wednesday, we tested again; we are trying to develop a standard process for our new batch of Dell 7550s. I ran a savedisk on the server and the client showed a restoredisk for the same image file again. After this failed on the client because the image file could not be found, I ran the same savedisk on the server again and this time, the client side executed correctly. Maybe we need to execute the server side twice???
I will try what you suggested in the last post --- For uEFI netboot, the file is /tftpboot/nbi_img/grub/grub.cfg, not pxelinux.cfg.
You can search "GRUB_CONF" in /usr/share/drbl/sbin/drbl-functions, and maybe check the functions add_opt_in_grub_efi_cfg_block and remove_opt_in_grub_efi_cfg_block.
Steven you have been great at helping me with this. I have found something.
This is an example of grub.cfg. I entered the DRBL command and grub.cfg was modified to the following:
menuentry "Clonezilla: save disk nvme0n1 as image Dell7530-TEST-20211102-21H1" --id clonezilla-se-client {
echo "Enter Clonezilla..."
echo 'Loading Linux kernel vmlinuz-pxe...'
$linux_cmd vmlinuz-pxe devfs=nomount drblthincli=off selinux=0 quiet text 1 drbl_bootp=$net_default_next_server edd=on clientdir=\"node_root\" ocs_opt=\"-l en_US.UTF-8 --nogui -g auto -e1 auto -e2 -r -p reboot --skip-set-netboot-first -scr --mcast-port 2232 multicast_restoredisk Dell7530-CNOQC-20210909-21H1 nvme0n1\"
echo 'Loading initial ramdisk initrd-pxe.img...'
$initrd_cmd initrd-pxe.img
}
Notice that the menu entry and the command are different. Now, I run the same command again and the command is modified to match the menu entry. Running the command a second time fixes everything. Now, I have a work-around.
That's really weird you need to run twice on the server to make the config file correct. I wish I can reproduce this issue here, and this issue can be fixed...
If there is a chance I can remotely login the machine which you encountered this issue, or you can reproduce this issue on a VM, please email me at steven at clonezilla org.
Thanks.
Steven
We have a work around for now. Can you tell me how these values are created. Maybe I can track down the problem.
Tom
Last edit: Steven Shiau 2021-12-05
As I mentioned, "/tftpboot/nbi_img/grub/grub.cfg" is the file to be modified when you use "dcs" to switch the uEFI netboot menu of clients. Basically it uses the functions from /usr/share/drbl/sbin/drbl-functions, i.e., add_opt_in_grub_efi_cfg_block and remove_opt_in_grub_efi_cfg_block to update the menu in grub.cfg. If you find where the problem is. Please let us know.
Thank you very much.
Steven