mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mikael Pettersson <mikpe@user.it.uu.se>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Unable to boot a raw kernel image :??
Date: Wed, 5 Mar 2003 16:33:13 +0100	[thread overview]
Message-ID: <15974.6329.574794.597753@gargle.gargle.HOWL> (raw)
In-Reply-To: <b453er$qo7$1@cesium.transmeta.com>

H. Peter Anvin writes:
 > Followup to:  <3DF08DD0.BA70DA62@gmx.de>
 > By author:    Edgar Toernig <froese@gmx.de>
 > In newsgroup: linux.dev.kernel
 > > 
 > > I had this problem a while ago.  It turned out to be a (widespread)
 > > BIOS bug triggered be the disk-size probe of the kernel's boot loader.
 > > 
 > 
 > It's not a bug, really.  The fact of the matter is that the disk
 > geometry probe in bootsect.S pretty much only works for legacy
 > floppies... no IDE floppies, no USB floppies, no virtual floppies.
 > 
 > That, and the 1 MB limitation, is the reason it either needs to get
 > nuked or get some massive surgery.  I am currently trying to get Linus
 > to accept a patch to put it out of its misery.

FWIW, I still use bzdisk images frequently, and the 1MB limit really
is a serious problem for 2.5 kernels, and 2.4 kernels build with gcc-3.
I'm currently using a patched kernel where `make bzdisk' invokes a
user-specified script, which in my case goes roughly like:

===snip===
BOOTIMAGE=$1
LIBDIR=/home/mikpe/pkgs/linux-x86/make-zdisk/lib
FDIMAGE=/tmp/fdimage.$$
MTOOLSRC=/tmp/mtools.conf.$$

cat > $MTOOLSRC << EOF
drive v:
        file="$FDIMAGE" cylinders=80 heads=2 sectors=18 filter
EOF

dd if=/dev/zero bs=72k count=20 of=$FDIMAGE
MTOOLSRC=$MTOOLSRC mformat v:
MTOOLSRC=$MTOOLSRC mcopy $LIBDIR/ldlinux.sys v:
MTOOLSRC=$MTOOLSRC mcopy $BOOTIMAGE v:linux
dd bs=512 count=1 conv=notrunc if=$LIBDIR/bootsect.img of=$FDIMAGE

dd bs=72k if=$FDIMAGE of=/dev/fd0
===snip===

The latest mtools are supposed to have direct support for image files,
which should eliminate the MTOOLSRC kludge.

All I'm really missing is a version of syslinux that understands enough
of MS-DOS FS layout to populate the FS and update the boot block without
having to mount the damn thing. That would eliminate the ldlinux.sys and
bootsect.img files, which I extracted from a syslinux-prepared floppy.

You can kill bootsect.S right now, IF you allow a user-specified script
to control how the boot floppy is prepared. Something like:

zdisk: $(BOOTIMAGE)
	make-zdisk.sh $(BOOTIMAGE)

should be enough.

/Mikael

  reply	other threads:[~2003-03-05 15:22 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-29 13:21 DervishD
2002-12-03 11:29 ` Denis Vlasenko
2002-12-08 10:33   ` DervishD
2002-12-06 11:45 ` Edgar Toernig
2002-12-08 10:36   ` DervishD
2003-03-05 15:00   ` H. Peter Anvin
2003-03-05 15:33     ` Mikael Pettersson [this message]
2003-03-05 15:47       ` H. Peter Anvin
2003-03-05 15:58         ` Mikael Pettersson
2003-03-05 16:02           ` H. Peter Anvin
2003-03-05 16:05             ` Mikael Pettersson
2003-03-06 10:16             ` Mikael Pettersson
2003-03-06 20:28               ` H. Peter Anvin
2003-03-09 10:31                 ` DervishD
2003-03-10 19:38                   ` H. Peter Anvin
2003-03-11  9:23                     ` DervishD
2003-03-05 16:12     ` DervishD
2003-03-05 16:33       ` John Bradford
2003-03-05 16:48         ` H. Peter Anvin
2003-03-05 16:55           ` John Bradford
2003-03-05 17:01         ` DervishD
2003-03-05 18:04           ` John Bradford
2003-03-05 16:51       ` H. Peter Anvin
2003-03-05 17:04         ` DervishD
2003-03-05 17:51           ` H. Peter Anvin
2003-03-06  1:08         ` Alan Cox
2003-03-06  0:30           ` H. Peter Anvin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=15974.6329.574794.597753@gargle.gargle.HOWL \
    --to=mikpe@user.it.uu.se \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®