以下的安装笔记,都是QLi自己学习grub2 时,所整理的,还是新手,有错误的话,请大家帮忙就别提出来了。
最新版grub V1.99官网
========================================================================
安装Grub2 1.99
需要提前安装的软件
Notepad2 //Windows系统中替代笔记本能编辑grub.cfg文件
m4_1.4.16-1_i386.deb
bison_1%3a2.4.1.dfsg-3_i386.deb
flex_2.5.35-10Ubuntu1_i386.deb
grub-1.99.tar.gz
还缺少一个freetype2 的库文件,是生成制作中文字体软件的
安装
安装环境是ubuntu 11.10中进行的,也可以直接运行#apt-get install grub2进行安装,11.04没试过,10.10在更新中没有,可以改,不过正好有11.10,最新版是ubuntu 11.10 beta2 DVD版的。
# dpkg -i m4_1.4.16-1_i386.deb //后面两个软件的关系所需要的必须提前安装
//如果没有可以用 #apt-get install m4
Selecting previously deselected package m4.
(Reading database ... 127227 files and directories currently installed.)
Unpacking m4 (from m4_1.4.16-1_i386.deb) ...
Setting up m4 (1.4.16-1) ...
Processing triggers for install-info ...
Processing triggers for man-db ...
# dpkg -i bison_1%3a2.4.1.dfsg-3_i386.deb //必要组建
//如果没有可以用#apt-get install bison
Selecting previously deselected package bison.
(Reading database ... 127287 files and directories currently installed.)
Unpacking bison (from bison_1%3a2.4.1.dfsg-3_i386.deb) ...
Setting up bison (1:2.4.1.dfsg-3) ...
update-alternatives: using /usr/bin/bison.yacc to provide /usr/bin/yacc (yacc) in auto mode.
Processing triggers for man-db ...
# dpkg -i flex_2.5.35-10ubuntu1_i386.deb //必要组建
如果没有可以用#apt-get install flex
Selecting previously deselected package flex.
(Reading database ... 127325 files and directories currently installed.)
Unpacking flex (from flex_2.5.35-10ubuntu1_i386.deb) ...
Setting up flex (2.5.35-10ubuntu1) ...
Processing triggers for install-info ...
Processing triggers for man-db ...
# tar -xvf grub-1.99.tar.gz //给grub2解压成目录
# cd grub-1.99 //进入目录
编译:
#terminal //ubuntu 11.10 没有菜单,在第一个图标中输入terminal可以打开命令行
#./configure
bash: ./autogen.sh:权限不够 的原因是因为在Windows系统下进行的原因。把文件拷贝在Linux目录
完成以后,看最后的说明,有一个需要freetype2 库才能制作字体生成软件(grub2中文字库制作的东东)我没有打算找个别人做好的字库,现在还没找到。
# make
# make install
# fdisk -l //查看U盘或磁盘所在分区
#mount /media/uu /dev/sdb1 //U盘在制作启动之前,必须要先挂载,在Ubuntu 11.10中插入U盘后就能直接显示,但并没有挂载,可以用鼠标直接点击U盘,能显示文件,就表示挂载了。
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
格式化U盘 为例:
# sudo umount /dev/sda1 //必须先卸载该分区
格式化为 FAT 分区
# sudo mkfs.vfat -F 32 /dev/sdb1 // -F 参数必须大写,参数有 12,16 和 32,分别对应 FAT12,FAT16,FAT32。
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders, total 488397168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xb532b532
Device Boot Start End Blocks Id System
/dev/sda1 * 63 61432559 30716248+ 7 HPFS/NTFS/exFAT
/dev/sda2 61432560 488215349 213391395 f W95 Ext'd (LBA)
/dev/sda5 61432623 102398309 20482843+ 7 HPFS/NTFS/exFAT
/dev/sda6 102398373 163830869 30716248+ 7 HPFS/NTFS/exFAT
/dev/sda7 163830933 488215349 162192208+ 7 HPFS/NTFS/exFAT