LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-09-2021, 06:06 PM   #16
Tem2
Member
 
Registered: Dec 2011
Posts: 243

Original Poster
Rep: Reputation: Disabled

Quote:
Originally Posted by yancek View Post
You have an older machine which still uses Legacy/CSM boot which has a small bit of Grub code in the MBR and most of the rest of the Grub files necessary to boot on the Ubuntu partition (sda5). Line 14 of the bootinfoscript shows you have Vista/Win7, neither of which is supported currently. Line 16 shows you have Grub2 files on an ntfs partition where they should never be. Line 21 shows boot files which are used by Grub4Dos. I don't know that any of this impacts your problem but those files are not useful.

Your bootinfoscript also shows Grub version as 1.99 which was first used about 10 years ago. I have Ubuntu 20.04 installed on one partition and it shows Grub version as 2.04 and you indicate you have Ubuntu 20.04 installed. Maybe reinstalling Grub2 from Ubuntu would help. Check what version of Grub2 you have by entering this command in a terminal:

Code:
 grub-install --version
If I understand your situation, you are able to boot Ubuntu. Do you only see one menu on boot, the grub.cfg file from Grub2? Your bootinfoscript output, beginning at line 560, shows the output of os-prober and you can see scrolling down that the 40_custom is not read but other files are? Not sure why that would happen. As a test, could you just copy your clonezilla menuentry to the grub.cfg file on sda5, the Ubuntu partition, save the change and do NOT update grub, but reboot to see if your clonezilla entry is there and it boots. If it does, you will know that the clonezilla iso boots so then the problem is why 40_custom isn't read and included in grub.cfg.
First let me say that I may have been getting tangled up in my clonezilla files and the grub coding. I apologize for my errors and inconsistencies.

That said, let me update my status. I have 3 different clonezilla iso files. I copied all 3 to the /boot/grml folder (and also to the root /) and after doing the update-grub, I created menu entries (which should be in the 40_custom file) at the bottom of the /boot/grub/grub.cfg file and then did not do the update-grub.

Here is the code I boot with in /boot/grub/grub.cfg:

Code:
### BEGIN /etc/grub.d/42_grml ###
menuentry "Grml Rescue System (clonezilla-live-2.7.1-22-amd64.iso)" {
        insmod part_msdos
        insmod ext2
        set root='hd0,msdos5'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5  469b1d8e-889c-4feb-96aa-343b03155e27
        else
          search --no-floppy --fs-uuid --set=root 469b1d8e-889c-4feb-96aa-343b03155e27
        fi
        iso_path="/boot/grml/clonezilla-live-2.7.1-22-amd64.iso"
        export iso_path
        kernelopts="   "
        export kernelopts
        loopback loop "/boot/grml/clonezilla-live-2.7.1-22-amd64.iso"
        set root=(loop)
        configfile /boot/grub/loopback.cfg
}
menuentry "Grml Rescue System (clonezilla-live-20210525-groovy-amd64.iso)" {
        insmod part_msdos
        insmod ext2
        set root='hd0,msdos5'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5  469b1d8e-889c-4feb-96aa-343b03155e27
        else
          search --no-floppy --fs-uuid --set=root 469b1d8e-889c-4feb-96aa-343b03155e27
        fi
        iso_path="/boot/grml/clonezilla-live-20210525-groovy-amd64.iso"
        export iso_path
        kernelopts="   "
        export kernelopts
        loopback loop "/boot/grml/clonezilla-live-20210525-groovy-amd64.iso"
        set root=(loop)
        configfile /boot/grub/loopback.cfg
}
menuentry "Grml Rescue System (clonezilla-live-20210817-hirsute-amd64.iso)" {
        insmod part_msdos
        insmod ext2
        set root='hd0,msdos5'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5  469b1d8e-889c-4feb-96aa-343b03155e27
        else
          search --no-floppy --fs-uuid --set=root 469b1d8e-889c-4feb-96aa-343b03155e27
        fi
        iso_path="/boot/grml/clonezilla-live-20210817-hirsute-amd64.iso"
        export iso_path
        kernelopts="   "
        export kernelopts
        loopback loop "/boot/grml/clonezilla-live-20210817-hirsute-amd64.iso"
        set root=(loop)
        configfile /boot/grub/loopback.cfg
}
### END /etc/grub.d/42_grml ###
menuentry "clonezilla-hirsute" {
  insmod ext2
  set isofile="/clonezilla-live-20210817-hirsute-amd64.iso"
  loopback loop (hd0,5)$isofile
  linux (loop)/live/vmlinuz boot=live findiso=$isofile
  initrd (loop)/live/initrd.img
}
menuentry "clonezilla-27122" {
  insmod ext2
  set isofile="/clonezilla-live-2.7.1-22-amd64.iso"
  loopback loop (hd0,5)$isofile
  linux (loop)/live/vmlinuz boot=live findiso=$isofile
  initrd (loop)/live/initrd.img
}	
menuentry "clonezilla-groovy" {
  insmod ext2
  set isofile="/clonezilla-live-20210525-groovy-amd64.iso"
  loopback loop (hd0,5)$isofile
  linux (loop)/live/vmlinuz boot=live findiso=$isofile
  initrd (loop)/live/initrd.img
}
The good news is that when I boot, the grub menu shows all 6 of these entries.

The really good news is that all 3 entries which should have been in the 40_custom file will boot clonezilla. So all 3 iso files are good.

The bad news is that all 3 entries which automatically get entered with the grml method do not work. When I edit these entries and change it to:

Code:
configfile /boot/grub/grub.cfg
I get a clonezilla menu immediately but all menu entries just blank the screen and after about 3 or 4 minutes fail with the error:

Code:
 unable to find a medium containing a live file system.
If nothing changes I can live with the situation, but it would be nice to be able to use grub the way it was designed.

I guess my question is: How can I clean up my grub? I hesitate to uninstall and reinstall it without someone's sage advice. Right now my systems all boot. If I start messing with grub, with my track record, things could get really ugly
 
Old 09-09-2021, 08:31 PM   #17
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,344

Rep: Reputation: 1587Reputation: 1587Reputation: 1587Reputation: 1587Reputation: 1587Reputation: 1587Reputation: 1587Reputation: 1587Reputation: 1587Reputation: 1587Reputation: 1587
I think part of your problem there is no "set root=" line in your custom menu.
put clonezilla-live-2.7.1-22-amd64.iso in / and try this grub entry
Code:
menuentry "clonezilla-27122" {
set root='hd0,5'
ISO="/clonezilla-live-2.7.1-22-amd64.iso"
search --set -f $ISO
loopback loop $ISO
linux (loop)/live/vmlinuz boot=live union=overlay username=user config components findiso=$ISO
initrd (loop)/live/initrd.img
}

Last edited by colorpurple21859; 09-09-2021 at 08:34 PM.
 
Old 09-09-2021, 08:53 PM   #18
Tem2
Member
 
Registered: Dec 2011
Posts: 243

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by colorpurple21859 View Post
I think part of your problem there is no "set root=" line in your custom menu.
put clonezilla-live-2.7.1-22-amd64.iso in / and try this grub entry
Code:
menuentry "clonezilla-27122" {
set root='hd0,5'
ISO="/clonezilla-live-2.7.1-22-amd64.iso"
search --set -f $ISO
loopback loop $ISO
linux (loop)/live/vmlinuz boot=live union=overlay username=user config components findiso=$ISO
initrd (loop)/live/initrd.img
}
The problem is not the menuentry. The following will boot the iso file:
Code:
menuentry "clonezilla-27122" {
  insmod ext2
  set isofile="/clonezilla-live-2.7.1-22-amd64.iso"
  loopback loop (hd0,5)$isofile
  linux (loop)/live/vmlinuz boot=live findiso=$isofile
  initrd (loop)/live/initrd.img
}
The problem is that when I do the update-grub, my 40_custom file is not added automatically to the grub.cfg file. I had to copy my 40_custom entries manually. Another problem is that the grml entries which are automatically added to the grub.cfg file will not boot the iso files.

This following code, for example,
Code:
menuentry "Grml Rescue System (clonezilla-live-2.7.1-22-amd64.iso)" {
        insmod part_msdos
        insmod ext2
        set root='hd0,msdos5'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5  469b1d8e-889c-4feb-96aa-343b03155e27
        else
          search --no-floppy --fs-uuid --set=root 469b1d8e-889c-4feb-96aa-343b03155e27
        fi
        iso_path="/boot/grml/clonezilla-live-2.7.1-22-amd64.iso"
        export iso_path
        kernelopts="   "
        export kernelopts
        loopback loop "/boot/grml/clonezilla-live-2.7.1-22-amd64.iso"
        set root=(loop)
        configfile /boot/grub/loopback.cfg
}
is automatically generated when I update-grub, but I have to change
Code:
configfile /boot/grub/loopback.cfg
to
Code:
configfile /boot/grub/grub.cfg
just to get a Clonezilla menu. But all of the entries on that Clonezilla menu don't work. They just timeout after about 3 or 4 minutes.

It is interesting to note that when I edit the grml menuentry to point to grub.cfg it will produce the Clonezilla menu (which doesn't work), but when I choose one of the manually copied 40_custom menuentries, there is no Clonezilla menu but the program loads.

My grub seems to be corrupted and I'm not sure if I want to risk uninstalling and re-installing it.

Last edited by Tem2; 09-09-2021 at 09:11 PM.
 
Old 09-09-2021, 08:54 PM   #19
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,344

Rep: Reputation: 1587Reputation: 1587Reputation: 1587Reputation: 1587Reputation: 1587Reputation: 1587Reputation: 1587Reputation: 1587Reputation: 1587Reputation: 1587Reputation: 1587
try this
Code:
sudo chmod +x /etc/grub.d/40_custom
sudo update-grub
 
Old 09-09-2021, 09:44 PM   #20
Tem2
Member
 
Registered: Dec 2011
Posts: 243

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by colorpurple21859 View Post
try this
Code:
sudo chmod +x /etc/grub.d/40_custom
sudo update-grub
That fixed it! All my 40_custom entries were automatically added to the grub.cfg file and they all load Clonezilla successfully from the menu. Thanks for all your help!

As far as the other issues... I'm going to let a sleeping grub lie!
 
Old 09-09-2021, 09:45 PM   #21
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,344

Rep: Reputation: 1587Reputation: 1587Reputation: 1587Reputation: 1587Reputation: 1587Reputation: 1587Reputation: 1587Reputation: 1587Reputation: 1587Reputation: 1587Reputation: 1587
You're Welcome
 
1 members found this post helpful.
Old 09-10-2021, 08:04 AM   #22
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,492

Rep: Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488
Glad you got it working, Just an FYI, I don't know how that happened as all the files in grub.d should be executable except of course the README so they must have been changed. Good reason to keep detailed notes.

Last edited by yancek; 09-10-2021 at 08:05 AM.
 
Old 09-10-2021, 10:35 AM   #23
Tem2
Member
 
Registered: Dec 2011
Posts: 243

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by yancek View Post
Glad you got it working, Just an FYI, I don't know how that happened as all the files in grub.d should be executable except of course the README so they must have been changed. Good reason to keep detailed notes.
Thanks for the feedback! I'm guessing that it has something to do with a project I've been working on in another thread https://www.linuxquestions.org/quest...643/page2.html. (See Post #16.) In my efforts to get this Editor working I have been installing various system components that probably reach deep into the bowels of my OS. I've installed gtk2 and gtk3 and various dependencies. Here is a portion of the grep results for what I've installed recently:

Code:
  336  sudo apt install python-pil
  338  sudo apt install -y libcups2-dev
  340  sudo apt install gtk2
  341  sudo apt-get install gtk2.0HHHHHHB
  343  sudo apt install  libgnomeui-devel
  344  sudo yum install libgnomeui-devel
  346  sudo apt install libgnomeui-devel
  459  sudo install libgnomeui-devel
  460  sudo apt install libgnomeui-devel
  462  sudo apt install glib2.0-dev
  463  sudo apt install cups-devel
  464  sudo apt install libgnomecups1.0.dev
  465  sudo apt install libcupsys2-dev
  502  sudo apt install libgnomeui-2.0
  508  sudo apt install gtk2.10
  509  sudo apt install libgtk-4-dev
  510  sudo apt groupinstall "Development Tools"
  511  sudo apt install "Development Tools"
  512  sudo apt install gtk+devel
  513  sudo apt install libgtk-3-dev
  518  sudo apt install libgtk-4-dev
  519  sudo apt-get install build-essential libgtk-3-dev
  521  sudo apt install libwebkit2gtk-4.0-dev
  522  sudo apt install libgtk-3-dev 
  523  sudo apt install autogen 
  524  sudo apt install  autoconf 
  525  sudo apt install libtool
  526  sudo apt install automake
  527  sudo apt install pkg-config
  528  sudo apt install intltool-debian 
  530  sudo apt install glib-2.0
  532  sudo apt-get install libglib2
  533  sudo apt-get install libglib2.0
  535  sudo apt-get install glib2.0
  537  sudo apt install gnome-2.0
  538  sudo apt install libgnome-2.0
  539  sudo apt install gtk-2.0
  540  sudo apt install gtk2.0
  562  sudo apt install meson
  564  sudo apt install ninja
  566  sudo ninja -C _build install
  568  sudo grub-install --version
  625  sudo apt install boot-repair
I get on a roll with these kinds of projects and I forget how dangerous the commands can be that I am entering. And this time I had the sense to use Clonezilla to make a safety net and I got bogged down trying to get it to work from grub. And thanks to all of your help it finally works. But do you want to hear something sad, perhaps ironic? My clonezilla doesn't see my sda5 partition anymore! That is my ubuntu main partition. I ran boot-repair hoping it would fix it, but for some reason, clonezilla doesn't list sda5 as a candidate for source partition.

I guess I'll have to use dd to do my backup. All my data is safely backed up with Back-in-Time, so my worst case is to reinstall ubuntu. I should be doing this in a test partition or sand-box.

If you can offer any advice regarding the gtk errors I'm getting with my configure problems on my other thread, https://www.linuxquestions.org/quest...643/page2.html I will be eternally grateful. I'm an old mainframe techie and I miss my old ISPF Editor.

At any rate, thanks again for all of your support.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Need help adding Clonezilla to grub2 menu Tem2 Linux - Software 3 09-08-2021 05:29 PM
LXer: Clonezilla-release Stable Clonezilla live (2.0.1-15) Released LXer Syndicated Linux News 0 12-18-2012 09:21 PM
GRUB2 - FreeBSD-8.0 does not show up in triple boot menu, dual boot menu it does.. wiliweld *BSD 7 05-03-2010 01:05 PM
Mount ISO as specific device (ie: /dev/sda1) with GRUB2 to boot KNOPPIX live cd iso BLuFeNiX Linux - General 2 12-23-2009 01:31 AM
Does anyone Know how to open either .iso.rz or these .iso.xdelta,.iso.bz2,.iso.lzma?? maximalred Debian 5 06-09-2004 06:15 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:11 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration