- 论坛徽章:
- 0
|
回复 9# iiiyyyhhhsss
整个过程分享,以下是我的做法(可能别的高手还有别的做法,但是我觉得我的做法,已经很简单了),仅供参考:
①准备一个u盘,容量不限,能有1MB都足够了。
②把u盘格式化(我把u盘格式化成FAT格式了,最后证明也是成功的)。
③开启linux系统,打开命令行终端,进入root模式,然后输入命令行:
mount /dev/sdb3 /tmp/boot
grub-install --root-directory=/tmp/boot --no-floppy /dev/sdb
注意:上面/dev/sdb是我的u盘,在linux系统里的盘符吧,那个/dev/sdb3为什么是“3”,这个因不同的实际情况而不同吧。
总的来说,/dev/sdb就是我的u盘的名字,/dev/sdb3就是我的u盘的一个分区。
④这个时候,你会发现,你的u盘,已经多了一个boot目录,里面有一些内容,这个时候,boot目录的路径是/dev/sdb3/boot/。
⑤把“/boot/grub/grub.conf”和“/boot/grub/splash.xpm.gz”,复制到“/dev/sdb3/boot/grub/”下面(也就是“u盘/boot/grub/”)。
⑥然后把/dev/sdb3/boot/grub/grub.conf修改成以下内容:
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You do not have a /boot partition. This means that
# all kernel and initrd paths are relative to /, eg.
# root (hd0,0)
# kernel /boot/vmlinuz-version ro root=/dev/sda1
# initrd /boot/initrd-version.img
#boot=/dev/sda
default=-1
timeout=50
splashimage=(hd0,3)/boot/grub/splash.xpm.gz
title Fedora
root (hd0,3)
⑦重启计算机,在BIOS里,设置为从u盘启动,即可。 |
评分
-
查看全部评分
|