Network Bootloader using Linux ...


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Network Bootloader using Linux ...
# 1  
Old 01-07-2009
Network Bootloader using Linux ...

Hello,

I want to find out the best route for setting up a network bootloader where I can have a custom listing of programmable options. Some of the desired options include:

  • Setting up a linux or windows system via the network
  • Troubleshooting utilities (like Knoppix) load via the network
  • Network Disk cloning utilities

I know that linux supports many types of network booting but has anyone done anything like what I am referring to?

Thanks for your time.

Regards,
Christopher Koeber
# 2  
Old 01-07-2009
Quote:
Originally Posted by ckoeber
Hello,

I want to find out the best route for setting up a network bootloader where I can have a custom listing of programmable options. Some of the desired options include:

  • Setting up a linux or windows system via the network
  • Troubleshooting utilities (like Knoppix) load via the network
  • Network Disk cloning utilities

I know that linux supports many types of network booting but has anyone done anything like what I am referring to?

Thanks for your time.

Regards,
Christopher Koeber
I never did figure out how to boot or install windows over a network, but the other thing I have done. You need a few things:
  • Your own DHCP server -- PXE network boot starts by looking for special values provided by a DHCP server. I use dnsmasq, with this extra line in the config file:
    Code:
    dhcp-boot=pxelinux.0,mecgentoo,192.168.0.126

  • Your own tftp server -- These DHCP values tell PXE what file to load from what tftp server, in this case, to load pxelinux.0 from the tftp server at 192.168.0.126. I use atftp, which(on my system at least) expects the files it serves to be in /tftproot/.
  • pxelinux -- This is the bootloader, and actually just one part from a small suite of bootloader tools. You might've heard of its brother, isolinux. They're capable of printing a greeting message and a menu of options, then booting what the user chooses. In my system PXE grabs and runs /pxelinux.0, which the tftp server finds in /tftproot/pxelinux.0, then pxelinux itself connects to the tftp server to grab its config file, /pxelinux.cfg/default, which the tftp server will find in /tftproot/pxelinux.cfg/default . Here's what mine looks like(substitute tabs where applicable):
    Code:
    # Ask which to boot
    PROMPT 1
    # Default to local boot when user enters blank
    DEFAULT local
    # Wait 1 minute
    TIMEOUT 600
    # Default to local on timeout
    ONTIMEOUT local
    # Download /message from tftp and display it
    DISPLAY message
    
    # Loads a DOS boot disk image, then boots it with the memdisk program.
    # Expects /dos/dos.img.gz and /memdisk from tftp.
    # memdisk is a part of pxelinux.
    LABEL dos
            KERNEL memdisk
            APPEND initrd=dos/dos.img.gz
    
    # Our P3's all had dead floppy drives, so we imaged the BIOS upgrade
    # then put it on PXE
    label deskpro-p3-sff
            KERNEL memdisk
            APPEND initrd=dos/deskpro-p3-sff.img.gz
    
    # Not a disk image, just a tiny program capable of running by itself
    LABEL memtest86
            KERNEL memtest86
    
    # Since udpcast operates PURELY inside an initrd, it works inside PXE too.
    # It expects /udpcast/linux and /udpcast/initrd from the tftp server,
    # which you can just grab off the official udpcast cdrom.
    LABEL udpcast
            KERNEL udpcast/linux
            APPEND load_ramdisk=1 initrd=udpcast/initrd root=/dev/ram0
            IPAPPEND 1
    
    # The Windows password reset disk also works over PXE.
    LABEL reset
            KERNEL pwd/vmlinuz
            append rw vga=1 init=/linuxrc initrd=pwd/initrd.cgz,pwd/scsi.cgz
    
    # This option just exits PXE and boots from local disk.
    LABEL local
            LOCALBOOT 0

You will notice one thing in common about all the different boot options: They are small and self-contained. pxelinux comes with a program to boot disk images, so nothing special needed there. The UDPcast and XP password reset CD's both used isolinux to boot them into ramdisks, making the move to PXE easy -- pxelinux and isolinux are part of the same software set, config and plugin-compatible.
And memtest86 was designed to run from a raw bootloader. pxelinux can just dump any of these into RAM and let them take over.

A 700mb boot cdrom like Gentoo is kind of opposite. (I explain Gentoo since that's the one I tried to make work over PXE.) It does use isolinux to boot a small ramdisk, and that part works over PXE, but it stops when it can't find the CD.

The gentoo disc actually did have the ability to load its files over NFS instead of from a local CD, but I never got that to work due to version incompatibilities. So it's possible in principle but the CD has to support it, and you need to install and configure yet ANOTHER daemon.

As for booting Windows over PXE? Ahah. Ahahahaha no. It's not flexible enough to boot from USB, let alone diskless. I do vaguely recall something about special-purpose Microsoft PXE installer tools demanding Server 2003 running MS DHCP Server, maybe someone somewhere has figured out how to make it a touch more tractable to the non-windows world.

Last edited by Corona688; 01-07-2009 at 05:47 PM..
# 3  
Old 01-07-2009
Your question inspired me to try again, this time with a fedora 8 install/rescue disk, the software of which is very flexible if poorly documented. It works.

You need vmlinuz, initrd.img, and stage2.img from the fedora 8 install disk. vmlinuz and initrd.img go under /tftproot/fedora-8/ , while stage2.img needs to be on an http or ftp server you have access to. This done, the following addition to pxelinux.cfg lets it boot the fedora 8 rescue system diskless, auto-downloading the 100mb stage file from your local web server.
Code:
LABEL fedora-8
        KERNEL fedora-8/vmlinuz
        APPEND initrd=fedora-8/initrd.img rescue method=http://mywebsite/fedora-8/

Note that fedora will expect http://mywebsite/fedora-8/images/stage2.img, not http://mywebsite/fedora-8/stage2.img . It still asks a few annoying questions but all in all I think that's as automated as it's going to get, I'm happy I don't have to type in the URL every time.

Of course, a diskless OS that needs to download a 100mb file is going to need a decent chunk of RAM, but since 256mb is considered small these days...

Last edited by Corona688; 01-07-2009 at 07:21 PM..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Ubuntu

How to change a preset bootloader

I have 2 pc's and 1 laptop (all less than a year old) and all 3 have been messed with by super smart but nosy roommate. The bootloader for all three (Gigabyte,Asus and Hp laptop) runs from RAM disk (Paragon software boot it bare metal I think) on a virtual drive that has all the different drivers... (0 Replies)
Discussion started by: kamiz101
0 Replies

2. Ubuntu

How do I re-install my bootloader?

I accidently altered my partition table. Somehow I wiped it out completely and changed the disk label. Before I rebooted I managed to rebuild it the way it originally was using the original structure and label however I need to re-install a new bootloader for the new MBR. I have Ubuntu 14.04TLS... (1 Reply)
Discussion started by: project722
1 Replies

3. UNIX for Dummies Questions & Answers

Right place to install Linux bootloader

I installed ubuntu on a windows machine, but after restart the computer automatically booted windows without showing me boot option. I think I might have installed my ubuntu bootloader in the wrong partition. I previously have sda1,2,3,5 and 6. I partitioned sda6 into sda6, sda7 and sda8. I... (4 Replies)
Discussion started by: freedombird9
4 Replies

4. Solaris

Bootloader Administration Tool

I need to know how to install & use 'Bootloader Administration Tool' in Solaris 11 Express. There is some documentation on this tool under 'Help' if you are in 'Package Manager'. :wall: Thanks (0 Replies)
Discussion started by: Tenyhwa
0 Replies

5. Boot Loaders

Bootloader Resources

Here is a list of resources for Unix and GNU/Linux bootloaders: GRUB Legacy: The original GRand Unified Bootloader. Now known as GRUB Legacy. GRUB: The latest and greatest. More commonly known as GRUB2. BRUG: Brand-new Universal loadeR from GRUB. Based on GRUB. Adds features like new object... (0 Replies)
Discussion started by: fpmurphy
0 Replies

6. UNIX for Dummies Questions & Answers

Bootloader problem Grub.

Bootloader problem Grub. Hello, I have some questions about my Mandriva Linux. My father died last year and so I got automatically forced to use Linux (master computer). I have become a little bit known with it, had to reset the root password via command lines etc. But I... (11 Replies)
Discussion started by: blabla9002
11 Replies

7. UNIX for Dummies Questions & Answers

Help needed with bootloader configuration !

I have installed Fedora 8 in my external harddrive in my laptop( toshiba satellite 1135-S125). During initial installation i installed the bootloader in the MBR of the external harddisk instead of the internal harddisk. the problem is that i donot always turn on the external harddrive;therefore,... (0 Replies)
Discussion started by: sunilryl
0 Replies

8. Red Hat

RedHat BootLoader

Hi, I have Windows XP and RedHat ES both. Last day I format windows due to problems in it, But now the BootLoader that used to come earlier is not coming. My system is directly booting Windows XP. How can I recover RedHat or what I need to do to get back the BootLoader. So that I can use both... (1 Reply)
Discussion started by: somnathbanerjee
1 Replies

9. AIX

can anybuddy tell me what bootloader is used in AIX4.3

hi this is fani working as jr system administration on unix flavours so please help waht bootloader is used in AIX 4.3 ver now LILO is using in AIX 5 help me to find the answer and there configuration file also tankzz.............. (0 Replies)
Discussion started by: phanifani
0 Replies

10. Solaris

solaris 10 bootloader

Hi, I'm new to solaris and I have a question about installing solaris 10. Does solaris during install create a /boot partition? And if it does, is it possible to set the bootloader on this partition or will it always be on the MBR? greetz tony (4 Replies)
Discussion started by: topa
4 Replies
Login or Register to Ask a Question