Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrading from 23.04 to 23.10 with only liquorix kernel - grub problems #342

Open
suoko opened this issue Nov 6, 2023 · 10 comments
Open
Assignees

Comments

@suoko
Copy link

suoko commented Nov 6, 2023

After the upgrade to 23.10 grub fails to configure with error:
Sourcing file `/etc/default/grub'
Generating grub configuration file ...
/etc/grub.d/10_lupin: 1: version_find_latest: not found

I suspect the problem is that I only had liquorix kernel installed and the $list of kernels is then empty.
I can't install any new kernel now cause they all fail to configure.

Is my suspect good ?
This is what I think gives a "version_find_latest: not found" error:


machine=`uname -m`
case "x$machine" in
    xi?86 | xx86_64)
	list=`for i in /boot/vmlinuz-* /vmlinuz-* /boot/kernel-* ; do
                  if grub_file_is_not_garbage "$i" ; then echo -n "$i " ; fi
              done` ;;
    *) 
	list=`for i in /boot/vmlinuz-* /boot/vmlinux-* /vmlinuz-* /vmlinux-* /boot/kernel-* ; do
                  if grub_file_is_not_garbage "$i" ; then echo -n "$i " ; fi
	     done` ;;
esac
@hakuna-m hakuna-m self-assigned this Nov 12, 2023
@hakuna-m
Copy link
Owner

IMHO, it is necessary to replace version_find_latest in /etc/grub.d/10_lupin

version_find_latest has been removed from GRUB.

So, I will try to change 10_lupin. 10_linux has already been changed.

@hakuna-m
Copy link
Owner

As I digged for a solution, I found other projects with similar issues: holoiso-eol/holoiso#458

So there is the following situation:

Here is the GRUB commit which has removed version_find_last.
A possible solution is to use version_sort as committed here for 10_linux

But in our tests it was not backward compatible. So the decision was to move code of external function version_find_latest to script 10_lupin renaming function to lupin_version_find_latest.

To do so, you can download 10_lupin_patch.txt and change the file /etc/grub.d/10_lupin or simply use

wget https://github.com/hakuna-m/wubiuefi/files/13339382/10_lupin_patch.txt
sudo patch -d / -p1 < 10_lupin_patch.txt

@suoko
Copy link
Author

suoko commented Nov 23, 2023

As I digged for a solution, I found other projects with similar issues: HoloISO/holoiso#458

So there is the following situation:

Here is the GRUB commit which has removed version_find_last. A possible solution is to use version_sort as committed here for 10_linux

But in our tests it was not backward compatible. So the decision was to move code of external function version_find_latest to script 10_lupin renaming function to lupin_version_find_latest.

To do so, you can download 10_lupin_patch.txt and change the file /etc/grub.d/10_lupin or simply use

wget https://github.com/hakuna-m/wubiuefi/files/13339382/10_lupin_patch.txt
sudo patch -d / -p1 < 10_lupin_patch.txt

It didnt work for me, same error when upgrading

@hakuna-m
Copy link
Owner

hakuna-m commented Nov 24, 2023

It didnt work for me, same error when upgrading

Can you list the output files of the patch ?
ls -l /etc/grub.d/10_lupin*

After running the patch for the first time, there should be only one file:
-rwxrwxr-x 1 root root 12412 Nov 24 19:50 /etc/grub.d/10_lupin

But after riunning the patch for the second time, there are at least two files:

-rwxrwxr-x 1 root root 10634 Nov 24 20:03 /etc/grub.d/10_lupin
-rwxrwxr-x 1 root root 12412 Nov 24 20:02 /etc/grub.d/10_lupin.orig
-rw-r--r-- 1 root root  2307 Nov 24 19:54 /etc/grub.d/10_lupin.rej

If you did not confirm the reversed mode, you got /etc/grub.d/10_lupin.rej which is just for information.
If you did confirm the reversed mode, you got /etc/grub.d/10_lupin.orig and an unpatched /etc/grub.d/10_lupin

If you got /etc/grub.d/10_lupin.orig, disable the file with
sudo chmod -x /etc/grub.d/10_lupin.orig

....and try the patch again with
sudo patch -d / -p1 < 10_lupin_patch.txt

-rwxrwxr-x 1 root root 12412 Nov 24 20:28 /etc/grub.d/10_lupin
-rw-rw-r-- 1 root root 12412 Nov 24 20:15 /etc/grub.d/10_lupin.orig
-rw-r--r-- 1 root root  2307 Nov 24 19:54 /etc/grub.d/10_lupin.rej

There should be only the file /etc/grub.d/10_lupin executable (x) and it should be the patched one (12412 bytes). If you run....
sudo update-grub
... it should work.

@suoko
Copy link
Author

suoko commented Nov 24, 2023

It didnt work for me, same error when upgrading

Can you list the output files of the patch ? ls -l /etc/grub.d/10_lupin*

After running the patch for the first time, there should be only one file: -rwxrwxr-x 1 root root 12412 Nov 24 19:50 /etc/grub.d/10_lupin

But after riunning the patch for the second time, there are at least two files:

-rwxrwxr-x 1 root root 10634 Nov 24 20:03 /etc/grub.d/10_lupin
-rwxrwxr-x 1 root root 12412 Nov 24 20:02 /etc/grub.d/10_lupin.orig
-rw-r--r-- 1 root root  2307 Nov 24 19:54 /etc/grub.d/10_lupin.rej

If you did not confirm the reversed mode, you got /etc/grub.d/10_lupin.rej which is just for information. If you did confirm the reversed mode, you got /etc/grub.d/10_lupin.orig and an unpatched /etc/grub.d/10_lupin

If you got /etc/grub.d/10_lupin.orig, disable the file with sudo chmod -x /etc/grub.d/10_lupin.orig

....and try the patch again with sudo patch -d / -p1 < 10_lupin_patch.txt

-rwxrwxr-x 1 root root 12412 Nov 24 20:28 /etc/grub.d/10_lupin
-rw-rw-r-- 1 root root 12412 Nov 24 20:15 /etc/grub.d/10_lupin.orig
-rw-r--r-- 1 root root  2307 Nov 24 19:54 /etc/grub.d/10_lupin.rej

There should be only the file /etc/grub.d/10_lupin executable (x) and it should be the patched one (12412 bytes). If you run.... sudo update-grub ... it should work.

Aooarently it worked but after reboot I'm left with a grub command line.
I'm stuck now, guess I have to start with a brand new wubi and import the old disk images

@hakuna-m
Copy link
Owner

Aooarently it worked but after reboot I'm left with a grub command line.

It is not easy to help you without further information.

At least we need the created /boot/grub/grub.cfg and the kernels in /boot.

Assuming that the Grub commands to attach your Ubuntu disk worked, you see that information with:

cat /boot/grub/grub.cfg
ls -l /boot

Alternately you can use 7z to open /ubuntu/disks/root.disk on Windows.

@suoko
Copy link
Author

suoko commented Dec 8, 2023

@hakuna-m
I'm back to a wubi 23.04 backup now.
Do you suggest to wait for 24.04 to do next upgrade ?

@hakuna-m
Copy link
Owner

Do you suggest to wait for 24.04 to do next upgrade ?

No, I suggest to use LTS releases like 22.04. see https://wiki.ubuntu.com/Releases and columns "End of Standard Support" and "End of Life"

23.04 still has only short term support. Support will end at a time where 24.04 is not available.

So there is no upgrade from 23.04 to 24.04 at the right time.

Besides, it is not sure that 24.04 fixes your issue.

IMHO, the patch in my previous posts fixes the GRUB issue but maybe liquorix kernels need other patches, too.

I will try a liquorix kernel with 22.04 and I will report. Maybe, we can solve all issues. So that you can try another upgrade.

@hakuna-m
Copy link
Owner

I will try a liquorix kernel with 22.04 and I will report.

I have installed a liquorix kernel without issues. The patched 10_lupin does find the liquorix kernel. So there should be no general issue with liquorix kernels.

@suoko
Copy link
Author

suoko commented Dec 12, 2023

Thanks for testing, it must be some other issue then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants