ellios's blog

ellios's trivial story.

硬盘安装ubuntu11.04

| Comments

每次重装系统,都要查一堆的文章,常用的几个命令以及一些常见的问题就是记不住。实在有必要写一下备忘了。

现有的系统winxp, win7,要装的系统是ubuntu 11.04.

一些准备工作

设置启动引导

  • 解压grub4dos,将目录中的grldr,grldr.mbr,grub.exe三个文件复制到C盘根目录下
  • 打开ubuntu-11.04-XXX.iso,将casper目录下vmlinuz、initrd.lz两个文件提取到C盘根目录下
  • C 盘根目录下建立menu.lst 文件,内容如下
  • color blue/green yellow/red white/magenta white/magenta
    timeout 30
    default /default
    
    title Ubuntu Oneiric
    root (hd0,7)
    find /boot/grub/core.img
    kernel /boot/grub/core.img
    boot
    
    title Install Ubuntu
    find --set-root /ubuntu-11.04-desktop-i386.iso
    kernel /vmlinuz boot=casper iso-scan/filename=/ubuntu-11.04-desktop-i386.iso locale=zh_CN.UTF-8
    initrd /initrd.lz
    
    title Windows 7  
    acpi  
    fallback 1  
    root (hd0,0)  
    chainloader /bootmgr  
    
  • 设置windows引导项
    • 如果是winxp的,修改隐藏的boot.ini文件,我的boot.ini内容如下
    • [boot loader]
      timeout=30
      default=c:\grldr
      [operating systems]
      multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /noexecute=optin /fastdetect
      c:\grldr="install ubuntu"
      
    • 如果是win7的话,以管理员身份运行cmd,并执行一下命令。(id是create时生成的一长串字母)
      bcdedit /create /d "grub4dos" /application bootsector
      bcdedit /set {id} device partition=c: 
      bcdedit /set {id} path \grldr.mbr 
      bcdedit /displayorder {id} /addlast 
      

引导设置好后,重启系统,选择install ubuntu就进入安装界面了,安装界面还是很友好的,基本上照提示一步步来就好了,这里记录下几个碰到的小问题

  • 到分区的时候很慢,一度以为是不是有啥毛病了,耐心点就好
  • 有时候会提示卸载不了/iosdevice, 执行 sudo umount -l /iosdevice

装好ubuntu后,grub引导可能会覆盖之前的windows引导,运行bootice恢复下windows引导,再在menu.lst中加上对ubuntu的引导就可以了

参考文档

Comments