tech-install archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: NetBSD 6.0Beta and 6.0Beta2 on hpcarm doesn't create a fdisk partition during install
> On Sat, Jul 14, 2012 at 03:12:30AM -0400, jmitchel%bigjar.com@localhost wrote:
>> Hello,
>>
>> I've noticed a slight issue with 6.0BETA and 6.0BETA2. After doing an
>> install on a new CF card, here's what we get:
>>
>> --------------
>> fdisk /dev/wd0
>> --------------
> ...
>> Partition table:
>> 0: Primary 'big' DOS, 16-bit FAT (> 32MB) (sysid 6)
>> start 8192, size 80325 (39 MB, Cyls 0/130/3-5/130/2), Active
>> 1: <UNUSED>
>> 2: <UNUSED>
>> 3: <UNUSED>
>> First active partition: 0
>> -----------------
>>
>> The surprising part is that NetBSD 6.0 BETA & BETA2 can run on this
>> flash
>> card. Part of that is because hpcarm uses Windows CE to load the NetBSD
>> kernel. But there is a disklabel somewhere. Here's what disklabel says:
>>
>> ------------------
>> disklabel /dev/wd0
>> ------------------
> ...
>> 16 partitions:
>> # size offset fstype [fsize bsize cpg/sgs]
>> a: 7863408 88517 4.2BSD 2048 16384 0 # (Cyl.
>> 87*-7888*)
>> b: 263275 7951925 swap # (Cyl.
>> 7888*-8149)
>> c: 8126683 88517 unused 0 0 # (Cyl.
>> 87*-8149)
>> d: 8215200 0 unused 0 0 # (Cyl. 0
>> -8149)
>> e: 80325 8192 MSDOS # (Cyl.
>> 8*-87*)
>> ---------------------
>
> I'd guess that the disklabel is somewhere in sector 0 or 1.
> IIRC 'disklabel -rvvv /dev/wd0a' will tell you where the label is found.
Thanks for that. You were right -- the disklabel is in sector 1. Here's
the output on the hpcarm device:
jornada# disklabel -rvvv /dev/wd0
disklabel: reading mbr sector 0
disklabel: read sector 0 len 8192 looking for label
disklabel: label found at offset 512 from sector 0
# /dev/wd0d:
type: unknown
disk: TRANSCEND
label:
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 16
sectors/cylinder: 1008
cylinders: 8150
total sectors: 8215200
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0 # microseconds
track-to-track seek: 0 # microseconds
drivedata: 0
16 partitions:
# size offset fstype [fsize bsize cpg/sgs]
a: 7863408 88517 4.2BSD 2048 16384 0 # (Cyl. 87*-
7888*)
b: 263275 7951925 swap # (Cyl. 7888*-
8149)
c: 8126683 88517 unused 0 0 # (Cyl. 87*-
8149)
d: 8215200 0 unused 0 0 # (Cyl. 0 -
8149)
e: 80325 8192 MSDOS # (Cyl. 8*-
87*)
>
> For a variety of reasons different NetBSD ports keep the disklabel in
> different places.
> To allow media be moved at least some systems play 'hunt the disklabel'.
>
> In this case it looks like exactly what you wanted - I guess you've
> moved a disk from hparm to x86.
I took a CF card that only had a FAT16 MBR partition and installed NetBSD
on it. Using another hpcarm CF, I deleted the original FAT32 MBR partition
and created a small FAT16 partition for hpcboot.exe -- the Windows CE
bootloader that starts hpcarm and an install kernel. Then within sysinst,
I attempted to create a NetBSD MBR partition and then labelled the disk.
If I boot from this card, then NetBSD finds the disklabel and the NetBSD
partitions are accessible. If I boot a different CF card with NetBSD 5.1.2
and insert this CF card, then the disklabel isn't detected. So I guess
5.1.2 doesn't have the same code that looks for the disklabel.
>
> There is a problem with the partitions 'c' and 'd' though. 'c' is
> traditionally the whole disk, the first x86 ports used mbr partition
> relative sectors - so 'c' would refer to the 'netbsd part of the disk'.
> Then it was changed to use absolute sectors and 'd' got pinched as well
> for 'really all of the disk'.
> This is a problem if you move a disk from sparc (where 'd' is a user
> partition) to x86.
>
> David
I guess the only problem is that an MBR partition isn't created even
though sysinst claims it is. That might cause problems if the CF is
inserted while another OS is running (although it doesn't cause problems
under Windows CE).
Unfortunately, there's no way to install NetBSD without first having a DOS
partition to hold the boot loader and kernel. I just took a new flash card
with the same partition scheme (4G FAT16) and repartitioned it on a Linux
box. Sysinst is running now. I'll report on the results when it finishes
(it will be a while).
Also, hpcboot.exe sometimes has trouble with gzipped kernels. Could we
make the 6.0 kernel for hpcarm uncompressed by default?
For googlers from the future, the d partition is a user partition on
hpcsh, IIRC.
Jason M.
Home |
Main Index |
Thread Index |
Old Index