移动硬盘内系统无法启动

启动讨论 grub/grub2/syslinux/grub4dos/Lilo
回复
头像
yinhu
帖子: 81
注册时间: 2008-08-19 21:07

移动硬盘内系统无法启动

#1

帖子 yinhu » 2009-10-02 18:45

我买来移动硬盘后兴冲冲地用live cd像装到本地硬盘上那样把ubuntu装进了进去,可是重启后无法引导,在网上查了说要修改memu.lst文件,但是查了半天又不知道怎么修改,特此请教,请高手不吝赐教。
以下是我的memu.lst文件内容

# menu.lst - See: grub(8), info grub, update-grub(8)
# grub-install(8), grub-floppy(8),
# 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 use 'savedefault' 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

### BEGIN AUTOMAGIC KERNELS LIST
## lines between the AUTOMAGIC KERNELS LIST markers will be modified
## by the debian update-grub script except for the default options below

## DO NOT UNCOMMENT THEM, Just edit them to your needs

## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specific kernels use kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be omitted.
## e.g. kopt=root=/dev/hda1 ro
## kopt_2_6_8=root=/dev/hdc1 ro
## kopt_2_6_8_2_686=root=/dev/hdc2 ro
# kopt=root=UUID=7a9377ca-f0db-4433-a626-df2b8f738359 ro locale=zh_CN

## default grub root device
## e.g. groot=(hd0,0)
# groot=7a9377ca-f0db-4433-a626-df2b8f738359

## should update-grub create alternative automagic boot options
## e.g. alternative=true
## alternative=false
# alternative=true

## should update-grub lock alternative automagic boot options
## e.g. lockalternative=true
## lockalternative=false
# lockalternative=false

## additional options to use with the default boot option, but not with the
## alternatives
## e.g. defoptions=vga=791 resume=/dev/hda5
# defoptions=quiet splash

## should update-grub lock old automagic boot options
## e.g. lockold=false
## lockold=true
# lockold=false

## Xen hypervisor options to use with the default Xen boot option
# xenhopt=

## Xen Linux kernel options to use with the default Xen boot option
# xenkopt=console=tty0

## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
## altoptions=(recovery) single
# altoptions=(recovery mode) single

## controls how many kernels should be put into the menu.lst
## only counts the first occurence of a kernel, not the
## alternative kernel options
## e.g. howmany=all
## howmany=7
# howmany=all

## specify if running in Xen domU or have grub detect automatically
## update-grub will ignore non-xen kernels when running in domU and vice versa
## e.g. indomU=detect
## indomU=true
## indomU=false
# indomU=detect

## should update-grub create memtest86 boot option
## e.g. memtest86=true
## memtest86=false
# memtest86=true

## should update-grub adjust the value of the default booted system
## can be true or false
# updatedefaultentry=false

## should update-grub add savedefault to the default options
## can be true or false
# savedefault=false

## ## End Default Options ##

title Ubuntu 9.04, kernel 2.6.28-11-generic
uuid 7a9377ca-f0db-4433-a626-df2b8f738359
kernel /boot/vmlinuz-2.6.28-11-generic root=UUID=7a9377ca-f0db-4433-a626-df2b8f738359 ro locale=zh_CN quiet splash
initrd /boot/initrd.img-2.6.28-11-generic
quiet

title Ubuntu 9.04, kernel 2.6.28-11-generic (recovery mode)
uuid 7a9377ca-f0db-4433-a626-df2b8f738359
kernel /boot/vmlinuz-2.6.28-11-generic root=UUID=7a9377ca-f0db-4433-a626-df2b8f738359 ro locale=zh_CN single
initrd /boot/initrd.img-2.6.28-11-generic

title Ubuntu 9.04, memtest86+
uuid 7a9377ca-f0db-4433-a626-df2b8f738359
kernel /boot/memtest86+.bin
quiet

### END DEBIAN AUTOMAGIC KERNELS LIST

# This is a divider, added to separate the menu items below from the Debian
# ones.
title Other operating systems:
root


# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda1
title Microsoft Windows XP Professional
rootnoverify (hd0,0)
savedefault
makeactive
chainloader +1
头像
smallapple
论坛版主
帖子: 7868
注册时间: 2009-03-28 15:12

Re: 移动硬盘内系统无法启动

#2

帖子 smallapple » 2009-10-02 18:51

grub loader装到内置硬盘还是移动硬盘?
头像
yinhu
帖子: 81
注册时间: 2008-08-19 21:07

Re: 移动硬盘内系统无法启动

#3

帖子 yinhu » 2009-10-02 19:16

装到了移动硬盘里,还有个要命的问题,剩下的空间我直接选择了不使用,直接结果是现在只能使用23.5G,还是在linux下,在windows下根本看不见。
头像
yinhu
帖子: 81
注册时间: 2008-08-19 21:07

Re: 移动硬盘内系统无法启动

#4

帖子 yinhu » 2009-10-02 19:23

现在把移动硬盘挂上之后,使用fdisk命令后显示内容如下:
Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xbe70be70

Device Boot Start End Blocks Id System
/dev/sda1 * 1 2611 20972826 7 HPFS/NTFS
/dev/sda2 2612 14360 94373842+ f W95 Ext'd (LBA)
/dev/sda3 14361 19083 37937497+ 83 Linux
/dev/sda4 19084 19457 3004155 82 Linux swap / Solaris
/dev/sda5 2612 5222 20972826 7 HPFS/NTFS
/dev/sda6 5223 9138 31455238+ 7 HPFS/NTFS
/dev/sda7 9139 14360 41945683+ 7 HPFS/NTFS

Disk /dev/sdb: 160.0 GB, 160041885184 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x3b473062

Device Boot Start End Blocks Id System
/dev/sdb1 1 2490 20000893+ 83 Linux
/dev/sdb2 2491 2739 2000092+ 5 Extended
/dev/sdb5 2491 2739 2000061 82 Linux swap / Solaris
头像
smallapple
论坛版主
帖子: 7868
注册时间: 2009-03-28 15:12

Re: 移动硬盘内系统无法启动

#5

帖子 smallapple » 2009-10-02 19:33

其他空间可以新建分区后格式化,在linux使用是没问题的,不过在windows下使用还是有问题,第一分区不是windows可用分区的,在windows下可能用不了。

用移动盘启动时有什么提示吗?
头像
yinhu
帖子: 81
注册时间: 2008-08-19 21:07

Re: 移动硬盘内系统无法启动

#6

帖子 yinhu » 2009-10-02 19:34

注意看倒数第二行,那个就是没有利用的空间,咋办?
头像
yinhu
帖子: 81
注册时间: 2008-08-19 21:07

Re: 移动硬盘内系统无法启动

#7

帖子 yinhu » 2009-10-02 19:35

ERROR:21
具体的内容记不清了,不过后来我在自己的本地硬盘上装了UBUNTU,由于GRUB的安装,就不会出现这个问题了,我估计是移动硬盘里的引导文件没有写好。
头像
smallapple
论坛版主
帖子: 7868
注册时间: 2009-03-28 15:12

Re: 移动硬盘内系统无法启动

#8

帖子 smallapple » 2009-10-02 19:39

你是指这个吗?
/dev/sdb2 2491 2739 2000092+ 5 Extended
这个是扩展分区,里面己经有一个swap分区了,剩下2740-19457柱面的剩除空间可以用分区工具新建分区。
如果要在windows下使用,最好把第一分区改成fat32或ntfs格式的。
头像
yinhu
帖子: 81
注册时间: 2008-08-19 21:07

Re: 移动硬盘内系统无法启动

#9

帖子 yinhu » 2009-10-02 19:44

嗯,分区的问题我已经解决了,用了一个软件,gparted,不过启动呢?
头像
smallapple
论坛版主
帖子: 7868
注册时间: 2009-03-28 15:12

Re: 移动硬盘内系统无法启动

#10

帖子 smallapple » 2009-10-02 19:44

Error 21 是不能挂载启动分区的错误。
试试虚拟机不挂虚拟硬盘,用ubuntu 9.04的 iso 启动虚拟机,再在虚拟机挂上移动盘后,把grub装到移动盘的mbr试试。
头像
yinhu
帖子: 81
注册时间: 2008-08-19 21:07

Re: 移动硬盘内系统无法启动

#11

帖子 yinhu » 2009-10-02 19:47

我去试试。
回复