All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rob Landley <rob@landley.net>
To: user-mode-linux-devel@lists.sourceforge.net
Cc: Andreas Wohlfeld <agw@supersonic.ruhr.de>
Subject: Re: [uml-devel] Using lilo on ubda?
Date: Sun, 27 Nov 2005 06:47:03 -0600	[thread overview]
Message-ID: <200511270647.10473.rob@landley.net> (raw)
In-Reply-To: <20051127052216.GA18684@supersonic.ruhr.de>

On Saturday 26 November 2005 23:22, Andreas Wohlfeld wrote:
> On Sat, Nov 26, 2005 at 01:03:42PM -0600, Rob Landley wrote:
> > Lilo is saying that ubda is not a device with partitions.
> >
> > Anybody know what it's talking about?  (I've got a ubda1.  I'm trying to
> > make a disk image I can test boot with qemu without having to boot a
> > knoppix image to do it...)
>
> Did you use fdisk on your hard file or do you use ist as a super floppy?

I'm trying to create a partitioned image file to feed as a hard drive image to 
qemu.

I eventually made the lilo installer happy by specifying _everything_:
disk=/dev/ubda
  bios=0x80
  cylinders=128
  heads=16
  sectors=63
  partition=/dev/ubda1
    start=63

The actual booting part isn't occurring yet.  (Getting "L 99 99 99 99 99"...)  
I may have the partition offset wrong.  Run my partition finding script... 
Yup, I told sfdisk not to leave a gap here so it starts at sector 1, I 
remember now...  And now the kernel decompression is going "ran out of input 
data" because I didn't update my length hack for the new kernel I just 
built...  Forgot to make some symlinks...  Ah, I left "mknod" out of 
busybox...

Work progresses.  Slowly, as usual... :)


> Try testing it with a second hardfile and (c)fdisk it with partitions.
>
> Most of us use several hard files as super floppies not putting any
> partition table on the disk (you can see a message about that during
> boot, I think).

It's partitioned but the first partition was starting at sector 1.

#!/bin/sh
CYLINDERS=128
HEADS=16
SECTORS=63

dd if=/dev/zero of=hda.img bs=$[$HEADS*$SECTORS*512] count=$CYLINDERS
sfdisk -uS -C $CYLINDERS -H 16 -S 63  hda.img << EOF
1,$[16*63*$CYLINDERS-1],83
EOF

The old dos compatible partitions would have used a starting cylinder of 
$SECTORS instead of 1, but LILO doesn't need the gap.  (I think grub might.)

You can actually use losetup to mount a partition via -o 
$[$cylinder*$sector*$head*512] (where cylinder is actually starting cylinder 
-1, because it's how much to _skip_ and cylinder numbering starts at 1).  You 
can't feed a "length" option to losetup (only offset), but now you know what 
the blocks-count option to mke2fs is for. :)

Yes, I do this sort of thing all the time.  For fun.

Rob
-- 
Steve Ballmer: Innovation!  Inigo Montoya: You keep using that word.
I do not think it means what you think it means.


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

      reply	other threads:[~2005-11-27 12:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-26 19:03 [uml-devel] Using lilo on ubda? Rob Landley
2005-11-26 22:13 ` [uml-devel] " Sven Köhler
2005-11-27  0:36   ` Sven Köhler
2005-11-27  5:22 ` [uml-devel] " Andreas Wohlfeld
2005-11-27 12:47   ` Rob Landley [this message]

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=200511270647.10473.rob@landley.net \
    --to=rob@landley.net \
    --cc=agw@supersonic.ruhr.de \
    --cc=user-mode-linux-devel@lists.sourceforge.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.