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:
Mbrfix.exe:
http://linux.linuxidc.com/pub/2007/Windows%E4%B8%8B%E4%BF%AE%E5%A4%8Dmbr%E7%9A%84%E8%BD%AF%E4%BB%B6MbrFix.exe/
By the way,linux.linuxidc.com has a lot of Linux -related resources on the site. The account password is linux.linuxidc.com
Grub4dos:
http://linux.linuxidc.com/pub/%E5%B8%B8%E7%94%A8%E5%B7%A5%E5%85%B7/Grub4DOS%200.4.4%20%E4%B8%8B%E8%BD%BD/
See, again the directory below this URL.
Ubuntu image, download the website:
http://cdimage.ubuntu.com/releases/12.04/release/
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:
Vim/boot/grub/grub.cfg
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
zamely
Hust
Reinstall Ubuntu12.04