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 06:55:16
On 7/25/05, Andy Ruhl <acruhl@gmail.com> wrote:
> On 7/25/05, Jochen Kunz <jkunz@unixag-kl.fh-kl.de> wrote:
> > 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 image
> > to a .fs image including bootloader and kernel with mkbootimage(8).
>=20
> 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:
>=20
> # ./nbprep-mkbootimage -h
> usage: ./nbprep-mkbootimage <boot-prog> <boot-image> [<gzip'd kernel>]
>=20
> I can't quite tell what that means. I'm going to try some stuff and repor=
t back.
By the way, thanks for your help so far Jochen! I always somehow
forget to say that.
Ok. I'm stumbling through now.
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
I assumed (correctly luckily) that boot is for VGA and boot_com0 is
for a serial console.
I cross built a kernel for this from another machine, so I grabbed
that and gzipped it.
The syntax is this:
./mkbootimage boot netbsd.fs netbsd.gz
where:
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.
I netbooted this thing and it works, that's wonderful.
Next, how to boot from the hardware?
I think I have something screwy going on, because I tried to do a dd
and got this:
# dd if=3Dbugs1.fs of=3D/dev/sd0d seek=3D64
dd: /dev/sd0d: Device not configured
Where bugs1.fs is the name of the boot image I created and
successfully netbooted.
Also, following convention, the "d" partition in disklabel is
suppposed to cover the entire disk, right? Well, this isn't the case
for me:
# 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
7 partitions:
# size offset fstype [fsize bsize cpg/sgs]
a: 17231872 0 4.2BSD 2048 16384 28120 # (Cyl. 0 - 11=
153*)
b: 542288 17231872 swap # (Cyl. 11153*- 11=
504*)
c: 17758095 16065 unused 0 0 # (Cyl. 10*- 11=
504*)
d: 16000 64 unused 0 0 # (Cyl. 0*- =
10*)
e: 17758095 16065 unused 0 0 # (Cyl. 10*- 11=
504*)
And here's fdisk:
# fdisk sd0
Disk: /dev/rsd0c
NetBSD disklabel disk geometry:
cylinders: 11474, heads: 5, sectors/track: 309 (1545 sectors/cylinder)
total sectors: 17774160
BIOS disk geometry:
cylinders: 1024, heads: 255, sectors/track: 63 (16065 sectors/cylinder)
total sectors: 17774160
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>
Any thoughts? Something doesn't look right in there... I think I might
have to re-do the disk...
Thanks!
Andy