LoginSignup
0
0

More than 3 years have passed since last update.

Linux Live USBを作成するコマンド

Last updated at Posted at 2020-03-29

はじめに

LinuxのLive USBを作成するコマンドを作成しました。(参考:Live USBとは)
実行可能環境はmacOSとLinuxです。

1. インストール

GitHub

$ git clone https://github.com/hiwm0126/create-live-usb.git ~/.create-live-usb
$ sudo ln -snf ~/.create-live-usb/main.sh /usr/local/bin/create-live-usb

2. 使い方

引数で指定するISOイメージは、好きなディストリビューションのものを各自用意してください。
例ではPeppermintを使ってます。
macOSとLinuxで操作は変わりませんが、表示が少し異なるので両方紹介します。

2-1. Linuxの例

$ sudo create-live-usb ~/Download/Peppermint-10-20191210-amd64.iso

==============BLOCK DEVICE INFO=================

NAME        MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda           8:0    1  3.8G  0 disk 
└─sda1        8:1    1  3.8G  0 part 
mmcblk0     179:0    0 29.8G  0 disk 
├─mmcblk0p1 179:1    0   63M  0 part 
├─mmcblk0p2 179:2    0    1K  0 part 
├─mmcblk0p5 179:5    0   32M  0 part 
├─mmcblk0p6 179:6    0  256M  0 part /boot
└─mmcblk0p7 179:7    0 29.5G  0 part /

================================================

which device do you want to use?

---device name list---
sda       
mmcblk0   
----------------------

Enter the dvice name : sda <-- デバイス名を入力
1560281088 bytes (1.6 GB, 1.5 GiB) copied, 266 s, 5.9 MB/s 
372+1 records in
372+1 records out
1562378240 bytes (1.6 GB, 1.5 GiB) copied, 266.846 s, 5.9 MB/s

--------------------------------------

Creating Live USB is complete.

2-2. macOSの例

$ sudo create-live-usb ~/Download/Peppermint-10-20191210-amd64.iso

==============BLOCK DEVICE INFO=================

/dev/disk0 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *251.0 GB   disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:                 Apple_APFS Container disk1         250.8 GB   disk0s2

/dev/disk1 (synthesized):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      APFS Container Scheme -                      +250.8 GB   disk1
                                 Physical Store disk0s2
   1:                APFS Volume Macintosh HD - Data     107.7 GB   disk1s1
   2:                APFS Volume Preboot                 83.5 MB    disk1s2
   3:                APFS Volume Recovery                528.1 MB   disk1s3
   4:                APFS Volume VM                      1.1 GB     disk1s4
   5:                APFS Volume Macintosh HD            11.2 GB    disk1s5

/dev/disk2 (external, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     FDisk_partition_scheme                        *4.0 GB     disk2
   1:                       0xEF                         2.4 MB     disk2s2


================================================

which device do you want to use?

---device name list---
disk2 
----------------------

Enter the dvice name : disk2 <-- デバイス名を入力
460+0 records in
460+0 records out
1929379840 bytes transferred in 324.378169 secs (5947934 bytes/sec)

--------------------------------------

Creating Live USB is complete.

※コマンド実行はご自身の責任で行ってください。コマンド実行に関して発生した事象について、筆者は一切の責任を負いません。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0