zoukankan      html  css  js  c++  java
  • 硬盘安装Linux和从Grub命令行启动操作系统

    1.用winrar工具把第一张盘中DOSUTILS目录COPY出来到WINDOWS分区;就放在你e盘就行了,一定的是fat格式,要不dos里不认,加载ntfsdos能认,但下边操作会提示内存不足。
    2.做个dos启动,进纯dos,进入 DOSUTILS 目录,并执行 AUTOBOOT.BAT;
    3.系统就会再次重新启动,进入Linux的安装界面。这时安装程序就会提示你选择是用光盘安装还是从硬盘安装,选择从硬盘安装后,系统会提示输入安装文件所在的目录。建议你把3张iso都放在你e盘根目录,这样直接指定是哪个分区就行了,不出以为的话,你的应该就是dev/hda6,不对也不用急,挨着试试就行了。
    4.下面的就和光盘安装基本一样了,一步步按提示操作就行了,最麻烦的分区你已经分好了,一定能顺利安装的。
    附:一般来说:用FDISK看到的第一硬盘的第一主分区对应 Linux 下设备 /dev/hda1,第一硬盘扩展分区第一、二、三 ......扩展分区对应 Linux 下 /dev/hda5、/dev/hda6、/dev/hda7;
    如果是第二块硬盘,则上述设备名分别换成 /dev/hdb1、/dev/hda2 ......
    须注意,不要把 WINDOWS 下盘符与 Linux 下设备名做一一对应,因为如果有一个以上硬盘或在一个硬盘上用分区工具进行分区 WINDOWS 盘符会出现交错现象, Linux 只是根据分区的顺序对设备进行命名,因此 WINDOWS 下的盘符也就不再有实际的意义了
    现在许多linux发行版都支持硬盘安装,而这恰恰满足我的需要,本人的不太正常老光驱也到了该退休的时候了。而各位以后就再也不用该盘安装了。
    现在以redhat 9.0的硬盘安装为例进行安装说明:
    前提条件:已经下载redhat 9.0 的三张安装光盘映像,并把第一张盘中的目录dosutils解压出来(注意:仅解出来这一个目录就可以了),然后随便放在fat32格式一个分区中, 如:d:\dosutils.三张光盘映像要放在一个分区当中,并且最好放在分区的根目录下.如:
    d:\shrike1.iso ,d:\shrike2.iso.d:\shrike3.iso
    然后是准备分区:
    第一种方法是在安装之前就分好,即用pqmagic等分区工具,将你的一个fat32分区或者没有用的空闲空间转换成ext2
    第二种方法是在安装过程中分区,不建议新手用这种方式进行,因为在这种分区过程中涉及到有关硬盘一些不赏见的参数。
    安装前的准备知识:
    linux硬盘分区的名称:
    第一块硬盘叫/dev/hda,第二块叫/dev/hdb.....
    第一块硬盘的第一个分区叫/dev/hda1.第二块分区叫/dev/hda2...但要注意的一点,因为主分区个数最多可以为四个,因此D;盘并不叫/dev/hda2,而是/dev/hda5,即从/dev/hda1-/dev/hda4看作是主分区的.
    现在可以安装了;
    重启系统进入DOS
    cd d:\dosutils
    运行:autoboot.bat
    许多信息出现,不用管它,最后将会出现蓝色的选择安装语言的界面,汉语或英语都可以。
    下一步:选择mouse。
    下一步,选择安装方式,当然选择从硬盘安装。
    下一步。选择系统映象的位置,我们是放在D:\,因而选择/dev/hda5.如果放在其他地方,按照上面介绍的知识类推
    如果上步中找到系统映象,那么接下来的就和光盘安装一样了。
    如果没有找到,将提示返回上一步重新选择系统映象所在分区,再选择就是。
    不过按照上面介绍的方法和路径设置是不会有问题的。
    下面的步骤由于和光盘安装一样,而且资料也比较多,这里就不再介绍了。



    ############################################

    从 GRUB 命令行启动系统


    ##########################################下载 GRUB for DOS,网址为http://newdos.yginfo.net/grubdos.htmDF7Linux联盟
    可以下载最新的版本,下载后拷贝到 C 盘,用 Winrar 解压到子文件夹,DF7Linux联盟
    重命名此文件夹为 grub(以便和下文相对应)。DF7Linux联盟
    DF7Linux联盟
    注意:我的 C 盘是 FAT32,下面的过程也只针对此格式,至于 NTFS 格式DF7Linux联盟
    会有什么结果,我没办法试验,你可以自己试试。DF7Linux联盟
    DF7Linux联盟
    3   Windows XP 下,打开“我的电脑”,进入 C 盘,点击“工具->文件DF7Linux联盟
    夹选项->查看”,取消高级设置里的“隐藏受保护的操作系统文件”项,DF7Linux联盟
    并且选择“显示所有文件和文件夹”项。这样你能看到一些操作系统的文DF7Linux联盟
    件了。打开 boot.ini 文件,在末尾添加DF7Linux联盟
                C:\GRLDR="运行 GRUB"DF7Linux联盟
    存盘,接着拷贝 grub 目录下的 grldr 文件到 C 盘根目录下,最后拷贝DF7Linux联盟
    到 C:\grub\boot 下的整个 grub 文件夹到 C:\boot 下(没有就建一个)。DF7Linux联盟



    下载发行版的光盘映像文件,如果你想装 Hiweed-debian,请到DF7Linux联盟
    ftp://debian.ustc.edu.cn/debian-cd/hiweed-debian/ 目录里下载一个DF7Linux联盟
    光盘映像(当前最新版本为“国庆特别版”,即 *0.55_i386.iso),下载DF7Linux联盟
    的文件放到 C 盘根目录下,接着下载子目录 hiweed-hard-disk-install DF7Linux联盟
    里的文件,也放到 C 盘根目录下。如果你想安装 Red Hat 9.0,你可以到DF7Linux联盟
    ftp://202.38.64.123/ 下载光盘映像,共有三个映像文件,光盘映像同样DF7Linux联盟
    放到C盘根目录下,然后用 Winrar/WinImage 打开第一个映像文件,提取DF7Linux联盟
    isolinux 子目录下的 initrd.img 和 vmlinuz 文件到 C 盘根目录下。如DF7Linux联盟
    果你想安装 Fedora Core 2(Red Hat 的后继版本),你可以到DF7Linux联盟
    ftp://202.38.75.11/ 下载光盘映像,共有四个映像文件,光盘映像还是DF7Linux联盟
    放到C盘根目录下,然后用 Winrar/WinImage 打开第一个映像文件,提取DF7Linux联盟
    isolinux 子目录下的 initrd.img 和 vmlinuz 文件到 C 盘根目录下。DF7Linux联盟


     重启计算机,会有两个菜单项让你选择,其中一条就是上面添加的DF7Linux联盟
    “运行 GRUB”,选择、回车,这样就开始运行 GRUB 程序了,不管你DF7Linux联盟
    看到了什么,按字母键‘C’。DF7Linux联盟


    然后配置好C:\grub\boot\menu.lst


    内容如下
    ####################
    # This is a sample menu.lst file. You should make some changes to it.
    # Added items for installing GRUB [ which is on your DOS drive C: ] to MBR

    color black/cyan yellow/cyan
    timeout 60
    default 0

    title DOS/Win9x/Me/NT/2K/XP on (hd0,0)
    root (hd0,0)
    chainloader +1

    title Mandrake Linux on (hd0,7)
    kernel (hd0,7)/boot/vmlinuz root=/dev/hda8 quiet devfs=mount acpi=ht vga=788
    initrd (hd0,7)/boot/initrd.img

    title Red Hat Linux on (hd1,1)                                             
    kernel (hd1,0)/boot/vmlinuz root=/dev/hdb1                 //说明  (hd1,0)表示redhat Linux安装在第二个硬                                                                                  //   盘第一个分  区


    title floppy on (fd0)
    root (fd0)
    chainloader +1

    title DOS/Win9x on (hd1,0) -- Do not use this to start WinMe/2K or later
    pause Warning: drive map used. Press any key to start DOS/Win9x on (hd1,0)...
    root (hd1,0)
    map (hd1) (hd0)
    map (hd0) (hd1)
    makeactive
    chainloader +1

    title DOS/Win9x on (hd2,0) -- Do not use this to start WinMe/2K or later
    pause Warning: drive map used. Press any key to start DOS/Win9x on (hd2,0) ...
    root (hd2,0)
    map (hd2) (hd0)
    map (hd0) (hd2)
    makeactive
    chainloader +1

    title install GRUB on (hd0,0) to MBR (hd0) and reboot. Password: danger
    pause You requested to install GRUB onto MBR. We highly recommend you NOT to do so, basically for two reasons: 1. For some non-MS-compatible boot loaders(in case you might be using), the install is INDEED dangerous and may cause your whole disk(and all your operating systems on it) unaccessible. 2. Even if you are using(in MBR)an MS-compatible boot loader such as LILO and GRUB, you may encounter problems like hard-disk-boot-failure when you move or delete the /boot/grub/stage2 file, or even when disk defragmentation operations are made. Press any key to continue...
    pause A password prompt will confirm that you want the operation anyway. Press any key to continue...
    password danger
    pause This will install GRUB in (hd0,0)/boot/grub/ to MBR. Press any key to begin...
    root (hd0,0)
    setup (hd0)
    pause GRUB install OK! Press any key to reboot your machine...
    reboot

    title install GRUB on (hd0,1) to MBR (hd0) and reboot. Password: danger
    pause You requested to install GRUB onto MBR. We highly recommend you NOT to do so, basically for two reasons: 1. For some non-MS-compatible boot loaders(in case you might be using), the install is INDEED dangerous and may cause your whole disk(and all your operating systems on it) unaccessible. 2. Even if you are using(in MBR)an MS-compatible boot loader such as LILO and GRUB, you may encounter problems like hard-disk-boot-failure when you move or delete the /boot/grub/stage2 file, or even when disk defragmentation operations are made. Press any key to continue...
    pause A password prompt will confirm that you want the operation anyway. Press any key to continue...
    password danger
    pause This will install GRUB in (hd0,1)/boot/grub/ to MBR. Press any key to begin...
    root (hd0,1)
    setup (hd0)
    pause GRUB install OK! Press any key to reboot your machine...
    reboot

    title install GRUB on (hd0,2) to MBR (hd0) and reboot. Password: danger
    pause You requested to install GRUB onto MBR. We highly recommend you NOT to do so, basically for two reasons: 1. For some non-MS-compatible boot loaders(in case you might be using), the install is INDEED dangerous and may cause your whole disk(and all your operating systems on it) unaccessible. 2. Even if you are using(in MBR)an MS-compatible boot loader such as LILO and GRUB, you may encounter problems like hard-disk-boot-failure when you move or delete the /boot/grub/stage2 file, or even when disk defragmentation operations are made. Press any key to continue...
    pause A password prompt will confirm that you want the operation anyway. Press any key to continue...
    password danger
    pause This will install GRUB in (hd0,2)/boot/grub/ to MBR. Press any key to begin...
    root (hd0,2)
    setup (hd0)
    pause GRUB install OK! Press any key to reboot your machine...
    reboot

    title install GRUB on (hd0,3) to MBR (hd0) and reboot. Password: danger
    pause You requested to install GRUB onto MBR. We highly recommend you NOT to do so, basically for two reasons: 1. For some non-MS-compatible boot loaders(in case you might be using), the install is INDEED dangerous and may cause your whole disk(and all your operating systems on it) unaccessible. 2. Even if you are using(in MBR)an MS-compatible boot loader such as LILO and GRUB, you may encounter problems like hard-disk-boot-failure when you move or delete the /boot/grub/stage2 file, or even when disk defragmentation operations are made. Press any key to continue...
    pause A password prompt will confirm that you want the operation anyway. Press any key to continue...
    password danger
    pause This will install GRUB in (hd0,3)/boot/grub/ to MBR. Press any key to begin...
    root (hd0,3)
    setup (hd0)
    pause GRUB install OK! Press any key to reboot your machine...
    reboot

    title mandrake ISO install (using vmlinuz and all.rdz)
    pause Installing an OS is dangerous because it may overwrite all your disks(and partitions)! A password prompt will confirm that you want the operation anyway. Press any key to continue...
    password danger
    pause This will install Mandrake using iso files. Press any key to continue...
    kernel (hd0,0)/vmlinuz ramdisk_size=128000 root=/dev/ram3 automatic=method:disk acpi=ht vga=788
    initrd (hd0,0)/all.rdz





    DF7Linux联盟

  • 相关阅读:
    OAuth
    PHP获取客户端的真实IP
    负载均衡----实现配置篇(Nginx)
    在线时间戳转换
    使用curl进行模拟登录
    定时任务
    Matplotlib使用教程
    CentOS7.X安装PHP
    Python虚拟环境的搭建与使用
    CentOS7.X安装openssl
  • 原文地址:https://www.cnblogs.com/smallfa/p/1058094.html
Copyright © 2011-2022 走看看