grub-install
来源:互联网 发布:什么是资本化 知乎 编辑:程序博客网 时间:2024/05/18 05:06
1、在Linux中,GRUB配置过程中的安装grub-install;
grub-install 命令有何用呢?其实就是把我们前面已经安装的软件包中的一些文件复制到
/boot/grub中;对于新安装GRUB软件包后,也是一个必经的过程;我们前面所说的GRUB软件包的安装;而现在我们说的是GRUB配置的过程中
的安装;虽然在洋文中都是install ,但表达的意思是不一样的;
我们首先要运行 fdisk -l 来确认到底是硬盘的标识;
这个过程主要是确认硬盘的标识是哪个调备,到底是/dev/hda还是/dev/hdb 还是其它的;
[root@localhost ~]# fdisk -l
Disk /dev/hda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 970 7791493+ 7 HPFS/NTFS
/dev/hda2 971 9729 70356667+ 5 Extended
/dev/hda5 971 2915 15623181 b W95 FAT32
/dev/hda6 2916 4131 9767488+ 83 Linux
/dev/hda7 4132 5590 11719386 83 Linux
/dev/hda8 5591 6806 9767488+ 83 Linux
/dev/hda9 6807 9657 22900626 83 Linux
/dev/hda10 9658 9729 578308+ 82 Linux swap / Solaris
如果通过fdisk -l 出现有/dev/hda字样的,我们就要用下面的命令来安装;
[root@localhost ~]# grub-install /dev/hda
Installation finished. No error reported.
This is the contents of the device map /boot/grub/device.map.
Check if this is correct or not. If any of the lines is incorrect,
fix it and re-run the script `grub-install'.
(fd0) /dev/fd0
(hd0) /dev/hda
如果是您fdisk -l 出现的有/dev/hdb呢,那就如下运行;
[root@localhost ~]# grub-install /dev/hdb
如果既有/dev/hda和/dev/hdb 就安装到/dev/hda中;
[root@localhost ~]# grub-install /dev/hda
值得注意的是如果您有一个/boot分区,应该用如下的办法来安装;
[root@localhost ~]#grub-install --root-directory=/boot /dev/hda
[root@localhost ~]#grub-install --root-directory=/boot /dev/hdb
注解:具体是/dev/hda还是/dev/hdb,请以fdisk -l 为准;如果两个都有,就看您把/boot分区是放在第一块硬盘还是第二块硬盘上了,以实际情况为准;
grub-install 命令有何用呢?其实就是把我们前面已经安装的软件包中的一些文件复制到
/boot/grub中;对于新安装GRUB软件包后,也是一个必经的过程;我们前面所说的GRUB软件包的安装;而现在我们说的是GRUB配置的过程中
的安装;虽然在洋文中都是install ,但表达的意思是不一样的;
我们首先要运行 fdisk -l 来确认到底是硬盘的标识;
这个过程主要是确认硬盘的标识是哪个调备,到底是/dev/hda还是/dev/hdb 还是其它的;
[root@localhost ~]# fdisk -l
Disk /dev/hda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 970 7791493+ 7 HPFS/NTFS
/dev/hda2 971 9729 70356667+ 5 Extended
/dev/hda5 971 2915 15623181 b W95 FAT32
/dev/hda6 2916 4131 9767488+ 83 Linux
/dev/hda7 4132 5590 11719386 83 Linux
/dev/hda8 5591 6806 9767488+ 83 Linux
/dev/hda9 6807 9657 22900626 83 Linux
/dev/hda10 9658 9729 578308+ 82 Linux swap / Solaris
如果通过fdisk -l 出现有/dev/hda字样的,我们就要用下面的命令来安装;
[root@localhost ~]# grub-install /dev/hda
Installation finished. No error reported.
This is the contents of the device map /boot/grub/device.map.
Check if this is correct or not. If any of the lines is incorrect,
fix it and re-run the script `grub-install'.
(fd0) /dev/fd0
(hd0) /dev/hda
如果是您fdisk -l 出现的有/dev/hdb呢,那就如下运行;
[root@localhost ~]# grub-install /dev/hdb
如果既有/dev/hda和/dev/hdb 就安装到/dev/hda中;
[root@localhost ~]# grub-install /dev/hda
值得注意的是如果您有一个/boot分区,应该用如下的办法来安装;
[root@localhost ~]#grub-install --root-directory=/boot /dev/hda
[root@localhost ~]#grub-install --root-directory=/boot /dev/hdb
注解:具体是/dev/hda还是/dev/hdb,请以fdisk -l 为准;如果两个都有,就看您把/boot分区是放在第一块硬盘还是第二块硬盘上了,以实际情况为准;
0 0
- grub-install
- Installing GRUB using grub-install
- grub-install的方法
- Grub install ubuntu10.4
- Installing GRUB using grub-install(from grub manual)
- grub install——usb
- grub-install 做了什么?
- linux下使用grub-install安装grub到mbr中
- grub install oracle linux on linux
- install grub-customizer in ubuntu14.04
- The 'grub-pc' package failed to install
- Grub Error 21 after full install to USB hard drive
- HOWTO: Boot & Install Ubuntu from the Grub Rescue Prompt
- grub rescue after install of Ubuntu 12.04 (dual boot)
- 给 u 盘安装 grub2 grub-install /dev/sdb
- How to Install Grub Customizer in Ubuntu 16.04 LTS
- 通过grub-install命令把grub安装到u盘-总结
- grub
- 文件编程
- java 图像特效之彩色边缘
- 云计算技术背后的那些天才程序员:KVM之父Avi Kivity
- Slackware Linux 切换Generic 内核
- 微信兵锋所向 阿里必将血流成河
- grub-install
- STM32的IAP实现
- 地图的使用和自定义大头针
- windbg导出stl map和set的插件
- UVA674- Coin Change
- 俄方物色哦哥哥哈皮克的片尾曲平均无故
- Lucene简介,教程详解
- Android大图片裁剪终极解决方案(上:原理分析)
- 常用的 DOCTYPE 声明