grub2, pxe, and default boot
Hey all! New to the list, and fairly new to Grub2.
I've got about 400+ machines as part of a farm. They are re-imaged routinely on demand, each image a different preset for the role it needs to play (even swapping OS at times.)
Traditionally, we used pxelinux to image this stuff remotely. I really, really would prefer to use Grub2 for this, but I've run into a small problem that I'm hoping the list here can lend a hand with.
The machines are set to network boot as a default. I'd like to keep this behavior, and let the timeout fallthrough to the primary hard drive. (This way, I can use tftp-hpa to rewrite read requests for 'grubenv' to get per-machine environmental vars, and remote-control the imaging. That part of this process is working great.)
It looks like I can accomplish this via:
set root=(hd0,1)
chainloader +1
bootThe problem is that there aren't any drives loaded by default from the (pxe) environment.
sh:grub> ls
(pxe)I discovered that I could 'insmod biosdisk', and lo-and-behold get my hd* nodes (woo!):
sh:grub> insmod ext2
sh:grub> insmod biosdisk
sh:grub> ls
(hd0) (fd0) (pxe)
However, I can't actually -use- hd0 for anything. I'm not sure why. I'm guessing it has something to do with what filesystem it thinks hd0 is:
sh:grub> ls -lh
Device hd0: Filesystem type pxefs <---- uh oh
Device fd0: Unknown filesystem
Device pxe: Filesystem type pxefs
sh:grub> chainloader (hd0,1)+1
error: no such partition
... and here's where my diagnostic abilities stop. :)
Can anyone suggest other things to try, reasons why this might be happening, or other ways to achieve my goal? Could this just be a bug?
All input welcome and appreciated.
--
Mahlon E. Smith
http://www.martini.nu/contact.html
Quoted 3 lines · Mahlon E. Smith
sh:grub> ls -lh
Device hd0: Filesystem type pxefs <---- uh oh
Upgrade
Signature · 2 lines
Regards Vladimir 'φ-coder/phcoder' Serbinenko
Quoted 1 line · Vladimir '??-coder/phcoder' Serbinenko
Upgrade
Thanks for the speedy reply, Vladimir. I realized a little bit late that I had neglected to mention what version I was using. (1.97.2).
I'll try 1.98 and see how it goes!
--
Mahlon E. Smith
http://www.martini.nu/contact.html
Quoted 6 lines · Vladimir '??-coder/phcoder' Serbinenko
Quoted 3 lines · Mahlon E. Smith
sh:grub> ls -lh
Device hd0: Filesystem type pxefs <---- uh ohUpgrade
Bumped up to 1.98. Closer, but still not quite working.
grub> ls
(pxe)
grub> insmod ext2
grub> insmod biosdisk
grub> ls -lh
Device hd0: Partition table
Device fd0: Unknown filesystem
Device pxe: Filesystem type pxefs
grub> ls (hd0,1)/
error: no such partition.
grub> chainloader (hd0,1)+1
error: no such partition.
I'm pretty sure I've got the right partition numbering. (This is a VirtualBox tester.)
# fdisk -l
Disk /dev/hda: 32.2 GB, 32212254720 bytes
255 heads, 63 sectors/track, 3916 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System
/dev/hda1 * 1 16 128488+ 83 Linux
/dev/hda2 17 3916 31326750 8e Linux LVMAre my expectations correct with what I'm trying to do here? Are there other modules I should be loading via insmod first?
I can't find any info out there on this specific PXE stuff with grub2. I humbly offer writing up some wiki content in trade for getting this working. :)
--
Mahlon E. Smith
http://www.martini.nu/contact.html
Quoted 38 lines · Mahlon E. Smith
Quoted 8 lines · Vladimir '??-coder/phcoder' Serbinenko
Quoted 4 lines · Mahlon E. Smith
sh:grub> ls -lh
Device hd0: Filesystem type pxefs <---- uh ohUpgrade
Bumped up to 1.98. Closer, but still not quite working.
grub> ls
(pxe)grub> insmod ext2
grub> insmod biosdisk
grub> ls -lh
Device hd0: Partition table
Device fd0: Unknown filesystem
Device pxe: Filesystem type pxefsgrub> ls (hd0,1)/
error: no such partition.
grub> chainloader (hd0,1)+1
error: no such partition.I'm pretty sure I've got the right partition numbering. (This is a VirtualBox tester.)
# fdisk -l Disk /dev/hda: 32.2 GB, 32212254720 bytes 255 heads, 63 sectors/track, 3916 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes
Quoted 10 lines
Device Boot Start End Blocks Id System /dev/hda1 * 1 16 128488+ 83 Linux /dev/hda2 17 3916 31326750 8e Linux LVMAre my expectations correct with what I'm trying to do here? Are there other modules I should be loading via insmod first?
You forgot to insmod part_msdos
This mailing list isn't for tech support. Use help-grub or IRC channel
Quoted 14 lines
I can't find any info out there on this specific PXE stuff with grub2. I humbly offer writing up some wiki content in trade for getting this working. :)
--
Mahlon E. Smith
http://www.martini.nu/contact.html_______________________________________________
Grub-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/grub-devel
Signature · 2 lines
Regards Vladimir 'φ-coder/phcoder' Serbinenko