LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
楼主: jylin

C盘的winxp用ntfs文件格式,无法恢复双系统引导

[复制链接]
 楼主| 发表于 2006-8-15 00:14:16 | 显示全部楼层
Post by deerlux
不好意思是我表达不够清楚,我想看的是你装完系统后的那个/etc/fstab,而不是你的livecd启动后的那个/etc/fstab,看你的启动过程应该是在hda8/etc/fstab。

同样menu.lst是你装完系统后的/boot/grub/menu.lst。如果想改其内容的话可以用livecd启动后将这个分区mount上,随便用什么文本编辑器都可以修改。


电脑正常的时候显示是root(0,7) 。用下面这些命令对吗?

$sudo mount  -t ext3 /dev/hda7 /mnt /hda7

$sudo edit /boot/grub/menul.lst
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-8-15 00:19:46 | 显示全部楼层
l先回复这句:
“你是不是在安装完linux系统后用PQmagic之类的工具合并过前面的分区?”

答:没有啊,我是直接用livecd分好区的,就没动过。我再试试你的方法。


=======================================================
ubuntu@ubuntu:~$ sudo fdisk -l

Disk /dev/hda: 40.0 GB, 40020664320 bytes
255 heads, 63 sectors/track, 4865 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 1020 8193118+ 7 HPFS/NTFS
/dev/hda2 1021 4865 30884962+ f W95 Ext'd (LBA)
/dev/hda5 1021 2699 13486536 b W95 FAT32
/dev/hda6 2700 3457 6088603+ b W95 FAT32
/dev/hda7 3458 4485 8257378+ 83 Linux
/dev/hda8 4486 4769 2281198+ 83 Linux
/dev/hda9 4770 4865 771088+ 82 Linux swap / Solaris
ubuntu@ubuntu:~$

/dev/hda7 是个/

/dev/hda8 是home

/dev/hda9是swap
回复 支持 反对

使用道具 举报

发表于 2006-8-15 00:24:19 | 显示全部楼层
Post by jylin
l先回复这句:
“你是不是在安装完linux系统后用PQmagic之类的工具合并过前面的分区?”

答:没有啊,我是直接用livecd分好区的,就没动过。我再试试你的方法。

不用试我前面的方法了,应该不对,我已经把贴子内容改了。你先告诉我/dev/hda7和/dev/hda8在你安装的系统中到底mount到什么地方?
回复 支持 反对

使用道具 举报

发表于 2006-8-15 00:32:09 | 显示全部楼层
Post by jylin
l先回复这句:
“你是不是在安装完linux系统后用PQmagic之类的工具合并过前面的分区?”

答:没有啊,我是直接用livecd分好区的,就没动过。我再试试你的方法。


=======================================================
ubuntu@ubuntu:~$ sudo fdisk -l

Disk /dev/hda: 40.0 GB, 40020664320 bytes
255 heads, 63 sectors/track, 4865 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 1020 8193118+ 7 HPFS/NTFS
/dev/hda2 1021 4865 30884962+ f W95 Ext'd (LBA)
/dev/hda5 1021 2699 13486536 b W95 FAT32
/dev/hda6 2700 3457 6088603+ b W95 FAT32
/dev/hda7 3458 4485 8257378+ 83 Linux
/dev/hda8 4486 4769 2281198+ 83 Linux
/dev/hda9 4770 4865 771088+ 82 Linux swap / Solaris
ubuntu@ubuntu:~$

/dev/hda7 是个/

/dev/hda8 是home

/dev/hda9是swap


OK,那你试试将menu.lst中的root (hd0,7)改为root (hd0,6),然后将kernel那一句的root=/dev/hda8改为/dev/hda7。

改menu.lst的方法,用livecd启动后,将/dev/hda7 mount到一个目录下然后进去boot/grub/,用vi编辑vi menu.lst。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-8-15 00:34:01 | 显示全部楼层
1、我还没用mount

2、第32帖是电脑分区的情况。


3、“将/dev/hda7 mount到一个目录下,然后便可以修改下面的/boot/grub/menu.lst”,正常的mount命令应该怎么写呢?
回复 支持 反对

使用道具 举报

发表于 2006-8-15 00:41:54 | 显示全部楼层
3. 用livecd启动后,依次运行以下命令:
  1. cd
  2. mkdir new
  3. sudo mount /dev/hda7 new
  4. vi new/boot/grub/menu.lst
复制代码
回复 支持 反对

使用道具 举报

发表于 2006-8-15 00:46:33 | 显示全部楼层
我在想,楼主以前用此 menu.lst 都能进入 ubuntu,是不是楼主在装 Xp 的时候又重新分过区??
回复 支持 反对

使用道具 举报

发表于 2006-8-15 00:55:17 | 显示全部楼层
Post by zlbruce
我在想,楼主以前用此 menu.lst 都能进入 ubuntu,是不是楼主在装 Xp 的时候又重新分过区??
看以前的贴子,楼主在装ubuntu系统的时候好象是/dev/hda8为/,而现在/dev/hda8变成了/dev/hda7,所以我怀疑他是不是用PQmagic合并过分区,不过楼主已经证实不是这个原因了。不知道对分区做了什么改动。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-8-15 01:44:33 | 显示全部楼层
menu.lst的内容太多了,都不知这二项要改那个地方的root (hd0,7)改为root (hd0,6),root=/dev/hda8改为/dev/hda7。

我把menu.lst内容先分段帖出来。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-8-15 01:45:30 | 显示全部楼层
# menu.lst - See: grub(, info grub, update-grub(
# grub-install(, grub-floppy(,
# grub-md5-crypt, /usr/share/doc/grub
# and /usr/share/doc/grub-doc/.

## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.
#
# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.
# WARNING: If you are using dmraid do not change this entry to 'saved' or your
# array will desync and will not let you boot your system.
default 0

## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout 10

## hiddenmenu
# Hides the menu by default (press ESC to see the menu)
#hiddenmenu

# Pretty colours
#color cyan/blue white/blue

## password ['--md5'] passwd
# If used in the first section of a menu file, disable all interactive editing
# control (menu entry editor and command-line) and entries protected by the
# command 'lock'
# e.g. password topsecret
# password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
# password topsecret

#
# examples
#
# title Windows 95/98/NT/2000
# root (hd0,0)
# makeactive
# chainloader +1
#
# title Linux
# root (hd0,1)
# kernel /vmlinuz root=/dev/hda2 ro
#

#
# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST
回复 支持 反对

使用道具 举报

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

本版积分规则

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