中国DOS联盟论坛

China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
Guest | Log in | Register | Members | Search | China DOS Union
中国DOS联盟论坛
The time now is 2026-08-12 08:03
47,811 topics / 349,897 posts / today 0 new / 48,256 members
GRUB4DOS、SYSLINUX及其它启动管理软件讨论专区 » How can grub boot an operating system on SATA?
Printable Version  1,463 / 6
Floor1 zhaigy Posted 2007-12-17 20:57
新手上路 Posts 3 Credits 8
Question for all the experts:
How can grub boot an operating system on SATA?? Also, what do the fallback and map commands mean?


There is no problem booting the operating system on IDE, and the BIOS can recognize the SATA hard disk, but how should it be set in grub??
Floor2 fastslz Posted 2007-12-17 21:49
铂金会员 Posts 2,315 Credits 5,493 From 上海
title find and load NTLDR of Windows NT/2K/XP
find --set-root /ntldr
chainloader /ntldr


title boot from the first partition of the first hard disk
root (hd0,0)
chainloader +1

title boot from the first partition of the second hard disk
root (hd1,0)
chainloader +1


title boot NTLDR from the first partition of the first hard disk
chainloader (hd0,0)/ntldr

title boot NTLDR from the first partition of the second hard disk
chainloader (hd1,0)/ntldr
Floor3 zhaigy Posted 2007-12-17 22:50
新手上路 Posts 3 Credits 8
Thanks to the poster in reply #2, but we can't possibly always know whether the system on the current hard disk is 2000/xp/2003 or vista, so how can we make a menu that guarantees all four systems can boot???
Thanks, it seems to use fallback, but I don't know how to use it. Friends who know, please give some pointers!!
Floor4 fastslz Posted 2007-12-17 23:10
铂金会员 Posts 2,315 Credits 5,493 From 上海
There is a sample menu.lst in the grub4dos-0.4.3 package.
The problem is that you didn't say the booting rule; which should have priority among 2000/xp/2003/vista?




# This is a sample menu.lst file. You should make some changes to it.
# The old install method of booting via the stage-files has been removed.
# Please install GRLDR boot strap code to MBR with the bootlace.com
# utility under DOS/Win9x or Linux.

color black/cyan yellow/cyan
timeout 30
default /default

title find and load NTLDR of Windows NT/2K/XP
fallback 1
find --set-root /ntldr
chainloader /ntldr
savedefault --wait=2

title find and load CMLDR, the Recovery Console of Windows NT/2K/XP
fallback 2
find --set-root /cmldr
chainloader /cmldr
#####################################################################
# write string "cmdcons" to memory 0000:7C03 in 2 steps:
#####################################################################
# step 1. Write 4 chars "cmdc" at 0000:7C03
write 0x7C03 0x63646D63
# step 2. Write 3 chars "ons" and an ending null at 0000:7C07
write 0x7C07 0x00736E6F
savedefault --wait=2

title find and load IO.SYS of Windows 9x/Me
fallback 3
find --set-root /io.sys
chainloader /io.sys
savedefault --wait=2

title find and boot Mandriva with menu.lst already installed
fallback 4
find --set-root /etc/mandriva-release
savedefault --wait=2
configfile /boot/grub/menu.lst

title find and boot Linux with menu.lst already installed
fallback 5
find --set-root /sbin/init
savedefault --wait=2
configfile /boot/grub/menu.lst

title commandline
savedefault --wait=2
commandline

title floppy (fd0)
chainloader (fd0)+1
rootnoverify (fd0)
savedefault --wait=2

title back to dos
savedefault --wait=2
quit

title reboot
savedefault --wait=2
reboot

title halt
savedefault --wait=2
halt

title memdrive duplicated from floppy image file (hd0,0)/sbm.bin
map --mem (hd0,0)/sbm.bin (fd0)
map --hook
chainloader (fd0)+1
rootnoverify (fd0)
savedefault --wait=2

title memdrive based on win98 partition (hd0,6)
map --mem (hd0,6)+1 (hd0)
# map --mem (hd0,0)/win98.gz (hd0)
map --hook
chainloader (hd0)+1
rootnoverify (hd0)
savedefault --wait=2
Floor5 fujianabc Posted 2007-12-18 10:24
金牌会员 Posts 1,616 Credits 3,467
No need to make it this complicated, just do this directly:
map (hd0) (hd1)
map (hd1) (hd0)
map --hook
chainloader (hd0)+1
boot
Floor6 zhaigy Posted 2007-12-19 11:38
新手上路 Posts 3 Credits 8
What the poster in #5 said still doesn't work, at least on my system with a hidden partition it didn't boot successfully.
I remember there is a command to check all partitions of the system; is it root (hd0
Ah, why doesn't it work??
Thanks/
Floor7 fastslz Posted 2007-12-19 12:30
铂金会员 Posts 2,315 Credits 5,493 From 上海
title map the fourth partition of the first hard disk as the first partition of the first hard disk
map --in-situ (hd0,6)+1 (hd0)
find --set-root /ntldr
chainloader /ntldr
boot
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023