How to Install Linux into a USB Flash Drive

How to Install Linux into a USB Flash Drive:


My preferred way is to disk dump the linux iso contents to the drive by command line, but there are other automated ways to do it and with GUI, such as UnetbootinLinux Live USB or if your using windows to make the linux live usb drive, I recommend Rufus or Win32DiskImager for (32 bit windows only) For those you can just start the program and follow the instructions, its quite easy, or you can install and use cygwin where you can use GNU/Linux tools like dd in windows.

To find out which device your flash drive is, you can use many ways I'll just mention 2 here, either use fdisk or lsblk at command line:

# fdisk -l
/or
$ lsblk

After determining which is your device

Issue the command, with a pseudo foo path to the file.iso, assuming the flash drive is in /dev/sdb for example

# dd if=/path-to/file.iso of=/dev/sdb bs=4M; sync  
/or

# dd if=/path-to/file.iso of=/dev/sdb bs=4M status=progress oflag=nocache,sync && sync

To make sure the process completes successfully, unmount the flash drive, before unplugging:

# umount /dev/sdb

0 comments:

Post a Comment