Introduction to installing the UbuntuLinux system on a USB flash drive

Source: Internet
Author: User
This article describes how to install the UbuntuLinux system on a USB flash drive. although Ubuntu is used in this article, it is also feasible to install other LinuxliveCD releases based on this method. running Linux on a USB flash drive enriches the liveCD experience, allowing you to run Linux on any machine, which is much easier than carrying a CD with you. 1. Make the following preparations before you start: * One UbuntuliveCD or. iso

This article describes how to install Ubuntu Linux on a USB flash drive. Although Ubuntu is used in this article, it is also feasible to install other Linux live CD distributions using this method.

Running Linux on a USB flash drive enriches the live CD experience, allowing you to run Linux on any machine, which is much easier than carrying a CD with you.


1. Preparations


Before you start, you must at least make the following preparations:


* A Ubuntu live CD or. iso Image File

* At least 1 gb u Disk

* Running Linux OS


2. Set the USB flash drive


First, insert the USB flash drive to check whether the device is recognized. To locate the device, run the following command:


$ Sudo fdisk-l


In my system, the drive letter of this device is/dev/sdb. This article uses/dev/sdb as an example to explain how to change the drive letter according to the actual situation of your system (which may be sda, sdc ...).


After the system discovers the U disk, it will create a partition.


Note: Incorrect drive letters may damage your hard drive partition, so please input them with caution.


Create a partition


Detach an attached U Disk:


$ Sudo umount/dev/sdb1


Then use fdisk, a partition editing tool:


Sudo fdisk/dev/sdb


After deleting the partition of the U disk, we create two new partitions: one fat file system partition with a capacity of MB, which is used to save the files in the live CD image and the other partition.


Then, the input format is "d x", and x is the drive letter of the partition. The input is as follows:


* N create a new partition

* P is set as the primary partition.

* 1 is set to the first primary partition.

* Accept the default option or input "1" to start from the first cylindrical Disk

* + 750 M set the space to 750 MB

* A sets the partition as an active partition that can be started.

* 1 select this partition

* T change the partition format

* 6 set to FAT16 Partition


When the first partition is set, perform the second one:


* N to create yet again a new partition

* N create a partition again

* P is set as the primary partition.

* 2 set as the second partition

* Press enter to accept the default Selection

* Accept the default selection and use up all capacity

* Finally, enter w to enable the USB flash drive to complete the above changes.


Format the partition.


Format partitions


The first partition will be in the format of FAT16 file system, and the U disk is set to self-start.


$ Sudo mkfs. vfat-F 16-n liveusb/dev/sdb1


The second partition will be formatted as the ext2 file system, the block length (blocksize) is 4096 bytes, and the volume is casper-rw (otherwise the target will not be successfully completed !)


$ Sudo mkfs. ext2-B 4096-L casper-rw/dev/sdb2


Now, you need to copy the live CD image to the USB drive.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.