#!/bin/sh roottmp=$(lsblk -l -o NAME,MOUNTPOINT | grep '/$') rootpart=/dev/${roottmp%% */} rootdev=${rootpart%2} rootdev=${rootdev%p} flock $rootdev sfdisk -f $rootdev -N 2 <