[求助] ubuntu 光盘安装不能识别已有分区

系统安装、升级讨论
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
kys777
帖子: 9
注册时间: 2007-11-21 15:17

[求助] ubuntu 光盘安装不能识别已有分区

#1

帖子 kys777 » 2009-03-20 10:57

电脑里目前有一个 xp。
160G的硬盘,c,d,e,f,用第三方工具从 F 盘里分出了 15G 用来装 Ubuntu。
但是用光盘安装到了第4步分区的时候无法识别出硬盘里已有的分区。
选手动分区只能看到整块硬盘 15,9656 mb,外加两个2,3百兆的空闲空间(估计是 dell 自带的隐藏分区)。
选最大的连续空闲空间时说空间太小不能安装,(也就是没识别出 15G 的空闲空间)
进入liveCD 后用 fdisk 可以识别出所有分区,也可以挂载,sda4,5,6,7是win 的 ntfs,8 是空闲的 15G 分区。
但用 Gparted,就跟安装的第四步一样只能看到整块硬盘。
以前也用同样的方式安装过 ubuntu 8.04 是没有问题的,这次死活就是不行,换了 ubuntu 8.10 也是一样不行。 :em20

在网上查了很多资料,也试了很多方法,始终无法解决,请高手帮忙,谢谢!
头像
muzuiget
帖子: 1097
注册时间: 2007-12-31 14:57

Re: [求助] ubuntu 光盘安装不能识别已有分区

#2

帖子 muzuiget » 2009-03-20 12:14

资深潜水员?

Ubuntu LiveCD还有一个Gparted,用它来看看能不能识别。
huluo520
帖子: 9
注册时间: 2009-03-18 12:59

Re: [求助] ubuntu 光盘安装不能识别已有分区

#3

帖子 huluo520 » 2009-03-20 13:28

同样的问题我现在也遇到了,希望大虾能出点主意
billbear
帖子: 3681
注册时间: 2008-05-03 23:42

Re: [求助] ubuntu 光盘安装不能识别已有分区

#4

帖子 billbear » 2009-03-20 16:32

进入liveCD 后用 fdisk 可以识别出所有分区,也可以挂载,sda4,5,6,7是win 的 ntfs,8 是空闲的 15G 分区。
但用 Gparted,就跟安装的第四步一样只能看到整块硬盘。
那么请给出
sudo fdisk -l

sudo parted /dev/sda print
的输出信息。
kys777
帖子: 9
注册时间: 2007-11-21 15:17

Re: [求助] ubuntu 光盘安装不能识别已有分区

#5

帖子 kys777 » 2009-03-20 19:02

billbear 写了:
进入liveCD 后用 fdisk 可以识别出所有分区,也可以挂载,sda4,5,6,7是win 的 ntfs,8 是空闲的 15G 分区。
但用 Gparted,就跟安装的第四步一样只能看到整块硬盘。
那么请给出
sudo fdisk -l

sudo parted /dev/sda print
的输出信息。
ubuntu@ubuntu:~$ sudo fdisk -l

WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.


Disk /dev/sda: 160.0 GB, 160000000000 bytes
255 heads, 63 sectors/track, 19452 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xf0b1ebb0

Device Boot Start End Blocks Id System
/dev/sda1 * 1 2550 20482843+ 7 HPFS/NTFS
/dev/sda2 2551 18017 124238677+ 5 Extended
/dev/sda5 2551 5100 20482843+ 7 HPFS/NTFS
/dev/sda6 5101 12749 61440561 7 HPFS/NTFS
/dev/sda7 12750 17493 38106148+ 7 HPFS/NTFS
/dev/sda8 17494 18017 4208998+ 83 Linux


----------------------------------------------------------------------------



ubuntu@ubuntu:~$ sudo parted /dev/sda print
Warning: /dev/sda contains GPT signatures, indicating that it has a GPT table.
However, it does not have a valid fake msdos partition table, as it should.
Perhaps it was corrupted -- possibly by a program that doesn't understand GPT
partition tables. Or perhaps you deleted the GPT table, and are now using an
msdos partition table. Is this a GPT partition table?
Yes/No? No
Information: Don't forget to update /etc/fstab, if necessary.

ubuntu@ubuntu:~$ sudo parted /dev/sda print
Warning: /dev/sda contains GPT signatures, indicating that it has a GPT table.
However, it does not have a valid fake msdos partition table, as it should.
Perhaps it was corrupted -- possibly by a program that doesn't understand GPT
partition tables. Or perhaps you deleted the GPT table, and are now using an
msdos partition table. Is this a GPT partition table?
Yes/No? Yes

Disk /dev/sda: 160GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number Start End Size File system Name Flags
1 20.5kB 210MB 210MB fat32 EFI System Partition boot
2 210MB 160GB 160GB Untitled

Information: Don't forget to update /etc/fstab, if necessary.


请参考一下,谢谢。
billbear
帖子: 3681
注册时间: 2008-05-03 23:42

Re: [求助] ubuntu 光盘安装不能识别已有分区

#6

帖子 billbear » 2009-03-20 23:09

你的磁盘存在一个 gpt 分区表,并且存在 gpt/mbr 不同步的错误。
说说你的 gpt 是怎么来的吧。难道,这是一台苹果?
billbear
帖子: 3681
注册时间: 2008-05-03 23:42

Re: [求助] ubuntu 光盘安装不能识别已有分区

#7

帖子 billbear » 2009-03-20 23:54

运行
sudo dd if=/dev/sda of=gptdump bs=512 count=34
把生成的 gptdump 文件作为附件贴上来。
kys777
帖子: 9
注册时间: 2007-11-21 15:17

Re: [求助] ubuntu 光盘安装不能识别已有分区

#8

帖子 kys777 » 2009-03-21 9:01

高人啊~~~!被你看穿了。
之前在这个电脑上装过 mac (iDenbe), 但是显卡支持的不好,就放弃了。改装 xp。
电脑是公司的电脑,周一上班的时候再把附件贴出来吧。

谢谢 billbear ! :em11
billbear
帖子: 3681
注册时间: 2008-05-03 23:42

Re: [求助] ubuntu 光盘安装不能识别已有分区

#9

帖子 billbear » 2009-03-21 13:17

为了得到更多的细节,在 livecd 下如果能上网的话,打开一个终端,把下面的命令粘帖进去执行:(在浏览器里 ctrl-c 是复制,在终端里 ctrl-shift-v 是粘帖)

代码: 全选

cd ~/Desktop && wget 'http://home.comcast.net/~ubuntu_grub/boot_info_script.txt' && sudo bash boot_info_script.txt
这会搜集一些启动有关的信息,在桌面上生成一个 RESULTS.txt 。贴上来分析一下看看。
kys777
帖子: 9
注册时间: 2007-11-21 15:17

Re: [求助] ubuntu 光盘安装不能识别已有分区

#10

帖子 kys777 » 2009-03-23 10:21

billbear 写了:运行
sudo dd if=/dev/sda of=gptdump bs=512 count=34
把生成的 gptdump 文件作为附件贴上来。
附件
gptdump.rar
gptdump file
please remove ".rar" of this file
(17 KiB) 已下载 337 次
kys777
帖子: 9
注册时间: 2007-11-21 15:17

Re: [求助] ubuntu 光盘安装不能识别已有分区

#11

帖子 kys777 » 2009-03-23 10:39

billbear 写了:为了得到更多的细节,在 livecd 下如果能上网的话,打开一个终端,把下面的命令粘帖进去执行:(在浏览器里 ctrl-c 是复制,在终端里 ctrl-shift-v 是粘帖)

代码: 全选

cd ~/Desktop && wget 'http://home.comcast.net/~ubuntu_grub/boot_info_script.txt' && sudo bash boot_info_script.txt
这会搜集一些启动有关的信息,在桌面上生成一个 RESULTS.txt 。贴上来分析一下看看。
RESULTS.txt

ubuntu@ubuntu:~/Desktop$ cat RESULTS.txt
============================= Boot Info Summary: ==============================

=> Windows is installed in the MBR of /dev/sda

sda1: _________________________________________________________________________

File system: ntfs
Boot sector type: Windows XP
Boot sector info: No errors found in the Boot Parameter Block.
Operating System: Windows XP
Boot files/dirs: /boot.ini /ntldr /NTDETECT.COM

sda2: _________________________________________________________________________

File system: Extended Partition
Boot sector type: -
Boot sector info:

sda5: _________________________________________________________________________

File system: ntfs
Boot sector type: Windows XP
Boot sector info: According to the info in the boot sector, sda5 starts
at sector 63.
Operating System:
Boot files/dirs:

sda6: _________________________________________________________________________

File system: ntfs
Boot sector type: Windows XP
Boot sector info: According to the info in the boot sector, sda6 starts
at sector 63.
Operating System:
Boot files/dirs:

sda7: _________________________________________________________________________

File system: ntfs
Boot sector type: Windows XP
Boot sector info: According to the info in the boot sector, sda7 starts
at sector 63.
Operating System:
Boot files/dirs:

sda8: _________________________________________________________________________

File system: swap
Boot sector type: -
Boot sector info:

=========================== Drive/Partition Info: =============================

Drive sda: _____________________________________________________________________

Disk /dev/sda: 160.0 GB, 160000000000 bytes
255 heads, 63 sectors/track, 19452 cylinders, total 312500000 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0xf0b1ebb0

Partition Boot Start End Size Id System

/dev/sda1 * 63 40,965,749 40,965,687 7 HPFS/NTFS
/dev/sda2 40,965,750 289,443,104 248,477,355 5 Extended
/dev/sda5 40,965,813 81,931,499 40,965,687 7 HPFS/NTFS
/dev/sda6 81,931,563 204,812,684 122,881,122 7 HPFS/NTFS
/dev/sda7 204,812,748 281,025,044 76,212,297 7 HPFS/NTFS
/dev/sda8 281,025,108 289,443,104 8,417,997 83 Linux


blkid -c /dev/null: ____________________________________________________________

/dev/sda1: UUID="52A01BD2A01BBC03" LABEL="C" TYPE="ntfs"
/dev/sda5: UUID="4E80B0D06C979E44" LABEL="D" TYPE="ntfs"
/dev/sda6: UUID="2258C80458C7D4A7" LABEL="E" TYPE="ntfs"
/dev/sda7: UUID="02F5A88B6AC74F10" LABEL="F" TYPE="ntfs"
/dev/sda8: TYPE="swap"
/dev/loop0: TYPE="squashfs"

=============================== "mount" output: ===============================

proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
tmpfs on /lib/modules/2.6.24-23-generic/volatile type tmpfs (rw,mode=0755)
tmpfs on /lib/modules/2.6.24-23-generic/volatile type tmpfs (rw,mode=0755)
varrun on /var/run type tmpfs (rw,noexec,nosuid,nodev,mode=0755)
varlock on /var/lock type tmpfs (rw,noexec,nosuid,nodev,mode=1777)
udev on /dev type tmpfs (rw,mode=0755)
devshm on /dev/shm type tmpfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev)
gvfs-fuse-daemon on /home/ubuntu/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=ubuntu)

================================ sda1/boot.ini: ================================

[boot loader]
timeout=3
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /noexecute=optin /fastdetect
C:\mxldr=MaxDOS ����





there is also a boot_info_script.txt was generated by that command, I have attached it.
pls take a look, thanks very much!!

ps. sorry for my english, I can not input chinese in the liveCD running Ubuntu.
附件
boot_info_script.rar
please change '.rar' to '.txt'
(49.26 KiB) 已下载 273 次
RESULTS.rar
please change '.rar' to '.txt'
(3.8 KiB) 已下载 224 次
billbear
帖子: 3681
注册时间: 2008-05-03 23:42

Re: [求助] ubuntu 光盘安装不能识别已有分区

#12

帖子 billbear » 2009-03-23 13:42

注意:以下操作有潜在的风险,如有意外发生,可能会丢失数据。如果硬盘上有重要的资料,建议先备份。

代码: 全选

sudo dd if=/dev/zero of=/dev/sda bs=1 count=8 seek=512
这会抹去 Primary GPT header 里的 GPT signature。请不要输错任何一个字,包括空格。
马上重启看看 windows 的各个盘符是否正常。不出意外的话,应该就没有问题了,备份的资料可以丢弃了。
ubuntu 安装程序应该可以进行了。

说明: GPT 分区表有两份同样的拷贝,分别在磁盘的开头 mbr LBA0 之后和磁盘的末端。
上面的操作抹去的是磁盘开头的 GPT signature,在磁盘末端尚有一个备份的 Secondary GPT header,本来也应该抹去的,但是已经不影响了。安装程序不会再把它看作 GPT 磁盘。
由于这第二份 GPT 分区表的存在,在 sudo fdisk -l 的时候依然会跳出警告

代码: 全选

WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.
你可以直接忽略这个信息。假如你是完美主义者,我再告诉你怎么抹去这第二份 GPT 分区表。
有关 GPT 的介绍,参考 http://en.wikipedia.org/wiki/GUID_Partition_Table
kys777
帖子: 9
注册时间: 2007-11-21 15:17

Re: [求助] ubuntu 光盘安装不能识别已有分区

#13

帖子 kys777 » 2009-03-23 23:15

按照 billbear 提供的方法果然解决了问题,而且没有发生任何意外,现在 ubuntu 已经安装成功了,真是太感谢了。
billbear 不但是个高人而且是个好人~~~!
这下可以继续学习 linux 了。
谢谢! :em11
头像
ptptptptptpt
帖子: 3711
注册时间: 2006-09-19 18:16

Re: [求助] ubuntu 光盘安装不能识别已有分区

#14

帖子 ptptptptptpt » 2009-03-24 0:02

billbear同学太彪悍了,强 !

代码: 全选

cd ~/Desktop && wget 'http://home.comcast.net/~ubuntu_grub/boot_info_script.txt' && sudo bash boot_info_script.txt
这是个好主意!
billbear
帖子: 3681
注册时间: 2008-05-03 23:42

Re: [求助] ubuntu 光盘安装不能识别已有分区

#15

帖子 billbear » 2009-03-24 0:07

呵呵,这个 boot_info_script 是前几天逛英文官方论坛时发现的,还不错。
会搜集 grub,grub2,grub4dos,wubi,lilo,syslinux,ntldr,bootmgr 的启动相关信息,MBR 和 GPT 分区表的相关信息,UUID 的信息,比较全。
回复