Port-macppc archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: setup a drive with disklabel



Hi Michael,

It doesn't seem to matter what list I ask a question on, you seem to
answer. THANKYOU!!

On Sat, 3 May 2008, Michael Lorenz wrote:
> On May 3, 2008, at 02:11, Al - image hosting services wrote:
>
> > I am setting up a drive, but I can't seem to get things right with
> > disklabel. I have the computer netbooted and I would like to do
> > everything
> > manually with NetBSD. Where I am stuck is when I ran: "dd if=/dev/zero
> > of=/dev/sd0c bs=8k count=1". Shouldn't this delete the disklabel?
>
> It's supposed to wipe out any previously existing partitioning
> schemes, like an Apple partition map.
>
> > It is still there after I do this (I really don't want to reboot
> > unless I really
> > have too).
>
> What you get is the kernel's copy of the disk label.

I think the only way to get rid of this information and to get it to
generate new information is to reboot. I really didn't want to reboot,
because I thought that if I did I would not be able to read what is on the
monitor (that it would be all scrambled again). I was getting a disk label
for that drive that wasn't right. It didn't have a c: partition (the whole
disk) and it had something besides label: fictitious. I rebooted and the
video mode is right for the monitor. So, I could see that it didn't have a
disk label. Now, when I look at disklabel /dev/sd0c, it looks right.

> > I would like to delete everything that is in the disklabel. Then
> > reload
> > the drives geometry, then use "disklabel -i /dev/sd0c" to partition
> > the
> > drive.  I should then be able to use newfs to format the partitions
> > and
> > installboot to install bootxx. This sound good in theory, but in
> > practical
> > application I seem to be missing something.
>
> What do you think you're missing?

What I really thought that I was missing was a way to delete the kernels
disk label. Although, I may be still over complicating this.


This is what I did:
disklabel /dev/sd0c > label
disklabel -r -R /dev/sd0c label
disklabel -i /dev/sd0c

I setup the partitions. At first this didn't seem right, but it looks like
I did it right.

#        size    offset     fstype [fsize bsize cpg/sgs]
 a:   5120000         0     4.2BSD      0     0     0  # (Cyl.      0 -
2499)
 b:    681984   5120000       swap                     # (Cyl.   2500 -
2832)
 c: 490234752         0     unused      0     0        # (Cyl.      0 -
239372*)
 e:  71680000   5801984     4.2BSD      0     0     0  # (Cyl.   2833 -
37832)
 f:  40960000  77481984     4.2BSD      0     0     0  # (Cyl.  37833 -
57832)
 g: 371792768 118441984     4.2BSD      0     0     0  # (Cyl.  57833 -
239372*)


My question is should partition "a" start with cylinder 0?

Then ran:
newfs /dev/sd0a
newfs /dev/sd0e
newfs /dev/sd0f
newfs /dev/sd0g

cp /usr/mdec/ofwboot /
installboot -v /dev/rwd0c /usr/mdec/bootxx /ofwboot

shutdown -r now

Then I get put back into the open firmware.

setenv boot-device pci/@D/@0,0
setenv boot-file
reset-all

Then:
0 bootr

HURRAY!!! I can boot from the hard drive.

but if I do:
setenv auto-boot? true
reset-all

Then the monitor says that the frequency is outside the range, please
select another setting. So, I am stuck again.

Thanks,
Al






Home | Main Index | Thread Index | Old Index