RE: format slice

2005-03-14 Thread Freek Nossin


 -Original Message-
 From: Alejandro Pulver [mailto:[EMAIL PROTECTED]
 Sent: zondag 13 maart 2005 15:53
 To: Freek Nossin
 Cc: freebsd-questions@freebsd.org; 'Jerry McAllister'
 Subject: Re: format slice
 
 Hello,
 
 Sorry I did not noticed it before, but your first slice must be of type
 165 (or 0xa5 in hex), that is the type of FreeBSD slices.
 
   The data for partition 1 is:
   sysid 0 (),(unused)
   start 63, size 20820177 (10166 Meg), flag 0
   beg: cyl 0/ head 1/ sector 1;
   end: cyl 174/ head 15/ sector 63
   The data for partition 2 is:
   sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
   start 20820240, size 19201392 (9375 Meg), flag 80 (active)
   beg: cyl 1023/ head 255/ sector 63;
   end: cyl 1023/ head 15/ sector 63
 
 It appeares as unused. So try changing the type.
 
 Best Regards,
 Ale

Finally it worked!

Thanks for helping me (but if I may? Still one question left... ). 

The slice was indeed unused. When I tried sysinstall just after the reboot,
and again it didn't worked I falsely assumed doing it from the command
prompt would also be of no use. I was wrong, following your advice, starting
fdisk (this time with -i, instead of -u, just to figure out if there was any
difference, still don't know that yet though ;-) ). And changing the type
created a freebsd slice. Then I used bsdlabel and there it was! /dev/ad0s1a
was in my list of devices. 

There is one little thing that worries me. On someone's advice I installed
testdisk (sysutils/testdisk). This tool tests your disk (duh! I mean slices
and partitions, so actually my disklayout). 

Disk /dev/ad0 - CHS 39704 16 63 - 19541 MB
Check current partition structure
 Partition  StartEndSize in sectors
 1 P FreeBSD  0   1  1 20654  15 63   20820177
 2 * FreeBSD  20655   0  1 39703  15 63   19201392

Bad starting head


The bad starting head warning worries me. But with these tools you never
know if the tool is correct, or indeed my disklayout. If I didn't just wrote
my Bios Partition table a couple of times, I wouldn't have worried at all,
but now I did, it *might* be possible that I actually did something wrong. 
My fdisk output is as follows (These numbers come even visit me in my dreams
these days... ;-) ):

bash-2.05b$ sudo fdisk
*** Working on device /dev/ad0 ***
parameters extracted from in-core disklabel are:
cylinders=39704 heads=16 sectors/track=63 (1008 blks/cyl)

Figures below won't work with BIOS for partitions not in cyl 1
parameters to be used for BIOS calculations are:
cylinders=39704 heads=16 sectors/track=63 (1008 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 (0xa5),(FreeBSD/NetBSD/386BSD)
start 63, size 20820177 (10166 Meg), flag 0
beg: cyl 0/ head 1/ sector 1;
end: cyl 174/ head 15/ sector 63
The data for partition 2 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
start 20820240, size 19201392 (9375 Meg), flag 80 (active)
beg: cyl 1023/ head 255/ sector 63;
end: cyl 1023/ head 15/ sector 63
The data for partition 3 is:
UNUSED
The data for partition 4 is:
UNUSED

Does anybody see a bad starting head??? 

Thanks again for helping me so far (Alejandro, and Jerry)

Freek

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: format slice

2005-03-14 Thread Alejandro Pulver
On Mon, 14 Mar 2005 22:54:57 +0100
Freek Nossin [EMAIL PROTECTED] wrote:

 
 
  -Original Message-
  From: Alejandro Pulver [mailto:[EMAIL PROTECTED]
  Sent: zondag 13 maart 2005 15:53
  To: Freek Nossin
  Cc: freebsd-questions@freebsd.org; 'Jerry McAllister'
  Subject: Re: format slice
  
  Hello,
  
  Sorry I did not noticed it before, but your first slice must be of
  type 165 (or 0xa5 in hex), that is the type of FreeBSD slices.
  
The data for partition 1 is:
sysid 0 (),(unused)
start 63, size 20820177 (10166 Meg), flag 0
beg: cyl 0/ head 1/ sector 1;
end: cyl 174/ head 15/ sector 63
The data for partition 2 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
start 20820240, size 19201392 (9375 Meg), flag 80 (active)
beg: cyl 1023/ head 255/ sector 63;
end: cyl 1023/ head 15/ sector 63
  
  It appeares as unused. So try changing the type.
  
  Best Regards,
  Ale
 
 Finally it worked!
 
 Thanks for helping me (but if I may? Still one question left... ). 
 
 The slice was indeed unused. When I tried sysinstall just after the
 reboot, and again it didn't worked I falsely assumed doing it from the
 command prompt would also be of no use. I was wrong, following your
 advice, starting fdisk (this time with -i, instead of -u, just to
 figure out if there was any difference, still don't know that yet
 though ;-) ). And changing the type created a freebsd slice. Then I
 used bsdlabel and there it was! /dev/ad0s1a was in my list of devices.
 
 
 There is one little thing that worries me. On someone's advice I
 installed testdisk (sysutils/testdisk). This tool tests your disk
 (duh! I mean slices and partitions, so actually my disklayout). 
 
 Disk /dev/ad0 - CHS 39704 16 63 - 19541 MB
 Check current partition structure
  Partition  StartEndSize in sectors
  1 P FreeBSD  0   1  1 20654  15 63   20820177
  2 * FreeBSD  20655   0  1 39703  15 63   19201392
 
 Bad starting head
 
 
 The bad starting head warning worries me. But with these tools you
 never know if the tool is correct, or indeed my disklayout. If I
 didn't just wrote my Bios Partition table a couple of times, I
 wouldn't have worried at all, but now I did, it *might* be possible
 that I actually did something wrong. My fdisk output is as follows
 (These numbers come even visit me in my dreams these days... ;-) ):
 
 bash-2.05b$ sudo fdisk
 *** Working on device /dev/ad0 ***
 parameters extracted from in-core disklabel are:
 cylinders=39704 heads=16 sectors/track=63 (1008 blks/cyl)
 
 Figures below won't work with BIOS for partitions not in cyl 1
 parameters to be used for BIOS calculations are:
 cylinders=39704 heads=16 sectors/track=63 (1008 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 (0xa5),(FreeBSD/NetBSD/386BSD)
 start 63, size 20820177 (10166 Meg), flag 0
 beg: cyl 0/ head 1/ sector 1;
 end: cyl 174/ head 15/ sector 63
 The data for partition 2 is:
 sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
 start 20820240, size 19201392 (9375 Meg), flag 80 (active)
 beg: cyl 1023/ head 255/ sector 63;
 end: cyl 1023/ head 15/ sector 63
 The data for partition 3 is:
 UNUSED
 The data for partition 4 is:
 UNUSED
 
 Does anybody see a bad starting head??? 
 
 Thanks again for helping me so far (Alejandro, and Jerry)
 
 Freek


Hello,

You are welcome.

Mine is better :)

Disk /dev/ad0 - CHS 77504 16 63 - 38146 MB
Disk /dev/ad2 - CHS 79656 16 63 - 39205 MB

Disk /dev/ad0 - CHS 77504 16 63 - 38146 MB
 1 * FAT32 LBA0   1  1 36863   6 63   37158282
Bad ending head
 2 E extended LBA 36863   7  1 77488   1 63   40949685
Bad ending head
Disk /dev/ad2 - CHS 79656 16 63 - 39205 MB
 1 P Linux0   1  1 20304   5 63   20466747
Bad ending head
 4 * FreeBSD  40624  11  1 79225   4 63   38909430
Bad ending head
TestDisk exited normally.

I do not know what is that, but I think it is just a warning. It has to
do with low level disk parameters (cylinders, heads, sectors, etc.) I do
not know. There is information about that (not specifically this topic
but there is a *lot* of information about hard-disks and how do they
operate) in

http://www.pcguide.com/topic.html (section hard-drives)

but I did not have problems with my slices/filesystems/data.

Best Regards,
Ale
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


RE: format slice

2005-03-13 Thread Freek Nossin


 -Original Message-
 From: Alejandro Pulver [mailto:[EMAIL PROTECTED]
 Sent: zondag 13 maart 2005 1:30
 To: Alejandro Pulver
 Cc: Freek Nossin; 'Jerry McAllister'; freebsd-questions@freebsd.org
 Subject: Re: format slice
 
 On Sat, 12 Mar 2005 21:06:05 -0300
 Alejandro Pulver [EMAIL PROTECTED] wrote:
 
  On Sun, 13 Mar 2005 00:04:06 +0100
  Freek Nossin [EMAIL PROTECTED] wrote:
 Then I used bsdlabel to create a label on ad0s1 by typing:

 #bsdlabel -w ad0s1

 And following the handbook, my next command was:

 #bsdlabel -e ad0s1

 Now I wrote in the text editor (I admit, after 4 tries and a lot
 of reading...):

 # /dev/ad0s1:
 8 partitions:
 #size   offsetfstype   [fsize bsize bps/cpg]
   c: 208201770unused0 0 # raw
   part, don't e: 2082017704.2BSD 2048 16384
   32776


 now I wanted to use newfs to create a file system on ad0s1e, but
 it could not. My problem is illustrated by my ls output:

 pcwin451# ls /dev/ad*
 /dev/ad0/dev/ad0s2  /dev/ad0s2b /dev/ad0s2d
 /dev/ad0s1  /dev/ad0s2a /dev/ad0s2c /dev/ad0s2e

 bsdlabel -e didn't create a new partition, although the output
 of bsdlabel ad0s1 is:

 pcwin451# disklabel ad0s1
 # /dev/ad0s1:
 8 partitions:
 #size   offsetfstype   [fsize bsize bps/cpg]
   c: 208201770unused0 0 # raw
   part, don't
 edit
   e: 20820161   164.2BSD 2048 16384 32776

 How can this be? (and how do I fix it...?)

 Thanks for your help already so far

 Freek

   
Hello,
   
In my second disk I have free space between two slices so I tried
the procedure by myself.
   
When I did a 'bsdlabel -w /dev/adXsY' (without editing them) I
ended with a partition labeled 'a', and it instantly appeared in
'/dev/'. Then I did what you have done ('bsdlabel -e slice') and
it also appeared in'/dev'.
   
I do not know about this, but maybe this helps:
   
1) Try with only 'bsdlabel -w slice'. The partition should
appear as'a'.
   
2) If the partition does not appear in '/dev/' then you can
reinitialize the ATA channel (0 or 1, I think your disk is in 0)
your disk is in, with 'atacontrol reinit channel'. For a list of
ATA channels with the devices do 'atacontrol list'.
   
***WARNING***: do ***NOT*** 'detach' and 'attach' the channel your
device your running hard disk (that contain the FreeBSD you are
running) is connected to (but you can safely 'reinit' it). A
'detach' removes the disk and slices/partitions from the kernel
and powers down the devices in that channel, so FreeBSD will stall
when it tries to read/write on its partitions ('/', '/usr', etc.).
I could detach and atach it once (in less than 5 seconds), but the
other time it crashed my machine (I had to rewrite this mail three
times, because I was experimenting with 'atacontrol'). It is more
safe to reboot the machine.
   
Best Regards,
Ale
  
  
   Thank, but unfortunately it dit not help
  
   pcwin451# atacontrol reinit 0
   Master:  ad0 Maxtor 5T020H2/TAH71DP0 ATA/ATAPI revision 6
   Slave:   no device present
  
   pcwin451# bsdlabel -w ad0s1
  
   pcwin451# ls /dev/ad*
   /dev/ad0/dev/ad0s2  /dev/ad0s2b /dev/ad0s2d
   /dev/ad0s1  /dev/ad0s2a /dev/ad0s2c /dev/ad0s2e
  
  
  
   ___
   freebsd-questions@freebsd.org mailing list
   http://lists.freebsd.org/mailman/listinfo/freebsd-questions
   To unsubscribe, send any mail to
   [EMAIL PROTECTED]
 
  Hello,
 
  Have you tried to reinitialize the ata channel before changing the
  partitions?
 
 
 Sorry, I mean after.
 
  Try unmounting '/dev' and mounting it again (forcing it with '-f').
 
  If the problem persist, the only alternative is to reboot. Do you have
  a dynamic IP? If that is the case it is possible to add a crontab
  entry that executes a script on each system startup. The script can
  send you an e-mail to you using the internal sendmail (must be enabled
  for that) relay so it will contain the IP of your server (in the
  complete headers). Alternatively the script can upload a file
  containing the output of 'ifconfig' to an FTP site.
 
  If you are interested you can ask me for more information.
 
  Best Regards,
  Ale
  ___
  freebsd-questions@freebsd.org mailing list
  http://lists.freebsd.org/mailman/listinfo/freebsd-questions
  To unsubscribe, send any mail to
  [EMAIL PROTECTED]

Hello, 

I did try to reinitialize the ata channel: no effect
I did try to unmount and mount /dev: no effect
Next on the list was: Shutdown -r now.

The reboot fortunately went well. But my problems weren't solved. Still
ad0s1a wasn't in /dev

Re: format slice

2005-03-13 Thread Alejandro Pulver
Hello,

Sorry I did not noticed it before, but your first slice must be of type
165 (or 0xa5 in hex), that is the type of FreeBSD slices.

  The data for partition 1 is:
  sysid 0 (),(unused)
  start 63, size 20820177 (10166 Meg), flag 0
  beg: cyl 0/ head 1/ sector 1;
  end: cyl 174/ head 15/ sector 63
  The data for partition 2 is:
  sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
  start 20820240, size 19201392 (9375 Meg), flag 80 (active)
  beg: cyl 1023/ head 255/ sector 63;
  end: cyl 1023/ head 15/ sector 63

It appeares as unused. So try changing the type.

Best Regards,
Ale
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


RE: format slice

2005-03-12 Thread Freek Nossin
Hello, formatting is almost complete... 

My new problem is that bsdlabel didn't create a new partition after bsdlabel
-e ad0s1. Below is an extensive output of some commands, but you might want
to skip to the last alinea ;). 

I used fdisk to create a new slice. I copied the exact format of the
previous slice (on which the windows installation resided), so I didn't have
to worry about the overlapping slices. I got this nice output:

pcwin451# fdisk
*** Working on device /dev/ad0 ***
parameters extracted from in-core disklabel are:
cylinders=39704 heads=16 sectors/track=63 (1008 blks/cyl)

Figures below won't work with BIOS for partitions not in cyl 1
parameters to be used for BIOS calculations are:
cylinders=39704 heads=16 sectors/track=63 (1008 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 0 (),(unused)
start 63, size 20820177 (10166 Meg), flag 0
beg: cyl 0/ head 1/ sector 1;
end: cyl 174/ head 15/ sector 63
The data for partition 2 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
start 20820240, size 19201392 (9375 Meg), flag 80 (active)
beg: cyl 1023/ head 255/ sector 63;
end: cyl 1023/ head 15/ sector 63
The data for partition 3 is:
UNUSED
The data for partition 4 is:
UNUSED

Part 1 is the new slice which I want to use. 
Then I used bsdlabel to create a label on ad0s1 by typing: 

#bsdlabel -w ad0s1

And following the handbook, my next command was:

#bsdlabel -e ad0s1

Now I wrote in the text editor (I admit, after 4 tries and a lot of
reading...):

# /dev/ad0s1:
8 partitions:
#size   offsetfstype   [fsize bsize bps/cpg]
  c: 208201770unused0 0 # raw part, don't 
  e: 2082017704.2BSD 2048 16384 32776


now I wanted to use newfs to create a file system on ad0s1e, but it could
not. My problem is illustrated by my ls output:

pcwin451# ls /dev/ad*
/dev/ad0/dev/ad0s2  /dev/ad0s2b /dev/ad0s2d
/dev/ad0s1  /dev/ad0s2a /dev/ad0s2c /dev/ad0s2e

bsdlabel -e didn't create a new partition, although the output of bsdlabel
ad0s1 is:

pcwin451# disklabel ad0s1
# /dev/ad0s1:
8 partitions:
#size   offsetfstype   [fsize bsize bps/cpg]
  c: 208201770unused0 0 # raw part, don't
edit
  e: 20820161   164.2BSD 2048 16384 32776

How can this be? (and how do I fix it...?)

Thanks for your help already so far

Freek


 -Original Message-
 From: Alejandro Pulver [mailto:[EMAIL PROTECTED]
 Sent: vrijdag 11 maart 2005 21:31
 To: Freek Nossin
 Cc: 'Jerry McAllister'; freebsd-questions@freebsd.org
 Subject: Re: format slice
 
 On Fri, 11 Mar 2005 21:16:49 +0100
 Freek Nossin [EMAIL PROTECTED] wrote:
 
   -Original Message-
   From: Jerry McAllister [mailto:[EMAIL PROTECTED]
   Sent: vrijdag 11 maart 2005 21:00
   To: Freek Nossin
   Cc: freebsd-questions@freebsd.org; [EMAIL PROTECTED]
   Subject: Re: format slice
  
   
Thank you for your suggestions, I followed them and this is what
   happened:
   
pcwin451# fdisk -s
/dev/ad0: 39704 cyl 16 hd 63 sec
PartStartSize Type Flags
   1:  6320820177 0x07 0x00
   2:2082024019201392 0xa5 0x80
   
Part 1 is the one I want to convert to a freebsd slice.
   
Now I used fdisk -f file with the input
   
p 1 0 0 0
   
the operation succeeded. I did again:
   
pcwin451# fdisk -s
/dev/ad0: 39704 cyl 16 hd 63 sec
PartStartSize Type Flags
   2:2082024019201392 0xa5 0x80
   
And this was indeed the output I expected. So I thought lets see
what sysinstall thinks of all this. Selecting fdisk in the menu
showed me a
   disk
layout where the NTFS partition still was on the disk.
   
Disk name:  ad0FDISK
Partition Editor
DISK Geometry:  39704 cyls/16 heads/63 sectors = 40021632 sectors
   (19541MB)
   
Offset   Size(ST)End Name  PType   Desc
Subtype Flags
   
 0 63 62- 12 unused
 0
   
63   20820177   20820239ad0s1  4 NTFS/HPFS/QNX
   7
  20820240   19201392   40021631ad0s2  8freebsd
  165
   
   
How can this be? I've always assumed that sysinstall uses the
fdisk
   tool?
And which one is correct? Is it wise to try creating a new slice
with fdisk?
  
   Well, is one of them reading only the in-memory label and the other
   reading the label on the disk?When you did the fdisk, did you
   make sure it changed on disk.  Then, did the in-memory label get
   updated?
  
   jerry
 
 
  /stand/sysinstall would be the one that read the in-memory label. The
  other way around seems impossible to me. But then how can these two be
  different? I did close /stand

Re: format slice

2005-03-12 Thread Alejandro Pulver
On Sat, 12 Mar 2005 21:09:33 +0100
Freek Nossin [EMAIL PROTECTED] wrote:

 Hello, formatting is almost complete... 
 
 My new problem is that bsdlabel didn't create a new partition after
 bsdlabel-e ad0s1. Below is an extensive output of some commands, but
 you might want to skip to the last alinea ;). 
 
 I used fdisk to create a new slice. I copied the exact format of the
 previous slice (on which the windows installation resided), so I
 didn't have to worry about the overlapping slices. I got this nice
 output:
 
 pcwin451# fdisk
 *** Working on device /dev/ad0 ***
 parameters extracted from in-core disklabel are:
 cylinders=39704 heads=16 sectors/track=63 (1008 blks/cyl)
 
 Figures below won't work with BIOS for partitions not in cyl 1
 parameters to be used for BIOS calculations are:
 cylinders=39704 heads=16 sectors/track=63 (1008 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 0 (),(unused)
 start 63, size 20820177 (10166 Meg), flag 0
 beg: cyl 0/ head 1/ sector 1;
 end: cyl 174/ head 15/ sector 63
 The data for partition 2 is:
 sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
 start 20820240, size 19201392 (9375 Meg), flag 80 (active)
 beg: cyl 1023/ head 255/ sector 63;
 end: cyl 1023/ head 15/ sector 63
 The data for partition 3 is:
 UNUSED
 The data for partition 4 is:
 UNUSED
 
 Part 1 is the new slice which I want to use. 
 Then I used bsdlabel to create a label on ad0s1 by typing: 
 
 #bsdlabel -w ad0s1
 
 And following the handbook, my next command was:
 
 #bsdlabel -e ad0s1
 
 Now I wrote in the text editor (I admit, after 4 tries and a lot of
 reading...):
 
 # /dev/ad0s1:
 8 partitions:
 #size   offsetfstype   [fsize bsize bps/cpg]
   c: 208201770unused0 0 # raw part,
   don't e: 2082017704.2BSD 2048 16384 32776
 
 
 now I wanted to use newfs to create a file system on ad0s1e, but it
 could not. My problem is illustrated by my ls output:
 
 pcwin451# ls /dev/ad*
 /dev/ad0/dev/ad0s2  /dev/ad0s2b /dev/ad0s2d
 /dev/ad0s1  /dev/ad0s2a /dev/ad0s2c /dev/ad0s2e
 
 bsdlabel -e didn't create a new partition, although the output of
 bsdlabel ad0s1 is:
 
 pcwin451# disklabel ad0s1
 # /dev/ad0s1:
 8 partitions:
 #size   offsetfstype   [fsize bsize bps/cpg]
   c: 208201770unused0 0 # raw part,
   don't
 edit
   e: 20820161   164.2BSD 2048 16384 32776
 
 How can this be? (and how do I fix it...?)
 
 Thanks for your help already so far
 
 Freek


Hello,

In my second disk I have free space between two slices so I tried the
procedure by myself.

When I did a 'bsdlabel -w /dev/adXsY' (without editing them) I ended
with a partition labeled 'a', and it instantly appeared in '/dev/'. Then
I did what you have done ('bsdlabel -e slice') and it also appeared in
'/dev'.

I do not know about this, but maybe this helps:

1) Try with only 'bsdlabel -w slice'. The partition should appear as
'a'.

2) If the partition does not appear in '/dev/' then you can reinitialize
the ATA channel (0 or 1, I think your disk is in 0) your disk is in,
with 'atacontrol reinit channel'. For a list of ATA channels
with the devices do 'atacontrol list'.

***WARNING***: do ***NOT*** 'detach' and 'attach' the channel your
device your running hard disk (that contain the FreeBSD you are
running) is connected to (but you can safely 'reinit' it). A 'detach'
removes the disk and slices/partitions from the kernel and powers down
the devices in that channel, so FreeBSD will stall when it tries to
read/write on its partitions ('/', '/usr', etc.). I could detach and
atach it once (in less than 5 seconds), but the other time it crashed
my machine (I had to rewrite this mail three times, because I was
experimenting with 'atacontrol'). It is more safe to reboot the machine.

Best Regards,
Ale
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


RE: format slice

2005-03-12 Thread Freek Nossin


 -Original Message-
 From: Alejandro Pulver [mailto:[EMAIL PROTECTED]
 Sent: zaterdag 12 maart 2005 23:44
 To: Freek Nossin
 Cc: freebsd-questions@freebsd.org; 'Jerry McAllister'
 Subject: Re: format slice
 
 On Sat, 12 Mar 2005 21:09:33 +0100
 Freek Nossin [EMAIL PROTECTED] wrote:
 
  Hello, formatting is almost complete...
 
  My new problem is that bsdlabel didn't create a new partition after
  bsdlabel-e ad0s1. Below is an extensive output of some commands, but
  you might want to skip to the last alinea ;).
 
  I used fdisk to create a new slice. I copied the exact format of the
  previous slice (on which the windows installation resided), so I
  didn't have to worry about the overlapping slices. I got this nice
  output:
 
  pcwin451# fdisk
  *** Working on device /dev/ad0 ***
  parameters extracted from in-core disklabel are:
  cylinders=39704 heads=16 sectors/track=63 (1008 blks/cyl)
 
  Figures below won't work with BIOS for partitions not in cyl 1
  parameters to be used for BIOS calculations are:
  cylinders=39704 heads=16 sectors/track=63 (1008 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 0 (),(unused)
  start 63, size 20820177 (10166 Meg), flag 0
  beg: cyl 0/ head 1/ sector 1;
  end: cyl 174/ head 15/ sector 63
  The data for partition 2 is:
  sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
  start 20820240, size 19201392 (9375 Meg), flag 80 (active)
  beg: cyl 1023/ head 255/ sector 63;
  end: cyl 1023/ head 15/ sector 63
  The data for partition 3 is:
  UNUSED
  The data for partition 4 is:
  UNUSED
 
  Part 1 is the new slice which I want to use.
  Then I used bsdlabel to create a label on ad0s1 by typing:
 
  #bsdlabel -w ad0s1
 
  And following the handbook, my next command was:
 
  #bsdlabel -e ad0s1
 
  Now I wrote in the text editor (I admit, after 4 tries and a lot of
  reading...):
 
  # /dev/ad0s1:
  8 partitions:
  #size   offsetfstype   [fsize bsize bps/cpg]
c: 208201770unused0 0 # raw part,
don't e: 2082017704.2BSD 2048 16384 32776
 
 
  now I wanted to use newfs to create a file system on ad0s1e, but it
  could not. My problem is illustrated by my ls output:
 
  pcwin451# ls /dev/ad*
  /dev/ad0/dev/ad0s2  /dev/ad0s2b /dev/ad0s2d
  /dev/ad0s1  /dev/ad0s2a /dev/ad0s2c /dev/ad0s2e
 
  bsdlabel -e didn't create a new partition, although the output of
  bsdlabel ad0s1 is:
 
  pcwin451# disklabel ad0s1
  # /dev/ad0s1:
  8 partitions:
  #size   offsetfstype   [fsize bsize bps/cpg]
c: 208201770unused0 0 # raw part,
don't
  edit
e: 20820161   164.2BSD 2048 16384 32776
 
  How can this be? (and how do I fix it...?)
 
  Thanks for your help already so far
 
  Freek
 
 
 Hello,
 
 In my second disk I have free space between two slices so I tried the
 procedure by myself.
 
 When I did a 'bsdlabel -w /dev/adXsY' (without editing them) I ended
 with a partition labeled 'a', and it instantly appeared in '/dev/'. Then
 I did what you have done ('bsdlabel -e slice') and it also appeared in
 '/dev'.
 
 I do not know about this, but maybe this helps:
 
 1) Try with only 'bsdlabel -w slice'. The partition should appear as
 'a'.
 
 2) If the partition does not appear in '/dev/' then you can reinitialize
 the ATA channel (0 or 1, I think your disk is in 0) your disk is in,
 with 'atacontrol reinit channel'. For a list of ATA channels
 with the devices do 'atacontrol list'.
 
 ***WARNING***: do ***NOT*** 'detach' and 'attach' the channel your
 device your running hard disk (that contain the FreeBSD you are
 running) is connected to (but you can safely 'reinit' it). A 'detach'
 removes the disk and slices/partitions from the kernel and powers down
 the devices in that channel, so FreeBSD will stall when it tries to
 read/write on its partitions ('/', '/usr', etc.). I could detach and
 atach it once (in less than 5 seconds), but the other time it crashed
 my machine (I had to rewrite this mail three times, because I was
 experimenting with 'atacontrol'). It is more safe to reboot the machine.
 
 Best Regards,
 Ale


Thank, but unfortunately it dit not help

pcwin451# atacontrol reinit 0
Master:  ad0 Maxtor 5T020H2/TAH71DP0 ATA/ATAPI revision 6
Slave:   no device present

pcwin451# bsdlabel -w ad0s1

pcwin451# ls /dev/ad*
/dev/ad0/dev/ad0s2  /dev/ad0s2b /dev/ad0s2d
/dev/ad0s1  /dev/ad0s2a /dev/ad0s2c /dev/ad0s2e



___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: format slice

2005-03-12 Thread Alejandro Pulver
On Sun, 13 Mar 2005 00:04:06 +0100
Freek Nossin [EMAIL PROTECTED] wrote:
   Then I used bsdlabel to create a label on ad0s1 by typing:
  
   #bsdlabel -w ad0s1
  
   And following the handbook, my next command was:
  
   #bsdlabel -e ad0s1
  
   Now I wrote in the text editor (I admit, after 4 tries and a lot
   of reading...):
  
   # /dev/ad0s1:
   8 partitions:
   #size   offsetfstype   [fsize bsize bps/cpg]
 c: 208201770unused0 0 # raw
 part, don't e: 2082017704.2BSD 2048 16384 32776
  
  
   now I wanted to use newfs to create a file system on ad0s1e, but
   it could not. My problem is illustrated by my ls output:
  
   pcwin451# ls /dev/ad*
   /dev/ad0/dev/ad0s2  /dev/ad0s2b /dev/ad0s2d
   /dev/ad0s1  /dev/ad0s2a /dev/ad0s2c /dev/ad0s2e
  
   bsdlabel -e didn't create a new partition, although the output of
   bsdlabel ad0s1 is:
  
   pcwin451# disklabel ad0s1
   # /dev/ad0s1:
   8 partitions:
   #size   offsetfstype   [fsize bsize bps/cpg]
 c: 208201770unused0 0 # raw
 part, don't
   edit
 e: 20820161   164.2BSD 2048 16384 32776
  
   How can this be? (and how do I fix it...?)
  
   Thanks for your help already so far
  
   Freek
  
  
  Hello,
  
  In my second disk I have free space between two slices so I tried
  the procedure by myself.
  
  When I did a 'bsdlabel -w /dev/adXsY' (without editing them) I ended
  with a partition labeled 'a', and it instantly appeared in '/dev/'.
  Then I did what you have done ('bsdlabel -e slice') and it also
  appeared in'/dev'.
  
  I do not know about this, but maybe this helps:
  
  1) Try with only 'bsdlabel -w slice'. The partition should appear
  as'a'.
  
  2) If the partition does not appear in '/dev/' then you can
  reinitialize the ATA channel (0 or 1, I think your disk is in 0)
  your disk is in, with 'atacontrol reinit channel'. For a list of
  ATA channels with the devices do 'atacontrol list'.
  
  ***WARNING***: do ***NOT*** 'detach' and 'attach' the channel your
  device your running hard disk (that contain the FreeBSD you are
  running) is connected to (but you can safely 'reinit' it). A
  'detach' removes the disk and slices/partitions from the kernel and
  powers down the devices in that channel, so FreeBSD will stall when
  it tries to read/write on its partitions ('/', '/usr', etc.). I
  could detach and atach it once (in less than 5 seconds), but the
  other time it crashed my machine (I had to rewrite this mail three
  times, because I was experimenting with 'atacontrol'). It is more
  safe to reboot the machine.
  
  Best Regards,
  Ale
 
 
 Thank, but unfortunately it dit not help
 
 pcwin451# atacontrol reinit 0
 Master:  ad0 Maxtor 5T020H2/TAH71DP0 ATA/ATAPI revision 6
 Slave:   no device present
 
 pcwin451# bsdlabel -w ad0s1
 
 pcwin451# ls /dev/ad*
 /dev/ad0/dev/ad0s2  /dev/ad0s2b /dev/ad0s2d
 /dev/ad0s1  /dev/ad0s2a /dev/ad0s2c /dev/ad0s2e
 
 
 
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to
 [EMAIL PROTECTED]

Hello,

Have you tried to reinitialize the ata channel before changing the
partitions?

Try unmounting '/dev' and mounting it again (forcing it with '-f').

If the problem persist, the only alternative is to reboot. Do you have a
dynamic IP? If that is the case it is possible to add a crontab entry
that executes a script on each system startup. The script can send you
an e-mail to you using the internal sendmail (must be enabled for that)
relay so it will contain the IP of your server (in the complete
headers). Alternatively the script can upload a file containing the
output of 'ifconfig' to an FTP site.

If you are interested you can ask me for more information.

Best Regards,
Ale
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: format slice

2005-03-12 Thread Alejandro Pulver
On Sat, 12 Mar 2005 21:06:05 -0300
Alejandro Pulver [EMAIL PROTECTED] wrote:

 On Sun, 13 Mar 2005 00:04:06 +0100
 Freek Nossin [EMAIL PROTECTED] wrote:
Then I used bsdlabel to create a label on ad0s1 by typing:
   
#bsdlabel -w ad0s1
   
And following the handbook, my next command was:
   
#bsdlabel -e ad0s1
   
Now I wrote in the text editor (I admit, after 4 tries and a lot
of reading...):
   
# /dev/ad0s1:
8 partitions:
#size   offsetfstype   [fsize bsize bps/cpg]
  c: 208201770unused0 0 # raw
  part, don't e: 2082017704.2BSD 2048 16384
  32776
   
   
now I wanted to use newfs to create a file system on ad0s1e, but
it could not. My problem is illustrated by my ls output:
   
pcwin451# ls /dev/ad*
/dev/ad0/dev/ad0s2  /dev/ad0s2b /dev/ad0s2d
/dev/ad0s1  /dev/ad0s2a /dev/ad0s2c /dev/ad0s2e
   
bsdlabel -e didn't create a new partition, although the output
of bsdlabel ad0s1 is:
   
pcwin451# disklabel ad0s1
# /dev/ad0s1:
8 partitions:
#size   offsetfstype   [fsize bsize bps/cpg]
  c: 208201770unused0 0 # raw
  part, don't
edit
  e: 20820161   164.2BSD 2048 16384 32776
   
How can this be? (and how do I fix it...?)
   
Thanks for your help already so far
   
Freek
   
   
   Hello,
   
   In my second disk I have free space between two slices so I tried
   the procedure by myself.
   
   When I did a 'bsdlabel -w /dev/adXsY' (without editing them) I
   ended with a partition labeled 'a', and it instantly appeared in
   '/dev/'. Then I did what you have done ('bsdlabel -e slice') and
   it also appeared in'/dev'.
   
   I do not know about this, but maybe this helps:
   
   1) Try with only 'bsdlabel -w slice'. The partition should
   appear as'a'.
   
   2) If the partition does not appear in '/dev/' then you can
   reinitialize the ATA channel (0 or 1, I think your disk is in 0)
   your disk is in, with 'atacontrol reinit channel'. For a list of
   ATA channels with the devices do 'atacontrol list'.
   
   ***WARNING***: do ***NOT*** 'detach' and 'attach' the channel your
   device your running hard disk (that contain the FreeBSD you are
   running) is connected to (but you can safely 'reinit' it). A
   'detach' removes the disk and slices/partitions from the kernel
   and powers down the devices in that channel, so FreeBSD will stall
   when it tries to read/write on its partitions ('/', '/usr', etc.).
   I could detach and atach it once (in less than 5 seconds), but the
   other time it crashed my machine (I had to rewrite this mail three
   times, because I was experimenting with 'atacontrol'). It is more
   safe to reboot the machine.
   
   Best Regards,
   Ale
  
  
  Thank, but unfortunately it dit not help
  
  pcwin451# atacontrol reinit 0
  Master:  ad0 Maxtor 5T020H2/TAH71DP0 ATA/ATAPI revision 6
  Slave:   no device present
  
  pcwin451# bsdlabel -w ad0s1
  
  pcwin451# ls /dev/ad*
  /dev/ad0/dev/ad0s2  /dev/ad0s2b /dev/ad0s2d
  /dev/ad0s1  /dev/ad0s2a /dev/ad0s2c /dev/ad0s2e
  
  
  
  ___
  freebsd-questions@freebsd.org mailing list
  http://lists.freebsd.org/mailman/listinfo/freebsd-questions
  To unsubscribe, send any mail to
  [EMAIL PROTECTED]
 
 Hello,
 
 Have you tried to reinitialize the ata channel before changing the
 partitions?
 

Sorry, I mean after.

 Try unmounting '/dev' and mounting it again (forcing it with '-f').
 
 If the problem persist, the only alternative is to reboot. Do you have
 a dynamic IP? If that is the case it is possible to add a crontab
 entry that executes a script on each system startup. The script can
 send you an e-mail to you using the internal sendmail (must be enabled
 for that) relay so it will contain the IP of your server (in the
 complete headers). Alternatively the script can upload a file
 containing the output of 'ifconfig' to an FTP site.
 
 If you are interested you can ask me for more information.
 
 Best Regards,
 Ale
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to
 [EMAIL PROTECTED]
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: format slice

2005-03-11 Thread Alejandro Pulver
On Fri, 11 Mar 2005 17:58:10 +0100
Freek Nossin [EMAIL PROTECTED] wrote:

 Hello,
 
 I have a freebsd installation on a disk with two slices. One of them
 has the current freebsd install, the other has a win2k installation. I
 want to convert the win2k slice to a freebsd slice (by deleting the
 old one and add a new one). I followed the handbook but when I try to
 delete the win2k slice, and want to write the changes to the disk,
 sysinstall returns a disk error. The steps I took were simple:
 
 - run sysinstall en select fdisk
 - choose delete on the NTFS slice 
 - Write changes
 
 Then sysinstall complains that it cannot do that (no specific
 information on the cause of the error is displayed). 
 
 Does anyone know what can be wrong and how can I solve this?
 
 
 
 
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to
 [EMAIL PROTECTED]

Hello,

Try using 'fdisk' directly (man 8 fdisk) and see the complete error
messages.

For example, to delete the second slice (check the numbering with
'fdisk -s') save the following in a file and then run 'fdisk -f file'
(but first try the test mode with the -t flag to see if it works as
expected):

p 2 0 0 0

Best Regards,
Ale

P.S.: what is the output of 'fdisk -s'?
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: format slice

2005-03-11 Thread Jerry McAllister
 
 Hello,
 
 I have a freebsd installation on a disk with two slices. One of them has the
 current freebsd install, the other has a win2k installation. I want to
 convert the win2k slice to a freebsd slice (by deleting the old one and add
 a new one). I followed the handbook but when I try to delete the win2k
 slice, and want to write the changes to the disk, sysinstall returns a disk
 error. The steps I took were simple:
 
 - run sysinstall en select fdisk
 - choose delete on the NTFS slice 
 - Write changes
 
 Then sysinstall complains that it cannot do that (no specific information on
 the cause of the error is displayed). 
 
 Does anyone know what can be wrong and how can I solve this?

Well, it looks like you started right. 
But write changes can cover a lot of things - all of which 
need to be done.

After you delete the NTFS slice,  you must create a new FreeBSD slice
in its place.   Then you need to do the disklabel part to make at
least one partition in the slice (more are possible if you want to
divide it for some reason.   Then that (those) slice(s) must
be newfs-ed.  You also need to establish a mount point and mount the
newly newfs-ed filesystem(s).   Sysinstall should do all that for you 
if you do all of its steps before bailing out of sysinstall.
It might not do the mount though.  But, it should create the mount
point and put the mount line in /etc/fstab.

Alternatively, you can do it all yourself and skip sysinstall.
That is what I normally do.   
Study the man pages for each of these before starting.  They 
have recently been improved, but can still be very confusing.

The steps are:
fdisk  -- overwrites the NTFS slice and creates a 
  new FreeBSD slice in its place.  Set it
  active if you want to boot from it.
disklabel  -- writes a FreeBSD label and divides the
  slice in to partitions.
newfs  -- creates a filesystem in each partition
  you run it on.
mkdir  -- create the new mount point  mkdir /newmnt
  or whatever you want to call it
edit /etc/fstab  -- to enter your mount information so it
will mount at boot time without you doing
by hand all the time.
fsck   -- the new file system, just in case.
mount -a   -- To mount the file system

If you have done everything and it still doesn't work, then more
information is needed to make any good guesses.   But, check all 
this first.

jerry
 
 
 
 
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to [EMAIL PROTECTED]
 

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


RE: format slice

2005-03-11 Thread Freek Nossin
Thank you for your suggestions, I followed them and this is what happened: 

pcwin451# fdisk -s
/dev/ad0: 39704 cyl 16 hd 63 sec
PartStartSize Type Flags
   1:  6320820177 0x07 0x00
   2:2082024019201392 0xa5 0x80

Part 1 is the one I want to convert to a freebsd slice. 

Now I used fdisk -f file with the input 

p 1 0 0 0

the operation succeeded. I did again: 

pcwin451# fdisk -s
/dev/ad0: 39704 cyl 16 hd 63 sec
PartStartSize Type Flags
   2:2082024019201392 0xa5 0x80

And this was indeed the output I expected. So I thought lets see what
sysinstall thinks of all this. Selecting fdisk in the menu showed me a disk
layout where the NTFS partition still was on the disk. 

Disk name:  ad0FDISK Partition
Editor
DISK Geometry:  39704 cyls/16 heads/63 sectors = 40021632 sectors (19541MB)

Offset   Size(ST)End Name  PType   Desc  Subtype
Flags

 0 63 62- 12 unused0

63   20820177   20820239ad0s1  4 NTFS/HPFS/QNX7
  20820240   19201392   40021631ad0s2  8freebsd  165


How can this be? I've always assumed that sysinstall uses the fdisk tool?
And which one is correct? Is it wise to try creating a new slice with
fdisk? 



-Original Message-
From: Alejandro Pulver [mailto:[EMAIL PROTECTED] 
Sent: vrijdag 11 maart 2005 20:15
To: Freek Nossin
Cc: freebsd-questions@freebsd.org
Subject: Re: format slice

On Fri, 11 Mar 2005 17:58:10 +0100
Freek Nossin [EMAIL PROTECTED] wrote:

 Hello,
 
 I have a freebsd installation on a disk with two slices. One of them
 has the current freebsd install, the other has a win2k installation. I
 want to convert the win2k slice to a freebsd slice (by deleting the
 old one and add a new one). I followed the handbook but when I try to
 delete the win2k slice, and want to write the changes to the disk,
 sysinstall returns a disk error. The steps I took were simple:
 
 - run sysinstall en select fdisk
 - choose delete on the NTFS slice 
 - Write changes
 
 Then sysinstall complains that it cannot do that (no specific
 information on the cause of the error is displayed). 
 
 Does anyone know what can be wrong and how can I solve this?
 
 
 
 
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to
 [EMAIL PROTECTED]

Hello,

Try using 'fdisk' directly (man 8 fdisk) and see the complete error
messages.

For example, to delete the second slice (check the numbering with
'fdisk -s') save the following in a file and then run 'fdisk -f file'
(but first try the test mode with the -t flag to see if it works as
expected):

p 2 0 0 0

Best Regards,
Ale

P.S.: what is the output of 'fdisk -s'?



___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: format slice

2005-03-11 Thread Jerry McAllister
 
 Thank you for your suggestions, I followed them and this is what happened: 
 
 pcwin451# fdisk -s
 /dev/ad0: 39704 cyl 16 hd 63 sec
 PartStartSize Type Flags
1:  6320820177 0x07 0x00
2:2082024019201392 0xa5 0x80
 
 Part 1 is the one I want to convert to a freebsd slice. 
 
 Now I used fdisk -f file with the input 
 
 p 1 0 0 0
 
 the operation succeeded. I did again: 
 
 pcwin451# fdisk -s
 /dev/ad0: 39704 cyl 16 hd 63 sec
 PartStartSize Type Flags
2:2082024019201392 0xa5 0x80
 
 And this was indeed the output I expected. So I thought lets see what
 sysinstall thinks of all this. Selecting fdisk in the menu showed me a disk
 layout where the NTFS partition still was on the disk. 
 
 Disk name:  ad0FDISK Partition
 Editor
 DISK Geometry:  39704 cyls/16 heads/63 sectors = 40021632 sectors (19541MB)
 
 Offset   Size(ST)End Name  PType   Desc  Subtype
 Flags
 
  0 63 62- 12 unused0
 
 63   20820177   20820239ad0s1  4 NTFS/HPFS/QNX7
   20820240   19201392   40021631ad0s2  8freebsd  165
 
 
 How can this be? I've always assumed that sysinstall uses the fdisk tool?
 And which one is correct? Is it wise to try creating a new slice with
 fdisk? 

Well, is one of them reading only the in-memory label and the other
reading the label on the disk?When you did the fdisk, did you
make sure it changed on disk.  Then, did the in-memory label get
updated?

jerry
 
 
 
 -Original Message-
 From: Alejandro Pulver [mailto:[EMAIL PROTECTED] 
 Sent: vrijdag 11 maart 2005 20:15
 To: Freek Nossin
 Cc: freebsd-questions@freebsd.org
 Subject: Re: format slice
 
 On Fri, 11 Mar 2005 17:58:10 +0100
 Freek Nossin [EMAIL PROTECTED] wrote:
 
  Hello,
  
  I have a freebsd installation on a disk with two slices. One of them
  has the current freebsd install, the other has a win2k installation. I
  want to convert the win2k slice to a freebsd slice (by deleting the
  old one and add a new one). I followed the handbook but when I try to
  delete the win2k slice, and want to write the changes to the disk,
  sysinstall returns a disk error. The steps I took were simple:
  
  - run sysinstall en select fdisk
  - choose delete on the NTFS slice 
  - Write changes
  
  Then sysinstall complains that it cannot do that (no specific
  information on the cause of the error is displayed). 
  
  Does anyone know what can be wrong and how can I solve this?
  
  
  
  
  ___
  freebsd-questions@freebsd.org mailing list
  http://lists.freebsd.org/mailman/listinfo/freebsd-questions
  To unsubscribe, send any mail to
  [EMAIL PROTECTED]
 
 Hello,
 
 Try using 'fdisk' directly (man 8 fdisk) and see the complete error
 messages.
 
 For example, to delete the second slice (check the numbering with
 'fdisk -s') save the following in a file and then run 'fdisk -f file'
 (but first try the test mode with the -t flag to see if it works as
 expected):
 
 p 2 0 0 0
 
 Best Regards,
 Ale
 
 P.S.: what is the output of 'fdisk -s'?
 
 
 
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to [EMAIL PROTECTED]
 

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


RE: format slice

2005-03-11 Thread Freek Nossin
 -Original Message-
 From: Jerry McAllister [mailto:[EMAIL PROTECTED]
 Sent: vrijdag 11 maart 2005 21:00
 To: Freek Nossin
 Cc: freebsd-questions@freebsd.org; [EMAIL PROTECTED]
 Subject: Re: format slice
 
 
  Thank you for your suggestions, I followed them and this is what
 happened:
 
  pcwin451# fdisk -s
  /dev/ad0: 39704 cyl 16 hd 63 sec
  PartStartSize Type Flags
 1:  6320820177 0x07 0x00
 2:2082024019201392 0xa5 0x80
 
  Part 1 is the one I want to convert to a freebsd slice.
 
  Now I used fdisk -f file with the input
 
  p 1 0 0 0
 
  the operation succeeded. I did again:
 
  pcwin451# fdisk -s
  /dev/ad0: 39704 cyl 16 hd 63 sec
  PartStartSize Type Flags
 2:2082024019201392 0xa5 0x80
 
  And this was indeed the output I expected. So I thought lets see what
  sysinstall thinks of all this. Selecting fdisk in the menu showed me a
 disk
  layout where the NTFS partition still was on the disk.
 
  Disk name:  ad0FDISK Partition
  Editor
  DISK Geometry:  39704 cyls/16 heads/63 sectors = 40021632 sectors
 (19541MB)
 
  Offset   Size(ST)End Name  PType   Desc  Subtype
  Flags
 
   0 63 62- 12 unused0
 
  63   20820177   20820239ad0s1  4 NTFS/HPFS/QNX7
20820240   19201392   40021631ad0s2  8freebsd  165
 
 
  How can this be? I've always assumed that sysinstall uses the fdisk
 tool?
  And which one is correct? Is it wise to try creating a new slice with
  fdisk?
 
 Well, is one of them reading only the in-memory label and the other
 reading the label on the disk?When you did the fdisk, did you
 make sure it changed on disk.  Then, did the in-memory label get
 updated?
 
 jerry


/stand/sysinstall would be the one that read the in-memory label. The other
way around seems impossible to me. But then how can these two be different?
I did close /stand/sysinstall and restarted. The in memory one *should* be
updated right? If this wasn't the case than it seems to me like bug in
sysinstall, or more likely, freebsd itself. 
Normally I should simply try rebooting the system and all ambiguities should
be solved. The problem is I'm working remote and rebooting is kind of a
risk. 

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: format slice

2005-03-11 Thread Alejandro Pulver
On Fri, 11 Mar 2005 21:16:49 +0100
Freek Nossin [EMAIL PROTECTED] wrote:

  -Original Message-
  From: Jerry McAllister [mailto:[EMAIL PROTECTED]
  Sent: vrijdag 11 maart 2005 21:00
  To: Freek Nossin
  Cc: freebsd-questions@freebsd.org; [EMAIL PROTECTED]
  Subject: Re: format slice
  
  
   Thank you for your suggestions, I followed them and this is what
  happened:
  
   pcwin451# fdisk -s
   /dev/ad0: 39704 cyl 16 hd 63 sec
   PartStartSize Type Flags
  1:  6320820177 0x07 0x00
  2:2082024019201392 0xa5 0x80
  
   Part 1 is the one I want to convert to a freebsd slice.
  
   Now I used fdisk -f file with the input
  
   p 1 0 0 0
  
   the operation succeeded. I did again:
  
   pcwin451# fdisk -s
   /dev/ad0: 39704 cyl 16 hd 63 sec
   PartStartSize Type Flags
  2:2082024019201392 0xa5 0x80
  
   And this was indeed the output I expected. So I thought lets see
   what sysinstall thinks of all this. Selecting fdisk in the menu
   showed me a
  disk
   layout where the NTFS partition still was on the disk.
  
   Disk name:  ad0FDISK
   Partition Editor
   DISK Geometry:  39704 cyls/16 heads/63 sectors = 40021632 sectors
  (19541MB)
  
   Offset   Size(ST)End Name  PType   Desc 
   Subtype Flags
  
0 63 62- 12 unused   
0
  
   63   20820177   20820239ad0s1  4 NTFS/HPFS/QNX
  7
 20820240   19201392   40021631ad0s2  8freebsd 
 165
  
  
   How can this be? I've always assumed that sysinstall uses the
   fdisk
  tool?
   And which one is correct? Is it wise to try creating a new slice
   with fdisk?
  
  Well, is one of them reading only the in-memory label and the other
  reading the label on the disk?When you did the fdisk, did you
  make sure it changed on disk.  Then, did the in-memory label get
  updated?
  
  jerry
 
 
 /stand/sysinstall would be the one that read the in-memory label. The
 other way around seems impossible to me. But then how can these two be
 different? I did close /stand/sysinstall and restarted. The in memory
 one *should* be updated right? If this wasn't the case than it seems
 to me like bug in sysinstall, or more likely, freebsd itself. 
 Normally I should simply try rebooting the system and all ambiguities
 should be solved. The problem is I'm working remote and rebooting is
 kind of a risk. 
 
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to
 [EMAIL PROTECTED]

Hello,

I do not know about that, but I think the best option is to do the
procedure manually, as indicated by Jerry.

Best Regards,
Ale
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: format slice from commandline

2005-03-11 Thread Jerry McAllister
 

Please post to the list and not privately.

 Hello,
 I'm trying to add a second drive to a 5.3 system in preparation to
 gmirror raid1 the box. My problem is i'm having a heck of a time with
 sysinstall, it doesn't want to put an a partition on the second drive, so i
 thought about doing it manually, fdisk, disklabel, newfs, etc. About the
 only thing i've got working is a single slice on drive2 which is ad2 btw,

Probably it should be ad2s1.
That may make bsdlabel be unhappy.

 active i believe. The two drives are identical in size 15 gb drives, the
 master drive with a single fbsd slice and six partitions in it including c.
 I have tried to duplicate this information with disklabel piping to a file
 then loading that file on to drive2, which gives me an error about partition
 c lengths being wrong.

Partition c length should be the size of the slice.  
Look at what the block counts are.

jerry

 I was wondering you mentioned onlist you do this kind of stuff, if you
 could give me a procedure or a web page, the man pages are quite confusing.
 Thanks a lot.
 Dave.
 
 

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]