Leap 42.1: Upgrade off-line from ISO image

Hi,

I’m trying to do an off-line upgrade of Leap 42.1 using an ISO image of the 42.2 installation disk. I’ve found instructions how to use iso file for installation (for example here: https://forums.opensuse.org/showthread.php/484223-How-to-boot-a-openSUSE-DVD-from-hard-disk-with-Grub2). The system boots, but it immediately jumps to the installation procedure - while when booted from the physical DVD, it offers an option to select Install or Upgrade first - and a couple of other options. When I canceled the installation, I managed to eventually find an upgrade option, but the upgrader only tried to find its files on the hard disks, while the ISO was invisible.

How can I trick the bootloader to run the upgrade from ISO file instead of install, or make an upgrade from a harddrive? I have an LVM installation and very limited space on traditional partitions.

Thank you very much for your help in advance. Any hints would be welcome.

Best regards,

(js).

The openSUSE documentation for installation and upgrade procedures is here: <https://doc.opensuse.org/documentation/leap/startup/html/book.opensuse.startup/index.html&gt;.
The openSUSE Reference guide (GRUB and LVM information) is here: <https://doc.opensuse.org/documentation/leap/reference/html/book.opensuse.reference/index.html&gt;.
The Release notes are here: <https://doc.opensuse.org/release-notes/x86_64/openSUSE/Leap/42.3/index.html&gt;.

I’ve never noticed that, when an upgrade is performed with an openSUSE ISO image that, the upgrade procedure – assuming that, one selects the upgrade procedure and not the installation procedure – does anything it shouldn’t do.

Please be aware that, the upgrade procedure usually doesn’t touch any existing configuration files in the ‘/etc/’ tree – it drops the latest version of the configuration as a “rpm.new” file alongside the existing configuration.

There are openSUSE SDBs for upgrading:

  • “Offline upgrade”: <https://en.opensuse.org/SDB:Offline_upgrade&gt;. – Note the ‘rcrpmconfigcheck’ in the “After the upgrade” section – please ignore the “Smiley” in the URL display: the link to the URL is OK AFAICS but, we seem to have a Forums display issue here . . . :wink:
  • “System upgrade”: only relevant for an upgrade from the immediately previous version – “Leap 42.2 to Leap 42.3” for example: <https://en.opensuse.org/SDB:System_upgrade&gt;.

That’s exactly my problem.
I can’t tell what the upgrade procedure does, because when I boot my box from ISO image I never have a chance to select the procedure - it immediately jumps to install. If I boot from a DVD (made from the same ISO) - the bootloader gives me a chance to decide. When I boot from the ISO image itself - never. Perhaps it’s because the selection is done by a DVD’s bootloader, and my HDD grub jumps directly to linux files rather than pass control to the iso’s bootloader.

Thanks for the documentation. I have already partially read it, but I’ll go through it again.

Is your machine to be upgraded a physical machine or a virtual machine, and if virtualized what technology are you using?

TSU

You still did not explain how you “booted from ISO image”. And no, I am not interested in links to random description in Internet - I’m interested in exact steps you performed.

I provided the source of the code in my original post. I only adapted the file location to my configuration - that’s why I thought posting the actual code was not necessary. Anyway, my /etc/grub.d/40_custom is below:


menuentry "openSUSE 42.2 Install DVD" {
  set isofile=/mnt/openSUSE-Leap-42.2-DVD-x86_64.iso
  set root=(hd4,6)
  loopback loop $isofile
  linux (loop)/boot/x86_64/loader/linux install=hd:$isofile
  initrd (loop)/boot/x86_64/loader/initrd
}

Of course, isofile and root entries match the physical location of the ISO file and /etc/grub.cfg file was updated. The menu entry is visible in the grub menu, and selecting it makes the system boot from the iso file - but as I already wrote, it jumps immediately to the installation program, skipping the selection between install, upgrade, and other boot-time options.

I understand that the selection menu (https://doc.opensuse.org/documentation/leap/startup/html/book.opensuse.startup/images/install_boot_osuse.png) is done in grub as well, right? So I should have to either chain the iso image bootsector, or modify my own menu entry to jump straight to the upgrade procedure - right? But how to do it?

Physical, of course. Booting a VM from an ISO image is rather simple if you have access to the VM Manager, isn’t it?

Please take into account that you and the others are separated through time, distance and assessment of each other level knowledge.

Everything you do not explain explicit can not be taken for granted. When you think you can skip the exact description on how you “boot from the ISO file”, then you apparently assume that others are doing the same day in day out. This might not be the case.
It is not important if you think “Booting a VM from an ISO image is rather simple if you have access to the VM Manager, isn’t it?”. We do not know if you think it is simple, nor do you know if others think likewise.

People here are spending their spare time in trying to help you. Part of this trying is to get feeling for what you are doing, why you are doing it, what the general working environment is and how you came to the point where you got stuck and decided to ask for help. For helping one often needs to more or less learn to think the same way as the OP thinks. This may take time and several posts going to and from. When you frustrate that process in posting in a slightly derogate way, the result will only be that people leave this thread and go for more rewarding tasks, like helping others, drinking a beer, going for a walk.

HTH.

What is /mnt filesystem type? Initial kernel supports limited number of filesystems, I’m sure for vfat, ext2 and iso9660.

It’s ext4 - though I do not think it really matters in this case: the computer does not refuse to boot, it just does something other than I would want it to do during and after the boot.

Without looking closely at the Install code, I’m pretty sure that the Install reads the Install Source as removable media, not mounted the way you did it.

For what you’re trying to do, I’d instead mount the DVD ISO in a loopback device, and then reference in Grub.
But, that’s only a try, not anything I’d be certain about.

the other possibility I can think of is that the bootstraop couldn’t detect your existing install.
Is your current 42.1 encrypted or otherwise not accessible?

TSU

Could you please explain what exactly is missing and at which stage. For all I can tell choice between installation and upgrade comes rather late, after you have already started installation. Screenshot of “missing” screen would be helpful.

I am sorry to disagree.

I just booted from an installation DVD and already the Grub menu shows “Upgrade” as an option.
I assume that the OP means this.

Looks like the OP is using a technic that was published around 13.1 time… Note that if it worked long ago does not mean it will work today. Things change and the ISO was never really designed to do it it is a pure kludge

On the other hand maybe the iso is smart enough to not allow you to format over the partition that the iso lives in thus destroying the install source LOL

Well, as I see it, the Upgrade from the DVD will not change partitions, nor create fresh file systems on them. It will basically do a zypper dup from the DVD.

That’s exactly the point, I think.

If the “Upgrade” is selected in the grub menu, in my own grub menuentry section I should use commands to either chain to the grub located in the ISO file or load the code performing the upgrade, right? Either way, I do not know, how to do it.

Best regards,

(js).

Or the OP is smart enough not to place the ISO file on the partition which would eventually be formatted. :wink: I have a habit of splitting the whole system into several partitions and LVs to avoid such situations - among other reasons.

Indeed, the upgrade procedure does not format the system disk at all.

OK, so you are speaking about boot loader menu. Of course you won’t see it when using “loop back boot” because then you bypass boot loader on DVD and directly load kernel. You need to explicitly pass the same options to kernel as DVD grub menu option “Upgrade” does.

P.S. you would save quite some time if you said exactly what you were missing from the very beginning, not some vague description.