help-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Booting an ISO file from GRUB


From: Andrei Borzenkov
Subject: Re: Booting an ISO file from GRUB
Date: Wed, 14 Feb 2024 15:59:45 +0300
User-agent: Mozilla Thunderbird

On 14.02.2024 11:26, Marko Toivanen wrote:
I have been trying to find information related to the following problem:

I'm trying to start a Lubuntu 22.04 installation from an older Lubuntu
14.04 installation by booting the ISO file from grub menu.

Booting the ISO file works by adding the following menu configuration to
file /etc/grub.d/40_custom:

menuentry "Linux ISO to RAM" {
      insmod lvm
      insmod ext2
      set root="lvm/lubuntu--vg-root"
      set isofile="/home/user/lubuntu-22.04.3-desktop-amd64.iso"
      loopback loop $isofile
      linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile
toram
      initrd (loop)/casper/initrd
}

The problem is when Lubuntu 22.04 starts this way, there is a device
"/dev/lubuntu-vg" showing up in Linux (what I didn't expect) and because

Well, installer needs to read a file from the filesystem on the logical volume so it needs to configure this logical volume. What miracle did you expect?

of that, I can't make a clean install of Lubuntu 22.04 on the hard drive
when Lubuntu was started from the ISO file (which is located on the hard
drive).

My initial thought was that using "toram" option would completely load
the ISO to RAM, so I could then be able to repartition the hard drive
without having to start Lubuntu 22.04 installation from an USB stick.

When I try to repartition /dev/sda (where this lubuntu-vg is located)
with gparted, I get the following error message:

"we have been unable to inform the kernel of the change, probably
because if/they are in use"

So, is it possible to boot an ISO file so the problem described wouldn't
happen?



It is completely unrelated to grub. Once kernel starts, grub is not in charge anymore. Apparently your installer does not deactivate LV/VG after reading ISO, but that is something you need to raise up with your distribution.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]