UbuntuHelp:UbuntuLTSP/grubgpxe
来自Ubuntu中文
点击翻译: |
English |
请不要直接编辑翻译本页,本页将定期与来源同步。 |
This page is specific to Ubuntu versions 8.04, 8.10, 9.04 |
If you find this information applicable to additional versions/releases, please edit this page and modify this header to reflect that. Please also include any necessary modifications for this information to apply to the additional versions.
目录
Introduction
Grubgpxe is the combination of the Grub4dos boot manager and the gPXE network boot loader. It can be used to boot LTSP clients that aren't PXE capable, and it can be installed on a floppy, a CD, or a hard disk that already has an OS on it - even on NTFS partitions. Thanks to the grub and grub4dos and gPXE developers for making this possible. 模板:Http://users.sch.gr/alkisg/tosteki/index.php?action=dlattach;topic=1451.0;attach=563;image
Boot from floppy
Download gpxe.dsk and write it to a floppy with
dd if=gpxe.dsk of=/dev/fd0
That's the same gpxe.dsk that can be downloaded from http://www.rom-o-matic.net and is provided only for convenience.
Boot from CD
Download gpxe.iso and burn it to a CD. That's the same gpxe.iso that can be downloaded from http://www.rom-o-matic.net and is provided only for convenience.
Boot from a Windows 95/98/Me partition
Download grubgpxe.zip, unzip it and move the contents of the "C" folder into C:\, so that you have C:\grldr, C:\grldr.mbr, C:\menu.lst and the folder C:\boot\. Open the Start menu, select Run, and type
C:\boot\grub\bootlace --time-out=0 0x80
0x80 is the first hard disk, 0x81 the second hard disk etc. Warning: the previous command installs grub4dos to your MBR. If you ever want to remove it, you should open the Start menu, select Run, and type
C:\boot\grub\bootlace --restore-mbr 0x80
Boot from a Windows NT/2000/XP/2003 partition
Download grubgpxe.zip, unzip it and move the contents of the "C" folder in C:\, so that you have C:\grldr, C:\grldr.mbr, C:\menu.lst and the folder C:\boot\. Open the Start menu, select Run, and type
attrib -r -s -h C:\boot.ini
This won't give any visual feedback; it just removes the read-only attribute that boot.ini may have. Again from the Run menu, type
notepad C:\boot.ini
In the end of the file, append
C:\grldr="GRUB4DOS boot loader"
Save the file and close notepad. If you want, you may change the Windows boot manager options by right clicking on My Computer and selecting Properties » Advanced » Startup and Recovery settings button.
Boot from a Windows Vista/2008 partition
Download grubgpxe.zip, unzip it and move the contents of the "C" folder in C:\, so that you have C:\grldr, C:\grldr.mbr, C:\menu.lst and the folder C:\boot\. Warning: some of the menu names might not be exact, as I don't have English Windows. Please edit the page and insert the correct menu names. From the Start menu, select All Programs » Accessories, right click on Command prompt and select Run as administrator. In the console that will emerge, type
bcdedit /create /d "GRUB4DOS boot loader" /application bootsector
Windows will reply with something like
The entry {04595f8c-de6b-11dc-ab4c-b354e8ed1f5e} was created succesfully.
Note down this number (GUID), and replace {id} in the following commands with it:
bcdedit /set {id} device boot bcdedit /set {id} path grldr.mbr bcdedit /displayorder {id} /addlast
If you want, you may change the Windows boot manager options by right clicking on My Computer and selecting Properties » Advanced » Startup and Recovery settings button.
Boot from a Linux partition
If Linux (and grub) is already installed in your clients, you'll only need to copy gpxe.krn from grubgpxe.zip to your /boot/ directory. Then, add the following lines to your /boot/grub/menu.lst:
title Boot from network kernel /boot/gpxe.krn
Proxy DHCP servers
The included gpxe supports getting the boot information from a "proxy DHCP" server; that's a server that doesn't send IP leases but only the next-server, boot filename, rootpath etc options. dnsmasq >= 2.48 can function as a proxy DHCP server. So if both gpxe and dnsmasq are used, it's possible for clients to boot even when an external, unmodifiable DHCP server assigns the IP leases but doesn't send any boot information (e.g. a cheap router). But after the clients complete the PXE booting and load the kernel, they'll need to issue another request to get an IP for the OS. Unfortunately, the ipconfig program that is used in the Ubuntu initramfs doesn't support the proxy DHCP protocol, and the clients won't be able to discover the server. To bypass this, you you'll need to append the following line to your /var/lib/tftpboot/ltsp/i386/pxelinux.cfg/default file:
IPAPPEND 3
Also, for the following line may need to be executed in your server to enable the clients to locate lts.conf:
sudo ln -s ltsp/i386/lts.conf /var/lib/tftpboot/lts.conf
See Also
- UbuntuLTSP - Community Ubuntu LTSP Documentation.
External Links
- Grub4dos - Grub4dos is a boot manager derived from grub, that can (also) be installed in NTFS partitions.
- gPXE - gPXE is a network bootloader that evolved from the Etherboot project.
- dnsmasq - dnsmasq is an alternative to dhcp3-server that supports the proxy DHCP part of the PXE specification.