{"id":20180460,"url":"https://github.com/kayooliveira/sudo-dd-script-for-automation","last_synced_at":"2025-04-10T04:55:42.272Z","repository":{"id":108513480,"uuid":"171577141","full_name":"kayooliveira/SUDO-DD-SCRIPT-FOR-AUTOMATION","owner":"kayooliveira","description":"A simple SCRIPT to automate the sudo dd command.","archived":false,"fork":false,"pushed_at":"2024-12-06T15:49:24.000Z","size":8,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-24T06:11:25.794Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kayooliveira.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-02-20T01:15:13.000Z","updated_at":"2024-12-06T15:49:28.000Z","dependencies_parsed_at":"2023-04-20T12:49:58.342Z","dependency_job_id":null,"html_url":"https://github.com/kayooliveira/SUDO-DD-SCRIPT-FOR-AUTOMATION","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kayooliveira%2FSUDO-DD-SCRIPT-FOR-AUTOMATION","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kayooliveira%2FSUDO-DD-SCRIPT-FOR-AUTOMATION/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kayooliveira%2FSUDO-DD-SCRIPT-FOR-AUTOMATION/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kayooliveira%2FSUDO-DD-SCRIPT-FOR-AUTOMATION/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kayooliveira","download_url":"https://codeload.github.com/kayooliveira/SUDO-DD-SCRIPT-FOR-AUTOMATION/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248161256,"owners_count":21057554,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-14T02:31:03.079Z","updated_at":"2025-04-10T04:55:42.264Z","avatar_url":"https://github.com/kayooliveira.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Automated Disk Imaging with `sudo dd`\n\nThis script automates the process of writing an ISO image to a disk using the `dd` command. It provides a menu-driven interface for selecting the target disk and the ISO image file.  **Use extreme caution:** This script will overwrite all data on the selected disk.\n\n\n## Usage\n\n1.  **Prerequisites:** Ensure you have the `lsblk` and `pv` commands available (e.g., install `pv` using `sudo apt-get install pv` on Debian/Ubuntu).\n2.  **Run the script:** Execute the script using `bash dd.sh`.\n3.  **Disk Selection:** The script will prompt you to enter the target disk path (e.g., `/dev/sda1`). Input validation ensures a correct format. **Double-check your selection to avoid data loss.**\n4.  **ISO Image Path:** Enter the full path to your ISO image file. Input validation checks for file existence.\n5.  **Confirmation:** The script will prompt you to explicitly type 'YES' to confirm before proceeding.\n6.  **Execution:** The script uses `pv` for a progress bar and `sudo dd` to write the ISO image.  Error handling will catch various potential problems.\n7.  **Completion:** Upon completion, you'll have the option to exit or image another disk.\n\n\n## Important Safety Precautions\n\n*   **Data Loss:** This script will erase all data on the selected disk partition.  **Double-check your disk selection and type 'YES' to confirm before proceeding.** There is no undo.\n*   **Root Privileges:** The script requires root privileges (`sudo`) to execute the `dd` command.\n*   **Correct Disk Selection:** Incorrect disk selection can lead to irreversible data loss. Carefully review the prompt and ensure you select the correct target disk.\n*   **ISO Image Integrity:** Verify the integrity of your ISO image before using this script.\n\n\n## Script Enhancements\n\n*   The script now includes input validation to prevent common errors.\n*   A progress bar (`pv`) is used to display the write progress.\n*   Robust error handling is included to catch and report potential issues.\n*   A more explicit confirmation prompt helps prevent accidental data loss.\n\n\n## Disclaimer\n\nThis script is provided as-is. The author is not responsible for any data loss or damage caused by its use. Use at your own risk.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkayooliveira%2Fsudo-dd-script-for-automation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkayooliveira%2Fsudo-dd-script-for-automation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkayooliveira%2Fsudo-dd-script-for-automation/lists"}