LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1472|回复: 14

疯了,竟然报分区错误!

[复制链接]
发表于 2007-11-24 00:00:43 | 显示全部楼层 |阅读模式
我在安装fc8的时候,在创建分区界面遇到了麻烦。
我现在的情况是:
一块80G硬盘,有1个主分区,是ntfs格式的,10G。
一个扩展分区,这个扩展分区里面包含2个逻辑盘,ntfs格式的,一个20G一个25G,还有一个fat32格式的主分区,4G。空闲空间16G,没有分入任何分区。
安装fc8的时候,我创建了一个分区,格式是swap,大小是1G,然后就再也无法创建分区了,无论我把/的大小设置为多少,都说空间不足。
后来,我先创建了一个/分区,大小是15G,然后在创建swap的时候又说空间不足。
大体意思就是,我只能创建一个分区,无论如何也无法创建第二个。不管我的第一个分区的大小设置的多么小,都说空间不足。
现在我只创建了/而没有建立swap,终于装上了...
我现在的/分区是15G的,还有1G的空间,我现在想再创建一个swap分区。请问我应该怎么办?
还有,我为什么在安装时无法创建分区呢?谢谢!!
很急。
 楼主| 发表于 2007-11-24 17:47:39 | 显示全部楼层
没人理我吗?急啊!!!
回复 支持 反对

使用道具 举报

发表于 2007-11-24 18:11:19 | 显示全部楼层
可以用fdisk或者cfdisk命令在开机之后创建swap分区。
创建的具体做法简述如下:
[root@localhost robin]# su -
[root@localhost ~]# fdisk -l

Disk /dev/sda: 122.9 GB, 122942324736 bytes
255 heads, 63 sectors/track, 14946 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xca87ca87

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        2550    20482843+  83  Linux
/dev/sda2            2551       10199    61440592+  83  Linux
/dev/sda3           10200       10330     1052257+  82  Linux swap / Solaris
/dev/sda4           10331       14946    37078020    5  Extended
/dev/sda5           10331       14946    37077988+  83  Linux
[root@localhost ~]#
现看看已存在的分区情况。
我这里已经没有空闲的地方了,如果有的话,会有unallocated 什么东东的。
fdisk /dev/sda
对第一个IDE硬盘进行操作。
Command (m for help): m
Command action
   a   toggle a bootable flag
   b   edit bsd disklabel
   c   toggle the dos compatibility flag
   d   delete a partition
   l   list known partition types
   m   print this menu
   n   add a new partition
   o   create a new empty DOS partition table
   p   print the partition table
   q   quit without saving changes
   s   create a new empty Sun disklabel
   t   change a partition's system id
   u   change display/entry units
   v   verify the partition table
   w   write table to disk and exit
   x   extra functionality (experts only)
命令解释如下。
好好看提示来作,在没有分配的空间建立一个新的分区,格式是82,也就是linux swap.
然后选择 w,写入磁盘分区表。
一般最好重新启动一下吧。保证分区表的完整。
然后是格式化这个swap分区。假设新加的分区叫做/dev/sda9
mkswap /dev/sda9
然后开启这个分区
swapon /dev/sda9
然后验证一下
free
[root@localhost ~]# free
             total       used       free     shared    buffers     cached
Mem:       1034952     907284     127668          0      22884     489604
-/+ buffers/cache:     394796     640156
Swap:      1052248          4    1052244
有最后这一行关于swap的信息就OK了。
最后一步,写入fstab.保证下一次开机自动启用这个分区。
vi /etc/fstab
最后加上一行
/dev/sda9        swap                    swap    defaults        0 0
回复 支持 反对

使用道具 举报

发表于 2007-11-25 10:30:40 | 显示全部楼层
Fedora安装程序anaconda本来就很烂的。
另: Fedora 8内核默认支持NTFS了么?   Fedora是不会支持有版权问题的ntfs的吧?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-11-25 13:37:58 | 显示全部楼层
[root@lin01 ~]# fdisk -l

Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xdb68db68

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        1213     9743391    7  HPFS/NTFS
/dev/sda2            1214        1670     3670852+   c  W95 FAT32 (LBA)
/dev/sda3            3825        9728    47423880    f  W95 Ext'd (LBA)
/dev/sda4            1671        3628    15727635   83  Linux
/dev/sda5            3825        6435    20972826    7  HPFS/NTFS
/dev/sda6            6436        9728    26450991    7  HPFS/NTFS

Partition table entries are not in disk order
[root@lin01 ~]# fdisk /dev/sda

The number of cylinders for this disk is set to 9729.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): m
Command action
   a   toggle a bootable flag
   b   edit bsd disklabel
   c   toggle the dos compatibility flag
   d   delete a partition
   l   list known partition types
   m   print this menu
   n   add a new partition
   o   create a new empty DOS partition table
   p   print the partition table
   q   quit without saving changes
   s   create a new empty Sun disklabel
   t   change a partition's system id
   u   change display/entry units
   v   verify the partition table
   w   write table to disk and exit
   x   extra functionality (experts only)

Command (m for help): n
No free sectors available

Command (m for help):
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-11-25 13:40:45 | 显示全部楼层
按照二楼的操作 报错 如楼上。
很神奇吧?
明明有空间 却说没有 安装的时候也是报错说没有空间的

另:回楼上的
fc8装好之后默认支持ntfs了...而且用root进xwindow还是自动挂载到桌面的...
回复 支持 反对

使用道具 举报

发表于 2007-11-25 14:22:22 | 显示全部楼层
Post by jilingshu;1787411
[root@lin01 ~]# fdisk -l

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        1213     9743391    7  HPFS/NTFS
/dev/sda2            1214        1670     3670852+   c  W95 FAT32 (LBA)
/dev/sda3            3825        9728    47423880    f  W95 Ext'd (LBA)
/dev/sda4            1671        3628    15727635   83  Linux
/dev/sda5            3825        6435    20972826    7  HPFS/NTFS
/dev/sda6            6436        9728    26450991    7  HPFS/NTFS
Partition table entries are not in disk order


#fdisk /dev/sda
x              (extra functionality)
f              (fix disk order)

这样试一下,可解决Partition table entries are not in disk order错误,不过用了f会改变分区表。


/dev/sda3是扩展分区,开始于3825,结束于9728,而你的/dev/sda6结束于9728,所以没空间了啊。 你的空闲空间不在扩展分区中,所以扩展分区已经没空间了。  在当时分区时应该把所有空闲空间放到扩展分区中。
现在只有2种方法:
1. 用分区工具把空闲空间分为主分区试试。
2. 把扩展分区删除(会删除扩展分区所有东西!),重新分区,把空闲空间放到扩展分区中。

我已经用后一种方法解决过这个问题。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-11-25 19:50:35 | 显示全部楼层
确实 空闲确实半空间在扩展分区里面。
我听说把lin装在win扩展分区中会产生奇怪的问题?
但是现在确实是有15G的空闲空间啊,有什么办法不把它们放到扩展分区中来安装lin吗?
我是不是要在win下把它们分成主分区?

很奇怪,lin为什么会说没有空闲空间?仅仅是因为我没有把它们放到扩展分区中?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-11-25 19:56:28 | 显示全部楼层
哈 更神奇的事情发生了~

我现在C是主分区,D E在扩展分区里面,是逻辑盘,都是ntfs的。
我创建了一个F分区,fat的,是主分区(空闲空间都不在扩展分区里面,只能建主分区),把lin的安装程序放进去了。然后建了一个1G的,没格式化的分区,准备作swap。现在还有15+G的空闲空间。我右击它们后,新建分区 竟然是灰色的.....
无语
应该怎么办?
回复 支持 反对

使用道具 举报

发表于 2007-11-25 21:09:02 | 显示全部楼层
这个问题很显然,一个硬盘只能有4个主分区(如果有扩展分区的话,扩展分区算一个主分区),你的已经有4个主分区了:1. 10G的 ntfs ;2. 4G的 fat32 ;3.16G的扩展分区 ; 4. 空闲空间(最多只能建一个(主)分区)。。。
所以,你要么把16G的空闲分区划到扩展分区里面,再在上面建其他分区安装linux等(扩展分区的逻辑分区似乎没有限制?),要么建一个分区后(swap或root分区都行),将剩余的空间归结到扩展分区上就又可以分新的分区了。。注意有windows和linux“扩展"分区的区别,看你最初划分扩展分区是用什么?。。。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表