Basic linux on usb

How to Install Linux OS on USB Drive and Run it On Any PC

Ever thought of using any computer which is not yours, with all your personal stuff and configuration? It is possible with any Linux distribution. Yes! You can use your own, customized Linux OS on any machine with just a USB drive.

This tutorial is all about installing Latest Linux OS on your pen-drive ( fully reconfigurable personalized OS, NOT just a Live USB ), customize it, and use it on any PC you have access to. Here I am using Lubuntu 18.04 Bionic beaver for this tutorial (but, you can use any Linux distribution). So let’s gets started.

Requirements:

  1. One Pendrive 4GB or More (Let’s call it as Main USB drive/Pendrive).
  2. One more Pen drive or DVD disk to use as bootable Linux installation media.
  3. Linux OS ISO file, for example Lubuntu 18.04.
  4. One PC (Warning: Disconnect internal hard drives to prevent boot record alteration).

Important: While this procedure will not cause loss of data, some users have experienced changes to their internal drive’s bootup behavior depending on Linux distributions selected. To prevent any possibility of this occurrence, you may wish to disconnect your hard drive before continuing with the USB install portion of the tutorial.”

TIP: Use 32 bit Linux OS to make it compatible with any available PC.

That’s it! Go, and collect all of these. It’s time to do something new.

Step 1: Create Bootable Linux Installation Media

Use your Linux ISO image file to create a bootable USB installation media. You can use any software like Unetbootin, Gnome Disk Utility, Yumi Multi Boot, xboot, Live USB Creator, etc. to create bootable USB with the help of ISO image file.

Alternatively, you can use DVD disk by writing that ISO image to it (but that is the old school method).

Step 2: Create Partitions On Main USB Drive

You have to make two partitions on your Main USB drive using Gparted or Gnome Disk Utility, etc.

  • The root partition of format ext4 of size according to your use.
  • Optionally you can use the rest of the space as a FAT partition for using it as a normal USB drive.

I am having 16GB USB drive and I have created one root partition of 5GB and using rest 11GB as normal FAT partition. So my 16 GB USB drive is converted to 11GB drive for normal use on any PC. Sounds good.

Читайте также:  Linux консоль utf 8

This step you can do while installing Linux also, but it will be very complex while installing Operating Systems like Arch Linux.

Main USB Drive Partitions

Once you have created required partitions on the Main USB drive. Now take a deep breath because it’s time to go for Linux installation section.

Step 3: Install Linux on USB Drive

1. First, boot Linux OS (Lubuntu 18.04) from your bootable installation media and launch installation application from a live session. Live session of Lubuntu 18.04 will look like this.

Lubuntu Live Boot

2. Installer welcome screen will appear, select Language there and hit Continue.

Select Lubuntu Installation Language

3. Select Keyboard Layout and continue…

Select Lubuntu Keyboard Layout

4. Select Wifi internet if you want to update Lubuntu while installation. I will skip it.

Select Wifi to Update Lubuntu

5. Select Installation Type and Third-party installation as per your choice and go to next..

Select Lubuntu Software Updates

6. Here select Something Else Option (It is Mandatory) and go to next…

Select Lubuntu Installation Type

7. This is an Important step, here you need to find out where your Main USB drive is mounted.

Find Main USB Drive

In my case /dev/sda are an internal hard disk of the PC and I am using /dev/sdb is USB Lubuntu Installation media from where this live session is booted.

And /dev/sdc is my Main USB drive where I want to install my Linux system and where I have made two partitions in step number 2. If you have skipped step 2, you can also make partitions in this window.

First, change the mount point of the first partition on this Main USB drive to ROOT (i.e. “ / ” ). And as shown in the second red square select bootloader installation device as the Main USB drive.

In my case it is /dev/sdc . This is the most important step in this tutorial. If it is not done correctly your system will boot only on the current PC you are using, which is exactly opposite of your motivation to follow this tutorial.

Once it is completed, double-check it and hit continue. You will get a small window showing devices and drive which will be affected.

8. Make sure that the device and drives shown on this window are of your Main USB drive, which is in my case /dev/sdc . Hit continue

Write Partition Changes to Disk

9. Now select your Region and hit Continue

Select Lubuntu Region

10. Add username, password, and hostname, etc…

Create Lubuntu User

11. Let the installation finish.

Lubuntu Installation

12. After completing installation hit restart and remove your installation media and press Enter.

Lubuntu Installation Completes

13. Congratulations, you have successfully installed your own Linux OS on your pen drive to use it on any PC. Now you can connect a USB drive to any PC and start your system on that PC by simply selecting boot from USB option while booting.

Step 4: Customize the Lubuntu System

Now it’s time for fun. Just boot your system on any PC and start customizing. You can install any software you want. You can change Themes, Icon themes, install docker.

You can add and store your online accounts on it. Install/modify/customize whatever you want. All the changes will be permanent. They will not change or reset after rebooting or booting on other PCs.

Читайте также:  Lazarus linux mint установка

The following figure shows my customized Lubuntu 18.04.

Lubuntu Running on USB Drive

The main advantage of this method is you can use your personal stuff, your online accounts securely on any PC. You can even do secure online transactions as well on any available PC.

I hope it will be helpful for you, if you have questions regarding this article, please feel free to ask in the comment section below.

Источник

How to Create a Bootable Linux USB Flash Drive?

One great thing about Linux is that you can try it out without installing it on your hard drive. Most Linux distributions provide disk images (ISO files) that contain everything you need to boot into a live environment and, optionally, begin installation.

But how do you transfer a downloaded disk image to a USB flash drive? In this article, we provide three solutions to help you create a bootable Linux USB flash drive on Linux, Windows, macOS, and even Android.

Create a Bootable Linux USB with Etcher (Linux, Windows, macOS)

Written in Electron, Etcher is a cross-platform open source utility for flashing disk images to USB drives and memory cards. It runs on Windows, macOS, and Linux and provides an approachable graphical user interface that reduces the process of creating a bootable Linux USB to just three simple steps.

Unlike other similar software tools, Etcher prevents users from accidentally wiping their entire hard drives, which is something you’ll definitely appreciate if you’ve never created a bootable USB before and understandably feel anxious about the process.

To create a bootable Linux USB with Etcher:

1. Download Etcher from its official website.

3. Select the ISO file you want to flash to your USB drive.

4. Specify the target USB drive if the correct drive is not selected already.

5. Click the Flash! button and wait for the process to finish.

Create a Bootable Linux USB with dd (Linux, macOS)

dd is a command-line utility for Unix-like operating systems whose primary purpose is to read/write data from/to device files, such as USB flash drives. Because dd is bundled in GNU coreutils, you can find it on virtually all Linux distributions, as well as on macOS.

To create a bootable Linux USB with dd:

  1. Open your favorite terminal emulator.
  2. Issue the following command (replace /dev/sdx with your drive and path/to/ubuntu.iso with the actual path to the ISO file you want to flash):

The version of dd included in GNU coreutils doesn’t provide any progress indication. If you’d like some reassurance that the transfer is progressing as it should, you can use the following command (replace dd-pid with the process-id of dd, which you can find using htop):

dd for windows

There’s actually a version of dd for Windows that provides all the functionality you need to transfer an ISO file to a USB flash drive. To install it:

  1. Download the latest version from its official website.
  2. Extract the downloaded archive to a new folder on your hard drive.
  3. Open Command Prompt and navigate to the folder with dd for Windows.
  4. Use dd for Windows just like you would the version included in GNU coreutils.
Читайте также:  Linux setup dns server

Unfortunately, dd for Windows was last updated in 2010, and many users have reported issues when using the utility in Windows 10. Considering that dd for Windows doesn’t even support data conversion, such as byte order swapping and conversion to and from the ASCII and EBCDIC text encodings, you’re probably better off using either Etcher or Rufus, which we describe in the next chapter.

Create a Bootable Linux USB with Rufus (Windows)

Before the release of Etcher in 2016, Rufus was the best way to create a bootable Linux USB in Windows. This bootable USB flash drive creator is much faster than all of its Windows competitors, and it can create live USB drives for systems with both BIOS and UEFI. Rufus has been translated into several dozen languages, and it’s compatible with Windows 7 and newer, both 32- and 64-bit.

To create a bootable Linux USB with Rufus:

  1. Download Rufus from its official website.
    • You can choose between an installer and a portable version.
  2. Install it if you’ve downloaded the installer. Otherwise, you can just launch it.
  3. Select the target USB device.
  4. Click the SELECT button next to the boot selection dropdown menu and specify the ISO file you want to flash.
  5. Choose the correct partition scheme for your system.
  6. Click the START button.
  7. Wait for Rufus to finish.

In addition to creating live Linux USB flash drives, Rufus can also flash Windows disk images.

Create a Bootable Linux USB with EtchDroid (Android)

The last utility we want to describe is called EtchDroid, and its purpose is to write OS images to USB drives on Android smartphones and tablets.

Why would you want to use your Android device to create a bootable Linux USB? Well, imagine you find yourself in the middle of nowhere, and your laptop stops working after a botched system update. Without another computer to use, your only option on how to create a bootable Linux USB to fix the issue is your Android device, and that’s where EtchDroid comes in.

To create a bootable Linux USB with EtchDroid:

  1. Download EtchDroid from Google Play or F-Droid.
  2. Connect a USB flash drive to your Android device using a USB OTG adapter.
  3. Launch EtchDroid and select the Write raw image or ISO option.
  4. Select your ISO image.
  5. Select the USB flash drive.
  6. Tap Write to write the image to the USB flash drive.

EtchDroid has been tested with Ubuntu and its derivatives, Debian, Fedora, Arch Linux, and Raspberry PI SD card images. It doesn’t work with Windows, macOS, and old GNU/Linux distros. Support for Windows installation ISO files is on the developer’s to-do list.

About the author

David Morelo

David Morelo is a professional content writer in the technology niche, covering everything from consumer products to emerging technologies and their cross-industry application

Источник

Оцените статью
Adblock
detector