Ubuntu Linux hard disk partitioning Solution

Source: Internet
Author: User

 

 

 

How can we reasonably divide Ubuntu into multiple zones? Previously, Linux was installed with automatic disk allocation {
Function onclick ()
{

}
} "Onmouseover =" function onmouseover ()
{
Function onmouseover ()
{
If (typeof (showtitle )! = 'Undefined') {This. Title = ''; window. cleartimeout (hideto); showtitle (event, this, 5 ,'');}
}
} "Onmouseout =" function onmouseout ()
{
Function onmouseout ()
{
If (typeof (showtitle )! = 'Undefined') {mouseisoverlayer = false; mouseoverwhileload = false; hideto = Window. setTimeout ('checkifmouseoverlayer () ', 500 );}
}
} "Href =" http://action.utops.cc/click.jsp? Adsid = 82 & adsleagueid = 5 & adsuserid = 188 & siteid = 657 & siteleagueid = 5 & siteuserid = 564 & SCID = 2 & adstype = 2 & prices = 0.8 & checkcode = login & click = 1 & url = http % 3A // container "target =" _ blank "> space, {
Function onclick ()
{

}
} "Onmouseover =" function onmouseover ()
{
Function onmouseover ()
{
If (typeof (showtitle )! = 'Undefined') {This. Title = ''; window. cleartimeout (hideto); showtitle (event, this, 0 ,'');}
}
} "Onmouseout =" function onmouseout ()
{
Function onmouseout ()
{
If (typeof (showtitle )! = 'Undefined') {mouseisoverlayer = false; mouseoverwhileload = false; hideto = Window. setTimeout ('checkifmouseoverlayer () ', 500 );}
}
} "Href =" http://action.utops.cc/click.jsp? Adsid = 428 & adsleagueid = 5 & adsuserid = 1 & siteid = 657 & siteleagueid = 5 & siteuserid = 564 & SCID = 2 & adstype = 98 & prices = 1.51 & checkcode = found & click = 1 & url = http % 3A // www.totole.com.cn & V = 0 & keyword = % u611f % u89c9 & s = http % 3A // tags "target =" _ blank "> this is not very professional, as a result, I found a good article in Baidu and Google .. The depressing thing is that I didn't find the extended partition settings mentioned in this article (only the primary partition and logical partition are displayed in the option, and I understand that it will automatically include these logical partitions in the extended partition, are you sure you want ?). No option for swap mounting is displayed (I manually entered it)

I. LINUX partition Concept

First, I would like to introduce the partition concept in Linux, but it hurts me from the beginning. In Linux, each {
Function onclick ()
{

}
} "Onmouseover =" function onmouseover ()
{
Function onmouseover ()
{
If (typeof (showtitle )! = 'Undefined') {This. Title = ''; window. cleartimeout (hideto); showtitle (event, this, 2 ,'');}
}
} "Onmouseout =" function onmouseout ()
{
Function onmouseout ()
{
If (typeof (showtitle )! = 'Undefined') {mouseisoverlayer = false; mouseoverwhileload = false; hideto = Window. setTimeout ('checkifmouseoverlayer () ', 500 );}
}
} "Href =" http://action.utops.cc/click.jsp? Adsid = 426 & adsleagueid = 5 & adsuserid = 1 & siteid = 657 & siteleagueid = 5 & siteuserid = 564 & SCID = 2 & adstype = 98 & prices = 1.51 & checkcode = found & click = 1 & url = http % 3A // www.totole.com.cn & V = 0 & keyword = % u4e00 % u4e2a & s = http % 3A // tags "target =" _ blank "> A hard disk device can have a maximum of four primary partitions (including extended partitions) constitute, any extended partition occupies a primary Partition Number, also {
Function onclick ()
{

}
} "Onmouseover =" function onmouseover ()
{
Function onmouseover ()
{
If (typeof (showtitle )! = 'Undefined') {This. Title = ''; window. cleartimeout (hideto); showtitle (event, this, 3 ,'');}
}
} "Onmouseout =" function onmouseout ()
{
Function onmouseout ()
{
If (typeof (showtitle )! = 'Undefined') {mouseisoverlayer = false; mouseoverwhileload = false; hideto = Window. setTimeout ('checkifmouseoverlayer () ', 500 );}
}
} "Href =" http://action.utops.cc/click.jsp? Adsid = 412 & adsleagueid = 5 & adsuserid = 1 & siteid = 657 & siteleagueid = 5 & siteuserid = 564 & SCID = 2 & adstype = 98 & prices = 1.51 & checkcode = found & click = 1 & url = http % 3A // www. foho. CC/totole/index.html & V = 0 & keyword = % u5c31 % u662f & s = http % 3A // fill "target =" _ blank "> is in a hard disk, the maximum number of primary and extended partitions is four. For earlier DOS and Windows (versions earlier than Windows 2000), the system recognizes only one primary partition. You can add a logical drive letter (logical partition) to the extended partition, further refine the partition.

A primary partition is used by a computer to start the operating system. Therefore, the boot of each operating system, or a boot program, should be stored in the primary partition. This is the biggest difference between primary and extended partitions and logical partitions. This is the best example when we specify the bootloader for Linux installation and boot on the primary partition.

Linux requires that the primary partition (or extended partition) occupies the first four numbers from 1 to 16. Taking the first IDE hard disk as an example, the primary partition (or extended partition) occupies hda1, hda2, hda3, and hda4, while the logical partition occupies 12 numbers from hda5 to hda16. Therefore, each Hard Disk in Linux has a total of 16 partitions.

For logical partitions, Linux requires that they must be built on extended partitions (also in DOS and Windows systems), rather than on the primary partition. Therefore, we can see that the extended partition provides a more flexible partition mode, but it cannot be used as a boot for the operating system.

I used to be unfamiliar with these concepts and made a lot of detours in partitioning. So what is a good partition {
Function onclick ()
{

}
} "Onmouseover =" function onmouseover ()
{
Function onmouseover ()
{
If (typeof (showtitle )! = 'Undefined') {This. Title = ''; window. cleartimeout (hideto); showtitle (event, this, 4 ,'');}
}
} "Onmouseout =" function onmouseout ()
{
Function onmouseout ()
{
If (typeof (showtitle )! = 'Undefined') {mouseisoverlayer = false; mouseoverwhileload = false; hideto = Window. setTimeout ('checkifmouseoverlayer () ', 500 );}
}
} "Href =" http://action.utops.cc/click.jsp? Adsid = 250 & adsleagueid = 5 & adsuserid = 188 & siteid = 657 & siteleagueid = 5 & siteuserid = 564 & SCID = 2 & adstype = 2 & prices = 0.8 & checkcode = login & click = 1 & url = http % 3A // response "targe T = "_ blank"> I think this is my opinion. In principle, it is best to mount two partitions/AND/home separately, because home can be regarded as my document in windows. If you have more personal data, home must be larger. /It doesn't matter if it is small. It is said that at least 2 GB, and I have never tried it. Others such as/tmp and/var because there are a lot of active files, to avoid the impact of their file fragments on other areas, it is best for them to mount a zone. Finally,/OPT mainly installs large software. If there are extra partitions, you can mount one for it.

1 {
Function onclick ()
{

}
} "Onmouseover =" function onmouseover ()
{
Function onmouseover ()
{
If (typeof (showtitle )! = 'Undefined') {This. Title = ''; window. cleartimeout (hideto); showtitle (event, this, 1 ,'');}
}
} "Onmouseout =" function onmouseout ()
{
Function onmouseout ()
{
If (typeof (showtitle )! = 'Undefined') {mouseisoverlayer = false; mouseoverwhileload = false; hideto = Window. setTimeout ('checkifmouseoverlayer () ', 500 );}
}
} "Href =" http://action.utops.cc/click.jsp? Adsid = 250 & adsleagueid = 5 & adsuserid = 188 & siteid = 657 & siteleagueid = 5 & siteuserid = 564 & SCID = 2 & adstype = 2 & prices = 1.33 & checkcode = login & click = 1 & url = http % 3A // container "target =" _ blank "> environment, use sudo fdisk/dev/xxx directly on the terminal

To partition, then W save and reboot, and then install the tool. When you manually edit the registry, it recognizes the partition table you edited, no

Use modifications to proceed to the next step.

2. You can also use the fdisk of livecd to divide the zone and use the livecd on the disk.

Install the installer program in the command line. However, this installer only requires you to mount/and swap. What about other partitions?

 

You can split the points first, or after installing the system. What if I mount other partitions to the desired directory? For example. If you want/

Mount home/user to the new sda8 partition. You can do this:

First, Mount/dev/sda8 to/mnt/sda8. If you do not have this directory, mkdir is your own.

Then, CP-r/home/user/*/mnt/sda8/user, and CP-r/home/user/. */mnt/sda8/user

Finally, modify/etc/fstab and add a/dev/sda8/home ext3 defaults 0 2 (the parameter is determined by yourself.

Ii. Start partitioning

OK. Let me see this. First {
Function onclick ()
{

}
} "Onmouseover =" function onmouseover ()
{
Function onmouseover ()
{
If (typeof (showtitle )! = 'Undefined') {This. Title = ''; window. cleartimeout (hideto); showtitle (event, this, 1 ,'');}
}
} "Onmouseout =" function onmouseout ()
{
Function onmouseout ()
{
If (typeof (showtitle )! = 'Undefined') {mouseisoverlayer = false; mouseoverwhileload = false; hideto = Window. setTimeout ('checkifmouseoverlayer () ', 500 );}
}
} "Href =" http://action.utops.cc/click.jsp? Adsid = 426 & adsleagueid = 5 & adsuserid = 1 & siteid = 657 & siteleagueid = 5 & siteuserid = 564 & SCID = 2 & adstype = 98 & prices = 1.51 & checkcode = found & click = 1 & url = http % 3A // www.totole.com.cn & V = 0 & keyword = % u4e00 % u4e2a & s = http % 3A // tags "target =" _ blank "> A m primary partition is generated, mount boot. All the files required for grub startup are in the/B o t directory. In this way, even if the working partition has a problem, as long as the partition is no problem, it can also be started. Therefore, the best way is to divide the root file into a single partition. Generally, the size is up to 64 MB, and I gave 100 MB for insurance.

All the subsequent partitions exist in the form of extended partitions, which have many logical partitions.

First, create an swap partition, which is twice or twice the memory size. If your memory is 1 GB like mine, it would be 1 GB. In fact, it is basically not that big. Change the partition format to Linux-swap.

 

Create a partition as large as possible for/usr, because most of the system software is stored here, including graphic interface programs such as X server. I divided 20 GB.

Next, create a mount partition for/home. Considering that I have many work documents and the source code and programs are often put here, I gave 10 Gb.

For other methods such as TMP and VAR, you do not need to consider a single user's work machine. Of course, I don't know if my machine will have server applications in the future. I still allocated 2 GB space to var.

All other spaces are mounted /. Although generally 2G is enough, it is more beneficial.

Note: many problems may occur if you use the built-in Installation Tool partition on the Ubuntu CD. If you encounter any problems, we recommend two methods:

1 {

} "Onmouseover =" function onmouseover ()
{
If (typeof (showtitle )! = 'Undefined') {This. Title = ''; window. cleartimeout (hideto); showtitle (event, this, 1 ,'');}
} "Onmouseout =" function onmouseout ()
{
If (typeof (showtitle )! = 'Undefined') {mouseisoverlayer = false; mouseoverwhileload = false; hideto = Window. setTimeout ('checkifmouseoverlayer () ', 500 );}
} "Href =" http://action.utops.cc/click.jsp? Adsid = 250 & adsleagueid = 5 & adsuserid = 188 & siteid = 657 & siteleagueid = 5 & siteuserid = 564 & SCID = 2 & adstype = 2 & prices = 1.33 & checkcode = login & click = 1 & url = http % 3A // container "target =" _ blank "> environment, use sudo fdisk/dev/xxx directly on the terminal

To partition, then W save and reboot, and then install the tool. When you manually edit the registry, it recognizes the partition table you edited, no

Use modifications to proceed to the next step.

2. You can also use the fdisk of livecd to divide the zone and use the livecd on the disk.

Install the installer program in the command line. However, this installer only requires you to mount/and swap. What about other partitions?

 

You can split the points first, or after installing the system. What if I mount other partitions to the desired directory? For example. If you want/

Mount home/user to the new sda8 partition. You can do this:

First, Mount/dev/sda8 to/mnt/sda8. If you do not have this directory, mkdir is your own.

Then, CP-r/home/user/*/mnt/sda8/user, and CP-r/home/user/. */mnt/sda8/user

Finally, modify/etc/fstab and add a/dev/sda8/home ext3 defaults 0 2 (the parameter is determined by yourself.

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.