Skip to content

dvbwitso/bootabledisk.macos

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

Bootable USB Creator (macOS)

A small Python utility to create a bootable USB from an ISO on macOS.

Overview

This script enumerates available disks, prompts for a target USB disk identifier (e.g. disk4) and the path to an ISO image, then writes the image to the selected disk and ejects it when finished.

Requirements

  • macOS host (uses macOS disk utilities)
  • Python 3
  • A terminal with sufficient privileges (writing an entire disk will require sudo)

Safety warning

Writing an ISO to a disk will erase all data on the selected device. Verify the target disk identifier carefully before proceeding. The author is not responsible for data loss.

Installation

  1. Save the script as create_bootable_usb.py in a convenient directory.

Usage

From the directory containing the script:

  1. Make the script executable: chmod +x create_bootable_usb.py

  2. Run the script (use sudo if required): ./create_bootable_usb.py or sudo ./create_bootable_usb.py

  3. Follow the on-screen prompts:

    • The script will list available disks.
    • Enter the USB disk identifier (e.g. disk4) when prompted.
    • Enter the full path to the ISO (e.g. /Users/you/Downloads/ubuntu-24.04.iso).
    • The script will write the ISO to the disk and automatically eject it when complete.

Example

  • Disk identifier: disk4
  • ISO path: /Users/you/Downloads/ubuntu-24.04.iso

Troubleshooting

  • "Permission denied": Rerun the script with sudo.
  • Disk not listed: Ensure the USB is connected and try diskutil list to verify the identifier.
  • Slow writes: Writing large ISOs can take time; check activity with Activity Monitor or iostat.

License

Use at your own risk. No warranty provided.

# Bootable USB Creator (macOS)

A small Python utility to create a bootable USB from an ISO on macOS.

## Overview
This script enumerates available disks, prompts for a target USB disk identifier (e.g. `disk4`) and the path to an ISO image, then writes the image to the selected disk and ejects it when finished.

## Requirements
- macOS host (uses macOS disk utilities)
- Python 3
- A terminal with sufficient privileges (writing an entire disk will require sudo)

## Safety warning
Writing an ISO to a disk will erase all data on the selected device. Verify the target disk identifier carefully before proceeding. The author is not responsible for data loss.

## Installation
1. Save the script as `create_bootable_usb.py` in a convenient directory.

## Usage
From the directory containing the script:

1. Make the script executable:
   chmod +x create_bootable_usb.py

2. Run the script (use `sudo` if required):
   ./create_bootable_usb.py
   or
   sudo ./create_bootable_usb.py

3. Follow the on-screen prompts:
   - The script will list available disks.
   - Enter the USB disk identifier (e.g. `disk4`) when prompted.
   - Enter the full path to the ISO (e.g. `/Users/you/Downloads/ubuntu-24.04.iso`).
   - The script will write the ISO to the disk and automatically eject it when complete.

## Example
- Disk identifier: `disk4`
- ISO path: `/Users/you/Downloads/ubuntu-24.04.iso`

## Troubleshooting
- "Permission denied": Rerun the script with `sudo`.
- Disk not listed: Ensure the USB is connected and try `diskutil list` to verify the identifier.
- Slow writes: Writing large ISOs can take time; check activity with `Activity Monitor` or `iostat`.

## License
Use at your own risk. No warranty provided.

About

Create any bootable disk that has any linx os, on mac

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages