菜鸟求助,高手指导如何写menu.lst

启动讨论 grub/grub2/syslinux/grub4dos/Lilo
shcv
帖子: 59
注册时间: 2009-08-16 15:16

菜鸟求助,高手指导如何写menu.lst

#1

帖子 shcv » 2009-09-17 10:41

硬盘:250GB

系统安装顺序:
dos---xp---vista-----Ubuntu904

问题:
xp引导dos,vista引导xp和dos,Ubuntu引导vista。我希望能用Ubuntu grub直接引导dos,xp,vista。请教怎么写menu.lst。

本机信息:
分区:
Device Boot Start END Blocks ID System
/dev/sda1 * 1 5847 46965996 c win95 FAT32 (LBA)
/dev/sda2 5848 30401 197230005 f win95 EXT'd (LBA)
/dev/sda5 5848 12221 51199123+ 7 HPFS/NTFS
/dev/sda6 12222 19870 61440561 7 HPFS/NTFS
/dev/sda7 30159 30401 1951866 82 LINUX SWAP
/dev/sda8 19871 30158 82638328+ 83 LINUX

现在的引导文件:
title Ubuntu 8.04.3 LTS, kernel 2.6.24-24-generic
root (hd0,7)
kernel /boot/vmlinuz-2.6.24-24-generic root=UUID=f63120fe-34f2-4f76-82ba-0d262edaab9f ro quiet splash
initrd /boot/initrd.img-2.6.24-24-generic
quiet

title Ubuntu 8.04.3 LTS, kernel 2.6.24-24-generic (recovery mode)
root (hd0,7)
kernel /boot/vmlinuz-2.6.24-24-generic root=UUID=f63120fe-34f2-4f76-82ba-0d262edaab9f ro single mem=1024M
initrd /boot/initrd.img-2.6.24-24-generic

title Ubuntu 8.04.3 LTS, memtest86+
root (hd0,7)
kernel /boot/memtest86+.bin
quiet

### END DEBIAN AUTOMAGIC KERNELS LIST

# This is a divider, added to separate the menu items below from the Debian
# ones.
title Other operating systems:
root


# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda1
title Windows Vista/Longhorn (loader)
root (hd0,0)
savedefault
makeactive
chainloader +1
头像
懒蜗牛Gentoo
论坛版主
帖子: 7353
注册时间: 2007-03-02 17:36
系统: Linux Mint

Re: 菜鸟求助,高手指导如何写menu.lst

#2

帖子 懒蜗牛Gentoo » 2009-09-17 11:04

竟然还有DOS…… :em06
虽然世上没有完美的东西,但这并不影响我们追求完美,因为只有偏执狂才TMD能成功。
10.04新手入门——笨兔兔讲述自己的故事
shcv
帖子: 59
注册时间: 2009-08-16 15:16

Re: 菜鸟求助,高手指导如何写menu.lst

#3

帖子 shcv » 2009-09-17 11:47

大哥,dos还是能干很多事情的。不要鄙视dos嘛
billbear
帖子: 3681
注册时间: 2008-05-03 23:42

Re: 菜鸟求助,高手指导如何写menu.lst

#4

帖子 billbear » 2009-09-17 21:56

boot.ini 也贴一下喽
shcv
帖子: 59
注册时间: 2009-08-16 15:16

Re: 菜鸟求助,高手指导如何写menu.lst

#5

帖子 shcv » 2009-09-17 22:27

;
;Warning: Boot.ini is used on Windows XP and earlier operating systems.
;Warning: Use BCDEDIT.exe to modify Windows Vista boot options.
;
[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(2)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(2)\WINDOWS="Microsoft Windows XP Professional" /NOEXECUTE=OPTIN /FASTDETECT
multi(0)disk(0)rdisk(0)partition(2)\WINDOWS="Microsoft Windows XP Professional" /FASTDETECT /NOEXECUTE=OPTIN /USEPMTIMER
c:\="DOS"
上次由 shcv 在 2009-09-18 19:10,总共编辑 1 次。
kappa8086
帖子: 308
注册时间: 2008-06-23 14:42

Re: 菜鸟求助,高手指导如何写menu.lst

#6

帖子 kappa8086 » 2009-09-17 22:49

chainloader要找引导区,但dos和xp的引导已经被vista和谐起来了,越俎代庖好像做不到吧

PS
DOS在现在的硬盘上用,是有相当危险性的,早在02年我玩回DOS结果被DOS玩了一把。觉得操作系统还是单纯点好。现置FreeDOS于一小容量SD卡,仅刷BIOS时用。
billbear
帖子: 3681
注册时间: 2008-05-03 23:42

Re: 菜鸟求助,高手指导如何写menu.lst

#7

帖子 billbear » 2009-09-17 23:19

xp 有一个偏方
viewtopic.php?f=139&t=224942
dos 如果是软盘映像也好弄,但你的好像是真 dos,可以试用上面的偏方自制一个引导映像,里面的 boot.ini 保留一个 c:\="ATI DIAGNOSTICS"
billbear
帖子: 3681
注册时间: 2008-05-03 23:42

Re: 菜鸟求助,高手指导如何写menu.lst

#8

帖子 billbear » 2009-09-17 23:30

其实这种情况最好是让 vista 来接管所有的系统。
头像
白鳍豚
帖子: 2356
注册时间: 2009-01-19 23:03

Re: 菜鸟求助,高手指导如何写menu.lst

#9

帖子 白鳍豚 » 2009-09-17 23:45

系统大全
shcv
帖子: 59
注册时间: 2009-08-16 15:16

Re: 菜鸟求助,高手指导如何写menu.lst

#10

帖子 shcv » 2009-09-18 18:38

那就给个方案,让dos,xp,vista,Ubuntu同在一个硬盘,用Ubuntu grub引导。怎么安装和设置?
头像
smallapple
论坛版主
帖子: 7868
注册时间: 2009-03-28 15:12

Re: 菜鸟求助,高手指导如何写menu.lst

#11

帖子 smallapple » 2009-09-18 18:43

用熊老大的偏方,
不然要dos,xp, vista,各自独立安装在自己的主分区,
或xp , vista各自独立主分区,dos用img引导,硬盘中有一个fat分区存放需要在dos使用的文件。
shcv
帖子: 59
注册时间: 2009-08-16 15:16

Re: 菜鸟求助,高手指导如何写menu.lst

#12

帖子 shcv » 2009-09-18 19:13

帮我看一下,如下的menu.lst是系统是怎么实现安装的?

# menu.lst - See: grub(8), info grub, update-grub(8)
# grub-install(8), grub-floppy(8),
# grub-md5-crypt, /usr/share/doc/grub
# and /usr/share/doc/grub-doc/.

## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.
#
# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.
# WARNING: If you are using dmraid do not use 'savedefault' or your
# array will desync and will not let you boot your system.
default 1

## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout 13

## hiddenmenu
# Hides the menu by default (press ESC to see the menu)
#hiddenmenu

# Pretty colours
#color cyan/blue white/blue

## password ['--md5'] passwd
# If used in the first section of a menu file, disable all interactive editing
# control (menu entry editor and command-line) and entries protected by the
# command 'lock'
# e.g. password topsecret
# password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
# password topsecret

#
# examples
#
# title Windows 95/98/NT/2000
# root (hd0,0)
# makeactive
# chainloader +1
#
# title Linux
# root (hd0,1)
# kernel /vmlinuz root=/dev/hda2 ro
#

#
# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST

### BEGIN AUTOMAGIC KERNELS LIST
## lines between the AUTOMAGIC KERNELS LIST markers will be modified
## by the debian update-grub script except for the default options below

## DO NOT UNCOMMENT THEM, Just edit them to your needs

## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specific kernels use kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be omitted.
## e.g. kopt=root=/dev/hda1 ro
## kopt_2_6_8=root=/dev/hdc1 ro
## kopt_2_6_8_2_686=root=/dev/hdc2 ro
# kopt=root=UUID=ed207545-e921-4d15-91c9-7ce930443cf0 ro

## Setup crashdump menu entries
## e.g. crashdump=1
# crashdump=0

## default grub root device
## e.g. groot=(hd0,0)
# groot=(hd0,6)

## should update-grub create alternative automagic boot options
## e.g. alternative=true
## alternative=false
# alternative=true

## should update-grub lock alternative automagic boot options
## e.g. lockalternative=true
## lockalternative=false
# lockalternative=false

## additional options to use with the default boot option, but not with the
## alternatives
## e.g. defoptions=vga=791 resume=/dev/hda5
# defoptions=quiet splash

## should update-grub lock old automagic boot options
## e.g. lockold=false
## lockold=true
# lockold=false

## Xen hypervisor options to use with the default Xen boot option
# xenhopt=

## Xen Linux kernel options to use with the default Xen boot option
# xenkopt=console=tty0

## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
## altoptions=(recovery) single
# altoptions=(recovery mode) single

## controls how many kernels should be put into the menu.lst
## only counts the first occurence of a kernel, not the
## alternative kernel options
## e.g. howmany=all
## howmany=7
# howmany=all

## should update-grub create memtest86 boot option
## e.g. memtest86=true
## memtest86=false
# memtest86=true

## should update-grub adjust the value of the default booted system
## can be true or false
# updatedefaultentry=false

## should update-grub add savedefault to the default options
## can be true or false
# savedefault=false

## ## End Default Options ##

title Ubuntu 8.04.1, kernel 2.6.24-19-generic
root (hd0,6)
kernel /boot/vmlinuz-2.6.24-19-generic root=UUID=ed207545-e921-4d15-91c9-7ce930443cf0 ro quiet splash
initrd /boot/initrd.img-2.6.24-19-generic
savedefault
quiet

title Ubuntu 8.04.1, kernel 2.6.24-19-generic (recovery mode)
root (hd0,6)
kernel /boot/vmlinuz-2.6.24-19-generic root=UUID=ed207545-e921-4d15-91c9-7ce930443cf0 ro single mem=1024M
initrd /boot/initrd.img-2.6.24-19-generic
savedefault

title Ubuntu 8.04.1, memtest86+
root (hd0,6)
kernel /boot/memtest86+.bin
quiet

### END DEBIAN AUTOMAGIC KERNELS LIST

# This is a divider, added to separate the menu items below from the Debian
# ones.
#title Other operating systems:
#root


## should update-grub add savedefault to the default options
## can be true or false
# savedefault=false

title Windows Vista
unhide (hd0,0)
hide (hd0,1)
hide (hd0,2)
root (hd0,0)
savedefault
makeactive
chainloader +1

title Microsoft Windows XP Professional
hide (hd0,0)
unhide (hd0,1)
hide (hd0,2)
root (hd0,1)
savedefault
makeactive
chainloader +1

# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda2
title Microsoft DOS 7.10
hide (hd0,0)
hide (hd0,1)
unhide (hd0,2)
root (hd0,2)
savedefault
makeactive
chainloader +1
shcv
帖子: 59
注册时间: 2009-08-16 15:16

Re: 菜鸟求助,高手指导如何写menu.lst

#13

帖子 shcv » 2009-09-18 19:25

顺便弱智疑问,Ubuntu下,ftp命令如何传输整个文件夹。传文件是用get xxxx.xxx。传文件夹是什么?

谢谢。
头像
tenzu
论坛版主
帖子: 36924
注册时间: 2008-11-21 20:26

Re: 菜鸟求助,高手指导如何写menu.lst

#14

帖子 tenzu » 2009-09-18 19:30

shcv 写了:顺便弱智疑问,Ubuntu下,ftp命令如何传输整个文件夹。传文件是用get xxxx.xxx。传文件夹是什么?

谢谢。
lftp下可以用mirror
头像
smallapple
论坛版主
帖子: 7868
注册时间: 2009-03-28 15:12

Re: 菜鸟求助,高手指导如何写menu.lst

#15

帖子 smallapple » 2009-09-18 19:59

看你手上有什么系统光盘,至少你要能从光盘启动进入DOS和WinPE,PE最好能支持vista安装,可省去一些麻烦。
至于menu.lst上的hide 和 unhide倒不是必须的(至少xp和vista可以不用的,DOS没试过)

安装过程可以这样,
1、进PE用WinPM把 DOS分区设为活动,XP和VISTA为非活动或隐藏,重启进入DOS,把DOS启动文件复制到DOS主分区,然后
sys C: (应该是这个没错吧?!太久没用DOS了)
2、进PE把XP分区设为活动,DOS分区和VISTA分区设为非活动或隐藏,重启(一定要重启,不然C盘还不是XP分区),用XP安装盘启动安装,如没安装盘,可进PE挂载ISO后把文件复制出来,在PE下安装。
3、安装配置完XP后再进PE把VISTA分区设为活动,DOS和XP分区设为非活动或隐藏,重启,再安装vista。

三个安装顺序可以随便调整。

安装xp或vista会改写mbr,等全部系统安装完再用livecd修复grub或用grub4dos进入ubuntu后再在ubuntu下修复grub。
回复