قالب وردپرس درنا توس
Home / Tips and Tricks / How to Create a Ubuntu USB Live Drive with Persistent Storage

How to Create a Ubuntu USB Live Drive with Persistent Storage



  The GNOME desktop of Ubuntu 18.04 displays a file browser window.

A Linux live USB drive is normally an empty slate every time you start it. You can start it, install programs, save files and change settings. However, once you restart, all changes will be deleted and you will be returned to a new system. This can be useful. However, if you want to use a system that continues to work where you left off, you can create a live USB drive with persistent storage.

How Persistent Storage Works

Assign up to 4 GB of USB storage for a persistent overlay file. Any changes that you make to the system, such as For example, saving a file to your desktop, changing settings in an application, or installing a program are stored in the overlay file. If you boot the USB drive on any computer, your files, settings, and installed programs are there.

This is an ideal feature if you want to keep a live Linux system on a USB drive and use it on different PCs. You do not have to set up your system every time you start it. You do not require persistence if you only install Ubuntu from a USB drive and then run it from your hard drive.

There are some limitations. You can not change system files like the kernel. You can not perform major system upgrades. You also can not install any hardware drivers. However, you can install most applications. You can even update most installed applications so you can be sure your permanent USB drive has the latest version of the Web browser of your choice.

Persistence does not work with any Linux distribution. We tested it with the latest versions of Ubuntu ̵

1; Ubuntu 18.04 LTS and Ubuntu 19.04 – and it works. It should also work with Ubuntu-based Linux distributions. In the past, we also had luck with Fedora. Simply download the appropriate ISO file and follow the instructions below.

How to create a Ubuntu USB permanent drive on Ubuntu

You need a computer that already runs Ubuntu to perform this operation. You also need a USB drive with enough storage capacity to set up persistence. We used a 16 GB drive, but an 8 GB drive would have worked too. The larger the drive, the more durable the memory can be.

The grub, boot, and Ubuntu partitions occupy less than 2 GB. The rest of the space on the USB drive is used for the partition casper-rw and usbdata .

The partition casper-rw is used for permanent storage. For example, the software and settings files you have installed are stored here.

The partition usbdata is formatted with the NTFS file system. It will be available for Linux, Windows and MacOS. This partition is also available in Live Ubuntu on the USB drive. This means that any files copied from another computer to the partition usbdata can be accessed on your Ubuntu.

In other words, the partition usbdata acts as a "shared folder" between your Ubuntu and any other computer to which you connect your USB drive. That's pretty cool.

The following screenshot shows what the resulting partitions looked like on our 16 GB drive.

 Partition Table on USB Drive

Although a 16 GB USB drive was used for investigating items, an 8 GB drive would work just as well. It just has less storage space.

First, you need to download the Ubuntu ISO file you want to put on the USB drive.

Second, the tool you want to use is mkusb . It is not part of the standard Ubuntu installation. You have to install it. Enter the following three commands. The first command adds the repository mkusb so Ubuntu knows where mkusb needs to be installed.

  sudo add-apt-repository ppa: mkusb / ppa 

  Adding the repository to a terminal window

The next command forces Ubuntu to update its package lists for the registered repositories.

  sudo apt-get update 

  sudo apt-get update in a terminal window

We Now install the package mkusb with the following command:

  sudo apt install - -install-recommends mkusb mkusb-nox usb-pack-efi 

  Installing mkusb in a terminal window ]

The program mkusb does an excellent job of identifying USB drives. That's great, but there's nothing better than knowing it yourself. If mkusb states that a specific drive is completely deleted, you can be sure that it is the USB drive you want to use, not another device in your system.

In a terminal window, type the following command. The command lsblk lists the block devices on your computer. Each drive is assigned a block device.

  lsblk 

  lsblk in a terminal window

The output of lsblk displays the drives currently connected to your computer. On this computer there is an internal disk named sda and a partition named sda1 .

 lsblk in a terminal window

Connect your USB drive and re-use the command lsblk . The edition of lsblk has changed. The USB drive will now be listed in the output.

 lsblk output with USB drive in a terminal window

The list contains a new entry named sdb . It has a partition called sdb1 . This is the USB drive.

If your computer already has multiple drives, the name of your USB drive will be different. Regardless of the designation, the device that was not in the previous lsblk listing must be the USB drive.

Once you know which device you have USB drive, you can start mkusb . Press the Super (Windows) key and enter "mkusb". The symbol mkusb is displayed. Click the icon or press Enter.

 The mkusb symbol

A dialog box will ask if you want to run the dus version (Do USB Stuff) of mkusb . Click the "Yes" button.

 Run mkusb as dus

A terminal window with a black background appears and a dialog box prompts for your password. Enter your password and click "OK".

 Password Query dialog box

Warning : This action deletes the contents of the USB drive!

Click Click "OK" in the warning dialog to confirm that you understand this.

 Warning Device Deletion Dialog Box

Click the "Install (Create Boot Device)" entry in the list, and then click "OK Button.

 Install Option (Create boot device)

Select the entry "Persistent live" – ​​Debian and Ubuntu only in the list and click the "OK" button. [19659005]   Ubuntu and Debian option only

A file browser dialog appears, navigate to the Ubuntu ISO file you downloaded and select it and click the green OK button.

In the screenshot below, select the Ubuntu 19.04 ISO Image from the Downloads folder.

 Section Window

A list of USB drives connected to your computer is displayed, allowing you to select the appropriate USB drive

To the one for the The test computer used was only one USB drive connected. As we confirmed above, it says sdb . We have confirmed that this is the USB drive we want to use so we can be confident. Click the OK button".

 USB Drive Confirmation Dialog

When the dialog shown below appears, select the entry "usb-pack-efi (standard ISO from scratch)" in the list and Click the OK button".

 Option

You have another option to choose from. You can specify the percentage of disk space that should be used for persistent storage in partition casper-rw . The rest is used for the usbdata partition, which has the NTFS file system and can also be accessed from Windows PCs and Macs.

If you are happy to have the available space on the USB drive Equal to these two partitions, leave the slider at its default value and click the "OK" button.

 Durable Memory Slider

Now we just have to specify mkusb ] that we are satisfied with all our decisions and that it should continue.

To be clear, this is the last point where you can resign. If you are sure you want to continue, select the Go radio button and click the Go button.

 mkusb final safety check

A progress bar indicates how close the creation is. The process is complete.

 progress bar

The final phase of creation is to transfer the file system buffers to the USB drive. It is also recommended to wait for the phrase "work done" to be displayed. This indicates that the process is complete.

 progress bar power amp "width =" 506 "height =" 268 "src =" /pagespeed_static/1.JiBnMqyl6S.gif "onload =" pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon (this); "onerror =" this.onerror = null; pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon (this);

When the process is complete, a dialog box with the phrase "work done" will be highlighted in green. Click the OK button". If other dialog boxes appear, close them by clicking the Quit button.

 Done Dialog "width =" 562 "height =" 408 "src =" /pagespeed_static/1.JiBnMqyl6S.gif "onload =" pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon (this); "onerror =" this.onerror = zero; pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon (this);

A few more lines in the output window are traversed. You will be asked to press Enter when done.

 Press Enter to continue. "Width =" 561 "height =" 410 "src =" /pagespeed_static/1.JiBnMqyl6S.gif "onload =" pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon (this); "onerror =" this.onerror = null; pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon (this);

When you press Enter, the terminal window closes. You can now either reboot your computer and boot from the USB drive, or disconnect the USB drive from the computer, transfer it to another computer, and boot.

RELATED: How to Start Your Computer from a CD or DVD USB Drive

Creating a permanent Ubuntu USB drive under Windows

Update : The following method (with Linux Live USB Creator) stops working with the latest versions of Ubuntu. You must use the method described above instead.

You need a large enough USB drive to set up persistence. Ubuntu itself states that it requires 2GB of space on the USB drive and you need extra storage for the persistent storage. So if you have a 4GB USB drive, you can only have 2GB of persistent storage. To get the maximum storage space, you need a USB drive that is at least 6 GB in size.

Unfortunately, Ubuntu's officially recommended Rufus tool for creating Ubuntu USB Live drives on Windows does not support creating systems with persistent storage. We recommend using Rufus to create most Ubuntu Live USB drives, but you will need to use a different tool for this particular job.

Download the Ubuntu ISO file that you want to save to the USB drive and the Linux Live USB Creator application.

Insert the desired USB drive into the USB port of your computer and start the just-installed "LiLi USB Creator" application.

Select the desired USB drive in "Step 1: Select your key from the box.

 Option to select a USB drive in Linux Live USB Creator "width =" 650 "height =" 249 "src =" /pagespeed_static/1.JiBnMqyl6S.gif "onload =" pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon ( this); "onerror =" this.onerror = null; pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon (this);

Enter your downloaded Ubuntu ISO file. Under "Step 2: Select a Source", click the "ISO / IMG / ZIP" button, navigate to the ISO file on your computer and double-click on it.

 Selecting an ISO File in Linux Live USB Creator "width =" 650 "height =" 145 "src =" /pagespeed_static/1.JiBnMqyl6S.gif "onload =" pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon (this) ; "onerror =" this.onerror = null; pagespeed.lazyLoadLoadLoad. loadIfVisibleAndMaybeBeacon (this);

Use the options in the "Step 3: Persistence" section to determine how much space to use for persistent storage on the USB drive. Drag the slider all the way to the right to select the maximum memory size.

<img class = "alignnone wp-image-283630 size-full" data-pagespeed-lazy-src = "https://www.howtogeek.com/wp-content/uploads/2016/12/ximg_58473a973fc57.png .pagespeed.gp + jp + jw + pj + ws + js + rj + rp + rw + ri + cp + md.ic.ZviRbQB7za.jpg "alt =" Assigning persistent storage to Linux Live USB Creator "width =" 650 "height =" 114 "src =" /pagespeed_static / 1. JiBnMqyl6S.gif "onload =" pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon (this); "onerror =" this.onerror = null; pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon (this); configure To create your live persistent memory USB drive, click the flash icon under "Step 5: Create."

<img class = "alignnone wp-image-283633 size-full" data-pagespeed- lazy-src = "https://www.howtogeek.com/wp-content/uploads/2016/12/ximg_58473ae1b9f75.png.pagespeed.gp+jp+jw+pj+ws+js+rj+rp+rw+ri + cp + md.ic.P7uwlwab2B.jpg "alt =" Creating a Persistence Progress File in LiLi USB Creator "width =" 6 50 "height =" 257 "src =" /pagespeed_static/1.JiBnMqyl6S.gif "onload =" pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon (this); "onerror =" this.onerror = null; pagespeed.lazyLoadImages.loadIfVisibleAndMay] Tool some time to create the drive. When the process is complete, the message "Your LinuxLive key is now active and ready!" Appears. Displayed. You can now either reboot your computer and boot from the USB drive, or disconnect the USB drive from the computer, transfer it to another computer, and boot.

<img class = "alignnone wp-image-283635 size-full" data-pagespeed-lazy-src = "https://www.howtogeek.com/wp-content/uploads/2016/12/ximg_58473d89e3cd7.png .pagespeed.gp + jp + jw + pj + ws + js + rj + rp + rw + ri + cp + md.ic.88LzpQ4etq.jpg "alt =" Linux live USB creation completed in LiLi "width =" 650 "height =" 152 "src =" /pagespeed_static/1.JiBnMqyl6S.gif "onload =" pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon (this); " onerror = "this.onerror = null; pagespeed.lazyLoadImages.loadIfIfVisibleA [1945]

To verify that permanent storage is working properly, start the USB drive and create a folder on the desktop, or save one File on the desktop, then shut down your system and reboot the live USB drive.You should see the folder or file you put on the desktop.




Source link