Skip to content

Instantly share code, notes, and snippets.

View peterdk's full-sized avatar

Peter de Kraker peterdk

View GitHub Profile
@cjyar
cjyar / mbr-to-gpt-uefi.md
Last active May 2, 2024 06:55
Convert a disk from MBR to GPT+UEFI, in Linux.

Before starting, make sure you have a backup, and make sure to have a linux live boot ready to rescue your system. It's easy to mess this up!

  1. Use gdisk to convert the partition table to GPT.

    gdisk /dev/sda

  2. Create the "BIOS boot" partition that GRUB needs.

    n to create a new partition. Needs to be about 1MB. You can probably squeeze this in from sectors 34-2047. Use L or l to look up the code for "BIOS boot" (ef02).

  3. Write the new partition table.

    w

  4. Reload the partition table. > partprobe /dev/sda
@johanvergeer
johanvergeer / create_and_restore_backup.md
Last active October 9, 2020 18:22
Create and replace database backup in Docker

Create and restore a database backing using Docker

This script is intended to demonstrate how a backup can be created and restored using Docker containers. The image we'll use is SQL Server 2017

The scripts are baed on the official Microsoft documentation

Create a new container and volume

Create a new container from the mssql-server-linux image