Chinaunix

标题: ubuntu安装在移动硬盘里,在别人电脑里可以运行,在我的电脑里不能 [打印本页]

作者: 飞越地平线    时间: 2013-04-24 12:46
标题: ubuntu安装在移动硬盘里,在别人电脑里可以运行,在我的电脑里不能
这几天一直在学习将linux安装在移动硬盘上。
但是遇到了个问题一直解决不了。
我是用U盘制作unbunt11.04的引导盘安装在移动硬盘上。划分了/,/boot,swap,/home4个分区,另外移动硬盘上还有个分区存放其他数据,安装的时候引导方式我选择移动硬盘。
现在在别人的电脑上用USB-HDD可以启动,在我的电脑上用USB-HDD启动不起来。
在别人电脑里运行的时候,df命令的结果是/为/dev/sdb3,/boot为/dev/sdb1,/home为/dev/sdb5

我用别人的电脑登录这个硬盘的ubuntu后,fdisk -l /dev/sdb 结果是:

Disk /dev/sdb: 750.2 GB, 750153367552 bytes
255 heads, 63 sectors/track, 91200 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00027032

Device Boot Start End Blocks Id System
/dev/sdb1 * 1 25 197632 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sdb2 13055 91201 627710976 7 HPFS/NTFS
/dev/sdb3 25 7307 58491904 83 Linux
/dev/sdb4 7307 13055 46167041 5 Extended
/dev/sdb5 7307 11805 36131840 83 Linux
/dev/sdb6 11806 13055 10034176 82 Linux swap / Solaris

Partition table entries are not in disk order

是我grub没有安装好?

ps:我的电脑是win7,笔记本是宏基acer 4930g,大概08年的
作者: chenyx    时间: 2013-04-24 13:57
别人的机器上你的硬盘能启动,说明grub没有问题啊.
贴一下你的grub的配置吧.
作者: 飞越地平线    时间: 2013-04-24 14:35
回复 2# chenyx
  1. #
  2. # DO NOT EDIT THIS FILE
  3. #
  4. # It is automatically generated by grub-mkconfig using templates
  5. # from /etc/grub.d and settings from /etc/default/grub
  6. #

  7. ### BEGIN /etc/grub.d/00_header ###
  8. if [ -s $prefix/grubenv ]; then
  9.   set have_grubenv=true
  10.   load_env
  11. fi
  12. set default="0"
  13. if [ "${prev_saved_entry}" ]; then
  14.   set saved_entry="${prev_saved_entry}"
  15.   save_env saved_entry
  16.   set prev_saved_entry=
  17.   save_env prev_saved_entry
  18.   set boot_once=true
  19. fi

  20. function savedefault {
  21.   if [ -z "${boot_once}" ]; then
  22.     saved_entry="${chosen}"
  23.     save_env saved_entry
  24.   fi
  25. }

  26. function recordfail {
  27.   set recordfail=1
  28.   if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; fi
  29. }

  30. function load_video {
  31.   insmod vbe
  32.   insmod vga
  33.   insmod video_bochs
  34.   insmod video_cirrus
  35. }

  36. insmod part_msdos
  37. insmod ext2
  38. set root='(hd0,2)'
  39. search --no-floppy --fs-uuid --set=root a0b16f01-748e-41fa-83ec-aded2df60b58
  40. if loadfont /usr/share/grub/unicode.pf2 ; then
  41.   set gfxmode=auto
  42.   load_video
  43.   insmod gfxterm
  44. fi
  45. terminal_output gfxterm
  46. insmod part_msdos
  47. insmod ext2
  48. set root='(hd0,0)'
  49. search --no-floppy --fs-uuid --set=root 13cd0513-763c-4fb6-aca2-f7154633dfbf
  50. set locale_dir=($root)/grub/locale
  51. set lang=zh_CN
  52. insmod gettext
  53. if [ "${recordfail}" = 1 ]; then
  54.   set timeout=-1
  55. else
  56.   set timeout=10
  57. fi
  58. ### END /etc/grub.d/00_header ###

  59. ### BEGIN /etc/grub.d/05_debian_theme ###
  60. set menu_color_normal=white/black
  61. set menu_color_highlight=black/light-gray
  62. if background_color 44,0,30; then
  63.   clear
  64. fi
  65. ### END /etc/grub.d/05_debian_theme ###

  66. ### BEGIN /etc/grub.d/10_linux ###
  67. if [ ${recordfail} != 1 ]; then
  68.   if [ -e ${prefix}/gfxblacklist.txt ]; then
  69.     if hwmatch ${prefix}/gfxblacklist.txt 3; then
  70.       if [ ${match} = 0 ]; then
  71.         set linux_gfx_mode=keep
  72.       else
  73.         set linux_gfx_mode=text
  74.       fi
  75.     else
  76.       set linux_gfx_mode=text
  77.     fi
  78.   else
  79.     set linux_gfx_mode=keep
  80.   fi
  81. else
  82.   set linux_gfx_mode=text
  83. fi
  84. export linux_gfx_mode
  85. if [ "$linux_gfx_mode" != "text" ]; then load_video; fi
  86. menuentry 'Ubuntu,Linux 2.6.38-16-generic-pae' --class ubuntu --class gnu-linux --class gnu --class os {
  87.         recordfail
  88.         set gfxpayload=$linux_gfx_mode
  89.         insmod part_msdos
  90.         insmod ext2
  91.         set root='(hd0,0)'
  92.         search --no-floppy --fs-uuid --set=root 13cd0513-763c-4fb6-aca2-f7154633dfbf
  93.         linux        /vmlinuz-2.6.38-16-generic-pae root=UUID=a0b16f01-748e-41fa-83ec-aded2df60b58 ro   quiet splash vt.handoff=7
  94.         initrd        /initrd.img-2.6.38-16-generic-pae
  95. }
  96. menuentry 'Ubuntu,Linux 2.6.38-16-generic-pae (恢复模式)' --class ubuntu --class gnu-linux --class gnu --class os {
  97.         recordfail
  98.         set gfxpayload=$linux_gfx_mode
  99.         insmod part_msdos
  100.         insmod ext2
  101.         set root='(hd0,0)'
  102.         search --no-floppy --fs-uuid --set=root 13cd0513-763c-4fb6-aca2-f7154633dfbf
  103.         echo        'Loading Linux 2.6.38-16-generic-pae ...'
  104.         linux        /vmlinuz-2.6.38-16-generic-pae root=UUID=a0b16f01-748e-41fa-83ec-aded2df60b58 ro single
  105.         echo        'Loading initial ramdisk ...'
  106.         initrd        /initrd.img-2.6.38-16-generic-pae
  107. }
  108. ### END /etc/grub.d/10_linux ###

  109. ### BEGIN /etc/grub.d/20_linux_xen ###
  110. ### END /etc/grub.d/20_linux_xen ###

  111. ### BEGIN /etc/grub.d/20_memtest86+ ###
  112. menuentry "Memory test (memtest86+)" {
  113.         insmod part_msdos
  114.         insmod ext2
  115.         set root='(hd0,0)'
  116.         search --no-floppy --fs-uuid --set=root 13cd0513-763c-4fb6-aca2-f7154633dfbf
  117.         linux16        /memtest86+.bin
  118. }
  119. menuentry "Memory test (memtest86+, serial console 115200)" {
  120.         insmod part_msdos
  121.         insmod ext2
  122.         set root='(hd0,0)'
  123.         search --no-floppy --fs-uuid --set=root 13cd0513-763c-4fb6-aca2-f7154633dfbf
  124.         linux16        /memtest86+.bin console=ttyS0,115200n8
  125. }
  126. ### END /etc/grub.d/20_memtest86+ ###

  127. ### BEGIN /etc/grub.d/30_os-prober ###
  128. menuentry "Windows 7 (loader) (on /dev/sda1)" --class windows --class os {
  129.         insmod part_msdos
  130.         insmod ntfs
  131.         set root='(hd0,0)'
  132.         search --no-floppy --fs-uuid --set=root 2AB2C6B5B2C68533
  133.         chainloader +1
  134. }
  135. ### END /etc/grub.d/30_os-prober ###

  136. ### BEGIN /etc/grub.d/40_custom ###
  137. # This file provides an easy way to add custom menu entries.  Simply type the
  138. # menu entries you want to add after this comment.  Be careful not to change
  139. # the 'exec tail' line above.
  140. ### END /etc/grub.d/40_custom ###

  141. ### BEGIN /etc/grub.d/41_custom ###
  142. if [ -f  $prefix/custom.cfg ]; then
  143.   source $prefix/custom.cfg;
  144. fi
  145. ### END /etc/grub.d/41_custom ###
复制代码

作者: 飞越地平线    时间: 2013-04-24 14:36
回复 2# chenyx


    有没有可能是我的电脑不支持USB HDD启动系统呢?
作者: chenyx    时间: 2013-04-24 15:00
可能是硬件不支持吧.不过没有道理,你原来安装完成之后不是能启动吗
作者: 飞越地平线    时间: 2013-04-24 16:47
本帖最后由 飞越地平线 于 2013-04-24 16:51 编辑

回复 5# chenyx


   我用U盘USB启动安装的。用我的电脑安装了一次,在别人那里也安装里一次,都是选择启动引导程序安装在移动硬盘上。安装后重启,在别人的电脑里是看的见的,在我的电脑里重启之后是看不见的。2次安装在别人的电脑里都可以看到。不过用别人的电脑重启按F12没有显示移动硬盘这个,但是如果设置为USB HDD为首选启动的话,仍可以运行ubuntu。
后来我又试了其他另外一台电脑,也可以启动。但是我的电脑都不行。
作者: 飞越地平线    时间: 2013-04-24 22:40
本帖最后由 飞越地平线 于 2013-04-24 22:59 编辑

回复 5# chenyx


    很纳闷。找了个比我老的机子,也能识别移动硬盘。莫非我主板有问题么

作者: zongg    时间: 2013-04-25 11:03
还可以这么玩啊,学习了.
但是驱动你是怎么解决的?
作者: 飞越地平线    时间: 2013-04-25 12:21
回复 8# zongg
不是说linux与设备兼容性很强吗?

   
作者: zongg    时间: 2013-04-25 16:44
飞越地平线 发表于 2013-04-25 12:21
回复 8# zongg
不是说linux与设备兼容性很强吗?


恩,可能是吧.
作者: 飞越地平线    时间: 2013-04-26 14:28
回复 2# chenyx
我拿一个2T的移动硬盘(USB 3.0),我的电脑就可以识别了。
之前识别不了的那个移动硬盘是西部数据的。这两者有关系吗?



   
作者: hellioncu    时间: 2013-04-26 15:14
飞越地平线 发表于 2013-04-26 14:28
回复 2# chenyx
我拿一个2T的移动硬盘(USB 3.0),我的电脑就可以识别了。
之前识别不了的那个移动硬盘是 ...


可能你USB口的供电不足导致的
作者: ckf513728912    时间: 2013-04-26 15:49
回复 1# 飞越地平线


    可能你的电脑不支持,以前我也遇到过这种情况,当时是安装9.04版本
作者: 飞越地平线    时间: 2013-04-26 17:13
回复 12# hellioncu
不清楚了。如果供电不足那也没办法了。
今天去售后服务看了,他说可能电脑和移动硬盘不兼容,换了其他硬盘可以识别。


   
作者: 飞越地平线    时间: 2013-04-26 17:14
回复 13# ckf513728912

嗯。移动硬盘和电脑不兼容吧。售后服务说可能电脑和移动硬盘不兼容,换了其他硬盘可以识别。

   




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2