Re: creating an fdisk partition in an automated way

2001-04-11 Thread Fred Clift

On Fri, 6 Apr 2001, dannyman wrote:

> On Wed, Apr 04, 2001 at 08:58:12PM -0700, Doug White wrote:
> > fdisk -I is your friend. (DANGER: THIS IS DESTRUCTIVE -- READ THE MAN
...
> Yeah ... I use it.  It seems to do the right thing.  Then disklabel doesn't
> work. :<
...
> disklabel -r -w $disk auto
> 
> Disklabel pukes.  I've found a similar case at:
> 
>http://groups.google.com/groups?q=%22cannot+find+label%22+%22no+disk+label%22+fdisk&hl=en&lr=&safe=off&rnum=1&seld=972266336&ic=1


Disklabel  auto only works on 'raw' disks.  I mean, it wasn't written
to work on partitions er slices.  This wouldn't be a bug, but more a
feature enhancement.  I'm sure it could be implemented.  Let us all know
when you get it fixed :).

Fred

--
Fred Clift - [EMAIL PROTECTED] -- Remember: If brute 
force doesn't work, you're just not using enough.


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: creating an fdisk partition in an automated way

2001-04-07 Thread dannyman

On Sat, Apr 07, 2001 at 07:31:18PM -0700, Doug White wrote:
> On Fri, 6 Apr 2001, dannyman wrote:
> > On Wed, Apr 04, 2001 at 08:58:12PM -0700, Doug White wrote: [...]
> > > fdisk -I is your friend. (DANGER: THIS IS DESTRUCTIVE -- READ THE MAN
> > > PAGE FIRST!)
> >
> > Yeah ... I use it.  It seems to do the right thing.  Then disklabel
> > doesn't work. :<
> 
> Well, I should have commented that for best results, dd if=/dev/zero
> of=/dev/${DISK} count=32 to make sure there's no leftovers for anything to
> trip on.

Hehehe, yeah done already tried that.  Now I'm thinking maybe take the first
64 blocks of a dick I know is good and use that as my fdisk -I. :/

Well, we'll see on Monday.

Thanks,
-danny

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: creating an fdisk partition in an automated way

2001-04-07 Thread Doug White

On Fri, 6 Apr 2001, dannyman wrote:

> On Wed, Apr 04, 2001 at 08:58:12PM -0700, Doug White wrote:
> [...]
> > fdisk -I is your friend. (DANGER: THIS IS DESTRUCTIVE -- READ THE MAN
> > PAGE FIRST!)
>
> Yeah ... I use it.  It seems to do the right thing.  Then disklabel doesn't
> work. :<

Well, I should have commented that for best results, dd if=/dev/zero
of=/dev/${DISK} count=32 to make sure there's no leftovers for anything to
trip on.

Doug White|  FreeBSD: The Power to Serve
[EMAIL PROTECTED] |  www.FreeBSD.org


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: creating an fdisk partition in an automated way

2001-04-06 Thread dannyman

On Wed, Apr 04, 2001 at 08:58:12PM -0700, Doug White wrote:
[...]
> fdisk -I is your friend. (DANGER: THIS IS DESTRUCTIVE -- READ THE MAN
> PAGE FIRST!)

Yeah ... I use it.  It seems to do the right thing.  Then disklabel doesn't
work. :<

I'm looking like this:

#!/bin/sh

disk='da0'

fdisk -I ${disk}

disk=${disk}s1

disklabel -r -w $disk auto

Disklabel pukes.  I've found a similar case at:
http://groups.google.com/groups?q=%22cannot+find+label%22+%22no+disk+label%22+fdisk&hl=en&lr=&safe=off&rnum=1&seld=972266336&ic=1

I emailed Matt Dillon to see if he solved the problem.  You have no idea, eh?
Or do you do something slightly different?  These commands work great if I run
sysinstall over to DTRT at first, but on a virgin bare disk, ... nada. :<

Thanks,
-danny

-- 
http://dannyman.toldme.com/

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: creating an fdisk partition in an automated way

2001-04-04 Thread Doug White

On Wed, 4 Apr 2001, dannyman wrote:

> Ooookay ...
>
> So, I gave up on sysinstall and wrote a script that beautifully runs disklabel
> and newfs slices for me, writing an fstab and installing packages after
> starting off a PXE boot.  It is just COOL!

Yup :)

> Now all my test machines wont boot.  The hard disk boot just doesn't DO
> anything, and the pxeboot crashes once it sees the SCSI disk.  Best I can
> tell from some Deja searches, this is related to the Adaptec controller
> reviling at the thought of a "dangeously dedicated" disk.

Yup.

> But I can not for the life of me figure out how to do it the right way.

fdisk -I is your friend. (DANGER: THIS IS DESTRUCTIVE -- READ THE MAN
PAGE FIRST!)

Doug White|  FreeBSD: The Power to Serve
[EMAIL PROTECTED] |  www.FreeBSD.org


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



creating an fdisk partition in an automated way

2001-04-04 Thread dannyman

Ooookay ...

So, I gave up on sysinstall and wrote a script that beautifully runs disklabel
and newfs slices for me, writing an fstab and installing packages after
starting off a PXE boot.  It is just COOL!

Now all my test machines wont boot.  The hard disk boot just doesn't DO
anything, and the pxeboot crashes once it sees the SCSI disk.  Best I can
tell from some Deja searches, this is related to the Adaptec controller
reviling at the thought of a "dangeously dedicated" disk.

But I can not for the life of me figure out how to do it the right way.

Because it's cute, I attach my script.  I've tried changing disk to da0s1 and
it works JUST FINE on another IDE-based system on its spare SCSI disk, but
gets upset at me when I try to run the disklabel commands on my test machines.
I believe I need to do something with fdisk but I can not fathom quite what it
is from the man page.

The working disk looks like so:

0-17:55 root@cronic /usr/local/share/netboot# fdisk da0
*** Working on device /dev/da0 ***
parameters extracted from in-core disklabel are:
cylinders=1115 heads=255 sectors/track=63 (16065 blks/cyl)

Figures below won't work with BIOS for partitions not in cyl 1
parameters to be used for BIOS calculations are:
cylinders=1115 heads=255 sectors/track=63 (16065 blks/cyl)

Media sector size is 512
Warning: BIOS sector numbering starts with sector 1
Information from DOS bootblock is:
The data for partition 1 is:
sysid 165,(FreeBSD/NetBSD/386BSD)
start 63, size 17912412 (8746 Meg), flag 80 (active)
beg: cyl 0/ sector 1/ head 1;
end: cyl 1023/ sector 63/ head 254
The data for partition 2 is:

The data for partition 3 is:

The data for partition 4 is:


The SCSI drives on my test machines, larger Seagates, start out similar, but
they have their goods in partition 4.  In their previous lives they were
Solaris x86 boxen, which is why I figure the sysid 165 stuff looks the same.
:)

Can someone please clue me in? :)

Thanks,
-danny

-- 
http://dannyman.toldme.com/

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message