Re: Partitioning with gpart

2012-08-29 Thread Thomas Mueller
from Lynn Steven Killingsworth blue.seahorse.syndic...@gmail.com:

 I have installed PC-BSD 9.1 RC1 last week.  Very nice I must say.

 The default file system is zfs.  I have one storage disk which is ufs and
 another which is on an mbr partition.  I thought I would format the mbr
 disk with zfs and move everything from the ufs disk and then format the
 ufs disk with zfs.

 I have not tried the command line before so I just tried to create over
 the disk with: gpart create -s gpt ada2

 The message is that ada2 already exists as a file system.

 Show indicates that it is not gpt but mbr.

 Then in order to start over I tried to delete and destroy by starting with:

 gpart delete -i 1 ada2s1

 The message is that ada2s1 is an invalid argument.

 I cannot experiment on my backup as it has only one disk.

 Comment please?

Either gpt (included in FreeBSD prior to the switch to gpart) or gdisk (now at 
v0.8.5 and in FreeBSD ports) can migrate an MBR-partitioned disk to GPT without 
loss of data in many cases, though backing up is still advised.

You can find information about gdisk at
http://www.rodsbooks.com/gdisk/

gdisk is much more versatile than gpart, can be used to make partitions for 
Windows, Linux, NetBSD, etc.

I don't think you can get gpt for FreeBSD, but if you're curious, you can go to
http://www.netbsd.org/
and look for the documentation/man pages.

It was gpt in NetBSD that I used to migrate an NTFS partition (MBR) spanning an 
entire 3 TB Western Digital My Book USB 3.0 hard drive to GPT, no data was lost.

I subsequently booted Linux from the System Rescue CD (http://sysresccd.org/) 
and copied the software/data to a USB stick so I could free the USB 3.0 hard 
drive for better things.  Maybe I could have done the repartitioning with 
gdisk, which is included on the System Rescue CD, this would be Linux.

Tom
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Partitioning with gpart

2012-08-29 Thread Lynn Steven Killingsworth
On Tue, 28 Aug 2012 21:33:16 -0400, Warren Block wbl...@wonkity.com  
wrote:



On Tue, 28 Aug 2012, Lynn Steven Killingsworth wrote:


I have installed PC-BSD 9.1 RC1 last week.  Very nice I must say.

The default file system is zfs.  I have one storage disk which is ufs  
and another which is on an mbr partition.  I thought I would format the  
mbr disk with zfs and move everything from the ufs disk and then format  
the ufs disk with zfs.


I have not tried the command line before so I just tried to create over  
the disk with: gpart create -s gpt ada2


The message is that ada2 already exists as a file system.


The exact message would help; gpart is not a filesystem tool.


Show indicates that it is not gpt but mbr.

Then in order to start over I tried to delete and destroy by starting  
with:


gpart delete -i 1 ada2s1

The message is that ada2s1 is an invalid argument.

I cannot experiment on my backup as it has only one disk.


gpart takes a -F option to destroy which makes it unnecessary to delete  
all the partitions first.  Back up data first, and make certain that you  
and the computer agree on which drive is which.


Great.  My storage disks are formatted with zfs and my files are moved.   
Thanks.


--
Steve
Blue Seahorse Syndicate
http://www.blueleafsyndicate.org
Maine  New Hampshire
Using Opera's revolutionary email client: http://www.opera.com/mail/
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Partitioning with gpart

2012-08-28 Thread Warren Block

On Tue, 28 Aug 2012, Lynn Steven Killingsworth wrote:


I have installed PC-BSD 9.1 RC1 last week.  Very nice I must say.

The default file system is zfs.  I have one storage disk which is ufs and 
another which is on an mbr partition.  I thought I would format the mbr disk 
with zfs and move everything from the ufs disk and then format the ufs disk 
with zfs.


I have not tried the command line before so I just tried to create over the 
disk with: gpart create -s gpt ada2


The message is that ada2 already exists as a file system.


The exact message would help; gpart is not a filesystem tool.


Show indicates that it is not gpt but mbr.

Then in order to start over I tried to delete and destroy by starting with:

gpart delete -i 1 ada2s1

The message is that ada2s1 is an invalid argument.

I cannot experiment on my backup as it has only one disk.


gpart takes a -F option to destroy which makes it unnecessary to delete 
all the partitions first.  Back up data first, and make certain that you 
and the computer agree on which drive is which.

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


Re: Partitioning with gpart or old style slices?

2011-06-05 Thread perryh
Robert Simmons rsimmo...@gmail.com wrote:

  How do I wipe the whole thing in one go so that I can start
  afresh?
 
  gpart destroy ad4 ??

 Yes, but first you must delete all of the slices/partitions.
 Think of it this way: you must go backwards down the path you
 just came with a delete for each add, then a destroy for each
 create.

So there is no way to just say clean up this whole disk in a
single operation?  That seems a considerable step backwards,
given that the old tools have fdisk -i and bsdlabel -w.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Partitioning with gpart or old style slices?

2011-06-05 Thread Robert Simmons
On Sun, Jun 5, 2011 at 3:35 AM,  per...@pluto.rain.com wrote:
 Robert Simmons rsimmo...@gmail.com wrote:
  How do I wipe the whole thing in one go so that I can start
  afresh?
 
  gpart destroy ad4 ??

 Yes, but first you must delete all of the slices/partitions.
 Think of it this way: you must go backwards down the path you
 just came with a delete for each add, then a destroy for each
 create.

 So there is no way to just say clean up this whole disk in a
 single operation?  That seems a considerable step backwards,
 given that the old tools have fdisk -i and bsdlabel -w.

I've never had to use it, but I think gpart destroy -F ad4 is what
you are looking for, so I guess it is not necessary to step backwards
after all.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Partitioning with gpart or old style slices?

2011-06-05 Thread Erik Nørgaard

On 5/6/11 7:03 AM, Robert Simmons wrote:

On Sunday, June 05, 2011 12:40:22 AM Matthias Apitz wrote:

# gpart create -s mbr ad4 # Init the disk with an MBR
# gpart add -t freebsd ad4# Create a BSD container
# gpart create -s bsd ad4s1   # Init with a BSD scheme
# gpart add -t freebsd-ufs  -s 1G ad4s1   # 1GB for /
# gpart add -t freebsd-swap -s 2G ad4s1   # 2GB for swap
# gpart add -t freebsd-ufs  -s 2G ad4s1   # 2GB for /var
# gpart add -t freebsd-ufs  -s 1G ad4s1   # 1GB for /tmp
# gpart add -t freebsd-ufs ad4s1  # all rest for /usr
# gpart set -a active -i 1 ad4


You need to install the bootcode:

This will install the interactive one:
gpart bootcode -b /mnt2/boot/boot0 ad4

this will install the non-interactive one:
gpart bootcode -b /mnt2/boot/mbr ad4


Thanks Warren, great article, and thanks all for the follow up posts as 
well.


Just one more question, the usual mbr and boot files will boot a gpt 
partition? I see there are some additional files gptboot and pmbr?


Thanks, Erik
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Partitioning with gpart or old style slices?

2011-06-05 Thread Warren Block

On Sat, 4 Jun 2011, Robert Simmons wrote:


On Sat, Jun 4, 2011 at 10:43 PM, Warren Block wbl...@wonkity.com wrote:

There's a sample in the second half of my disk setup article:

http://www.wonkity.com/~wblock/docs/html/disksetup.html


Looks good.  I have a few critiques:

1) Linux and FreeBSD do not have alignment requirements, as far as I
know.  So you may want to include a note about this when you say
Create partition for /. It should start at the 1M boundary for
alignment on 4K sector drives, or 2048 blocks:  This would only be
necessary for dual-boot with an OS that has alignment requirements
such as windows.  This would essentially be the difference between the
two old methods of dedicated and not.


The 1M size is compatible with Windows and aligns partitions for better 
performance on 4K sector drives.  Doesn't affect performance on 512-byte 
sector drives, easier to set up initially than add later, and costs less 
than 1M of space.  Cheap compatibility insurance, I guess I'm saying.



2) Perhaps add a note about softupdates (-U) for partitions other than
/ when you describe the newfs steps.


Yikes, yes.


I think your article would be a good place to start for making an
updated section in the handbook.


Thanks!
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Partitioning with gpart or old style slices?

2011-06-04 Thread Robert Simmons
On Sat, Jun 4, 2011 at 6:14 PM, Erik Nørgaard norga...@locolomo.org wrote:
 - or any problems (problems as in I've never tried that before) - using
 gpart instead of the old scheme?

Sorry for the double post, but the only problem that I've encountered
is after creating a encrypted provider with geli(8), that provider
cannot be partitioned using the GPT scheme.  You can still partition
it using gpart(8), but the scheme must be BSD or MBR.

I am not sure whether this is a bug or just the way GPT partitions
work, but it is not that big of a problem unless you want to have very
large encrypted providers that are GPT scheme partitions.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Partitioning with gpart or old style slices?

2011-06-04 Thread Robert Simmons
On Sat, Jun 4, 2011 at 6:14 PM, Erik Nørgaard norga...@locolomo.org wrote:
 I just realized how many years ago I haven't been partitioning any disks ..
 this system is so stable :) So, now I see I have gpart as alternative to
 fdisk/bsdlabel.

gpart(8) from my experience is far superior to all the older tools.


 I have a 320GB disk which will be dedicated to FBSD, is there any advantage
 - or any problems (problems as in I've never tried that before) - using
 gpart instead of the old scheme?

It is clean and clear as to what you are doing, and it supports GPT
scheme partitions.


 Do I need kernel modules not in the generic kernel or create extra boot
 partition?

If you use it to make GPT partitions, you will need a freebsd-boot
partition with the proper bootcode for what you want to do.  If you
search this mailing list's archive, I've posted basic instructions for
gpart/GPT partitioning recently, perhaps there needs to be a section
added to Handbook 18.3.2 describing the basics.  Unfortunately, the
only mention in the handbook is a link to the man page in section
18.3.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Partitioning with gpart or old style slices?

2011-06-04 Thread Warren Block

On Sat, 4 Jun 2011, Robert Simmons wrote:


Do I need kernel modules not in the generic kernel or create extra boot
partition?


If you use it to make GPT partitions, you will need a freebsd-boot
partition with the proper bootcode for what you want to do.  If you
search this mailing list's archive, I've posted basic instructions for
gpart/GPT partitioning recently, perhaps there needs to be a section
added to Handbook 18.3.2 describing the basics.  Unfortunately, the
only mention in the handbook is a link to the man page in section
18.3.


There's a sample in the second half of my disk setup article:

http://www.wonkity.com/~wblock/docs/html/disksetup.html
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Partitioning with gpart or old style slices?

2011-06-04 Thread Robert Simmons
On Sat, Jun 4, 2011 at 10:43 PM, Warren Block wbl...@wonkity.com wrote:
 There's a sample in the second half of my disk setup article:

 http://www.wonkity.com/~wblock/docs/html/disksetup.html

Looks good.  I have a few critiques:

1) Linux and FreeBSD do not have alignment requirements, as far as I
know.  So you may want to include a note about this when you say
Create partition for /. It should start at the 1M boundary for
alignment on 4K sector drives, or 2048 blocks:  This would only be
necessary for dual-boot with an OS that has alignment requirements
such as windows.  This would essentially be the difference between the
two old methods of dedicated and not.

2) Perhaps add a note about softupdates (-U) for partitions other than
/ when you describe the newfs steps.

3) I like to put /root in its own partition on the off chance that it
fills up.  That way it's in a little sandbox and does not fill /.  But
this is personal preference, I guess.

I think your article would be a good place to start for making an
updated section in the handbook.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Partitioning with gpart or old style slices?

2011-06-04 Thread Matthias Apitz
El día Saturday, June 04, 2011 a las 08:43:37PM -0600, Warren Block escribió:

 On Sat, 4 Jun 2011, Robert Simmons wrote:
 
  Do I need kernel modules not in the generic kernel or create extra boot
  partition?
 
  If you use it to make GPT partitions, you will need a freebsd-boot
  partition with the proper bootcode for what you want to do.  If you
  search this mailing list's archive, I've posted basic instructions for
  gpart/GPT partitioning recently, perhaps there needs to be a section
  added to Handbook 18.3.2 describing the basics.  Unfortunately, the
  only mention in the handbook is a link to the man page in section
  18.3.
 
 There's a sample in the second half of my disk setup article:
 
 http://www.wonkity.com/~wblock/docs/html/disksetup.html

Since some time I'm as well using gpart(8) to setup new systems with the
following sequence:

# gpart create -s mbr ad4 # Init the disk with an MBR
# gpart add -t freebsd ad4# Create a BSD container
# gpart create -s bsd ad4s1   # Init with a BSD scheme
# gpart add -t freebsd-ufs  -s 1G ad4s1   # 1GB for /
# gpart add -t freebsd-swap -s 2G ad4s1   # 2GB for swap
# gpart add -t freebsd-ufs  -s 2G ad4s1   # 2GB for /var
# gpart add -t freebsd-ufs  -s 1G ad4s1   # 1GB for /tmp
# gpart add -t freebsd-ufs ad4s1  # all rest for /usr
# gpart set -a active -i 1 ad4

But the result is not ready for boot after install the kernel and
system; I allways have to go again with the sysinstall(8) tool to set
the 'A' flag; don't know what I'm missing (and the man page is not very
instructive on this); thanks

PS: next time will try the example of your page, Warren; thx

matthias

-- 
Matthias Apitz
t +49-89-61308 351 - f +49-89-61308 399 - m +49-170-4527211
e g...@unixarea.de - w http://www.unixarea.de/
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Partitioning with gpart or old style slices?

2011-06-04 Thread Polytropon
On Sun, 5 Jun 2011 06:40:22 +0200, Matthias Apitz g...@unixarea.de wrote:
 Since some time I'm as well using gpart(8) to setup new systems with the
 following sequence:
 
 # gpart create -s mbr ad4 # Init the disk with an MBR
 # gpart add -t freebsd ad4# Create a BSD container
 # gpart create -s bsd ad4s1   # Init with a BSD scheme
 # gpart add -t freebsd-ufs  -s 1G ad4s1   # 1GB for /
 # gpart add -t freebsd-swap -s 2G ad4s1   # 2GB for swap
 # gpart add -t freebsd-ufs  -s 2G ad4s1   # 2GB for /var
 # gpart add -t freebsd-ufs  -s 1G ad4s1   # 1GB for /tmp
 # gpart add -t freebsd-ufs ad4s1  # all rest for /usr
 # gpart set -a active -i 1 ad4

Just a side question that may be interesting for addition
in a new Handbook section:

When you use the old method, you can leave out the slicing
step, creating a dangerously (haha) dedicated disk for
use with FreeBSD. Would this also work with gpart by omitting
the gpart create -s bsd ad4s1 step and then refering to
ad4 instead of ad4s1 in the gpart add -t freebsd-ufs/swap
steps?



 But the result is not ready for boot after install the kernel and
 system; I allways have to go again with the sysinstall(8) tool to set
 the 'A' flag; don't know what I'm missing (and the man page is not very
 instructive on this); thanks

I agree about the manpage; gpart set -a attrib -i index [-f
flags] geom is mentioned in the synopsis, but there's no
further mentioning of the -a option and its parameters.
Maybe (haven't tested!) gpart set -a active -i 1 ad4s1
is equivalent to setting the A flag using sysinstall?





-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Partitioning with gpart or old style slices?

2011-06-04 Thread Robert Simmons
On Sunday, June 05, 2011 12:40:22 AM Matthias Apitz wrote:
 Since some time I'm as well using gpart(8) to setup new systems with the
 following sequence:
 
 # gpart create -s mbr ad4 # Init the disk with an MBR
 # gpart add -t freebsd ad4# Create a BSD container
 # gpart create -s bsd ad4s1   # Init with a BSD scheme
 # gpart add -t freebsd-ufs  -s 1G ad4s1   # 1GB for /
 # gpart add -t freebsd-swap -s 2G ad4s1   # 2GB for swap
 # gpart add -t freebsd-ufs  -s 2G ad4s1   # 2GB for /var
 # gpart add -t freebsd-ufs  -s 1G ad4s1   # 1GB for /tmp
 # gpart add -t freebsd-ufs ad4s1  # all rest for /usr
 # gpart set -a active -i 1 ad4
 
 But the result is not ready for boot after install the kernel and
 system; I allways have to go again with the sysinstall(8) tool to set
 the 'A' flag; don't know what I'm missing (and the man page is not very
 instructive on this); thanks

You need to install the bootcode:

This will install the interactive one:
gpart bootcode -b /mnt2/boot/boot0 ad4

this will install the non-interactive one:
gpart bootcode -b /mnt2/boot/mbr ad4
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Partitioning with gpart or old style slices?

2011-06-04 Thread Robert Simmons
On Sunday, June 05, 2011 12:59:44 AM Polytropon wrote:
 On Sun, 5 Jun 2011 06:40:22 +0200, Matthias Apitz g...@unixarea.de wrote:
  Since some time I'm as well using gpart(8) to setup new systems with the
  following sequence:
  
  # gpart create -s mbr ad4 # Init the disk with an MBR
  # gpart add -t freebsd ad4# Create a BSD container
  # gpart create -s bsd ad4s1   # Init with a BSD scheme
  # gpart add -t freebsd-ufs  -s 1G ad4s1   # 1GB for /
  # gpart add -t freebsd-swap -s 2G ad4s1   # 2GB for swap
  # gpart add -t freebsd-ufs  -s 2G ad4s1   # 2GB for /var
  # gpart add -t freebsd-ufs  -s 1G ad4s1   # 1GB for /tmp
  # gpart add -t freebsd-ufs ad4s1  # all rest for /usr
  # gpart set -a active -i 1 ad4
 
 Just a side question that may be interesting for addition
 in a new Handbook section:
 
 When you use the old method, you can leave out the slicing
 step, creating a dangerously (haha) dedicated disk for
 use with FreeBSD. Would this also work with gpart by omitting
 the gpart create -s bsd ad4s1 step and then refering to
 ad4 instead of ad4s1 in the gpart add -t freebsd-ufs/swap
 steps?

Yes, that would be the equivalent, but if you do that, you might as well use 
GPT.  The reason you would want to use MBR is to dual boot with another OS 
that only understands MBR.  If you are using certain newer 64bit versions of 
Windows, they understand GPT boot, so the whole BSD inside MBR vs. BSD 
dedicated is becoming moot in my opinion.  A good reference if you must dual 
boot is:
http://msdn.microsoft.com/en-us/windows/hardware/gg463525

Also, at the bottom of this page is a list of OSs and GPT support:
http://en.wikipedia.org/wiki/GUID_Partition_Table

  But the result is not ready for boot after install the kernel and
  system; I allways have to go again with the sysinstall(8) tool to set
  the 'A' flag; don't know what I'm missing (and the man page is not very
  instructive on this); thanks
 
 I agree about the manpage; gpart set -a attrib -i index [-f
 flags] geom is mentioned in the synopsis, but there's no
 further mentioning of the -a option and its parameters.
 Maybe (haven't tested!) gpart set -a active -i 1 ad4s1
 is equivalent to setting the A flag using sysinstall?

After reexamining the man page I think I see where it could be made more 
clear.  The Examples section at the bottom should be changed into sections, 
one for MBR with BSD inside, one for BSD dedicated, one for GPT, and one for 
VTOC8.

Or at minimum add that you _must_ install bootcode if you wish to boot from 
the disk.  From the confusion above it seems that people think that gpart 
create -s GPT ad0 installs the bootcode, which it does not (replace the GPT 
in my example with MBR, BSD etc).
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Partitioning with gpart or old style slices?

2011-06-04 Thread Odhiambo Washington
On Sun, Jun 5, 2011 at 08:03, Robert Simmons rsimmo...@gmail.com wrote:

 On Sunday, June 05, 2011 12:40:22 AM Matthias Apitz wrote:
  Since some time I'm as well using gpart(8) to setup new systems with the
  following sequence:
 
  # gpart create -s mbr ad4 # Init the disk with an MBR
  # gpart add -t freebsd ad4# Create a BSD container
  # gpart create -s bsd ad4s1   # Init with a BSD scheme
  # gpart add -t freebsd-ufs  -s 1G ad4s1   # 1GB for /
  # gpart add -t freebsd-swap -s 2G ad4s1   # 2GB for swap
  # gpart add -t freebsd-ufs  -s 2G ad4s1   # 2GB for /var
  # gpart add -t freebsd-ufs  -s 1G ad4s1   # 1GB for /tmp
  # gpart add -t freebsd-ufs ad4s1  # all rest for /usr
  # gpart set -a active -i 1 ad4
 
  But the result is not ready for boot after install the kernel and
  system; I allways have to go again with the sysinstall(8) tool to set
  the 'A' flag; don't know what I'm missing (and the man page is not very
  instructive on this); thanks

 You need to install the bootcode:

 This will install the interactive one:
 gpart bootcode -b /mnt2/boot/boot0 ad4

 this will install the non-interactive one:
 gpart bootcode -b /mnt2/boot/mbr ad4


This is interesting and here is my question:

Taking the above example from Matthias, assume that I have done everything
including installing the bootcode, then I realize I am not happy with the
scheme and I need to change.
How do I wipe the whole thing in one go so that I can start afresh?

gpart destroy ad4 ??

Why is there no sysinstall-style GUI for gpart?


-- 
Best regards,
Odhiambo WASHINGTON,
Nairobi,KE
+254733744121/+254722743223
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
I can't hear you -- I'm using the scrambler.
Please consider the environment before printing this email.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org

Re: Partitioning with gpart or old style slices?

2011-06-04 Thread Robert Simmons
On Sun, Jun 5, 2011 at 1:39 AM, Odhiambo Washington odhia...@gmail.com wrote:
 On Sun, Jun 5, 2011 at 08:03, Robert Simmons rsimmo...@gmail.com wrote:
 On Sunday, June 05, 2011 12:40:22 AM Matthias Apitz wrote:
  Since some time I'm as well using gpart(8) to setup new systems with the
  following sequence:
 
  # gpart create -s mbr ad4                 # Init the disk with an MBR
  # gpart add -t freebsd ad4                # Create a BSD container
  # gpart create -s bsd ad4s1               # Init with a BSD scheme
  # gpart add -t freebsd-ufs  -s 1G ad4s1   # 1GB for /
  # gpart add -t freebsd-swap -s 2G ad4s1   # 2GB for swap
  # gpart add -t freebsd-ufs  -s 2G ad4s1   # 2GB for /var
  # gpart add -t freebsd-ufs  -s 1G ad4s1   # 1GB for /tmp
  # gpart add -t freebsd-ufs ad4s1          # all rest for /usr
  # gpart set -a active -i 1 ad4
 
  But the result is not ready for boot after install the kernel and
  system; I allways have to go again with the sysinstall(8) tool to set
  the 'A' flag; don't know what I'm missing (and the man page is not very
  instructive on this); thanks

 You need to install the bootcode:

 This will install the interactive one:
 gpart bootcode -b /mnt2/boot/boot0 ad4

 this will install the non-interactive one:
 gpart bootcode -b /mnt2/boot/mbr ad4


 This is interesting and here is my question:

 Taking the above example from Matthias, assume that I have done everything
 including installing the bootcode, then I realize I am not happy with the
 scheme and I need to change.
 How do I wipe the whole thing in one go so that I can start afresh?

 gpart destroy ad4 ??

Yes, but first you must delete all of the slices/partitions.  Think of
it this way: you must go backwards down the path you just came with a
delete for each add, then a destroy for each create.

 Why is there no sysinstall-style GUI for gpart?

Hopefully, because sysinstall is soon going to be taken out back and
shot, and its replacement will be gpart-aware and therefore GPT-aware.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org