Reinstall Ubuntu12.04

Source: Internet
Author: User

Reinstall Ubuntu12.04

I reinstalled Ubuntubecause the first time I allocated the root directory was too small, like a 20GB bar ~ result compilation Android , the compilation of 3 of a child directly aborted. Depressed. This also tells us to outline the size allocation of partitions according to their own needs. So this time allocate a large amount of space to the root directory. Of course, this is achieved using Diskgenius .

Download links for the files used:


By the way, has a lot of Linux -related resources on the site. The account password is


See, again the directory below this URL.

Ubuntu image, download the website:

First, use Mbrfix.exe to fix boot items

Copy the Mbrfix.exe to a directory, in order to enter the command prompt cmd easy to operate, I will copy to the C packing directory!

Open cmd, switch to C packing directory (input c:, then enter), and then input mbrfix/drive 0 Fixmbr/yes , that's all you can do. You can try it and go straight to Windows after booting .

Then, open Diskgenius to Delete the Linux partition directly. The process is fast.

Second, the Installation preparation work

Download Ubuntu image files, as well as grub4dos.

menu.lst and grldr in grub4dos and menu.lst copied to C the packing directory.

Then theUbuntuin the image. Diskfolder, andCasperin the folderVmlinuz.efi,Initrd.lzare copied toCthe root directory of the disk. Additionally, the image file is added to theCPacking directory. (Note -bit isVmlinuz.efi, +bit isVmlinuz, so for -bit remove suffixEFIcan). Here are the files I copied:

Figure 1 The files we copied

OK, the file is ready to play, start modifying the boot configuration file. Open the boot. ini file and add the last sentence at the end:

C:\grldr= "Ubuntu Install"(note the text in quotation marks when the prompt action, text can be changed casually)

Next, modify the menu.lst. Add the following text at the end:

Title Install Ubuntu12.04

Root (hd0,0)

Kernel (hd0,0)/vmlinuz boot=casper iso-scan/filename=/ubuntu12.04.5-amd64.iso locale=zh_cn. UTF-8

INITRD (hd0,0)/initrd.lz

the text after the title line is displayed on the screen for our selection. Then hd0, refers to our disk , 0 means C disk.

In the kernel line, the red text is our image name. Must be filled in according to our image name.

Note: Do not fill in the blanks in the text, otherwise you cannot select this option.

Three, start the installation

Restart your computer, then choose Ubuntu Install, and then you'll be on the Ubuntu System. Then we have to uninstall the disc, open the terminal, enter:

sudo umount-l/isodevice

Then, double-click on the desktop to install the Ubuntu System. OK, the pop-up window asks you to install the configuration:

Contains the keyboard layout (usually English (United States)), location selection, partitioning, and so on. Where partitioning is the most important, you need to implement the space as well as the number of partitions and their mount points. My partition is as follows:

Table 1 Description of the size and mount point of each partition

Mount point Partition size Description
root directory / 37G Because I want to compile Android, the compilation of Android demand space is relatively large, estimated that I need at least 20G space. For the first time, the compilation was terminated because there was not enough space.
/boot 500MB
/home 10GB Home directory for ordinary users
Swap 4GB The partition must have, typically 1.5~2 times the physical memory capacity
/tmp 5G

The remaining space is left for later study. Figure 2 is the partition where the Ubuntu12.04 has just been installed, so you can refer to the size of each partition after installation:


Figure 2 The partition of Ubuntu just after installation

OK, then wait, about a few minutes later, reboot is OK.

Iv. Rehabilitation Work

Delete the files copied to the C packing directory and restore the boot. ini Modification, which is the last sentence we added.

Of course, after rebooting, the default startup item is ubuntu, what if we don't use ubuntu much? At this time, we want to modify the default boot system, then of course to enter the Ubuntu System Oh! Open Terminal, enter:


Locate the set default row and change the number in the quotation marks to the number that Windows corresponds to when the system starts up , noting that the sequence number starts at 0 . Usually 0 is the Ubuntu operating system OH.

2015-03-13 22:01:30



Reinstall Ubuntu12.04

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: 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.