Live Ubuntu Boot

De Wiki Babelgate
Revisión del 10:50 27 mar 2018 de Admin (discusión | contribuciones) (Admin moved page LiveBoot to Live Ubuntu Boot)
(dif) ← Revisión anterior | Revisión actual (dif) | Revisión siguiente → (dif)
Saltar a: navegación, buscar

This section explains how to boot from a Ubuntu 16.04 USB pen drive without needing that the eMMC is programmed. Other Linux distributions are also supported and Ubuntu is shown as reference.

This procedure is helpful for maintenance and recovery tasks, but it is also a simple approach for programming eMMC or extracting an image from eMMC.

The procedure consists on two steps:

  1. ISO download and USB creation
  2. Setup
  3. Booting
  4. eMMc image flashing or extraction (optional)

1. ISO download and USB creation

Ubuntu Desktop 16.04 ISO can be downloaded from Ubuntu web site or using the following link.

This ISO file must be flashed into a USB pen drive (let's call it USB-ISO from now on). There are many tools which can be used. One of the most popular ones is Rufus (Rufus download).

2. Setup

The following items are needed:

  • PC with serial port and terminal (TeraTerm, Putty or any other terminal tool)
  • Serial port cable with the appropriate adapter for G5001 or G5002
  • 1 or 2 USB pen drives depending on the kind of boot desired
  • An additional USB hub if 2 USB pen drives are needed (only for G5002)

Switch off the device and connect the device serial port to the PC serial port configured with 115200,8N1 parameters.

For proceeding with a normal boot for maintenance or recovery purposes, just plug USB-ISO into any of the USB sockets of the device (G5001 has 4 USB ports and G5002 has 1 USB port), and jump to Step 3.

2.1. eMMC image flashing or extraction setup

If you want to flash eMMC or recover an eMMC image you can use an additional USB pen drive (let's call it USB-Image) formated in EXT4.

In the case of eMMC image recovery, USB-Image must be empty (pre-formated in EXT4).

In the case of eMMC image flashing, USB-Image must contain an archinve with the binary file to program into the eMMC.

G5001 setup for eMMC image flashing or extraction

USB-ISO and USB-Image can be plugged in any USB port.

G5002 setup for eMMC image flashing or extraction

An external hub is needed for connecting both USB-ISO and USB-Image to the device.

3. Booting

Switch on the device.

After BIOS messages, the following Grub menu should appear:

Grub menu with Ubuntu booting options

Select "“Try Ubuntu without installing” y press key ‘e’.

NOTE: If no key is pressed within few seconds, normal booting will happen.

The following screen should appear:

Grub Ubuntu booting configuration parameters

Edit line beginning with "linux" replacing the word "quiet" by "text console=ttyS0,115200" resulting a line as shown in previous image.

Press Ctrl-X and Ubuntu will boot displaying boot messages in the serial console.

Wait until the OS has completely booted and use the following user/password for entering the shell:

User: ubuntu

Password: <ENTER> (no password)

If eMMC maintenance is required, proceed to Step 4. Otherwise, the process is done.

4. eMMC image flashing or extraction (optional)

Locate mount path of the USB-Image pen-drive. You can check the mount point with the following command:

mount | grep -e sda -e sdb

Depending on the USB port where USB-Image has been plugged, system will have detected USB-Image as SDA or SDB device.

If Ubuntu has not mounted the pen-drive automatically, you can mount it manually now.

Verify that no eMMC partition is mounted.

mount | grep mmcblk

If any partition is mounted, please, unmount them.

umount /dev/mmcblk0
...

4.1. eMMc image flashing

Assuming mount point is <MOUNT_PATH_USB_IMAGE> you can flash your file

sudo dd if=<MOUNT_PATH_USB_IMAGE>/<eMMC_IMAGE_BIN_FILE> of=/dev/mmcblk0 bs=65536

Press <ENTER> if prompted for password.

4.2. eMMC image extraction

Assuming mount point is <MOUNT_PATH_USB_IMAGE> you can flash your file

sudo dd if=/dev/mmcblk0 of=<MOUNT_PATH_USB_IMAGE>/<eMMC_IMAGE_BIN_FILE> bs=65536

Press <ENTER> if prompted for password.

Unmount the pen-drive

sudo umount <MOUNT_PATH_USB_IMAGE>