[syslinux] booting a dos floppy from a disk image over pxe
geert geurts
geert at verweggistan.eu
Mon Apr 2 00:43:39 PDT 2012
Hello,
I'm trying to boot a dos floppy stored on a disk image which is initially
loaded over pxe using memdisk.
I've created the disk image as follows:
dd if=/dev/zero of=$IMGLOCATION/$IMGNAME bs=$(( 1024 * 1024 )) count=20
LOOPDEV=$(losetup --show -f $IMGLOCATION/$IMGNAME)
MAJOR_MINOR=$(ls -l $LOOPDEV|awk '{print $5$6}'|sed 's/,/:/')
DMSIZE=$(( $(ls -l $IMGLOCATION/$IMGNAME|awk '{print $5}') / 512 ))
echo 0 $DMSIZE linear $MAJOR_MINOR 0|dmsetup create hdz
fdisk /dev/mapper/hdz<<EOT
n
p
1
t
6
a
1
w
EOT
kpartx -a /dev/mapper/hdz
mkdosfs /dev/mapper/hdz1
Then I put a dosfloppy image and memdisk on the image:
mount /dev/mapper/hdz1 /mnt/
mkdir -p /mnt/boot/grub
cp dos622.IMA /mnt/boot/
cp /usr/lib/syslinux/memdisk /mnt/boot
/mnt/boot/grub/grub.cfg contains:
linux16 /boot/memdisk
initrd16 /boot/dos622.IMA
boot
and I install grub:
grub-install --root-directory=/mnt /dev/dm-0
This works perfectly on a virtualbox installation, I get a dos
environment with a C: disk.
On a live system it works till till the boot of the dos floppy. The
machine resets.
I believe it has something to do with loading a second memdisk instance
for the floppy after the first which was used to boot the harddisk
image over pxe...
I have tried allot to get this working, even grub-legacy, but I'm out
of options...
If anyone has a idea, I would be very happy to hear!
Thanks for reading!
Regards,
More information about the Syslinux
mailing list