[syslinux] help: booting dos from syslinux/memdisk

Wichetael wichetael at gmx.net
Thu Jul 3 05:08:01 PDT 2003

> But how can I now transfer an OS to this image ?
> The device /dev/loop0p1 does not exist.
> So I cannot do a syslinux /dev/loop0p1.

By using the offset with losetup you actually mounted the first partition in
your disk image and not the complete disk image.

What you should do after you mounted the partition with losetup is:

mkdosfs /dev/loop0
mount /dev/loop0 /mnt/img
mcopy a: /mnt/img
dd if=/dev/fd0 of=bootblock.dos7 bs=512 count=1
cp bootblock.dos7 /mnt/img/dos.bss
cp <your syslinux config file> /mnt/img
umount /mnt/img
syslinux /dev/loop0

I don't use linux on a daily basis so I could've made some errors there,
what you need to realize is that disk.img is a hard disk image, by using
losetup you make /dev/loop0 the partition image. (ie compare /dev/hda with
disk.img and /dev/hda1 with /dev/loop0) So now we have the partition image
we mount it to /mnt/img, copy our files to it, unmount it and call syslinux
on the partition image to make it bootable.

Oh, and one more thing, I'm not a hundred percent sure, but I think you also
need to activate the partition you made with cfdisk.


Remko van der Vossen

More information about the Syslinux mailing list