GRUB2, Boot Clonezilla live, not the ISO, on Win 10, UEFI
Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
You can see from the different menus most of what I have tried. The one I am working on now is "Clonezilla 3"
FYI, if I do an ls on "(hd0,gpt3)/user/braums/PXE/i386/live/) I do see the files and the kernel is loading.
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.
@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.
I don't fully get the grub part of pxe unless you are saying your nic doesn't have a boot rom.
Sorry for the confusion, my nic does PXE boot and my configuration does work. I am trying to use the same live files to boot from Grub2. I think my problem is in the initrd stage of the boot. Seems like whatever format the initrd file is in, the NIC PXE boot loads it ok, but Grub2 does not.
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?
Basically yes. However, to be more precise, I want a grub menu that will boot Win10 (chain load) and the live files (vmlinuz, initrd.img, filesystem.squashfs).
To reimage, all I have to do is make the Clonezilla menu option the default, reboot, and it is reimaged.
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:
Originally Posted by jefro
Grub can boot to iso image but you don't want it as part of the clone usually.
The reason it is part of the clone is so the device (Point of Sale) can boot to it for a touchless reimage.
The error is a "kernel panic" at boot, "not syncing: VFS: Unable to mount root fs on unknown-block(0,0)"
That's a pretty common error and it has many causes. You indicate that you think this may be caused by the initrd but don't explain why you think this is the case.
Quote:
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.
Where is your Grub2? Do you have a Linux OS on some partition? You mention "grub.conf" which doesn't and hasn't ever existed in Grub2. Did you mean grub.cfg? Apparently, you are no longer using Grub4Dos, is that correct? Are the entries in your initial post from the grub.cfg file (wherever that might be?)? One thing I see in those menuentries which I have never seen in any of the live extracted iso files on any Linux that boot successfully is an equal sign after initrd. Not sure why you would be using that? I would delete the = sign and leave a space between initrd and /user or whastever the path is to the actual initrd file. This a Grub2 entry from grub.cfg not some Grub4Dos thing, correct?
Thank you for the questions to help me articulate where I was having trouble. :-)
Quote:
Originally Posted by yancek
That's a pretty common error and it has many causes. You indicate that you think this may be caused by the initrd but don't explain why you think this is the case.
I am making this assumption because I am getting something like "unable to mount .... rootfs. Some sort of block error". Also when the issue was not downloading filesystem.squash on the PXE boot, at least I was getting a "busybox" prompt. There was no kernel panic. Because of what I experience with PXE boot troubleshooting, if the initrd is loaded and switched to then you get a command prompt with some basic commands.
Quote:
Originally Posted by yancek
Where is your Grub2?
It is installed in the EFI partation.
Quote:
Originally Posted by yancek
Do you have a Linux OS on some partition?
No
Quote:
Originally Posted by yancek
You mention "grub.conf" which doesn't and hasn't ever existed in Grub2. Did you mean grub.cfg? Apparently, you are no longer using Grub4Dos, is that correct?
I should have said "custom.cfg". Looks like grub.cfg calls/loads custom.cfg. You are correct, I am not using Grub4Dos. I did not think it would support the EFI booting. I was using it to give context on my use case.
Quote:
Originally Posted by yancek
One thing I see in those menuentries which I have never seen in any of the live extracted iso files on any Linux that boot successfully is an equal sign after initrd. Not sure why you would be using that? I would delete the = sign and leave a space between initrd and /user or whastever the path is to the actual initrd file.
I think you are looking at one of my iterations. I left them from what I found online. I was using "Clonezilla test 1". I thought they might help show my thinking, but looks like it was just confusing. Here is the entry I am choosing when the kernel panics.
This a Grub2 entry from grub.cfg not some Grub4Dos thing, correct?
Yes, this is from custom.cfg called from grub.cfg.
Here is my grub.cfg, which should be stock, except that I add was some modules hoping that would fix it.
Code:
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub2-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#
### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
load_env
fi
if [ "${next_entry}" ] ; then
set default="${next_entry}"
set next_entry=
save_env next_entry
set boot_once=true
else
set default="0"
fi
if [ x"${feature_menuentry_id}" = xy ]; then
menuentry_id_option="--id"
else
menuentry_id_option=""
fi
export menuentry_id_option
if [ "${prev_saved_entry}" ]; then
set saved_entry="${prev_saved_entry}"
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi
function savedefault {
if [ -z "${boot_once}" ]; then
saved_entry="${chosen}"
save_env saved_entry
fi
}
function load_video {
if [ x$feature_all_video_module = xy ]; then
insmod all_video
else
insmod efi_gop
insmod efi_uga
insmod ieee1275_fb
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
fi
}
if [ x$feature_default_font_path = xy ] ; then
font=unicode
else
font="${prefix}/fonts/unicode.pf2"
fi
if loadfont $font ; then
#set gfxmode=1024x768x32,1024x768x24,1024x768x16,1024x768,auto
#set gfxpayload=keep
load_video
insmod gfxterm
#insmod png
terminal_output gfxterm
#background_image -m stretch $prefix/themes/splash.png
fi
if [ x$feature_timeout_style = xy ] ; then
set timeout_style=menu
set timeout=15
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
set timeout=15
fi
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/10_linux ###
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###
### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###
### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
insmod net
insmod efinet
insmod tftp
insmod gzio
insmod part_gpt
insmod efi_gop
insmod efi_uga
insmod ext2
insmod multiboot2
net_bootp
ls_net_addr
### END /etc/grub.d/40_custom ###
### BEGIN /etc/grub.d/41_custom ###
if [ -f ${config_directory}/custom.cfg ]; then
source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
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:
Originally Posted by yancek
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.
I wanted to answer your question about the directory. I followed some instructions on installing Grub2. I don't remember off the top of my head how I mounted that partition. Once I got Grub2 booting I kind of moved past that point. I will need to dig back through the web pages and figure it out again to give you the exact directories. Once I had Grub2 chain loading to Win 10, I made a backup copy of the image using Clonezilla. :-)
Quote:
Originally Posted by yancek
You indicate 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?
Yes.
Quote:
Originally Posted by yancek
If I understand, you have 2 entries you want to boot and one works and the other fails, correct?
Yes, I want to be able to boot to either windows or Clonezilla based off a menu choice. Then once I get the Clonezill option to work touchless, then while remote in, all that has to happen to reimage is change the default from the windows menu item to the Clonezilla menu item, then just reboot. Comming out the reboot the saved imaged is restored. On that image the windows menu item is defaulted, so now after the reimage is finished, it reboots and we are back to an original state of windows.
Quote:
Originally Posted by yancek
Might try the suggested menuentry posted by colorpurple21859.
Yes, I will try that. Even though I have the ISO working, it still makes me wonder why or even if I can make the live files work by themselves.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.