Mac - Bootable USB Stick erzeugen: Unterschied zwischen den Versionen

Aus Wikizone
Wechseln zu: Navigation, Suche
(Die Seite wurde neu angelegt: „Einen bootable USB Stick benötigt man z.b. zur Installation von Betriebssystemen wie Linux. Aber auch Windows 10 oder 11 ist möglich. Mit dem Mac Terminal ha…“)
 
 
Zeile 77: Zeile 77:
  
 
Once verified you can write it to the USB device.
 
Once verified you can write it to the USB device.
===  
+
=== Step 4 – Create a bootable USB stick on Linux ===
Step 4 – Create a bootable USB stick on Linux ===
 
  
 
'''Warning: Be careful with the USB stick/pen/disk names. Wrong names always result in data loss. Make sure you type the correct name.'''
 
'''Warning: Be careful with the USB stick/pen/disk names. Wrong names always result in data loss. Make sure you type the correct name.'''

Aktuelle Version vom 7. September 2022, 17:35 Uhr

Einen bootable USB Stick benötigt man z.b. zur Installation von Betriebssystemen wie Linux. Aber auch Windows 10 oder 11 ist möglich. Mit dem Mac Terminal hat man alle benötigten Tools.

Beispiel Ubuntu ISO auf bootable USB Stick:[Bearbeiten]

Quelle (Zugriff 2022-09-07)

https://www.cyberciti.biz/faq/creating-a-bootable-ubuntu-usb-stick-on-a-debian-linux/

Step 1 – Download Ubuntu .iso image[Bearbeiten]

Visit the Ubuntu.com and grab the desktop or server CD/DVD iso image.

Step 2 – Find your usb device name on Linux[Bearbeiten]

Insert your USB stick and type the following df command to see if it is mounted automatically on a Debian or any other Linux desktop system:

df

Sample outputs (see /media/vivek/data that is my USB):

Filesystem            1K-blocks    Used Available Use% Mounted on
udev                   16432268       0  16432268   0% /dev
tmpfs                   3288884   26244   3262640   1% /run
/dev/mapper/md0_crypt 491076512 9641092 456420380   3% /
tmpfs                  16444408  105472  16338936   1% /dev/shm
tmpfs                      5120       4      5116   1% /run/lock
tmpfs                  16444408       0  16444408   0% /sys/fs/cgroup
/dev/sdc1             122546800  124876 116153868   1% /boot
tmpfs                   3288880      24   3288856   1% /run/user/119
tmpfs                   3288880      72   3288808   1% /run/user/1000
/dev/sdd1               1467360 1467360         0 100% /media/vivek/data

You can try the lsblk command or dmesg command as well to list your usb devices:

lsblk
dmesg

You need to unmount /media/vivek/data:

sudo umount /media/vivek/data

Or try:

sudo umount /dev/sdd1

Another option is to run dmesg command to find out usb device name:

sudo dmesg

Sample outputs:

[461339.310378] usb 2-1.7: new high-speed USB device number 12 using ehci-pci
[461339.420453] usb 2-1.7: New USB device found, idVendor=0781, idProduct=558a
[461339.420457] usb 2-1.7: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[461339.420460] usb 2-1.7: Product: Ultra
[461339.420461] usb 2-1.7: Manufacturer: SanDisk
[461339.420463] usb 2-1.7: SerialNumber: FooBarNixCraftSerialNumber
[461339.421010] usb-storage 2-1.7:1.0: USB Mass Storage device detected
[461339.421457] scsi host6: usb-storage 2-1.7:1.0
[461340.431909] scsi 6:0:0:0: Direct-Access     SanDisk  Ultra            1.00 PQ: 0 ANSI: 6
[461340.432886] sd 6:0:0:0: Attached scsi generic sg4 type 0
[461340.433448] sd 6:0:0:0: [sdd] 121307136 512-byte logical blocks: (62.1 GB/57.8 GiB)
[461340.435434] sd 6:0:0:0: [sdd] Write Protect is off
[461340.435438] sd 6:0:0:0: [sdd] Mode Sense: 43 00 00 00
[461340.436405] sd 6:0:0:0: [sdd] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[461340.449612]  sdd: sdd1 sdd2

It is clear that /dev/sdd is my usb stick device name. You can also use the lsblk command. For example:

lsblk

Step 3 – Verify Ubuntu .iso CD/DVD image file[Bearbeiten]

TIP: You can find DVD iso image checksum such as 443511f6bf12402c12503733059269a2e10dec602916c0a75263e5d990f6bb93 on Ubuntu.com download page itself.

However, I like to verify my download. For example:

ls -l ubuntu-20.04.1-live-server-amd64.iso

echo "443511f6bf12402c12503733059269a2e10dec602916c0a75263e5d990f6bb93 *ubuntu-20.04.1-live-server-amd64.iso" \
| shasum -a 256 --check

You should get the following output:

ubuntu-20.04.1-live-server-amd64.iso: OK

Once verified you can write it to the USB device.

Step 4 – Create a bootable USB stick on Linux[Bearbeiten]

Warning: Be careful with the USB stick/pen/disk names. Wrong names always result in data loss. Make sure you type the correct name.

Type the following dd command to create a bootable USB image from a .ISO file:

sudo dd if=artful-desktop-amd64.iso of=/dev/sdd bs=1M status=progress

Another example:

sudo dd if=ubuntu-20.04.1-live-server-amd64.iso of=/dev/sda bs=1M status=progress

The dd command will write process data to a usb stick (/dev/sdd or /dev/sda)and a progress bar appears on screen. Ubuntu to create a bootable Ubuntu USB flash drive from terminal

In this example I am going to create a bootable flash drive for ubuntu-18.04.3-live-server-amd64.iso file as follows:

sudo dd if=/isos/ubuntu-18.04.3-live-server-amd64.iso of=/dev/sdb bs=1M status=progress

Ubuntu iso bootable USB create using dd command on Linux

Another example

sudo dd if=/isos/ubuntu-19.04-live-server-amd64.iso of=/dev/sdb bs=1M status=progress

Here is what I see:

748+0 records in
748+0 records out
784334848 bytes (784 MB, 748 MiB) copied, 119.174 s, 6.6 MB/s

Understanding the dd command options

dd : Start the dd command to write DVD/CD iso image.
if=/iso/ubuntu.iso : Path to input file.
of=/dev/sdd : Path to destination USB disk/stick.
bs=1M : read and write up to BYTES bytes at a time. In this example, 1M at a time.
status=progress : Display progress bar while writing image to the USB stick such as /dev/sdd. See “Linux dd Command Show Progress Copy Bar With Status” for more info.

Step 5: Install Ubuntu using newly created USB drive[Bearbeiten]

That’s all, folks! You now have Ubuntu on a USB stick, bootable and ready to install on your Laptop, Desktop or server based system. Conclusion

You learned how to create a bootable usb pen drive from downloaded Ubuntu desktop or server .ISO image. See Ubuntu download page.