GRUB2, Boot Clonezilla live, not the ISO, on Win 10, UEFI
The first post at LQ, hope I found the right forum.
I tried to put enough in the subject to explain why I think this is a new question. The error is a "kernel panic" at boot, "not syncing: VFS: Unable to mount root fs on unknown-block(0,0)" I have read a lot about the Linux boot process. I think my issue is the initrd is not compatible with GRUB2/UEFI. The same kernel/initrd/filesystem.squashfs will PXE boot ok. The initrd/filesystem is from Clonezilla live files. Let me try and give some better context to have a skeleton to hang some of the details on. The use case is for a Win10 register to remote image. We have been using the basic process for years. It was Grub4Dos, Win7, and P.I.N.G (Part Image is Not Ghost). For newer kernel, for newer hardware, we are trying to use Clonezilla. GRUB2 because we are Win10/GPT/UEFI. I think the same process will work. So there a "dual boot" grub conf. One that boots to windows the other will boot Clonezilla with all the parm needed to connect to a share. There is 2 version of that conf, one defaults to windows the other to Clonezilla. So when the helpdesk would like to reimage the register(computer), a bat file copies the conf with the default that will reimage. After the reimage, it boots, and since the image that was just applied the conf defaults to windows. Now it a matter of saving the register personality to the server, then when the new Win10 image boots the first time pulling that personality back. Also as part of the disaster recovery, a tech can PXE boot the register and the same process except no personality is save and they have to reconfigure the register, other than that and the kernel/initrd/filesystemfs.squash is served up VIA TFTP64 running on the same server with the image. This is why I think my issue is the compatibility between GRUB2 and initrd. I had an issue with the PXE boot and it was not downloading the filesytem.squash. But the initrd had Busybox and there was no kernel panic. Finally some questions :-) 1. do I need a different initrd for how GURB sets up the ramdisk compared to PXE? 2. Does GRUB2 have a PXE boot like Grub4dos? 3. do I need a different angle of attack? Details: Code:
Directory FYI, if I do an ls on "(hd0,gpt3)/user/braums/PXE/i386/live/) I do see the files and the kernel is loading. Code:
menuentry "Windows" { |
I do not do it myself, but I believe you may find it easier to use grub to boot an iso via a 40_custom file as explained here, that has an example of clonezilla too.
https://www.linuxbabe.com/desktop-li...b2-boot-loader |
Don't know PXE, Here's my loopback that I use:
Code:
menuentry "clonezilla" { |
@aus9 and @verndog, I am considering that option. Since I have to have the live directory for PXE booting, which BTW works, I was trying to use the same files and not have to have the ISO with all the unneeded fluff.
I am new and therefore have tried not to use terms unless I am sure, from my studies so far, I hope to have some 60,000 foot understanding of the Linux boot process, but take all this with a grain of salt. I am getting the block device error, while the Kernel is setting up the root fs. So I think Grub2 must set up the ram drive for the intrd differently. So when the kernel tries to connect it panics. When I was working on PXE boot, there was an issue with TFTP, I was getting a busybox prompt. There was a TFTP setting that was causing the download of filesystem.squashfs to fail. I am making an assumption based on that PXE boot experience that my issue is with initrd not being loaded correctly. For what it is worth here is my PXE menu from pxelinux.cfg/default that does work. Code:
label Clonezilla-test1 |
I don't fully get the grub part of pxe unless you are saying your nic doesn't have a boot rom.
https://clonezilla.org/livepxe.php Edit your PXElinux config file /tftpboot/nbi_img/pxelinux.cfg/default, and append the following: ----------- label Clonezilla-live MENU LABEL Clonezilla Live (Ramdisk) KERNEL vmlinuz APPEND initrd=initrd.img boot=live username=user union=overlay config components quiet noswap edd=on nomodeset nodmraid locales= keyboard-layouts= ocs_live_run="ocs-live-general" ocs_live_extra_param="" ocs_live_batch=no net.ifnames=0 nosplash noprompt fetch=tftp://$serverIP/filesystem.squashfs |
Quote:
Maybe the use case will give more context, it is to reimage a Win10 OS Point of Sale. There are two different times. 1. A hard drive is replaced. Then the tech would PXE boot, pick the correct menu option, and the image is restored. The first boot then asks the tech for information to set the personality of that Point of Sale. 2. There is or thought to be a windows corruption of some sort, but windows are running enough to boot. The Grub Conf file with the default to Win10 is copied over with a Grub Conf whose default is set to boot to Linux/Clonezilla. The personality of the Point of Sale is saved to the server just before the reimage. Then the first boot after the reimage, it sees that a personality was saved and then uses that. So with just a click of the bat file, the Point of sale can be reimaged, remotely, and other than the initiating part touchless. As mention earlier, I am looking at switching to the ISO. In theory, I should be able to PXE and Grub2 boot it. Other than the size, which Point of Sale mostly comes with SSD drives and therefore they are not large, there are some other advantages to switch. Besides I might be able to get it to work :-), looks like community support would be better and the other is updates would be easier (just copy new ISO). Once the process works, its scope is so narrow there is not a lot of reason to update once it is working. It only runs long enough to be imaged and therefore security is not that big of an issue. I hate magic, and not understanding why Grub2 will not boot files that the NIC PXE does bother me. But some mysteries of the universe are meant not to be solved. :-) |
Let me go over this in my mind outloud.
You want to boot locally to grub. Then you want to access clonezilla from the grub menu correct? Where are the clonezilla files at? On network? https://unix.stackexchange.com/quest...option-to-grub |
Quote:
To reimage, all I have to do is make the Clonezilla menu option the default, reboot, and it is reimaged. |
Grub can boot to iso image but you don't want it as part of the clone usually.
|
Looks like I may have to use both methods. Extract the live files for PXE and ISO loop/back for Grub2.
I don't see how to set up a loop/back and windows running DHCP/TFTP for PXE. Most of the ways that I have found are Linux and they mount the ISO to make the live files accessible. Quote:
|
Quote:
Quote:
|
Thank you for the questions to help me articulate where I was having trouble. :-)
Quote:
Quote:
Quote:
Quote:
Quote:
Code:
menuentry "Clonezilla test 1" { Quote:
Here is my grub.cfg, which should be stock, except that I add was some modules hoping that would fix it. Code:
# |
copy/move clonezilla live folder to C:\ and rename C:\live-hd.
/etc/grub.d/40_custom entries Code:
menuentry 'Clonezilla' { Code:
live-media-path=/live-hd bootfrom=/dev/sda4 toram=live-hd |
In post 12, you indicate that you have Grub2 installed on the EFI partition. Which folder in the EFI partition contains Grub2 and what files do you have under that folder. You indicate that that your clonezilla entry is in the custom.cfg file and is called from the grub.cfg file. Do you have an entry in your BIOS firmware that points to the folder with Grub. If I understand, you have 2 entries you want to boot and one works and the other fails, correct?
In my previous post, I indicated that I had never seen a Grub entry with an = sign on the initrd line. That's true but the = sign is used with the Syslinux/Isolinux bootloaders? The menuentry you posted in post 12 isn't correct as Grub doesn't use APPEND and all the parameters should be on the linux line not the initrd line. I would expect the parameters to be after the initrd path. Might try the suggested menuentry posted by colorpurple21859. |
I going to be out of town on business for a couple of days. I appreciate all the help and I did not want you all to think I was ignoring the suggestions. I will test them when I get back.
Let me give you where I am currently at before I answer your questions. I did try the ISO live boot and it does work. I can either boot to Win 10 or Clonezilla via the ISO. Other than some disks, which are not the end of the world, I am now to the point of trying to get Clonezilla to restore without depending on any input, what I am calling a touchless restore. Getting the touchless restore is a different journey. :-) Quote:
Quote:
Quote:
Quote:
|
All times are GMT -5. The time now is 09:32 AM. |