- 论坛徽章:
- 0
|
回复 #2 qtdszws 的帖子
touch hd.img
dd if=/dev/zero of=hd.img bs=1M count=64
losetup /dev/loop1 hd.img
mkfs.ext2 /dev/loop1
mount /dev/loop1 /mnt
cd /mnt
mkdir boot/grub -p
cp /boot/grub/stage1 boot/grub/
cp /boot/grub/stage2 boot/grub/
cd /
然后执行:
grub --device-map=/dev/null
进入grub命令行界面
grub> device (fd0) /dev/loop1
grub> root (fd0)
Filesystem type is ext2fs, using whole disk
grub> setup (fd0)
Checking if "/boot/grub/stage1" exists... yes
Checking if "/boot/grub/stage2" exists... yes
Checking if "/boot/grub/e2fs_stage1_5" exists... no
Running "install /boot/grub/stage1 (fd0) /boot/grub/stage2 p /boot/grub/grub.c
onf "... failed
Error 29: Disk write error
折磨了我一整天了,还是没搞好...
换了台机子执行,还是有错,但错误号又变了
grub> device (fd0) /dev/loop1
device (fd0) /dev/loop1
grub> root (fd0)
root (fd0)
Unknown partition table signature
Filesystem type is ext2fs, using whole disk
grub> setup (fd0)
setup (fd0)
Checking if "/boot/grub/stage1" exists... no
Checking if "/grub/stage1" exists... no
Error 15: File not found
[ 本帖最后由 hbrqlpf 于 2008-10-16 17:48 编辑 ] |
|