Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

...

This guide will allow you to install linux on Bedrock PC

...

Tested versions:

  • Ubuntu server 20.04.2

  • Ubuntu server Linux server 22.04.1

Tested serial platforms:

  • Tio

  • Putty

Tested NVME disks:

  • Micron 7450 pro 960GB

  • Samsung 980 pro 980 GB

  • Kingston datatraveler usb thumb drive

Create bootable usb drive:

  • download a linux server iso

  • sudo dd if=${path/to/iso/file.iso} of=/dev/sdX sdX status=progress

    • Note: X is the letter

...

    • you see when running lsblk

...

    • .

  • Insert the usb media to the device

  • In bios BIOS enable uart support (ASK RON HOW TO DO IT)

  • Boot from inserted usb media

Putty settings:

  • If keyboard input doesn’t work change XON\XOFF to none

  • In BIOS choose the bootable usb drive

Grub settings:

...

A grub menu will appear saying try or install ubuntu, on this entry press ‘e’ to set the boot parameters.

  • You will be prompted with a window like this:

...

  • Remove the quiet parameter and change line 3 tothe entry as follows:

Change below command to the correct ttyS#

  • linux        /casper/vmlinuz   console=tty0 console=ttyS4,115200n8  ---

...

  •   console=tty1 console=ttyS4,115200n8 systemd.unit=getty@ttyS4.service

...

Note: the text in bold may be different for you, you just need to add the parameters after that.

  • Now press ctrl+x to boot

  • A message saying “Booting a command list” will appear

  • It might take a while to start showing more output

  • After the output stops running you will see one or more of  the following messages:

    • Welcome to Ubuntu Server Installer!

    • Cloud init is ready

    • Some encryption keys

You have 3 options to proceed from here (choose ONE):

1. Install from serial console:

Check if we can make it work through uart input

  • IMPORTANT: Connect a keyboard to the device (serial input will not work here)

  • Press ctrl+z

  • Type the commands in bold:

    • systemctl status getty@ttyS4.service

    • systemctl enable getty@ttyS4.service

    • systemctl start getty@ttyS4.service

Check console redirection or start service automatically
Note: you will not see what you're typing but just continue

  • After the last command, a console line  will appear (switch back to uart input)

  • Run the following file: /usr/bin/subiquity-shell 

2. Install from ssh: this option enables yopu to connect throuth SSH (wasnt tested yet).

3. Install from cloud init: this option uses network boot

Installation process:

  • Choose language

  • If prompted to update the installer choose the desired option

  • Choose keyboard configuration

  • Configure network interface (not mandatory)

  • Configure proxy (not mandatory)

  • Configure ubuntu archive mirror (not mandatory)

  • Choose installation disk

  • Choose on which partition to install linux, or choose the whole disk

Note: chosen disk will be formatted so be careful when choosing, so you will not lose your data.

  • Choose what snaps you want to install

  • After install finishes select reboot now

      

After installation is done:

  • run: systemctl start getty@ttyS4.service

  • And : systemctl enable getty@ttyS4.service

  • After that the device's console will appear and that's it.

  • Wait for the live usb to boot

Live USB settings:
After live usb boots run the following services (check if I can drop some of them):

Code Block
languagebash
sudo systemctl start snapd
sudo systemctl start snapd.socket
sudo systemctl start snapd.seeded
sudo systemctl start snapd.apparmor
sudo systemctl start snapd.core-fixup
sudo systemctl start snapd.autoimport
sudo systemctl start systemd-resolved
sudo systemctl start snapd.system-shutdown
sudo systemctl start cloud-init
sudo systemctl start cloud-init-local
sudo systemctl start systemd-rfkill.service
sudo systemctl start systemd-networkd.service
sudo systemctl start ssh.service
sudo systemctl start ModemManager.service
sudo systemctl start snap.lxd.daemon.service

  • run the installer program:

Code Block
languagebash
Sudo subiquity –serial
  • Choose your selected setting for installation

  • Wait until installation is complete.

  • you will be asked to remove the installation media and press enter

  • Device will be rebooted

Enable ttyS4 service:

  • Boot into BIOS

  • Boot from the disk you installed linux on.

  • In the grub menu:

    • Choose advanced options for Ubuntu

    • Select the line that says recovery mode

    • Press ’e’

    • In line: linux        /boot/vmlinuz-5.15.0-43-generic root=UUID=4c58e5aa-6443-4fb2-84e7-4ac2265a7b9e ro recovery nomodeset dis_ucode_ldr

    • Add the console redirection:

    • linux        /boot/vmlinuz-5.15.0-43-generic root=UUID=4c58e5aa-6443-4fb2-84e7-4ac2265a7b9e ro console=tty1 console=ttyS4,115200n8 recovery nomodeset dis_ucode_ldr

    • Press ctrl+x to boot

  • Choose Root (drop into shell):

  • Type:

Code Block
languagebash
systemctl enable getty@ttyS4.service
  • Reboot to linux in normal mode