Hacker Public Radio

HPR4231: Duplicating Multiple USB Flash Drives with DD and Tmux on FreeBSD


Listen Later

This show has been flagged as Clean by the host.

Pre-planning and creating
your image:
  1. Create your image with your preferred disk image creation tool. I
  2. used USB Image Tool to create an image from my "golden master" Windows
    11 installation thumb drive A. USB Image Tool: https://www.alexpage.de/usb-image-tool
    Prepare
    your Tmux session on your Linux or BSD-based system.
    1. 'tmux new -s $sessionName' to create a new Tmux session
    2. window with a session name of your choice.
    3. 'Ctrl-B-"' to create a horizontal split, putting one
    4. pane over the other.
    5. 'Ctrl-B-%' to create a vertical split, putting one pane
    6. next to the other.
    7. 'Ctrl-B-UpArrow' or 'Ctrl-B-DownArrow' to
    8. move to the pane you want to split if you split the window with a
      horizontal line.
    9. 'Ctrl-B-LeftArrow' or 'Ctrl-B-RightArrow'
    10. to move to the pane you want to split if you split the window with a
      vertical line.

      https://tmuxcheatsheet.com/

      Duplicate
      4 USB thumb drives from a disk image within your new, split-paned Tmux
      session:
      • CHECK DMESG FOR THE CORRECT DEVICE NAME AND WRITE IT
      • DOWN!!!
        • FreeBSD will show dmesg output on TTYv0, or you can use the dmesg
        • command on Linux or BSD. You don't want to end up wiping your system
          drive!
        • Within your Tmux session:
          • Pane 1:
          • 'dd if=$diskImageName of=/dev/da0 bs=1M status=progress' to
            begin imaging USB thumb drive #1.
          • Pane 2:
          • 'dd if=$diskImageName of=/dev/da1 bs=1M status=progress' to
            begin imaging USB thumb drive #2.
          • Pane 3:
          • 'dd if=$diskImageName of=/dev/da2 bs=1M status=progress' to
            begin imaging USB thumb drive #3.
          • Pane 4:
          • 'dd if=$diskImageName of=/dev/da3 bs=1M status=progress' to
            begin imaging USB thumb drive #4.
          • 'Ctrl-B-:' to call the Tmux command prompt, followed by
          • 'setw synchronize-panes' to sync the 4 panes to your
            commands. The primary pane will be highlighted in red, and the secondary
            panes will copy whatever command it typed into that primary pane.
          • Hit Enter to begin the process on all 4 panes.
          • When the image finishes, you can remove the USB thumbs drives, pop
          • in 4 more, hit the Up arrow on the primary pane to pull up the previous
            commands on their respective panes, and hit Enter. When in doubt, refer
            to Step 0!!
          • Repeat as needed.
          • If you need to de-synchronize your Tmux panes, just type

            'Ctrl-:' to call the Tmux command prompt, followed by
            'setw synchronize-panes' to toggle pane synchronization on
            and off (or you can use the up arrow at the Tmux command prompt to bring
            up that previously-typed command).

            The faster your USB ports and USB thumb drives, the better!

            Provide feedback on this episode.

            ...more
            View all episodesView all episodes
            Download on the App Store

            Hacker Public RadioBy Hacker Public Radio

            • 4.2
            • 4.2
            • 4.2
            • 4.2
            • 4.2

            4.2

            34 ratings


            More shows like Hacker Public Radio

            View all
            The Changelog: Software Development, Open Source by Changelog Media

            The Changelog: Software Development, Open Source

            289 Listeners

            Defensive Security Podcast - Malware, Hacking, Cyber Security & Infosec by Jerry Bell and Andrew Kalat

            Defensive Security Podcast - Malware, Hacking, Cyber Security & Infosec

            373 Listeners

            LINUX Unplugged by Jupiter Broadcasting

            LINUX Unplugged

            268 Listeners

            SANS Internet Stormcenter Daily Cyber Security Podcast (Stormcast) by Johannes B. Ullrich

            SANS Internet Stormcenter Daily Cyber Security Podcast (Stormcast)

            653 Listeners

            Curious Cases by BBC Radio 4

            Curious Cases

            826 Listeners

            The Strong Towns Podcast by Strong Towns

            The Strong Towns Podcast

            423 Listeners

            Late Night Linux by The Late Night Linux Family

            Late Night Linux

            164 Listeners

            Darknet Diaries by Jack Rhysider

            Darknet Diaries

            8,039 Listeners

            Cybersecurity Today by Jim Love

            Cybersecurity Today

            181 Listeners

            CISO Series Podcast by David Spark, Mike Johnson, and Andy Ellis

            CISO Series Podcast

            189 Listeners

            TechCrunch Daily Crunch by TechCrunch

            TechCrunch Daily Crunch

            42 Listeners

            Strict Scrutiny by Crooked Media

            Strict Scrutiny

            5,809 Listeners

            2.5 Admins by The Late Night Linux Family

            2.5 Admins

            98 Listeners

            Cyber Security Headlines by CISO Series

            Cyber Security Headlines

            138 Listeners

            What the Hack? by DeleteMe

            What the Hack?

            221 Listeners