On Thu, Mar 12, 2009 at 4:51 PM, Constantine Cusulos <noha...@freemail.gr> wrote: > Ted Unangst wrote: >> >> On Thu, Mar 12, 2009 at 1:45 PM, Constantine Cusulos >> <noha...@freemail.gr> wrote: >>> >>> I am trying to run a linux binary on my OpenBSD 4.4/i386 system. The >>> binary >>> file (let's call it 'fpc') is a static executable. >> >>> Is there something i can do to run this binary?? >> >> generally, if it's not detected automatically, you have to brand it by >> dd'ing the string "Linux" into the second 8 bytes of the file. >> >> > > I am no expert user of the dd command so i did some man-paging and > archive-searching. Is the following command ok? > > $ echo Linux | dd of=/emul/linux/usr/bin/fpc bs=1 seek=8 > > After that, when i execute 'fpc' i get: > > $/emul/linux/usr/bin/fpc > /emul/linux/usr/bin/fpc[1]:ELFLinux: not found
you want Linux without a newline, so use echo -n. dd by default truncates, so a better set of options is something like bs=8 count=1 conv=notrunc,sync