Subject: Re: Installing 2.0.2 onto IBM 7248-100
To: Jochen Kunz <jkunz@unixag-kl.fh-kl.de>
From: Andy Ruhl <acruhl@gmail.com>
List: port-prep
Date: 07/25/2005 20:37:19
On 7/25/05, Andy Ruhl <acruhl@gmail.com> wrote:
> On 7/25/05, Andy Ruhl <acruhl@gmail.com> wrote:
> > On 7/25/05, Jochen Kunz <jkunz@unixag-kl.fh-kl.de> wrote:
>=20
> > > Usually I do it this way:
> > > save output of fdisk(8) and disklabel(8).
> > > dd(1) kernel image like generic.fs to raw disk.
> > >         ATTENTION! This overwrites the MBR partition table.
> > > restore MBR partition table according to saved fdisk(8) output.
> > > reboot and pray. ;-)
> > >
> > > Note: If you compile your own kernel you have to convert the ELF imag=
e
> > > to a .fs image including bootloader and kernel with mkbootimage(8).
> >
> > There is no man page for mkbootimage(8) for prep. There is one for
> > some other archs, but not prep. All I found was when I built tools for
> > 2.0.2, in my tools/bin directory there is a nbprep-mkbootimage binary.
> > I did help on it and it gives me this:
> >
> > # ./nbprep-mkbootimage -h
> > usage: ./nbprep-mkbootimage <boot-prog> <boot-image> [<gzip'd kernel>]
> >
> > I can't quite tell what that means. I'm going to try some stuff and rep=
ort back.
>=20
> By the way, thanks for your help so far Jochen! I always somehow
> forget to say that.
>=20
> Ok. I'm stumbling through now.
>=20
> I noticed a /usr/mdec/mkbootimage binary on my prep system. In that
> same directory also appears to be 2 bootloaders: boot and boot_com0
>=20
> I assumed (correctly luckily) that boot is for VGA and boot_com0 is
> for a serial console.
>=20
> I cross built a kernel for this from another machine, so I grabbed
> that and gzipped it.
>=20
> The syntax is this:
>=20
> ./mkbootimage boot netbsd.fs netbsd.gz
>=20
> where:
>=20
> boot is the /usr/mdec/boot file
> netbsd.fs is the name of the boot image you want to make (it doesn't
> exist before you run this command)
> netbsd.gz is a gzipped kernel you made.
>=20
> I netbooted this thing and it works, that's wonderful.
>=20
> Next, how to boot from the hardware?
>=20
> I think I have something screwy going on, because I tried to do a dd
> and got this:
>=20
> # dd if=3Dbugs1.fs of=3D/dev/sd0d seek=3D64
> dd: /dev/sd0d: Device not configured
>=20
> Where bugs1.fs is the name of the boot image I created and
> successfully netbooted.
>=20
> Also, following convention, the "d" partition in disklabel is
> suppposed to cover the entire disk, right? Well, this isn't the case
> for me:
>=20
> # disklabel -r sd0
> # /dev/rsd0c:
> type: SCSI
> disk: mydisk
> label: fictitious
> flags:
> bytes/sector: 512
> sectors/track: 309
> tracks/cylinder: 5
> sectors/cylinder: 1545
> cylinders: 11474
> total sectors: 17774160
> rpm: 7200
> interleave: 1
> trackskew: 0
> cylinderskew: 0
> headswitch: 0           # microseconds
> track-to-track seek: 0  # microseconds
> drivedata: 0
>=20
> 7 partitions:
> #        size    offset     fstype [fsize bsize cpg/sgs]
>  a:  17231872         0     4.2BSD   2048 16384 28120  # (Cyl.      0 -  =
11153*)
>  b:    542288  17231872       swap                     # (Cyl.  11153*-  =
11504*)
>  c:  17758095     16065     unused      0     0        # (Cyl.     10*-  =
11504*)
>  d:     16000        64     unused      0     0        # (Cyl.      0*-  =
   10*)
>  e:  17758095     16065     unused      0     0        # (Cyl.     10*-  =
11504*)
>=20
> And here's fdisk:
>=20
> # fdisk sd0
> Disk: /dev/rsd0c
> NetBSD disklabel disk geometry:
> cylinders: 11474, heads: 5, sectors/track: 309 (1545 sectors/cylinder)
> total sectors: 17774160
>=20
> BIOS disk geometry:
> cylinders: 1024, heads: 255, sectors/track: 63 (16065 sectors/cylinder)
> total sectors: 17774160
>=20
> Partition table:
> 0: Linux/MINIX (sharing disk with DRDOS) or Personal RISC boot (sysid 65)
>     start 64, size 16000 (8 MB, Cyls 0/1/2-0/254/63), Active
> 1: NetBSD (sysid 169)
>     start 16065, size 17758095 (8671 MB, Cyls 1-1106/99/34)
> 2: <UNUSED>
> 3: <UNUSED>
>=20
> Any thoughts? Something doesn't look right in there... I think I might
> have to re-do the disk...
>=20
> Thanks!
>=20

Ok, I definitely need to redo the disk. I didn't realize that the a
partition starts from the begining. That's a problem.

Andy