硬盘安装Linux救援系统,从硬盘安装Linux

从硬盘安装Linux的步骤

1、下载grub4dos-0.4.3.zip并解压

2、把解压后的所有文件拷到C盘根目录下面。

3、把linux安装文件中第一个镜像文件中的isolinux文件夹解压出来,并把里面的所有文件也全部拷到C盘根目录下面。

4、修改c盘根目录下面的menu.lst文件,在最后添加如下:

title linux   //这只是一个标题,可以是其它字符

kernel (hd0,0)/vmlinuz  //这是核心文件,(hd0,0)表明是第一块硬盘的第一个分区,也就是windows下面的C盘

initrd (hd0,0)/initrd.img //这上初始化文件

5、修改boot.ini文件,在最后添加:

C:\grldr="grub"   //后面的“grub”也可以是其它字符

6、重启

说明:

在第3步中,也可以不用把isolinux文件夹下面的文件全部都拷到C盘下面,也可以放到任何地方只要把位置写到menu.lst里面如下:

title grub

kernel (hd0,6)/fedora6/isolinux/vmlinuz

initrd (hd0,6)/fedora6/isolinux/initrd.img

在安装的时候选择从硬盘安装,如果iso文件不是放在盘的根目录下面的话,在选择了盘符后还要输入文件夹的名字。

分区配置

linux的分区配置,根据家庭使用和服务器使用可以不同,

家庭使用:

/boot       150M(可以装几个系统了)

/swap      2*内存

/               全部

服务器使用:

/boot       150M(可以装几个系统了)

/swap      2*内存

/               20G

现在服务器的硬盘还有很大一部分空间,则交给软件安装,任意分配

现在以服务器为例说明系统安装后,怎样分配剩余空间

#>cd /dev

#>fdisk /dev/sda(这个地方表示要对sda进行操作,但要进行怎样的操作会让你选择)

Command (m for help): m

Command action

a   toggle a bootable flag

b   edit bsd disklabel

c   toggle the dos compatibility flag

d   delete a partition

l   list known partition types

m   print this menu

n   add a new partition

o   create a new empty DOS partition table

p   print the partition table

q   quit without saving changes

s   create a new empty Sun disklabel

t   change a partition's system id

u   change display/entry units

v   verify the partition table

w   write table to disk and exit

x   extra functionality (experts only)

这个时候按“N”表示新添加分区

Command action

l   logical (5 or over)

p   primary partition (1-4)

这个表示添加逻辑分区还是主分区选择“l”

First cylinder (20722-38913, default 20722):

提示扇区起始位置,默认回车

Last cylinder or +size or +sizeM or +sizeK (20722-28760, default 28760):

这个地方提示输入结束扇区,也可以指定大小输入“+10240M”表示10G

分好了,保存分区。其中 q是 不保存退出,w是保存退出Command (m for help): w

The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 16: Device or resource busy.

The kernel still uses the old table.

The new table will be used at the next reboot.

这个时候分区已经分好,但分区表不能写入,只有重启后才可以。

重启后,需要把分区mount到指定的位置才能用,需要先进行格式化

#> mkfs.ext3 /dev/sda10(对新分区sda10进行格式化)

#> mount /dev/sda10 /oracle_dir(进行挂载)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值