Install linux for your USB flash drive

Source: Internet
Author: User
Install the linux-Linux Release Technology-Debian for your USB flash drive. For details, refer to the following. After entering linux, edit/boot/grub/me to the front:

Because the linux penetration rate is not high, it is not installed in many places, including university data centers. For its convenience and promotion of linux, we decided to install a linux operating system on the USB flash disk and carry it with us. In addition, I want to read this article as a reader who has a certain linux Foundation and will install linux.

USB flash drive: I chose the Netac (longco) U208 USB flash drive that can start 1 GB.

Release Version: Debain Etch (Debian 4), because dibian is customizable.

Special hardware requirements:

Installation:

The computer has a USB interface. The motherboard supports USB flash drives, but USB flash drives are not required.

Usage:

The motherboard can be started from a USB flash drive.

Installation steps:

Insert a USB flash drive and start it with the Debian installation disc to enter the installation interface for basic configuration (such as keyboard layout and language options)

Partition

Partitioning is one of the keys to successful installation.

Select a custom partition for the partition. I chose to create a partition table on the USB flash drive for the first installation, but failed to start later. I don't know if this is the reason or the failure of grub installation. For the second installation, I did not create a partition table on the USB flash drive, but directly partitioned the table (that is, the initial status after the RegEx in windows, with only one partition ). Divide the USB flash disk into two zones, ext2 (more than 900 M), and 64 M is left for swap as the swap partition.

I think so.

1. The ext3 disk management mechanism will make the disk read and write frequently, greatly shortening the service life of the USB flash disk, so the ext2 format is used.

2. Since the OS is Mini and the USB flash disk is only 1 GB, we don't expect to use swap partition. The main memory is mainly memory. 64 MB to the OS to prevent unknown errors without swap.

3. I tried to use fat32 as a daily windows USB flash drive, but I encountered an unrecognized error on my computer widnows. Therefore, the second installation canceled the fat32 partition.

4. The speed and performance bottleneck of 1g u disk OS are mainly USB read/write speed. The difference between this bottleneck and whether to Mount important folders to independent partitions is too large, so I chose to install all the operating systems in one partition. Therefore, select an ext2 + swap.

To improve the versatility of the USB flash drive OS, I canceled all non-USB flash drives. For example, because I have installed linux on my computer and swap partitions, the Debian installer will also associate the swap partition on the hard disk with the swap partition on the USB disk. So I set the swap partition on the hard disk to unavailable (relative to the OS to be installed on the U disk ).

Another key to installing the USB flash drive OS is the installation of grub.

After grub is installed, you will be asked if you want to install it on MBR. Install grub on the USB flash drive. If you have a hard disk, the general hard disk is (hd0), the U disk is (hd1), if you do not know how hard disk is hd. You can use the second expression:

You can directly enter the drive name as follows:

Ctrl + al + f2: Enter the command on the terminal.

Fdisk-l

View your USB flash drive name

My options are/dev/sdb.

Then the installation is normal until the installation is complete.

Restart

Now set BIOS to start from USB flash drive.

Go to GRUB.

If you directly select to enter linux, an error will occur.

This is because the first hard disk is hd0 by default when the CD is installed.

When grub was just installed, the USB flash disk was identified as hd1, which is also written in the grub STARTUP configuration file. Now starting from the USB flash drive, grub considers the USB flash drive to be hd0. Therefore, the path is incorrect and an error occurs.

So when you enter the grub boot program interface, select the linux option, press edit, then select all rows, change hd1 (hd) to hd0, and press enter to confirm, press boot.

After entering linux, edit the/boot/grub/menu. lst configuration file and change the above path. Save. Restart.

OK. A mobile mini operating system has been installed.

Installation suggestions:

Due to the limited disk capacity, do not install the window manager during installation. Only install the basic system or add a notebook management system.

After installing the basic system, we recommend that you change the source configuration file.

After installation, clear the deb package cache in the following path:/var/cache/apt/archives

The software package is too easy to install. We recommend that you install the software package named synaptic.

Delete all the deb packages before installing the new software.

After all, the OS with only text interfaces is too ugly. to install the window manager, we recommend that you install a lightweight window manager.

Xorg + xfce4 is a good choice, simple to use, suitable for beginners and old birds.

The command line is as follows:

Install as Administrator
Apt-get install xorg
Rm/var/cache/apt/archives /*
Apt-get install xfce4
Rm/var/cache/apt/archives /*

If you are unhappy, install fvwm or e.

If you want to install kde and gnome, the disk space is insufficient during the installation process. Not recommended. Or install the components in batches. After installing the components in batches, immediately clear the deb package cache.

If the disk space is insufficient during the installation process, clear the deb cache and run dpkg -- configure-.

Literacy:

Use administrator permissions: su

Modify the source configuration file. For details, see baidu and debian.cn99.com.

How to install a package: apt-get install package name under the Administrator permission.
Related Article

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.