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.05k stars 149 forks source link

No root partition defined: Ubuntu 15.10 on Lenovo Yoga 2 #11

Open sokkycakes opened 8 years ago

sokkycakes commented 8 years ago

I used both ver. 1510r302 and 1510r306 and they both give me this error. The wiki only talks about the solution but doesn't actually say what is supposed to be done to fix it. How am I supposed to work around this problem? There isn't enough information for me to fix this problem anywhere.

hakuna-m commented 8 years ago

In general, the "No root partition defined" error message means that there is a partition table which is unsupported for an automatic installation.

There are 3 different cases:

  1. It is the partition table of the device where you want to install Ubuntu.
  2. It is the partition table of a device where you don't want to install Ubuntu.
  3. It is the partition table of the virtual partition (root.disk).

IMHO possible solutions are:

If we need more information, you can run Ubuntu in demo mode.

After the first restart it should display:

Completing the Ubuntu installation.
For more installation boot options, press `ESC' now...

There you can press ESC and then you can select "Demo mode" in the following menu:

Normal mode
Safe graphic mode
ACPI workarounds
Verbose mode
Demo mode 

The demo mode is a kind of live CD. It also contains an installer which does not use the Wubi configuration. So if you want to install with Wubi, don't use it. If you want to install without Wubi, you can use it with the limitation that some used partitions are locked.

But if you want only more information, don't use the installer. Open a terminal and type

sudo parted --list

sokkycakes commented 8 years ago

using parted to list my partitions gave me 4 different "drives", and they're all marked as MMC memory. I'm guessing that means this is like an SSD, but I've never used one before so I don't know for sure. The main drive that's 32 GB says the table type is GPT, the sector size is 512b/512b, and there's 5 partitions. I unplugged the microSD card before booting into ubuntu as well, didn't affect the installer in any way. also before running parted --list I got an error saying error fsyncing/closing /dev/mmcblk0rpmb: Input/output error retry/ignore? Ignoring gave me the results I typed already.

hakuna-m commented 8 years ago

error fsyncing/closing /dev/mmcblk0rpmb

IMHO it is a RPMB (Replay Protected Memory Block) of an embedded MMC (eMMC). RPMBs are used to store OEM security keys and therefore they are protected. We don't need to get access to a RPMB for installation of Ubuntu but it is necessary to handle errors if the installer lists all partitions with parted.

There is also an existing bug 1456443 for the installer. The fix should be released for several Ubuntu versions but maybe it only fixes some but not all errors.

IMHO it is not really a Wubiuefi bug but the bug affects Wubiuefi, too. I don't know if you ever have tried an Ubuntu installation without Wubiuefi on your Yoga 2. IMHO there are more possibilities.

We will try to find a solution for Wubiuefi, too. But I don't think we will get it soon.

sokkycakes commented 8 years ago

Well, I could use the boot entry made by Wubiuefi to install ubuntu normally, but I would assume tht would make things messy and screw things up UEFI and Windows side. I would try installing ubuntu normally, but this Yoga 2 tablet doesn't have full size USB ports so I can't boot a live USB. There's no ethernet port either so I can't do netbooting. the SD card isn't used to boot from either. So wubi is my only option outside of buying a USB OTG adapter.

hakuna-m commented 8 years ago

I understand you. IMHO it is possible to fix it soon, if we can reproduce the issue on a testing machine. After reproducing we are able to analyze the logs in /var/log, change the installer and try it again. But that's the problem. Currently, on our testing machines we don't have the issue and I assume that it would be not easy for you to send us all logs we need.

hakuna-m commented 8 years ago

Currently, I try to create an alternate installer for "demo mode", if an auto installation is not possible. I have questions for you:

The terminal command: cat /proc/mounts | grep isodevice should show something like this:

/dev/mmcblk0p2 /isodevice fuseblk rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other,blksize=4096 0 0

rw means write access, ro means read only access

sokkycakes commented 8 years ago

The issue does still persist and I DO have write access.

hakuna-m commented 8 years ago

I DO have write access.

That is good news. Meanwhile, I created a script for Ubuntu 16.04 to install Wubi from "demo mode". Due to the upload file type restrictions I changed the file type from .sh to .txt, but it doesn't matter.

How it works:

The script formats your empty virtual Wubi disk and copy the unchanged base files of the live system to it. Then it adds some Wubi files and removes files which are only needed for a live system. On EFI computers, it also adds an EFI configuration. Finally, the script creates two configuration files. The configuration files are used to add your user account and other personal settings after next reboot.

sudo /isodevice/Users/Windowsusername/Downloads/wubiinstall.txt

or if you download it on Ubuntu in demo mode

sudo sh Downloads/wubiinstall.txt

cat /target/etc/fstab

/host/ubuntu/disks/root.disk /               ext4    loop,errors=remount-ro 0       1
PARTUUID=12345678-1234-1234-1234-123456789abc  /boot/efi       vfat    umask=0077      0       1

The second line is for EFI systems only. A third line for swap.disk will be added after next reboot.

Your personal Wubi configuration:

cat /host/ubuntu/install/preseed.cfg

(*) edit: 1.4.2017 new version of the script

sokkycakes commented 8 years ago

That seemed to do the trick! Booting into wubi looks and feels like a normal install now. I have an issue with my install size being too small and wanting to move my home directory somewhere else but that's for another topic, alongside installing missing network and bluetooth and display drivers.

hakuna-m commented 8 years ago

That seemed to do the trick!

That is good news.

I have an issue with my install size being too small

The standard Wubi install uninstalls a lot of packages (e.g. unused language packages). My script uninstalls only few packages of the installer.

Maybe, it helps if you uninstall unused packages and if you clean your package cache.

sudo apt-get clean

If you need space on the Windows side, you can remove the content of the folder /host/ubuntu/install with the Ubuntu iso image.

sokkycakes commented 8 years ago

Ubuntu and Windows aren't the issue for small space, this tablet-top has only 9gb of free usable space and the 5 GB install eats up a large portion of it. I'd want to move it to the 64GB microSD card but I'm not sure if this machine's bios reads from it at boot. Maybe GRUB would have to be involved to run from it? And if that's the case then a wubi install is irrelevant, isn't it?

hakuna-m commented 8 years ago

It is not necessary that your 64GB microSD card is bootable. Wubi uses always the EFI partition of your Windows installation to boot.

It should work, if you format your 64GB microSD card with NTFS (fat32 should also work, but it is less stable and doesn't support large files) and then simply install Ubuntu to the new Windows drive.

It is also possible to move an existing install to a new drive: Copy wubildr.mbr, wubildr to the new drive and move folder ubuntu to the new drive. It should work that you can boot into the GRUB menu. There press e to edit the first menu entry for Ubuntu. You see something like this:

    gfxmode $linux_gfx_mode
    insmod gzio
    insmod ntfs
    set root='hd0,gpt2'
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2  ACE2DD0A5DDD5135 
    else
      search --no-floppy --fs-uuid --set=root ACE2DD0A5DDD5135
    fi
    loopback loop0 /ubuntu/disks/root.disk
    set root=(loop0)
    linux  /vmlinuz root=UUID=ACE2DD0A5DDD5135 loop=/ubuntu/disks/root.disk ro   quiet splash $vt_handoff
    initrd /initrd.img

Change it to:

    gfxmode $linux_gfx_mode
    insmod gzio
    insmod ntfs
    search -s -f -n /ubuntu/disks/root.disk
    probe --set=diskuuid -u $root
    loopback loop0 /ubuntu/disks/root.disk
    set root=(loop0)
    linux  /vmlinuz root=UUID=$diskuuid loop=/ubuntu/disks/root.disk ro   quiet splash $vt_handoff
    initrd /initrd.img

Press F10. After successful reboot, you can write a new grub.cfg with sudo update-grub

hakuna-m commented 8 years ago

@sokkycakes Meanwhile a new version has been released which should fix your issue(s). A least the first issue that you can install Ubuntu on the Windows drive but maybe also your second issue that you can install on the 64GB microSD. It depends on the linux name of your devices. If the device name is /dev/mmcblk0, /dev/mmcblk1, and so on, the new version should work.