hakuna-m / wubiuefi

fork of Wubi (https://launchpad.net/wubi) for UEFI support and for support of recent Ubuntu releases
GNU General Public License v2.0
1.06k stars 151 forks source link

"Error: device name already exists" at boot #345

Open suoko opened 8 months ago

suoko commented 8 months ago

I have this error at boot and can't understand what's causing it. I tried disable each line, line by line, option by option, but I don't get it. I'm not even sure it's a grub error. The os starts ok after that, it just prevents the plymouth image to start immediately, so no big deal, but I'm curious if anyone knows where to look at. I found nothing in the logs

This is the grub conf:

menuentry 'Ubuntu' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-e11598f3-8b7c-427d-9f51-d8728ad3ecac' {
        gfxmode $linux_gfx_mode
        insmod gzio
        insmod ntfs
        set root='hd0,msdos3'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos3 --hint-efi=hd0,msdos3 --hint-baremetal=ahci0,msdos3  DAEC2E82EC2E5951
        else
          search --no-floppy --fs-uuid --set=root DAEC2E82EC2E5951
        fi
        loopback loop0 /ubuntu/disks/root.disk
        set root=(loop0)
        linux   /boot/vmlinuz-6.8.0-11-generic root=UUID=DAEC2E82EC2E5951 loop=/ubuntu/disks/root.disk ro rootflags=sync  quiet splash radeon.modeset=0 amdgpu.modeset=0 radeon.cik_support=0 amdgpu.cik_support=0 radeon.si_support=0
 amdgpu.si_support=1 loglevel=0 amdgpu.runpm=0 $vt_handoff
        initrd  /boot/initrd.img-6.8.0-11-generic
}

grub error

hakuna-m commented 8 months ago

IMHO it is an error message of the GRUB loopback command. There has been a change since creation date of original Wubi: https://www.mail-archive.com/grub-devel@gnu.org/msg31239.html

In previous GRUB versions command loopback replaces existing name loop0 without error messages. loop0 does always exist from the first boot script: https://github.com/hakuna-m/wubiuefi/blob/1da9c1ccd10a6ec193857c953274eabdd64d5f6b/data/wubildr.cfg#L4

So a possible solution of the issue is that you use a different device name e.g. loop1:

        loopback loop1 /ubuntu/disks/root.disk
        set root=(loop1)

It should be also possible to delete the device before creating a new one with the same name:

        loopback -d loop0
        loopback loop0 /ubuntu/disks/root.disk
        set root=(loop0)

Additionally, it should also possible to use the existing one:

        set root=(loop0)

But I try to find a general solution. It should be compatible with previous versions.

suoko commented 7 months ago

I enabled the grub console option and found out this error before: Error: symbol grub_abort not found

I can't find that error anywhere in the entire internet