Last active
June 15, 2018 03:05
-
-
Save onyxhat/5d268d39fb600b59ab4d94fa78e69c5a to your computer and use it in GitHub Desktop.
Ubuntu fd0 Errors on boot in Hyper-V
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #! /bin/bash | |
| set -e | |
| #Re-run the script if not using sudo/root | |
| detect_current_uid() { | |
| echo $(id -u) | |
| } | |
| rerun_script_as_root() { | |
| if [ $(detect_current_uid) -ne "0" ]; then | |
| local ENVVARS=$(echo $@) | |
| echo "Re-running script as root..." | |
| exec sudo $ENVVARS bash $0 | |
| fi | |
| } | |
| rerun_script_as_root | |
| rmmod floppy | |
| echo "blacklist floppy" | tee /etc/modprobe.d/blacklist-floppy.conf | |
| dpkg-reconfigure initramfs-tools |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment