Opened 8 years ago

Closed 8 years ago

#1761 closed defect (fixed)

Xenial version of usb-creator fails to create a live usb key

Reported by: kalxas Owned by: live-demo@…
Priority: major Milestone: OSGeoLive10.5
Component: OSGeoLive Keywords:
Cc: live-demo@…

Description

During our rc1 testing we realized that the live usb keys created with usb-creator 0.3.2 from an Ubuntu 16.04 Xenial host are unusable.

When trying to boot from the resulting usb, an "operating system missing" error occurs.

I have reported this issue upstream:

https://bugs.launchpad.net/ubuntu/+source/usb-creator/+bug/1605803

Change History (8)

comment:1 by kalxas, 8 years ago

When building a live usb using the usb-creator from Ubuntu 14.04 Trusty or Wily, the usb key prompts for a boot option (due to not matching syslinux version) as described here:

http://askubuntu.com/questions/486602/ubuntu-14-04-lts-live-usb-boot-error-gfxboot-c32not-a-valid-com32r-image/543284#543284

After entering "live", the system boots without issues. Then (as described in the above link) one can install the proper syslinux version in the usb and the error message never appears again.

I have also ported usb-creator 0.2.67 to Xenial in order to try if that would work as expected:

https://launchpad.net/~gcpp-kalxas/+archive/ubuntu/ppa-tzotsos

Still, it is needed to enter "live" in order to boot properly.

Last edited 8 years ago by kalxas (previous) (diff)

comment:2 by kalxas, 8 years ago

After extensive testing I found the following:

  1. usb-creator 0.3.2 (version bundled with Ubuntu 16.04) is doing a direct copy of an iso to the usb key. It probably uses dd command and it does not create a partition table before copying the data. It has also dropped support for persistence.
  1. upstream 16.04 iso files must have some kind of partitioning setup within the iso, because they work fine with this new version of usb-creator, but also they can be created with the dd command from any other GNU/Linux distribution.
  1. usb-creator < 0.3.0 is not doing direct iso copy. Instead it creates a partition table and then copies the iso file in the first partition. This way it leaves space for creating extra partitions (e.g. for persistence). Within the source code one can see that there is a distinction between using an iso file and using a raw disk image file as a source. This code has been removed in the latest version, which treats both raw and iso files as one.
  1. usb-creator < 0.3.0 is installing a bootloader at the end of the usb creation while 0.3.2 does not.

Steps to create a working live usb with OSGeoLive 10.0 from an Ubuntu 16.04 host system:

  1. Remove usb-creator with
    sudo apt-get remove usb-creator-common usb-creator-gtk 
    
  1. Add a ppa with previous version available and install the previous version:
    sudo add-apt-repository ppa:gcpp-kalxas/ppa-tzotsos
    sudo apt-get update
    sudo apt-get install usb-creator-common=0.2.67ubuntu2 usb-creator-gtk=0.2.67ubuntu2
    
  1. Insert a usb key
  1. Use the usb-creator to erase the key and select the iso file to create the live usb key.
  1. Boot from the created usb key.
  1. If during the boot process you get a notification that boot configuration is missing, a boot prompt will appear: just enter "live" and press enter. OSGeoLive will boot normally.
  1. Open a terminal from within OSGeoLive and execute:
    mount | grep cdrom
    
  1. Use the device name listed on your terminal from the previous step (e.g. /dev/sdb1) to install the bootloader on the usb key. (Important: be careful not to overwrite master boot record of another disk in your system!!! To make sure of the usb device name you can use sudo lsblk to list the device names on your system.)
    sudo syslinux /dev/sdb1
    
  1. Reboot and your OSGeoLive usb key will work as expected.

Steps to create a working live usb with OSGeoLive 10.0 from an older Ubuntu host system:

Just use steps 3 to 8 of the previous list.

comment:3 by kalxas, 8 years ago

Marc Deslauriers, the core developer of usb-creator, has confirmed that the new version of the tool only supports direct copy of the iso to the usb.

He also pointed to the code repository of the official ubuntu iso creation process:

http://bazaar.launchpad.net/~ubuntu-cdimage/ubuntu-cdimage/mainline/files

comment:4 by kalxas, 8 years ago

Now this looks interesting, apparently this is what upstream Lubuntu uses to build the iso:

http://bazaar.launchpad.net/~lubuntu-desktop/+junk/lubuntu-tools/view/head:/iso/lubuntu-build.sh

comment:5 by kalxas, 8 years ago

And this is the core of the Ubuntu build process:

http://bazaar.launchpad.net/~ubuntu-cdimage/debian-cd/ubuntu/files

comment:6 by kalxas, 8 years ago

Priority: criticalmajor

We now have a working process to produce live usb keys under Xenial.

comment:7 by kalxas, 8 years ago

Milestone: OSGeoLive10.0OSGeoLive10.5

Ticket retargeted after milestone closed

comment:8 by kalxas, 8 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.