Fix Grub

sudo dd bs=4M if=Downloads/ubuntu-19.04-desktop-amd64.iso of=/dev/sdb conv=fdatasync
  • connect to the internet
  • install boot-repair:
sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt update
sudo apt install boot-repair
  • run boot-repair and apply the default configuration

GRUB settings are stored in the /etc/default/grub file. Edit this file to change GRUB2’s settings. Scripts are also located in the /etc/grub.d/ directory. For example, on Ubuntu, there are scripts here that configure the default theme. There’s also an os-prober script that checks the system’s internal hard drives for other installed operating systems — Windows, other Linux distributions, Mac OS X, and so on — and automatically add them to GRUB2’s menu.

When you run the update-grub command, GRUB automatically combines the settings from the /etc/default/grub file, the scripts from the /etc/grub.d/ directory, and everything else, creating a /boot/grub/grub.cfg file that’s read at boot.

In other words, to customize your GRUB2 settings, you’ll have to edit the /etc/default/grub file and then run the sudo update-grub command.

sudo grub-install /dev/nvme0n1
sudo update-grub

For more info, feel free to read the following article: https://www.howtogeek.com/196655/how-to-configure-the-grub2-boot-loaders-settings/

Kubernetes Debugging

  • Create Dockerfile with JAVA_OPTS present as in the following example
FROM frolvlad/alpine-oraclejdk8:slim
VOLUME /tmp
ADD gs-spring-boot-docker-0.1.0.jar app.jar
RUN sh -c 'touch /app.jar'
ENTRYPOINT [ "sh", "-c", "java $JAVA_OPTS -jar /app.jar" ]
  • Start container with JAVA_OPTS and debug port enabled
  containers:
  - name: gateway
    image: dockerhub../gateway:latest
    env:
    - name: JAVA_OPTS
      value: -Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n
    ports:
    - containerPort: 8080
      name: client-facing
    - containerPort: 8000
      name: debug
  • check Pod availability

sudo kubectl get pod -n models

  • enable port forwading

sudo kubectl port-forward gateway-78c4c7fbc6-6g6g4 8000:8000 -n models

  • start remote debugging from Eclipse