gpart weirdness: diskid/DISK-3EV0P4PZ00007250010X GPT (17G)

2013-10-09 Thread Anton Shterenlikht
# gpart show
=  34  35566411  da1  GPT  (17G)
34  35566411   - free -  (17G)

=  34  35566411  diskid/DISK-3EV0P4PZ7250010X  GPT  (17G)
34  35566411- free -  (17G)

=  34  35566411  da2  GPT  (17G)
34  35566411   - free -  (17G)

=  34  35566411  diskid/DISK-3EV0PWCX72500ZNJ  GPT  (17G)
34  35566411- free -  (17G)

# 

This is on ia64 10.0-CURRENT #5 r255488.

Both disks appear twice in gpart show output.
Is there some corruption in gpart data.

What am I do to?

Thanks

Anton
___
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: gpart weirdness: diskid/DISK-3EV0P4PZ00007250010X GPT (17G)

2013-10-09 Thread Mark Felder
On Wed, Oct 9, 2013, at 4:33, Anton Shterenlikht wrote:
 # gpart show
 =  34  35566411  da1  GPT  (17G)
 34  35566411   - free -  (17G)
 
 =  34  35566411  diskid/DISK-3EV0P4PZ7250010X  GPT  (17G)
 34  35566411- free -  (17G)
 
 =  34  35566411  da2  GPT  (17G)
 34  35566411   - free -  (17G)
 
 =  34  35566411  diskid/DISK-3EV0PWCX72500ZNJ  GPT  (17G)
 34  35566411- free -  (17G)
 
 # 
 

This is normal. Gpart is showing you both the physical dev versions of
the devices and the GPT label versions of the devices. I'll admit it can
be confusing, though.
___
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: gpart weirdness: diskid/DISK-3EV0P4PZ00007250010X GPT (17G)

2013-10-09 Thread Anton Shterenlikht
From: Mark Felder f...@freebsd.org
To: freebsd-questions@freebsd.org
Subject: Re: gpart weirdness: diskid/DISK-3EV0P4PZ7250010X  GPT  (17G)
Date: Wed, 09 Oct 2013 06:56:17 -0500

On Wed, Oct 9, 2013, at 4:33, Anton Shterenlikht wrote:
 # gpart show
 =  34  35566411  da1  GPT  (17G)
 34  35566411   - free -  (17G)
 
 =  34  35566411  diskid/DISK-3EV0P4PZ7250010X  GPT  (17G)
 34  35566411- free -  (17G)
 
 =  34  35566411  da2  GPT  (17G)
 34  35566411   - free -  (17G)
 
 =  34  35566411  diskid/DISK-3EV0PWCX72500ZNJ  GPT  (17G)
 34  35566411- free -  (17G)
 
 # 
 

This is normal. Gpart is showing you both the physical dev versions of
the devices and the GPT label versions of the devices. I'll admit it can
be confusing, though.

Well, I haven't seen this before.
And it only shows this for some disks, not all:

# gpart show
=   34  143374671  da0  GPT  (68G)
 34 4096001  efi  (200M)
 409634  1429650712  freebsd-ufs  (68G)

=  34  35566411  da1  GPT  (17G)
34  35566411   - free -  (17G)

=  34  35566411  da2  GPT  (17G)
34  35566411   - free -  (17G)

=   34  142255508  da3  GPT  (67G)
 34  1422555081  freebsd-ufs  (67G)

=  34  35566411  diskid/DISK-3EV0P4PZ7250010X  GPT  (17G)
34  35566411- free -  (17G)

=  34  35566411  diskid/DISK-3EV0PWCX72500ZNJ  GPT  (17G)
34  35566411- free -  (17G)

=   34  142255508  da4  GPT  (67G)
 34  1422555081  freebsd-swap  (67G)

=   34  142255508  da5  GPT  (67G)
 34  1422555081  freebsd-ufs  (67G)

=   34  286744118  da6  GPT  (136G)
 34  2867441181  freebsd-ufs  (136G)

# 

Thanks

Anton


___
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


gpart: table 'da0' is corrupt; operation not permitted

2013-07-16 Thread aurfalien
Hello again,

Not happy to be posting so much lately especially being so new.

I grabbed a few disks from a Mac and am using them for sys disks.

Upon booting from an install CD into a shell, I type;

gpart show

and see several partitions;

34  78165293da0 GPT 
(37G)   [CORRUPT]
34  6   - free -
(3.0k)
40  409600  1   efi 
(200M)
409640  774935362   
!52414944--11aa-aa11-00306543eacac  (37G)
77903176262144  3   apple-boot  
(128M)
781653207   - free- 
(3.5k)


Upon doing;

gpart destroy da0

I get;

gpart: Device busy


Upon doing;

gpart delete -i 1 da0

I get;

gpart: table da0 is corrupt: Operation not permitted

Any insight would be huge, thanks in advance,

- aurf


___
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: gpart: table 'da0' is corrupt; operation not permitted

2013-07-16 Thread Michael Sierchio
On Tue, Jul 16, 2013 at 1:44 PM, aurfalien aurfal...@gmail.com wrote:

 Upon doing;

 gpart destroy da0

 I get;

 gpart: Device busy

crude but effective:


DISK=da0

offset=`diskinfo $DISK | awk '{ print $4 - 131072 }'`
dd if=/dev/zero of=/dev/$DISK bs=64k count=1
dd if=/dev/zero of=/dev/$DISK bs=64k seek=$offset

gpart create -s gpt ${DISK}
___
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: gpart: table 'da0' is corrupt; operation not permitted

2013-07-16 Thread aurfalien

On Jul 16, 2013, at 1:50 PM, Michael Sierchio wrote:

 On Tue, Jul 16, 2013 at 1:44 PM, aurfalien aurfal...@gmail.com wrote:
 
 Upon doing;
 
 gpart destroy da0
 
 I get;
 
 gpart: Device busy
 
 crude but effective:
 
 
 DISK=da0
 
 offset=`diskinfo $DISK | awk '{ print $4 - 131072 }'`
 dd if=/dev/zero of=/dev/$DISK bs=64k count=1
 dd if=/dev/zero of=/dev/$DISK bs=64k seek=$offset
 
 gpart create -s gpt ${DISK}

This is what I ended up doing.

I unplugged it, waited a few, re plugged and then I was able to delete/destroy.

I will keep your method on hand though as I prefer not doing a hot plug.

- aurf
___
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: gpart: table 'da0' is corrupt; operation not permitted

2013-07-16 Thread Warren Block

On Tue, 16 Jul 2013, aurfalien wrote:



On Jul 16, 2013, at 1:50 PM, Michael Sierchio wrote:


On Tue, Jul 16, 2013 at 1:44 PM, aurfalien aurfal...@gmail.com wrote:


Upon doing;

gpart destroy da0

I get;

gpart: Device busy


crude but effective:


DISK=da0

offset=`diskinfo $DISK | awk '{ print $4 - 131072 }'`
dd if=/dev/zero of=/dev/$DISK bs=64k count=1
dd if=/dev/zero of=/dev/$DISK bs=64k seek=$offset

gpart create -s gpt ${DISK}


This is what I ended up doing.

I unplugged it, waited a few, re plugged and then I was able to delete/destroy.

I will keep your method on hand though as I prefer not doing a hot plug.


Hot plug?  That just wipes the beginning and end of the disk.  I would 
erase 1M just to be sure.


The more elegant version is

  gpart destroy -F da0

If it gives an error when doing that, disabling the safety may be 
necessary:  sysctl kern.geom.debugflags=16

Do that only when necessary.  It usually is not.
___
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: gpart: table 'da0' is corrupt; operation not permitted

2013-07-16 Thread aurfalien

On Jul 16, 2013, at 3:01 PM, Warren Block wrote:

 On Tue, 16 Jul 2013, aurfalien wrote:
 
 
 On Jul 16, 2013, at 1:50 PM, Michael Sierchio wrote:
 
 On Tue, Jul 16, 2013 at 1:44 PM, aurfalien aurfal...@gmail.com wrote:
 
 Upon doing;
 
 gpart destroy da0
 
 I get;
 
 gpart: Device busy
 
 crude but effective:
 
 
 DISK=da0
 
 offset=`diskinfo $DISK | awk '{ print $4 - 131072 }'`
 dd if=/dev/zero of=/dev/$DISK bs=64k count=1
 dd if=/dev/zero of=/dev/$DISK bs=64k seek=$offset
 
 gpart create -s gpt ${DISK}
 
 This is what I ended up doing.
 
 I unplugged it, waited a few, re plugged and then I was able to 
 delete/destroy.
 
 I will keep your method on hand though as I prefer not doing a hot plug.
 
 Hot plug?  That just wipes the beginning and end of the disk.  I would erase 
 1M just to be sure.
 
 The more elegant version is
 
  gpart destroy -F da0

Oh for sure, I did that after the hotplug which finally allowed me to f do it.

I had to hot plug a few times though.


 If it gives an error when doing that, disabling the safety may be necessary:  
 sysctl kern.geom.debugflags=16
 Do that only when necessary.  It usually is not.

Funny, I did that based on some googling but no dice.

I booted in both regular shel and Live CD.

- aurf
___
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: gpart

2013-04-01 Thread Erich Dollansky
Hi,

On Sun, 31 Mar 2013 21:06:24 -0500
Joshua Isom jri...@gmail.com wrote:

 On 3/31/2013 8:54 PM, Erich Dollansky wrote:
  I have had only one problem with this description. I could not boot
  from a GPT setup on my machine done as described there. But I have a
  disk done with PCBSD based on 9.0 which booted well. I cannot tell
  you if this is a problem caused by a later chance on the side of
  FreeBSD.
 
 Did you make sure to install the gpt bootloader instead of the
 standard bootloader?  I believe I have the gptzfsboot, so I have no
 UFS partitions and everything's partitioned with GPT.  There's no
 guarantee it will fix it, bios quirks happens.

it is a real weird thing. As I installed a PCBSD on that disk
originally, I have had a running system. It stopped working after some
FreeBSD update. As this is an external disk, I do not boot often from
it. I use it mainly for backup purpose.

I stopped working on this problem for some time but I will have to go
back soon after other work is finished.

Erich
___
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: gpart

2013-04-01 Thread Grant Peel
-Original Message-
From: Erich Dollansky [mailto:erichsfreebsdl...@alogt.com] 
Sent: March-31-13 9:55 PM
To: Grant Peel
Cc: freebsd-questions@freebsd.org
Subject: Re: gpart

Hi,

On Sun, 31 Mar 2013 21:28:40 -0400
Grant Peel gp...@thenetnow.com wrote:

 I am in the midst of setting up the framework for new servers using 
 FreeBSD 9.1. I used the bsdinstall and Manual`` option when setting up 
 the disk geometry using GPT - graphical setup.
 
 The idea will be to eventually dump the 4 file systems, (/, /usr /var 
 and /home) and restore them on other servers when the time comes.
 
using a separated home is a very good idea.
  
 http://www.wonkity.com/~wblock/docs/html/disksetup.html

I have had only one problem with this description. I could not boot from a
GPT setup on my machine done as described there. But I have a disk done with
PCBSD based on 9.0 which booted well. I cannot tell you if this is a problem
caused by a later chance on the side of FreeBSD.

 Which worked well. But as yet I do not have dumps to test with.

If all worked well for you, I do not see any problems coming for you then.
 
 I was wondering in anyone sees any issues creating the drive geometry 
 using this method, with the intent of restoring dumped filesystems to 
 to, including the root filesystem.

I have some drives which partitioning I did according to this. The only
problem I have is booting. The rest is all working perfectly.
 
 I am yet to use 9.1 to do so, so any tips would be appreciated.
 
If you want this for serious servers, you might even consider 8.3, if your
hardware is supported. Nothing beats the robustness of the older FreeBSD
versions.

Erich

Interesting.

Up to this point I have always upgraded to the latest release version of
FreeBSD.

I am currently running 8.0 and am in need of many of the ports to be
upgraded, and have never had much luck doing the upgrade thing with the base
system and ports, preferring instead to completely rebuild in restore user
data.

Can I assume that the versions of the ports shown on the freebsd.orgéports
site will be available in 8.3 and 9.1é

-G


___
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: gpart

2013-04-01 Thread Erich Dollansky
Hi,

On Mon, 1 Apr 2013 09:20:21 -0400
Grant Peel gp...@thenetnow.com wrote:

 I am currently running 8.0 and am in need of many of the ports to be
 upgraded, and have never had much luck doing the upgrade thing with
 the base system and ports, preferring instead to completely rebuild
 in restore user data.
 
I do upgrades via portupgrade since 6.x days.

 Can I assume that the versions of the ports shown on the
 freebsd.orgéports site will be available in 8.3 and 9.1é

Ports do not use a version. So, what ever FreeBSD version you have does
not matter. If you updated your ports tree, you will always get the
current port version.

erich

___
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

gpart

2013-03-31 Thread Grant Peel
Hi all,

 

I am in the midst of setting up the framework for new servers using FreeBSD
9.1. I used the bsdinstall and Manual`` option when setting up the disk
geometry using GPT - graphical setup.

 

The idea will be to eventually dump the 4 file systems, (/, /usr /var and
/home) and restore them on other servers when the time comes.

 

I am reading everything there is about GPT at this point as I have never
used it before. It seems gpart is the tool to use.

 

I have done several test runs setting the drive geometry using this as a
guide:

 

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

 

Which worked well. But as yet I do not have dumps to test with.

 

I was wondering in anyone sees any issues creating the drive geometry using
this method, with the intent of restoring dumped filesystems to to,
including the root filesystem.

 

I am yet to use 9.1 to do so, so any tips would be appreciated.

 

-G

 

 

 

 

___
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: gpart

2013-03-31 Thread Erich Dollansky
Hi,

On Sun, 31 Mar 2013 21:28:40 -0400
Grant Peel gp...@thenetnow.com wrote:

 I am in the midst of setting up the framework for new servers using
 FreeBSD 9.1. I used the bsdinstall and Manual`` option when setting
 up the disk geometry using GPT - graphical setup.
 
 The idea will be to eventually dump the 4 file systems, (/, /usr /var
 and /home) and restore them on other servers when the time comes.
 
using a separated home is a very good idea.
  
 http://www.wonkity.com/~wblock/docs/html/disksetup.html

I have had only one problem with this description. I could not boot
from a GPT setup on my machine done as described there. But I have a
disk done with PCBSD based on 9.0 which booted well. I cannot tell you
if this is a problem caused by a later chance on the side of FreeBSD.

 Which worked well. But as yet I do not have dumps to test with.

If all worked well for you, I do not see any problems coming for you
then.
 
 I was wondering in anyone sees any issues creating the drive geometry
 using this method, with the intent of restoring dumped filesystems to
 to, including the root filesystem.

I have some drives which partitioning I did according to this. The only
problem I have is booting. The rest is all working perfectly.
 
 I am yet to use 9.1 to do so, so any tips would be appreciated.
 
If you want this for serious servers, you might even consider 8.3, if
your hardware is supported. Nothing beats the robustness of the older
FreeBSD versions.

Erich
___
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: gpart

2013-03-31 Thread Joshua Isom

On 3/31/2013 8:54 PM, Erich Dollansky wrote:

I have had only one problem with this description. I could not boot
from a GPT setup on my machine done as described there. But I have a
disk done with PCBSD based on 9.0 which booted well. I cannot tell you
if this is a problem caused by a later chance on the side of FreeBSD.


Did you make sure to install the gpt bootloader instead of the standard 
bootloader?  I believe I have the gptzfsboot, so I have no UFS 
partitions and everything's partitioned with GPT.  There's no guarantee 
it will fix it, bios quirks happens.


___
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: gpart

2013-03-31 Thread Joshua Isom

On 3/31/2013 8:28 PM, Grant Peel wrote:

I was wondering in anyone sees any issues creating the drive geometry using
this method, with the intent of restoring dumped filesystems to to,
including the root filesystem.


Geometry or partition size?  If it's geometry, and you need to worry 
about it, buy a new system.  Nowadays it's making sure your 4k block 
hard drive has everything aligned to 4k blocks when the drive reports 
512b blocks.  If it's partition size, no.

___
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: gpart

2013-03-31 Thread Doug Hardie

On 31 March 2013, at 18:28, Grant Peel gp...@thenetnow.com wrote:

 Hi all,
 
 
 
 I am in the midst of setting up the framework for new servers using FreeBSD
 9.1. I used the bsdinstall and Manual`` option when setting up the disk
 geometry using GPT - graphical setup.
 
 
 
 The idea will be to eventually dump the 4 file systems, (/, /usr /var and
 /home) and restore them on other servers when the time comes.
 
 
 
 I am reading everything there is about GPT at this point as I have never
 used it before. It seems gpart is the tool to use.
 
 
 
 I have done several test runs setting the drive geometry using this as a
 guide:
 
 
 
 http://www.wonkity.com/~wblock/docs/html/disksetup.html
 
 
 
 Which worked well. But as yet I do not have dumps to test with.
 
 
 
 I was wondering in anyone sees any issues creating the drive geometry using
 this method, with the intent of restoring dumped filesystems to to,
 including the root filesystem.
 
 
 
 I am yet to use 9.1 to do so, so any tips would be appreciated.

I just finished doing exactly that.  Worked fine.  I installed 9.1 on a drive 
and it had boot problems.  Apparently the drive was previously a part of a raid 
and graid would get involved during boot and wait and wait and wait.  To get 
rid of that, I formatted another drive using gpart and then used dump-restore 
to move the data from the first drive to the second.  The new drive is now the 
master drive for the system.  The original drive has been returned to a spare 
drive pool. The new drive boots fine and just works.  I did a complete zero of 
the drive before starting the partitioning though as I have no way of knowing 
if that drive was previously in a raid array.

___
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


9.1 install wipes out gpart boot blocks?

2013-01-30 Thread Gary Aitken
I used gpart to set up a new disk,
then went through a 9.1 install.
Everything seemed to go fine, but when time came to boot the new drive,
it wouldn't boot.

When doing the 9.1 install, 
I selected the disk and had to assign the partitions to the various filesystems.
AFIK, I did not otherwise modify the filesystems.

Does the 9.1 install process trash the boot areas?

My gpart setup was:

  clean up (delete) the original partitions
  gpart destroy ada3
  gpart create -s GPT ada3
  gpart bootcode -b /boot/pmbr ada3
  gpart add -t freebsd-boot -i 1 -s 512K -l gptboot ada3
  gpart bootcode -p /boot/gptboot -i 1 ada3
  gpart add -t freebsd-ufs -a 4K -b 1M -s 4G -i 2 -l fbsdroot ada3  # /
  gpart add -t freebsd-swap -a 4K -s 2G -i 3 -l fbsdswap ada3 # swap
  gpart add -t freebsd-ufs -a 4K -s 2G -i 4 -l fbsdvar ada3 # /var
  gpart add -t freebsd-ufs -a 4K -s 2G -i 5 -l fbsdtmp ada3 # /tmp
  gpart add -t freebsd-ufs -a 4K -i 6 -l fbsdusr ada3   # /usr
  newfs /dev/ada3p2   # /
  newfs -U -b 4096 -g 8192 -i 1024 /dev/ada3p4# /var
  newfs -U /dev/ada3p5# /tmp
  newfs -U /dev/ada3p6

At this point:

gpart show -l ada3
=   34  488397101  ada3  GPT  (232G)
 34   1024 1  gptboot  (512k)
   1058  6- free -  (3.0k)
   10648388608 2  fbsdroot  (4.0G)
83896724194304 3  fbsdswap  (2.0G)
   125839764194304 4  fbsdvar  (2.0G)
   167782804194304 5  fbsdtmp  (2.0G)
   20972584  467424544 6  fbsdusr  (222G)
  488397128  7- free -  (3.5k)

The / /var and /usr partitions seem to have been written properly.
Do I simply need to rewrite the boot areas, 
or is something more fundamental screwed up?
___
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


9.1 install wipes out gpart boot blocks?

2013-01-30 Thread Robert Huff

Gary Aitken writes:

  I used gpart to set up a new disk,
  then went through a 9.1 install.
  Everything seemed to go fine, but when time came to boot the new drive,
  it wouldn't boot.

While the it wouldn't boot is catastrophically imprecise, I
had what sounds like a similar problem about a month ago.
I installed from the 9.0 CD and everything appeared to go
correctly.  However, on final re-boot the loader couldn't identify
the root partition.
The solution was to identify the disks using the GPT labels in
fstab.
Check the archive of questions@ for more details.



Robert Huff

___
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: 9.1 install wipes out gpart boot blocks?

2013-01-30 Thread Warren Block

On Wed, 30 Jan 2013, Gary Aitken wrote:


I used gpart to set up a new disk,
then went through a 9.1 install.
Everything seemed to go fine, but when time came to boot the new drive,
it wouldn't boot.


What did it say?


When doing the 9.1 install,
I selected the disk and had to assign the partitions to the various filesystems.
AFIK, I did not otherwise modify the filesystems.

Does the 9.1 install process trash the boot areas?

My gpart setup was:

 clean up (delete) the original partitions
 gpart destroy ada3


These two steps can be replaced with
  gpart destroy -F ada3


 gpart create -s GPT ada3
 gpart bootcode -b /boot/pmbr ada3
 gpart add -t freebsd-boot -i 1 -s 512K -l gptboot ada3
 gpart bootcode -p /boot/gptboot -i 1 ada3


I do the bootcode in one step:
  gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 ada3


 gpart add -t freebsd-ufs -a 4K -b 1M -s 4G -i 2 -l fbsdroot ada3  # /
 gpart add -t freebsd-swap -a 4K -s 2G -i 3 -l fbsdswap ada3 # swap
 gpart add -t freebsd-ufs -a 4K -s 2G -i 4 -l fbsdvar ada3 # /var
 gpart add -t freebsd-ufs -a 4K -s 2G -i 5 -l fbsdtmp ada3 # /tmp
 gpart add -t freebsd-ufs -a 4K -i 6 -l fbsdusr ada3   # /usr


It's not necessary to use partition numbers with add, gpart will just 
use the next one available.


Here are my notes:
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


creating bootable disk with gpart

2013-01-28 Thread Erich Dollansky
Hi,

I followed http://www.wonkity.com/~wblock/docs/html/disksetup.html to
create bootable disks with GPT.

As you know from my former post, I tried to boot via USB from a GPT
disk and failed. I inserted the disk into the notebook and bootin also
failed.

Irony is that inserting the MBR disk into the USB case results also in
a failure but much later.

Booting from the GPT disk fails already at BIOS level. The BIOS does
not find the loader and returns to the selection menu of available boot
devices when using the GPT disk.

I know that I could boot via USB. But I do not know anymore if I booted
from the GPT or from the MBR disk.

I can exclude an error with the USB adapter as booting from a thumb
drive via USB also fails. The BIOS of my X220 did not get any updates
since I purchased it. So, nothing should have changed.

I am bit irritated at the moment as you can imagine.

If somebody has an idea what is wrong or what I am doing wrong, please
tell me.

Erich
___
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: creating bootable disk with gpart

2013-01-28 Thread Warren Block

On Mon, 28 Jan 2013, Erich Dollansky wrote:


Hi,

I followed http://www.wonkity.com/~wblock/docs/html/disksetup.html to
create bootable disks with GPT.

As you know from my former post, I tried to boot via USB from a GPT
disk and failed. I inserted the disk into the notebook and bootin also
failed.

Irony is that inserting the MBR disk into the USB case results also in
a failure but much later.


What failure?
___
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: creating bootable disk with gpart

2013-01-28 Thread Erich Dollansky
Hi,

On Mon, 28 Jan 2013 08:41:10 -0700 (MST)
Warren Block wbl...@wonkity.com wrote:

 On Mon, 28 Jan 2013, Erich Dollansky wrote:
 
  Hi,
 
  I followed http://www.wonkity.com/~wblock/docs/html/disksetup.html
  to create bootable disks with GPT.
 
  As you know from my former post, I tried to boot via USB from a GPT
  disk and failed. I inserted the disk into the notebook and bootin
  also failed.
 
  Irony is that inserting the MBR disk into the USB case results also
  in a failure but much later.
 
 What failure?

'GEOM_PART integrity check failed (da0 MBR)'

It is obviously not a problem with the disk as the disk worked again
after being put back into the notebook.

I did another test with a fresh FreeBSD 9.0 installation on an USB
disk. It is the same story. The loader is not found and the system does
not boot. It seems to me that my notebook is not able to boot on the
combination out of USB and GPT.

I will do later some more testing. It all would work for me if the
machine boots with MBR. The only thing which irritates me is the fact
that it started last year from the GPT formatted disk in the USB case.
Of course, it also started from this disk when it was in the notebook.

It still could be that I have overwritten something which comes after
the loader but I cannot imagine that I have changed the loader by
chance. But - as we all know - things happen.

Erich
 ___
 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

___
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: creating bootable disk with gpart

2013-01-28 Thread Erich Dollansky
Hi Warren,

On Mon, 28 Jan 2013 08:41:10 -0700 (MST)
Warren Block wbl...@wonkity.com wrote:

 On Mon, 28 Jan 2013, Erich Dollansky wrote:
 
  Hi,
 
  I followed http://www.wonkity.com/~wblock/docs/html/disksetup.html
  to create bootable disks with GPT.
 
  As you know from my former post, I tried to boot via USB from a GPT
  disk and failed. I inserted the disk into the notebook and bootin
  also failed.
 
  Irony is that inserting the MBR disk into the USB case results also
  in a failure but much later.
 
 What failure?

it is all getting really confusing for me. When I try now your example,
it also fails:

[X220]/home/erich (root)  gpart destroy -F da0
da0 destroyed
[X220]/home/erich (root)  gpart show da0
gpart: No such geom: da0.
[X220]/home/erich (root)  gpart create -s mbr da0
da0 created
[X220]/home/erich (root)  gpart show da0
=   63  312581745  da0  MBR  (149G)
 63  312581745   - free -  (149G)

[X220]/home/erich (root)  gpart bootcode -b /boot/mbr da0
bootcode written to da0
[X220]/home/erich (root)  gpart show da0
=   63  312581745  da0  MBR  (149G)
 63  312581745   - free -  (149G)

[X220]/home/erich (root)  gpart add -t freebsd da0
da0s1 added
[X220]/home/erich (root)  gpart show da0
=   63  312581745  da0  MBR  (149G)
 63  3125817451  freebsd  (149G)

[X220]/home/erich (root)  gpart set -a active -i 1 da0
active set on da0s1
[X220]/home/erich (root)  gpart show da0
=   63  312581745  da0  MBR  (149G)
 63  3125817451  freebsd  [active]  (149G)

[X220]/home/erich (root)  gpart create -s bsd da0s1
gpart: geom 'da0s1': File exists
[X220]/home/erich (root)  gpart show da0
=   63  312581745  da0  MBR  (149G)
 63  3125817451  freebsd  [active]  (149G)

Of course, there was a da0s1 before on the disk. Shouldn't gpart
destroy -F da0 have destroyed it all?

Erich
___
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: creating bootable disk with gpart

2013-01-28 Thread Erich Dollansky
Hi,

On Tue, 29 Jan 2013 08:08:19 +0700
Erich Dollansky erichsfreebsdl...@alogt.com wrote:

 Hi Warren,
 
 On Mon, 28 Jan 2013 08:41:10 -0700 (MST)
 Warren Block wbl...@wonkity.com wrote:
 
  On Mon, 28 Jan 2013, Erich Dollansky wrote:
  
   Hi,
  
   I followed http://www.wonkity.com/~wblock/docs/html/disksetup.html
   to create bootable disks with GPT.
  
   As you know from my former post, I tried to boot via USB from a
   GPT disk and failed. I inserted the disk into the notebook and
   bootin also failed.
  
   Irony is that inserting the MBR disk into the USB case results
   also in a failure but much later.
  
  What failure?
 
 it is all getting really confusing for me. When I try now your
 example, it also fails:
 
 [X220]/home/erich (root)  gpart destroy -F da0
 da0 destroyed
 [X220]/home/erich (root)  gpart show da0
 gpart: No such geom: da0.
 [X220]/home/erich (root)  gpart create -s mbr da0
 da0 created
 [X220]/home/erich (root)  gpart show da0
 =   63  312581745  da0  MBR  (149G)
  63  312581745   - free -  (149G)
 
 [X220]/home/erich (root)  gpart bootcode -b /boot/mbr da0
 bootcode written to da0
 [X220]/home/erich (root)  gpart show da0
 =   63  312581745  da0  MBR  (149G)
  63  312581745   - free -  (149G)
 
 [X220]/home/erich (root)  gpart add -t freebsd da0
 da0s1 added
 [X220]/home/erich (root)  gpart show da0
 =   63  312581745  da0  MBR  (149G)
  63  3125817451  freebsd  (149G)
 
 [X220]/home/erich (root)  gpart set -a active -i 1 da0
 active set on da0s1
 [X220]/home/erich (root)  gpart show da0
 =   63  312581745  da0  MBR  (149G)
  63  3125817451  freebsd  [active]  (149G)
 
 [X220]/home/erich (root)  gpart create -s bsd da0s1
 gpart: geom 'da0s1': File exists
 [X220]/home/erich (root)  gpart show da0
 =   63  312581745  da0  MBR  (149G)
  63  3125817451  freebsd  [active]  (149G)
 
 Of course, there was a da0s1 before on the disk. Shouldn't gpart
 destroy -F da0 have destroyed it all?
 
even using the image to install FreeBSD 9.0 from a thumbdrive gives the
same result. It seems that old partitions re-appear after a deleted
slice is created again.

I then installed FreeBSD 9.0 from that thumbdrive onto that USB disk
using a MBR schema. Of course, this booted after editing /etc/fstab.

My problem are still the re-appearin partitions. I would like to have a
script which flattens a media and creates new partitions and puts a new
file system on each partition.

There are now two options I have. Looking at the source (would be the
ideal one) or do a hack deleting partitions which might not exist.

The original problem of a GPT device not booting would still be there.

I will go back to my normal work now.

Erich
___
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: gpart, glabel and newfs -- what am I doing wrong

2013-01-13 Thread Erich Dollansky
Hi,

On Sun, 13 Jan 2013 01:36:21 -0500
kpn...@pobox.com wrote:

 On Sun, Jan 13, 2013 at 08:09:00AM +0700, Erich Dollansky wrote:
  For what is glabel then still good?
 
 It is still useful for partition schemes that don't have labels (eg,
 MBR) AND the filesystem used doesn't support labels itself AND the
 end of the partition does not get touched by the filesystem.
 
 Note that UFS in FreeBSD does support labels. I believe it is the '-L'
 option to newfs. ZFS does not in this sense, and ZFS touches the end
 of the partition.
 
 That's a long list of conditions. So, really, glabel should typically
 be avoided.
 

thanks for the explaination. I am not able to use the labels outside
gpart but if they work for me - as it currently looks like - I will
stick with them.

I will later report in more detail when I have finished my scripts.

Erich
___
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: gpart, glabel and newfs -- what am I doing wrong

2013-01-13 Thread Warren Block

On Sun, 13 Jan 2013, kpn...@pobox.com wrote:


On Sun, Jan 13, 2013 at 08:09:00AM +0700, Erich Dollansky wrote:

For what is glabel then still good?


It is still useful for partition schemes that don't have labels (eg, MBR)
AND the filesystem used doesn't support labels itself AND the end of the
partition does not get touched by the filesystem.


But it doesn't matter what the filesystem does.  Access to the last 
block is not allowed by the label device.  The filesystem does not even 
see it.  See my reply in -fs:

http://lists.freebsd.org/pipermail/freebsd-fs/2013-January/016113.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: gpart, glabel and newfs -- what am I doing wrong

2013-01-13 Thread Warren Block

On Sun, 13 Jan 2013, Warren Block wrote:


On Sun, 13 Jan 2013, kpn...@pobox.com wrote:


On Sun, Jan 13, 2013 at 08:09:00AM +0700, Erich Dollansky wrote:

For what is glabel then still good?


It is still useful for partition schemes that don't have labels (eg, MBR)
AND the filesystem used doesn't support labels itself AND the end of the
partition does not get touched by the filesystem.


But it doesn't matter what the filesystem does.  Access to the last block is 
not allowed by the label device.  The filesystem does not even see it.  See 
my reply in -fs:

http://lists.freebsd.org/pipermail/freebsd-fs/2013-January/016113.html


Sorry, forgot to mention that one possible use for glabel is to label a 
swap partition on an MBR drive.


  # glabel label myswap /dev/ada0s1b

And then in /etc/fstab:

  /dev/label/myswap noneswapsw  0   0

One block is used for metadata at the end of ada0s1b, but it's safe from 
overwriting because /dev/label/myswap does not include that block.

___
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


gpart, glabel and newfs -- what am I doing wrong

2013-01-12 Thread Erich Dollansky
Hi,

in general, I try to create the partitions with gpart, add a label with
glabel and put a filesystem. I think that I am doing something very
simple the wrong way but I cannot see the error.

I try to do it in the following way:

# gpart destroy -F da0
# gpart create -s GPT da0
# gpart add -t freebsd-boot -s 64k da0
# gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 da0
# gpart add -t freebsd-ufs -s 512m -a 4k -l Toshiba16GB2boot da0
# gpart add -t freebsd-ufs -s 10m -a 4k -l Toshiba16GB2root da0
# gpart add -t freebsd-swap -s 10m -a 4k -l Toshiba16GB2swap da0
# gpart add -t freebsd-ufs -s 10m -a 4k -l Toshiba16GB2var da0
# gpart add -t freebsd-ufs -s 10m -a 4k -l Toshiba16GB2tmp da0
# gpart add -t freebsd-ufs -a 4k -l Toshiba16GB2usr da0

Label the partitions:

# glabel label Toshiba16GB2boot /dev/da0p2
# glabel label Toshiba16GB2root /dev/da0p3
# glabel label Toshiba16GB2swap /dev/da0p4
# glabel label Toshiba16GB2var /dev/da0p5
# glabel label Toshiba16GB2tmp /dev/da0p6
# glabel label Toshiba16GB2usr /dev/da0p7

And put a file system onto the partitions.

# newfs /dev/label/Toshiba16GB2boo
# newfs /dev/label/Toshiba16GB2roo
# newfs /dev/label/Toshiba16GB2var
# newfs /dev/label/Toshiba16GB2tmp
# newfs /dev/label/Toshiba16GB2usr

But newfs on the first partition results in this:

Filesystem size 15  minimum size of 48

When I ran the newfs directly on the device, I get this:

[X220]/home/erich (root)  newfs /dev/da0p2
/dev/da0p2: 512.0MB (1048576 sectors) block size 32768, fragment size
4096 using 4 cylinder groups of 128.03MB, 4097 blks, 16512 inodes.
super-block backups (for fsck -b #) at:
 192, 262400, 524608, 786816

Of course, this is what I expect.

I believe that it is something simple but I am not able to see my
mistake.

Erich
___
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: gpart, glabel and newfs -- what am I doing wrong

2013-01-12 Thread Mardorf Ralf
FWIW I could not partition using the FreeBSD 9.0 amd64 install DVD. I 
partitioned with the PcBSD  8.2 DVD and then tried to install from 9.0, but it 
anyway caused partitioning issues.
After that I partitioned using FreeBSD 8.3, installed 8.3 and then updated to 
9.1.

Regards,
Ralf

___
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: gpart, glabel and newfs -- what am I doing wrong

2013-01-12 Thread Warren Block

On Sat, 12 Jan 2013, Erich Dollansky wrote:


in general, I try to create the partitions with gpart, add a label with
glabel and put a filesystem. I think that I am doing something very
simple the wrong way but I cannot see the error.

I try to do it in the following way:

# gpart destroy -F da0
# gpart create -s GPT da0
# gpart add -t freebsd-boot -s 64k da0
# gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 da0
# gpart add -t freebsd-ufs -s 512m -a 4k -l Toshiba16GB2boot da0
# gpart add -t freebsd-ufs -s 10m -a 4k -l Toshiba16GB2root da0
# gpart add -t freebsd-swap -s 10m -a 4k -l Toshiba16GB2swap da0
# gpart add -t freebsd-ufs -s 10m -a 4k -l Toshiba16GB2var da0
# gpart add -t freebsd-ufs -s 10m -a 4k -l Toshiba16GB2tmp da0
# gpart add -t freebsd-ufs -a 4k -l Toshiba16GB2usr da0

Label the partitions:

# glabel label Toshiba16GB2boot /dev/da0p2
# glabel label Toshiba16GB2root /dev/da0p3
# glabel label Toshiba16GB2swap /dev/da0p4
# glabel label Toshiba16GB2var /dev/da0p5
# glabel label Toshiba16GB2tmp /dev/da0p6
# glabel label Toshiba16GB2usr /dev/da0p7


There is no need for all this.  You already created GPT labels with
'gpt -l' above.  And those labels don't need extra metadata at the end 
of the partition.



And put a file system onto the partitions.

# newfs /dev/label/Toshiba16GB2boo
# newfs /dev/label/Toshiba16GB2roo
# newfs /dev/label/Toshiba16GB2var
# newfs /dev/label/Toshiba16GB2tmp
# newfs /dev/label/Toshiba16GB2usr


Those look cut off.  And there's surely a limit to the length of label 
names, but I'm not sure what it is.  Anyway, use


  # newfs /dev/gpt/Toshiba16GB2boot

And consider using -U with newfs.
___
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: gpart, glabel and newfs -- what am I doing wrong

2013-01-12 Thread Erich Dollansky
Hi,

On Sat, 12 Jan 2013 09:56:39 -0700 (MST)
Warren Block wbl...@wonkity.com wrote:

 On Sat, 12 Jan 2013, Erich Dollansky wrote:
 
  in general, I try to create the partitions with gpart, add a label
  with glabel and put a filesystem. I think that I am doing something
  very simple the wrong way but I cannot see the error.
 
  I try to do it in the following way:
 
  # gpart destroy -F da0
  # gpart create -s GPT da0
  # gpart add -t freebsd-boot -s 64k da0
  # gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 da0
  # gpart add -t freebsd-ufs -s 512m -a 4k -l Toshiba16GB2boot da0
  # gpart add -t freebsd-ufs -s 10m -a 4k -l Toshiba16GB2root da0
  # gpart add -t freebsd-swap -s 10m -a 4k -l Toshiba16GB2swap da0
  # gpart add -t freebsd-ufs -s 10m -a 4k -l Toshiba16GB2var da0
  # gpart add -t freebsd-ufs -s 10m -a 4k -l Toshiba16GB2tmp da0
  # gpart add -t freebsd-ufs -a 4k -l Toshiba16GB2usr da0
 
  Label the partitions:
 
  # glabel label Toshiba16GB2boot /dev/da0p2
  # glabel label Toshiba16GB2root /dev/da0p3
  # glabel label Toshiba16GB2swap /dev/da0p4
  # glabel label Toshiba16GB2var /dev/da0p5
  # glabel label Toshiba16GB2tmp /dev/da0p6
  # glabel label Toshiba16GB2usr /dev/da0p7
 
 There is no need for all this.  You already created GPT labels with
 'gpt -l' above.  And those labels don't need extra metadata at the
 end of the partition.
 
For what is glabel then still good?

 And consider using -U with newfs.

Do not worry, this was just for the test.

Erich
___
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


gpart and FreeBSD 8.x

2012-12-03 Thread Rick Miller
For anyone interested, Posted a new blog with regards to gpart on
FreeBSD 8.x (with a link to one of Warren's blog posts):

http://blog.hostileadmin.com/2012/12/03/freebsd-partitions-and-filesystems-with-gpart/

-- 
Take care
Rick Miller
___
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: gpart and FreeBSD 8.x

2012-12-03 Thread Julien Cigar

On 12/03/2012 13:31, Rick Miller wrote:

For anyone interested, Posted a new blog with regards to gpart on
FreeBSD 8.x (with a link to one of Warren's blog posts):

http://blog.hostileadmin.com/2012/12/03/freebsd-partitions-and-filesystems-with-gpart/


gpart is in BASE on 8.x so there is nothing to install


--
No trees were killed in the creation of this message.
However, many electrons were terribly inconvenienced.

___
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: gpart and FreeBSD 8.x

2012-12-03 Thread Rick Miller
On Mon, Dec 3, 2012 at 7:49 AM, Julien Cigar jci...@ulb.ac.be wrote:

 gpart is in BASE on 8.x so there is nothing to install


Thanks, Julien!  I added a comment to this effect on the post!

-- 
Take care
Rick Miller
___
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


Manually partitioning using gpart

2012-11-25 Thread Ralf Mardorf
This is what I've got:

# gpart show ada0
=  63   625142385 ada0 MBR (298G)
63   121274683 - free - (57G)
[snip]

IIUC I now have to do:

# gpart add -s 64k -t freebsd-boot -l boot0 ada0
# gpart add -s 8G -t freebsd-swap -l swap0  ada0
# gpart add -t freebsd-ufs -a 256k -l root0 ada0

Here I already don't understand how large the swap should be. Really 2 *
size of the RAM?

I also don't know if 256k is a sane alignment value, I just copied this
from a howto.

How to continue after this is done?

I want to use GRUB from my Linux installs, this is the Linux menu.lst:

timeout   8
default   0
color light-blue/black light-cyan/blue

title FreeBSD 9.0
root   (hd0,a)
kernel /boot/loader

[snip]

Regards,
Ralf

___
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: Manually partitioning using gpart

2012-11-25 Thread Polytropon
On Sun, 25 Nov 2012 12:26:14 +0100, Ralf Mardorf wrote:
 This is what I've got:
 
 # gpart show ada0
 =  63   625142385 ada0 MBR (298G)
 63   121274683 - free - (57G)
 [snip]
 
 IIUC I now have to do:
 
 # gpart add -s 64k -t freebsd-boot -l boot0 ada0
 # gpart add -s 8G -t freebsd-swap -l swap0  ada0
 # gpart add -t freebsd-ufs -a 256k -l root0 ada0
 
 Here I already don't understand how large the swap should be. Really 2 *
 size of the RAM?

Won't be wrong; my understanding of the rule was 2 * size of
_possible_ RAM in the machine. But disk space is cheap, so
8 G should be fine. But again, the requirement for the swap
partition depends on what you're doing with the machine and
what you're expecting (e. g. will you want to save kernel dumps
to the swap partition?).

You can find an example here:

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

Also see man newfs for options.



 I also don't know if 256k is a sane alignment value, I just copied this
 from a howto.

Modern disks work faster when everything is aligned to 4k.
But they _work_ with any other alignment.



 How to continue after this is done?

You will have new partitions /dev/ada0pN. You need to format
them with newfs. If I see this correctly, you have created
one big / partition (for everything); this is _valid_ and
possible, but may be less optimum for a couple of reasons.

Doing functional partitioning requires at least an idea
of how much disk space will be needed per functional part,
and this can differ from use as server or desktop, or what
kind of software you run. The advantage is that you can
backup data partition-wise (using dump + restore) and have
a functional base system on / in case there's a severe
disk corruption. The disadvantage is that if finally one
partition is too full, you cannot easily resize them
(even though this is possible).

When done, add them to your /etc/fstab. You can use the
labels for that instead of the device names.



 I want to use GRUB from my Linux installs, this is the Linux menu.lst:
 
 timeout   8
 default   0
 color light-blue/black light-cyan/blue
 
 title FreeBSD 9.0
 root   (hd0,a)
 kernel /boot/loader

My Linux multiboot experience is limited, but this looks okay.
You will delegate boot control to the loader, hd0a = sda1 = adap1,
the partition of freebsd-boot type.



-- 
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: Manually partitioning using gpart

2012-11-25 Thread Lucas B. Cohen
On 2012.11.25 12:26, Ralf Mardorf wrote:
 Here I already don't understand how large the swap should be. Really 2 *
 size of the RAM?
It depends on use patterns and the amount of RAM in your computer. 1.5*
to 2* installed memory is a traditional works for most value, but I
feel it's outdated for 64-bit machines with 8 GB or more.

 I also don't know if 256k is a sane alignment value, I just copied this
 from a howto.
If you're using a single, not too recent-and-huge hard drive, 512 bits
(that is, no alignment) is fine.
If you have an Advanced Format Drive or you don't know if you do, use 4k.
If you have an underlying RAID array, 256k is a better choice.
If it's an SSD, go with 4 MB to avoid taking any chances with
performance over time.


 How to continue after this is done?
Once you're satisfied with your partition organization, the easiest is
to restart bsdinstall, dd your new partition table somewhere safe (flash
drive, or network drive), use the (n?)curses UI to designate the target
partitions to install to, and go on with the installation to install the
sets.

___
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: [Bulk] Re: Manually partitioning using gpart

2012-11-25 Thread Ralf Mardorf
On Sun, 2012-11-25 at 13:29 +0100, Polytropon wrote:
 On Sun, 25 Nov 2012 12:26:14 +0100, Ralf Mardorf wrote:
  This is what I've got:
  
  # gpart show ada0
  =  63   625142385 ada0 MBR (298G)
  63   121274683 - free - (57G)
  [snip]
  
  IIUC I now have to do:
  
  # gpart add -s 64k -t freebsd-boot -l boot0 ada0
  # gpart add -s 8G -t freebsd-swap -l swap0  ada0
  # gpart add -t freebsd-ufs -a 256k -l root0 ada0
  
  Here I already don't understand how large the swap should be. Really 2 *
  size of the RAM?
 
 Won't be wrong; my understanding of the rule was 2 * size of
 _possible_ RAM in the machine. But disk space is cheap, so
 8 G should be fine. But again, the requirement for the swap
 partition depends on what you're doing with the machine and
 what you're expecting (e. g. will you want to save kernel dumps
 to the swap partition?).
 
 You can find an example here:
 
 http://www.wonkity.com/~wblock/docs/html/disksetup.html
 
 Also see man newfs for options.

I'll read this. I want to test what's possible and/or impossible
regarding to MIDI and audio productions using FreeBSD.

  I also don't know if 256k is a sane alignment value, I just copied this
  from a howto.
 
 Modern disks work faster when everything is aligned to 4k.
 But they _work_ with any other alignment.

I'll use 4k.

  How to continue after this is done?
 
 You will have new partitions /dev/ada0pN. You need to format
 them with newfs. If I see this correctly, you have created
 one big / partition (for everything); this is _valid_ and
 possible, but may be less optimum for a couple of reasons.

Until now I haven't done anything. It's still free.

 Doing functional partitioning requires at least an idea
 of how much disk space will be needed per functional part,
 and this can differ from use as server or desktop, or what
 kind of software you run.

On Linux I only use /. So I don't have to think about how much space
what directory might need and I never run into issues, when the file
system hierarchy does change. Off cause I've got special partitions for
audio productions mounted with noatime and a own partition for emails,
but anything else, including /home is inside /.


  The advantage is that you can
 backup data partition-wise (using dump + restore) and have
 a functional base system on / in case there's a severe
 disk corruption. The disadvantage is that if finally one
 partition is too full, you cannot easily resize them
 (even though this is possible).

On Linux I can backup partition-wise too, but it's also possible to
backup directory-wise ;).

Btw. I never sync backups, I always keep several backups of the system,
since setting up a hard real-time jitter free DAW is a special task for
modern computers. In the 80s hard real-time really was hard real-time
(C64, Atari ST), nowadays it is hard work to get something similar.

 When done, add them to your /etc/fstab. You can use the
 labels for that instead of the device names.

  I want to use GRUB from my Linux installs, this is the Linux menu.lst:
  
  timeout   8
  default   0
  color light-blue/black light-cyan/blue
  
  title FreeBSD 9.0
  root   (hd0,a)
  kernel /boot/loader
 
 My Linux multiboot experience is limited, but this looks okay.
 You will delegate boot control to the loader, hd0a = sda1 = adap1,
 the partition of freebsd-boot type.

Thank you.

Regards,
Ralf


___
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: Manually partitioning using gpart

2012-11-25 Thread Ralf Mardorf
I'm reading http://www.wonkity.com/~wblock/docs/html/disksetup.html at
the moment.

Seemingly there are many outdated howtos first hits for searching with
Google. I frst read 64k for boot and now 512k.

IIUC Install the GPT bootcode into the boot partition has to be done
and is independent of the GRUB in the MBR.

On Sun, 2012-11-25 at 13:32 +0100, Lucas B. Cohen wrote:
 On 2012.11.25 12:26, Ralf Mardorf wrote:
  Here I already don't understand how large the swap should be. Really 2 *
  size of the RAM?
 It depends on use patterns and the amount of RAM in your computer. 1.5*
 to 2* installed memory is a traditional works for most value, but I
 feel it's outdated for 64-bit machines with 8 GB or more.

It's a 64-bit machine with 4GB RAM.


  I also don't know if 256k is a sane alignment value, I just copied this
  from a howto.
 If you're using a single, not too recent-and-huge hard drive, 512 bits
 (that is, no alignment) is fine.
 If you have an Advanced Format Drive or you don't know if you do, use 4k.
 If you have an underlying RAID array, 256k is a better choice.
 If it's an SSD, go with 4 MB to avoid taking any chances with
 performance over time.

No RAID, a modern SATA drives, so 4k seems to be the way to go.

Thank you.

Regards,
Ralf

___
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: Manually partitioning using gpart

2012-11-25 Thread Lucas B. Cohen
On 2012.11.25 13:57, Ralf Mardorf wrote:
 IIUC Install the GPT bootcode into the boot partition has to be done
 and is independent of the GRUB in the MBR.
Not in your case. You won't need bootcode other than GRUB's (in the MBR,
and the Linux partition where the bulk of it is installed).
___
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: Manually partitioning using gpart

2012-11-25 Thread Ralf Mardorf
At the moment I still have:
This is what I've got:
# gpart show ada0
=  63   625142385 ada0 MBR (298G)
63   121274683 - free - (57G)
[snip]

Regarding to http://www.wonkity.com/~wblock/docs/html/disksetup.html
for my set up it should be ok to run:

# gpart add -t freebsd-boot -l boot -b 40 -s 512K ada0

# gpart add -t freebsd-swap -l swap -s 8G ada0

# gpart add -t freebsd-ufs -l root -b 1M ada0
Should use all the free space, so no option -s?!

# newfs -U /dev/gpt/root

# gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 ada0
Will install the FreeBSD bootloader independent of the GRUB in the MBR?

My GRUB menu.lst still is:

timeout   8
default   0
color light-blue/black light-cyan/blue

title FreeBSD 9.0
root   (hd0,a)
kernel /boot/loader

[snip]

So kernel /boot/loader has to be replaced by /boot/foo?

/etc/fstab:

# DeviceMountpoint  FS  Options DumpPass# -- 
is this # needed at the end?
Or is it ok like this:
# DeviceMountpoint  FS  Options DumpPass

And this are the entries I need:

/dev/gpt/swap   noneswapsw  0   0
/dev/gpt/root   /   ufs rw  1   1

*???*
Ralf










___
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: Manually partitioning using gpart

2012-11-25 Thread Ralf Mardorf
On Sun, 2012-11-25 at 14:13 +0100, Lucas B. Cohen wrote:
 On 2012.11.25 13:57, Ralf Mardorf wrote:
  IIUC Install the GPT bootcode into the boot partition has to be done
  and is independent of the GRUB in the MBR.
 Not in your case. You won't need bootcode other than GRUB's (in the MBR,
 and the Linux partition where the bulk of it is installed).

Thank you.

I don't need it, but I could add it for what ever worst case emergency
scenario and GRUB in the MBR anyway will work?

___
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: [Bulk] Re: Manually partitioning using gpart

2012-11-25 Thread Polytropon
On Sun, 25 Nov 2012 13:43:46 +0100, Ralf Mardorf wrote:
 On Sun, 2012-11-25 at 13:29 +0100, Polytropon wrote:
 I'll read this. I want to test what's possible and/or impossible
 regarding to MIDI and audio productions using FreeBSD.

Will be interesting. I know there is some good support for this
case in specialized Linux distributions.



  Doing functional partitioning requires at least an idea
  of how much disk space will be needed per functional part,
  and this can differ from use as server or desktop, or what
  kind of software you run.
 
 On Linux I only use /.

Yes, this is common, even though Linux can support functional
partitioning as well, still ext2/3/4/... partitions != UFS partitions.
And with GPT partitioning, it's even easier to separate parts
of the system across partitions and devices (which _can_ provide
you performance boosts).



 So I don't have to think about how much space
 what directory might need and I never run into issues, when the file
 system hierarchy does change. Off cause I've got special partitions for
 audio productions mounted with noatime and a own partition for emails,
 but anything else, including /home is inside /.

This _could_ develop into disadvantages, like some half-dead
process filling the whole partition until problems arise. But
for common desktop use, it should not be problematic.



   The advantage is that you can
  backup data partition-wise (using dump + restore) and have
  a functional base system on / in case there's a severe
  disk corruption. The disadvantage is that if finally one
  partition is too full, you cannot easily resize them
  (even though this is possible).
 
 On Linux I can backup partition-wise too, but it's also possible to
 backup directory-wise ;).

Tools like rsync or cpdup make selective backing up and restoring
easy, that's true. :-)

The idea is that if there is some damage, all you need to boot
your machine in a minimum and _defined_ state is on /. No need
for /usr or /var at this point, so you could - if required - do
analytics and recovery from this point on. As all 3rd party software
is in /usr/local, there won't be a problem as nothing of that
stuff is needed to perform the boot into this early stage (the
single user mode). If you don't have to experience such a situation,
the better.



 Btw. I never sync backups, I always keep several backups of the system,
 since setting up a hard real-time jitter free DAW is a special task for
 modern computers. In the 80s hard real-time really was hard real-time
 (C64, Atari ST), nowadays it is hard work to get something similar.

There are specialized operating systems emphasizing real-time use.
Still those more simple computers required a close to the hardware
programming that modern OSes will hardly allow, so if you don't have
this kind of access from the OS level, how would you get it from the
application level, with tons of dependencies unter your hands? :-)

BTW, I still have some Atari ST hardware here. Impressive what has
been possible with this (quite limited) machines, but with _efficient_
programs...





-- 
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: Manually partitioning using gpart

2012-11-25 Thread Polytropon
On Sun, 25 Nov 2012 14:30:17 +0100, Ralf Mardorf wrote:
 At the moment I still have:
 This is what I've got:
 # gpart show ada0
 =  63   625142385 ada0 MBR (298G)
 63   121274683 - free - (57G)
 [snip]
 
 Regarding to http://www.wonkity.com/~wblock/docs/html/disksetup.html
 for my set up it should be ok to run:
 
 # gpart add -t freebsd-boot -l boot -b 40 -s 512K ada0
 
 # gpart add -t freebsd-swap -l swap -s 8G ada0
 
 # gpart add -t freebsd-ufs -l root -b 1M ada0
 Should use all the free space, so no option -s?!

See man gpart for details (yes, there are _excellent_ man pages
installed locally, or accessible via web):

If -s option is omitted then new size is automatically
calculated to maximum available from given geom geom.

Here:

http://www.freebsd.org/cgi/man.cgi?query=gpartapropos=0sektion=0manpath=FreeBSD+9.0-RELEASEarch=defaultformat=html



 # newfs -U /dev/gpt/root

Maybe you would also consider using -J (journaling). Still the
traditional approach when using functional partitioning is to
format the / partition without soft updates (-U), but in your
case, using them on a everything in one / partition is okay.



 # gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 ada0
 Will install the FreeBSD bootloader independent of the GRUB in the MBR?

Hmmm... I'd assume that ada0 (the beginning of the disk) contains
GRUB already (or a redirect to where it's actually located), so
I think ada0p1 would be the location to write to... still I'm not
sure if you need to have any boot code at all because GRUB will
perform the redirection to the FreeBSD loader which will then
load the FreeBSD kernel.

See man 8 boot for details.

I'm not a multi-booter so I can't be more specific, sorry.



 My GRUB menu.lst still is:
 
 timeout   8
 default   0
 color light-blue/black light-cyan/blue
 
 title FreeBSD 9.0
 root   (hd0,a)
 kernel /boot/loader
 
 [snip]
 
 So kernel /boot/loader has to be replaced by /boot/foo?

No, I think /boot/loader is correct here; it's a program that
sets up the kernel environment, loads it, maybe loads modules,
and passes control to the kernel. It's located on the ada0p1
partition.



 /etc/fstab:
 
 # DeviceMountpoint  FS  Options DumpPass# -- 
 is this # needed at the end?
 Or is it ok like this:
 # DeviceMountpoint  FS  Options DumpPass

No, it means pass number; according to man 5 fstab:

The sixth field, (fs_passno), is used by the fsck(8) and
quotacheck(8) programs to determine the order in which
file system and quota checks are done at reboot time.
The fs_passno field can be any value between 0 and `INT_MAX-1'.

But it's a comment line anyway. :-)



 And this are the entries I need:
 
 /dev/gpt/swap   noneswapsw  0   0
 /dev/gpt/root   /   ufs rw  1   1

Looks correct. (You can later on add lines to access data partitions
or even your Linux partitions if you want, optical drives or NFS
shares if you need.)




-- 
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


Wheres the FreeBSD PBR ? (was Re: Manually partitioning using gpart / wh)

2012-11-25 Thread Lucas B. Cohen
On 2012.11.25 14:35, Ralf Mardorf wrote:
 I don't need it, but I could add it for what ever worst case emergency
 scenario and GRUB in the MBR anyway will work?
I don't see how it could ever come in handy, and I'm not sure it
wouldn't do any hamr either. The /boot/gptboot code to be written weighs
15kB, that could be big enough to mess up the filesystem on the
partition. That /boot/gptboot code is designed to work on a
special-purpose small GPT partition that doesn't hold a filesystem. So I
would refrain from doing it.

It would be useful for emergency purposes to write MBR-partition
scheme-compatible bootcode to that partition instead, but I've yet to
find out how to do it. gpart(8) seems to have the ability to do it, but
it's manual page doesn't mention what file to pass to its -p option to
do that. Maybe it's one of those /boot/boot1 or /boot/boot2 files I'm
seeing on my system. Maybe someone can enlighten me on that.
___
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: Manually partitioning using gpart

2012-11-25 Thread Bruce Cran

On 25/11/2012 12:29, Polytropon wrote:

Won't be wrong; my understanding of the rule was 2 * size of
_possible_ RAM in the machine. But disk space is cheap, so
8 G should be fine. But again, the requirement for the swap
partition depends on what you're doing with the machine and
what you're expecting (e. g. will you want to save kernel dumps
to the swap partition?).


You probably want to stop following that rule some time before you get 
to 8 TB RAM 
(http://semiaccurate.com/2010/09/29/inphi-imbs-can-stuff-8tb-ram-system/) :)


--
Bruce Cran
___
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: Wheres the FreeBSD PBR ? (was Re: Manually partitioning using gpart / wh)

2012-11-25 Thread Ralf Mardorf
On Sun, 2012-11-25 at 15:10 +0100, Lucas B. Cohen wrote:
 On 2012.11.25 14:35, Ralf Mardorf wrote:
  I don't need it, but I could add it for what ever worst case emergency
  scenario and GRUB in the MBR anyway will work?
 I don't see how it could ever come in handy, and I'm not sure it
 wouldn't do any hamr either. The /boot/gptboot code to be written weighs
 15kB, that could be big enough to mess up the filesystem on the
 partition. That /boot/gptboot code is designed to work on a
 special-purpose small GPT partition that doesn't hold a filesystem. So I
 would refrain from doing it.
 
 It would be useful for emergency purposes to write MBR-partition
 scheme-compatible bootcode to that partition instead, but I've yet to
 find out how to do it. gpart(8) seems to have the ability to do it, but
 it's manual page doesn't mention what file to pass to its -p option to
 do that. Maybe it's one of those /boot/boot1 or /boot/boot2 files I'm
 seeing on my system. Maybe someone can enlighten me on that.

Ok. I don't install it.

Regards,
Ralf

-- 
At the moment I'm watching The Hitchhiker's Guide to the Galaxy, so
I'll continue the install later today.

___
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


OT: Manually partitioning using gpart

2012-11-25 Thread Ralf Mardorf
On Sun, 2012-11-25 at 14:37 +0100, Polytropon wrote:
 BTW, I still have some Atari ST hardware here. Impressive what has
 been possible with this (quite limited) machines, but with _efficient_
 programs...

I still have the C64 in some cartons and the Atari ST is still beside my
PC, but I don't remember when I turned it on the last time. Btw. no QL
emulator here, but a 80286 emulator and to my Atari 520 ST there are old
PC RAM soldered, so it has got the full 4096KB. An issue is to replace
the old monitor, since it's hard to get a monitor that can go low enough
with the frequencies.


___
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: Manually partitioning using gpart

2012-11-25 Thread Ralf Mardorf
Polytropon, I'll use journaling.

I've to apologize for my broken English.
Regarding to the comment line my question is, if it's enough to us a #
at the beginning, or if it's needed to begin and to end with a #. I
suspect just a # at the beginning is needed.

___
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: Manually partitioning using gpart

2012-11-25 Thread Polytropon
On Sun, 25 Nov 2012 15:42:38 +0100, Ralf Mardorf wrote:
 Polytropon, I'll use journaling.

That should give you additional security in integrity,
especially on a everything in one / partition.



 I've to apologize for my broken English.

No understanding problem here.



 Regarding to the comment line my question is, if it's enough to us a #
 at the beginning, or if it's needed to begin and to end with a #. I
 suspect just a # at the beginning is needed.

Yes, every line starting with a # is considered a comment (like
in shell scripts). In case of the default comment line, the
second # is just pass number written as Pass#. Comment line
and empty lines can appear in /etc/fstab as desired. You can use
them to structure your fstab file as soon as it gets too
many entries (which may be possible when you're utilizing NFS
a lot).



-- 
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: Manually partitioning using gpart

2012-11-25 Thread Warren Block

On Sun, 25 Nov 2012, Ralf Mardorf wrote:


This is what I've got:

# gpart show ada0
=  63   625142385 ada0 MBR (298G)
   63   121274683 - free - (57G)
[snip]

IIUC I now have to do:

# gpart add -s 64k -t freebsd-boot -l boot0 ada0
# gpart add -s 8G -t freebsd-swap -l swap0  ada0
# gpart add -t freebsd-ufs -a 256k -l root0 ada0


No.  MBR does not need or use a freebsd-boot partition.  Also, GPT 
labels don't work for MBR because, well, it's not GPT.



Here I already don't understand how large the swap should be. Really 2 *
size of the RAM?


No, that's less true than it used to be.  Depends on how much RAM you 
have, but the more RAM, the less you really need swap.  If disk space is 
not at a premium, I usually use 4G.



I also don't know if 256k is a sane alignment value, I just copied this
from a howto.


For a hard drive, 4K alignment and starting the main partition at 1M is 
good.



How to continue after this is done?


Realize this multi-boot stuff is painful and inconvenient and install 
everything in a VM?

___
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: Manually partitioning using gpart

2012-11-25 Thread Ralf Mardorf
On Sun, 2012-11-25 at 13:49 -0700, Warren Block wrote:
 Realize this multi-boot stuff is painful and inconvenient and install 
 everything in a VM?

Unfortunately this is impossible.

I'll install FreeBSD, because there's a driver for my sound card, a RME
HDSPe AIO, that perhaps enables to use all ADAT IOs. On Linux I only can
use 2 ADAT IOs.

Another step could be to replace Linux by FreeBSD on my machine, but I
suspect FreeBSD isn't ready for audio production yet. Assumed it should
be ready, a virtual machine can't be used. Any layer does cause issues
for audio production machines.

I was thinking of doing a test install in VBox, but I guess it's a minor
risk that I'll lose everything by making an mistake.

Regards,
Ralf

___
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: Manually partitioning using gpart

2012-11-25 Thread Lucas B. Cohen
Hi Warren,

On 2012.11.25 21:49, Warren Block wrote:
 For a hard drive, 4K alignment and starting the main partition at 1M is
 good.
Why would one leave 1024 full kbits before the first partition on a HDD ?
___
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: Manually partitioning using gpart

2012-11-25 Thread Ralf Mardorf
On Mon, 2012-11-26 at 02:22 +0100, Lucas B. Cohen wrote:
 Hi Warren,
 
 On 2012.11.25 21:49, Warren Block wrote:
  For a hard drive, 4K alignment and starting the main partition at 1M is
  good.
 Why would one leave 1024 full kbits before the first partition on a HDD ?

Create a partition for /. It should start at the 1M boundary for proper
sector alignment on 4K sector drives or SSDs. This is compatible with
GPT drive layout for many other systems. Give it a GPT label of
gprootfs. - http://www.wonkity.com/~wblock/docs/html/disksetup.html

It doesn't explain it for me, but at least it might be an explanation
for somebody with more knowledge?

___
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: Manually partitioning using gpart

2012-11-25 Thread Warren Block

On Mon, 26 Nov 2012, Lucas B. Cohen wrote:


On 2012.11.25 21:49, Warren Block wrote:

For a hard drive, 4K alignment and starting the main partition at 1M is
good.

Why would one leave 1024 full kbits before the first partition on a HDD ?


The second only is only relevant to GPT.

We went over this last week, but briefly there are two reasons: 
compatibility with what few GPT standards are out there (Windows and 
others), and proper alignment on hard drives and SSDs.


It's not the first partition, but the first filesystem partition.  The 
boot partition can go in the space before it.

___
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


help with gpart

2012-10-31 Thread doug
I am trying to put FreeBSD on an HP laptop. The use up all the partitions to I 
deleted the least useful one, shrunk the windows partition and tried to add 
freeBSD.


gpart show:

=   63  625142385  ada0  MBR  (298G)
 63   1985- free -  (992k)
   2048 407552 1  ntfs  [active]  (199M)
 409600  311951360 2  ntfs  (148G)
  312360960 33- free -  (16k)
  312360993  283115448 4  freebsd  (135G)
  595476441 577575- free -  (282M)
  596054016   28880896 3  ntfs  (13G)
  624934912 207536- free -  (101M)

I do not have any flexibility as to where #4 is. I would like to use the 
9.0 installer from this point but it wants to add BSD partitions to the 282M 
space.


I am not sure after much man-ing and google-ing what gpart commands are 
required. I guess I could use sysinstall at this point but learning gpart seems 
like a good thing. I assume I need to do something like:


   gpart add set -a active -i 4 ada04  (not sure geom is correct)
   gpart bootcode -b /boot/boot0 ada04

and then add the mounts. I would like

   /
   swap
   /var 10g
   /usr 20g
   /home (the rest)

but am somewhat lost about the syntax and geom values. thanks for any help

_
Douglas Denault
http://www.safeport.com
d...@safeport.com
Voice: 301-217-9220
  Fax: 301-217-9277
___
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: help with gpart

2012-10-31 Thread Warren Block

On Wed, 31 Oct 2012, d...@safeport.com wrote:

I am trying to put FreeBSD on an HP laptop. The use up all the partitions to 
I deleted the least useful one, shrunk the windows partition and tried to add 
freeBSD.


gpart show:

=   63  625142385  ada0  MBR  (298G)
63   1985- free -  (992k)
  2048 407552 1  ntfs  [active]  (199M)
409600  311951360 2  ntfs  (148G)
 312360960 33- free -  (16k)
 312360993  283115448 4  freebsd  (135G)
 595476441 577575- free -  (282M)
 596054016   28880896 3  ntfs  (13G)
 624934912 207536- free -  (101M)

I do not have any flexibility as to where #4 is. I would like to use the 9.0 
installer from this point but it wants to add BSD partitions to the 282M 
space.


I am not sure after much man-ing and google-ing what gpart commands are 
required. I guess I could use sysinstall at this point but learning gpart 
seems like a good thing. I assume I need to do something like:


  gpart add set -a active -i 4 ada04  (not sure geom is correct)


No, for slice 4, it would be ada0s4.  For the MBR setup, bootcode must 
be added to both the MBR (ada0) and the slice.



  gpart bootcode -b /boot/boot0 ada04

and then add the mounts. I would like

  /
  swap
  /var 10g
  /usr 20g
  /home (the rest)

but am somewhat lost about the syntax and geom values. thanks for any help


bsdlabel partitions are created inside a slice.  No idea whether the 
partition numbers being out of order will be a problem...


gpart create -s bsd ada0s4
gpart bootcode -b /boot/boot ada0s4

Then add partitions inside that:

gpart add -t freebsd-ufs -s 2g ada0s4
gpart add -t freebsd-swap -s 4g ada0s4
gpart add -t freebsd-ufs -2 10g ada0s4
...

I strongly suggest taking advantage of labels with the -l option.
___
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


gpart and mbr give no operating system message at boot.

2012-09-07 Thread markham breitbach
I am trying to partition a disk to be used as the primary boot disk for a 
FreeBSD 8.3
installation using gpart to install an MBR partition.

The system is an existing FreeBSD 5.2.1 system at a remote location (ie 
impossible to boot
from CD/netboot/etc), but has no data of value.  To do this I am copying /boot 
and
mfsroot.gz from an mfsbsd iso image to boot to an MFS live system so I can wipe 
the drive
and do a clean install of 8.3.  After booting to the MFS I do this:

dd if=/dev/zero of=/dev/ad2 bs=1m count=1
gpart create -s mbr ad2
gpart add -b63 -t freebsd ad2
gpart create -s bsd ad2s1
gpart add -i1 -s 1g -t freebsd-ufs ad2s1
gpart add -i2 -s 1g -t freebsd-swap ad2s1
gpart add -i4 -s 2g -t freebsd-ufs ad2s1
gpart add -i5 -s 1g -t freebsd-ufs ad2s1
gpart add -i6 -t freebsd-ufs ad2s1
gpart set -a active -i 1 ad2
gpart bootcode -b /boot/mbr ad2
newfs /dev/ad2s1a
newfs -U /dev/ad2s1d
newfs -U /dev/ad2s1e
newfs -U /dev/ad2s1f

followed by a sysinstall and some configuration.  When I reboot I get a message 
that says
Operating system not found and the system hangs.

If I follow the same procedure but create a gpt partition it works swimmingly.  
I am OK
with using a gpt partition if needed, but for the sake of curiosity I would 
like to know
why I can't make the MBR partition partition work.  Am I missing something?


___
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: gpart and mbr give no operating system message at boot.

2012-09-07 Thread Warren Block

On Fri, 7 Sep 2012, markham breitbach wrote:


I am trying to partition a disk to be used as the primary boot disk for a 
FreeBSD 8.3
installation using gpart to install an MBR partition.

The system is an existing FreeBSD 5.2.1 system at a remote location (ie 
impossible to boot
from CD/netboot/etc), but has no data of value.  To do this I am copying /boot 
and
mfsroot.gz from an mfsbsd iso image to boot to an MFS live system so I can wipe 
the drive
and do a clean install of 8.3.  After booting to the MFS I do this:

dd if=/dev/zero of=/dev/ad2 bs=1m count=1
gpart create -s mbr ad2
gpart add -b63 -t freebsd ad2
gpart create -s bsd ad2s1
gpart add -i1 -s 1g -t freebsd-ufs ad2s1
gpart add -i2 -s 1g -t freebsd-swap ad2s1
gpart add -i4 -s 2g -t freebsd-ufs ad2s1
gpart add -i5 -s 1g -t freebsd-ufs ad2s1
gpart add -i6 -t freebsd-ufs ad2s1
gpart set -a active -i 1 ad2
gpart bootcode -b /boot/mbr ad2
newfs /dev/ad2s1a
newfs -U /dev/ad2s1d
newfs -U /dev/ad2s1e
newfs -U /dev/ad2s1f

followed by a sysinstall and some configuration.  When I reboot I get a message 
that says
Operating system not found and the system hangs.

If I follow the same procedure but create a gpt partition it works swimmingly.  
I am OK
with using a gpt partition if needed, but for the sake of curiosity I would 
like to know
why I can't make the MBR partition partition work.  Am I missing something?


Need to install bootcode to the slice also:

# gpart bootcode -b /boot/boot ad2s1

Why are you skipping partition 3?  For that matter, don't give partition 
numbers when adding, and gpart will just use the next available.


If GPT works, there is little reason to use MBR.
___
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: gpart and mbr give no operating system message at boot.

2012-09-07 Thread markham breitbach
Thanks Warren!

I was always under the impression that partition 3 was not to be touched as the 
raw
partition, so figured it was best left alone.
I was mostly concerned with installing MBR so it would still be compatible with
sysinstall, although I can't really think of a terribly good reason not to go 
GPT.
Installing the bootcode gets me a step closer, but is now puking at the loader. 
I'm not
sure if this is because the bootcode is coming from and 8.1 install, but at 
this point I'm
pretty much out of time and out of patience for this, since it is something of 
a bandaid
situation anyway.


On 12-09-07 2:48 PM, Warren Block wrote:
 On Fri, 7 Sep 2012, markham breitbach wrote:

 I am trying to partition a disk to be used as the primary boot disk for a 
 FreeBSD 8.3
 installation using gpart to install an MBR partition.

 The system is an existing FreeBSD 5.2.1 system at a remote location (ie 
 impossible to boot
 from CD/netboot/etc), but has no data of value. To do this I am copying 
 /boot and
 mfsroot.gz from an mfsbsd iso image to boot to an MFS live system so I can 
 wipe the drive
 and do a clean install of 8.3. After booting to the MFS I do this:

 dd if=/dev/zero of=/dev/ad2 bs=1m count=1
 gpart create -s mbr ad2
 gpart add -b63 -t freebsd ad2
 gpart create -s bsd ad2s1
 gpart add -i1 -s 1g -t freebsd-ufs ad2s1
 gpart add -i2 -s 1g -t freebsd-swap ad2s1
 gpart add -i4 -s 2g -t freebsd-ufs ad2s1
 gpart add -i5 -s 1g -t freebsd-ufs ad2s1
 gpart add -i6 -t freebsd-ufs ad2s1
 gpart set -a active -i 1 ad2
 gpart bootcode -b /boot/mbr ad2
 newfs /dev/ad2s1a
 newfs -U /dev/ad2s1d
 newfs -U /dev/ad2s1e
 newfs -U /dev/ad2s1f

 followed by a sysinstall and some configuration. When I reboot I get a 
 message that says
 Operating system not found and the system hangs.

 If I follow the same procedure but create a gpt partition it works 
 swimmingly. I am OK
 with using a gpt partition if needed, but for the sake of curiosity I would 
 like to know
 why I can't make the MBR partition partition work. Am I missing something?

 Need to install bootcode to the slice also:

 # gpart bootcode -b /boot/boot ad2s1

 Why are you skipping partition 3? For that matter, don't give partition 
 numbers when
 adding, and gpart will just use the next available.

 If GPT works, there is little reason to use MBR.
 ___
 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

___
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: gpart and mbr give no operating system message at boot.

2012-09-07 Thread Polytropon
On Fri, 07 Sep 2012 17:00:24 -0600, markham breitbach wrote:
 I was always under the impression that partition 3 was not to be touched as 
 the raw
 partition, so figured it was best left alone.

No, that is regarding traditional partitioning. But it's
not the 3rd partition, it's the 'c' partition, which means
nothing more or less than the whole device or the whole
slice. In today's FreeBSD /dev representation, the 'c' is
left out, e. g. /dev/ad0c = /dev/ad0, and /dev/da3s2c = /dev/da3s2.
For GPT partitions, that doesn't matter. It's only relevant
for the kind of partitions disklabel (bsdlabel) creates
inside a slice or directly on the device.

Reserved names (or those with special purpose) are 'a'
for a bootable partition, 'b' for a swap partition and
'c' for the whole slice or disk. I think even 'd' has
had a special meaning, but I didn't encounter it yet,
even though I'm using FreeBSD since 4.0. :-)

Partitions created with the gpart / gpt tools usually use
e. g. /dev/ad0p1 and so on for partitioning, if I remember
correctly. Additionally, I typically point to

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

to encourage the use of labels, because that lets you leave
devices names alone.

More information can be found here:

http://www.daemonforums.org/showthread.php?t=2666

http://www.freebsdonline.com/content/view/731/506/

http://www.freebsd.org/doc/en_US.ISO8859-1/books/faq/disks.html

And also

http://www.freebsd.org/doc/handbook/geom-glabel.html

regarding labels (GEOM labels, UFS labels, UFSIDs).



 I was mostly concerned with installing MBR so it would still be compatible 
 with
 sysinstall, although I can't really think of a terribly good reason not to go 
 GPT.

Maybe that is significant only on older hardware where you
intendedly want to preserve the traditional approach of
MBR partitioning, maybe to keep compatibility with other
systems that have trouble with GPT layouts.



 Installing the bootcode gets me a step closer, but is now puking at the 
 loader. I'm not
 sure if this is because the bootcode is coming from and 8.1 install, but at 
 this point I'm
 pretty much out of time and out of patience for this, since it is something 
 of a bandaid
 situation anyway.

The version number should not be the problem. It's only important
that the boot elements installed refer to the layout that is
present on disk correctly.




-- 
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

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


Partitioning with gpart

2012-08-28 Thread Lynn Steven Killingsworth

Dear FreeBSD -

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?

--
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: Format a USB flash drive using gpart

2012-07-09 Thread Bruce Cran

On 08/07/2012 13:10, Warren Block wrote:
bsdinstall(8) has a curses partition editor.  There is probably a 
trick needed to use that outside of an install context.


Just run bsdinstall partedit.

--
Bruce Cran
___
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: Format a USB flash drive using gpart

2012-07-09 Thread Polytropon
On Sun, 08 Jul 2012 23:27:23 -0400, Thomas Mueller wrote:
 You mean the non-subdivided 1.44 MB or other capacity of a floppy
 is called a partition?

Let's try to use the correct terminology.

If you're talking about an MS-DOS disk, then yes, it contains
a DOS partition which is formatted. In FreeBSD, we would call
it a slice (slice == DOS primary partition). In this case,
there is no (sub)partitioning, the _slice_ carries the MS-DOS
file system here. You know that MS-DOS does not have support
for partitioning.



 Same question for CDs?

Not sure. A CD contains an ISO-9660 file system without an
enclosing partition per se.

If we look back into OS history, we find the magical 'c' partition.
Historically, partition letters have been reserved for specific
purposes: the 'a' partition means a bootable partition, 'b' is
a swap partition, and 'c' is the whole disk, refering either
to the disk device (da0c == da0) or the whole slice (da0s1c == da0s1).

You _can_ put a UFS file system, even many of them, on a CD, that
is possible, but don't expect any Windows to be able to deal
with it. :-)



 Also, a file system can be contained in an image file.  Or is this
 a virtual partition?

As devices and real files are quite the same, you can mount
a file system that is contained in a file. You typically do this
when doing data recovery and forensic analysis, where your starting
point is an image file of a disk, a slice or a partition. You
then connect it to a virtual node (vnconfig - e. g. md0) and
then you mount it as if it was a device file.



 Might 
  # tar xf /dev/da0
 work in other BSDs or even other (quasi-)Unixes including Linux,
 using the appropriate device name where applicable in place of da0?

That's quite possible. I've been speaking about tar as the most
universal file system which isn't one -- I've been using it on
floppies many many years ago, to transfer data among Sun Sparcstations,
Linux workstations and a BSD server. It's important not to use
any fancy tar features, and of course you need to know the
device names corresponding to the floppy drive which differ
across the systems, but it is possible to first use fdformat,
then tar cf, then tar xf. This of course happened before the
dawn of networking. :-)



 While that particular construst could probably not be booted,
 it is possible to boot from a floppy or image file that does
 not contain a file system.

For bare booting, a file system isn't that essential. You just
have to make sure the boot chain is properly resolved, such
as for example the FreeBSD boot mechanism works. You can read
more about it in man 8 boot.



 Some of the disk images on the System Rescue CD (sysresccd.org)
 are not viewable/mountable as file systems.

I haven't looked into this particular one, but that is very well
possible. A CD doesn't _need_ to be in a ISO-9660 format (even
though it's the default data format). The _implementation_ of
the boot mechanism matters: it could even select from several
different boot images stored in some arbitrary (but addressable)
manner on the CD.




-- 
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: Format a USB flash drive using gpart

2012-07-09 Thread Wojciech Puchar

If you're talking about an MS-DOS disk, then yes, it contains
a DOS partition which is formatted. In FreeBSD, we would call
it a slice (slice == DOS primary partition). In this case,
there is no (sub)partitioning, the _slice_ carries the MS-DOS


unless you need windows 98 support partitionless USB drives works 
absolutely fine


clear it out

dd if=/dev/zero of=/dev/da0 bs=64k count=1


format

newfs_msdos /dev/da0


Same question for CDs?


Not sure. A CD contains an ISO-9660 file system without an
enclosing partition per se.

In FreeBSD (as well as NetBSD, OpenBSD, maybe linux) CD is just block 
device. You may make disklabel on it, and whatever you like.



In excuse of OS (windows) CD/DVD MUST BE CD9660 or UDF formatted without 
partitions.


You may record NTFS formatted DVD, perfectly readable on FReeBSD, 
unreadable under windows in spite it is windows native filesystem.


--
You may actually make hybrid DVD that will show whatever you want under 
windoze, and have real data in tar format.


below the recipe:

1) prepare windows-vizible layout, all needed viruses and autorun.inf in 
some directory and do


mkisofs -J -q .|dd of=/path/to/tempfile bs=512 skip=1

2)

tar cf - /path/to/tempfile ...list of what you want to be tarred...|growisofs 
-dvd-compat -Z /dev/cd0=-


now use tar to read files from that DVD, while in windows it will run 
viruses properly.




a virtual partition?


As devices and real files are quite the same, you can mount
a file system that is contained in a file. You typically do this
when doing data recovery and forensic analysis, where your starting
point is an image file of a disk, a slice or a partition. You
then connect it to a virtual node (vnconfig - e. g. md0) and


vnconfig is quite in old FreeBSD
today it is mdconfig

___
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: Format a USB flash drive using gpart

2012-07-09 Thread Bruce Cran

On 09/07/2012 11:16, Polytropon wrote:

If you're talking about an MS-DOS disk, then yes, it contains
a DOS partition which is formatted. In FreeBSD, we would call
it a slice (slice == DOS primary partition). In this case,
there is no (sub)partitioning, the _slice_ carries the MS-DOS
file system here. You know that MS-DOS does not have support
for partitioning.


Floppy disks aren't partitioned/sliced - they use 'dangerously 
dedicated' mode, containing nothing except the filesystem. The way you'd 
mount it would be:


mount /dev/fd0 /mnt/point

You can do the same with a normal USB or other disk using:

newfs /dev/da0
mount /dev/da0 /mnt/point

The reason it's called 'dangerously dedicated' I think is that other 
systems - or even the same system months/years later if you forget and 
run the wrong tools - won't know there's a filesystem there and it's 
easy to think the disk's empty.  If you're on an old system and run 
'gpart show da0' and don't see a partition table it's quite easy to 
forget to check if da0 itself contains a filesystem.


When using GPT what were called slices are now partitions, and instead 
of 'ada0s1a' (disk 0, slice 1, partition a) you just have 'ada0p1'. A 
partition table supports up to 4096 entries (gpart creates one 
supporting 128 by default) so there's no need for the freebsd container 
any more - you just create freebsd-boot, freebsd-ufs, freebsd-zfs, 
freebsd-swap entries e.g. 'gpart add -t freebsd-ufs -s 64g da0'.


--
Bruce Cran
___
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: Format a USB flash drive using gpart

2012-07-09 Thread Wojciech Puchar

Floppy disks aren't partitioned/sliced - they use 'dangerously dedicated'


they use dangerously obsolete mode. nobody use them at all.

disk's empty.  If you're on an old system and run 'gpart show da0' and don't 
see a partition table it's quite easy to forget to check if da0 itself 
contains a filesystem.


unless it is a normal way of using it.
___
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: Format a USB flash drive using gpart

2012-07-09 Thread Bruce Cran

On 09/07/2012 13:17, Wojciech Puchar wrote:

they use dangerously obsolete mode. nobody use them at all.



A company I worked with were still distributing files on floppy disks as 
recently as 2009. They _are_ obsolete, but I suspect plenty of people 
still use them.



unless it is a normal way of using it.


That's right - I was thinking of my system where I destroyed all the 
data on a HDD because it didn't have a partition table. When I ran the 
FreeBSD installer and saw the disk was 'empty' I forgot it had a 
filesystem and reformatted it. Obviously people using floppy or USB 
disks would be more ready for there to be data on the disk without a 
partition table.


--
Bruce Cran

___
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: Format a USB flash drive using gpart

2012-07-09 Thread Wojciech Puchar
A company I worked with were still distributing files on floppy disks as 
recently as 2009.

quite funny :)

They _are_ obsolete, but I suspect plenty of people still 
use them.



unless it is a normal way of using it.


That's right - I was thinking of my system where I destroyed all the data on 
a HDD because it didn't have a partition table. When I ran the FreeBSD 
only your fault, not FreeBSD. Why you connected your data disk at first 
place.

___
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: Format a USB flash drive using gpart

2012-07-09 Thread Bruce Cran

On 09/07/2012 13:29, Wojciech Puchar wrote:
only your fault, not FreeBSD. Why you connected your data disk at 
first place.


I didn't say it was FreeBSD's fault. If I thought it was, I would have 
fixed it!


--
Bruce Cran
___
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: Format a USB flash drive using gpart

2012-07-09 Thread Ian Smith
On Sun, 8 Jul 2012 21:00:40 +0100, Bruce Cran wrote:
  On 08/07/2012 16:06, Ian Smith wrote:
   In general they're not distinct in usage from any other type of disk.
  
  The more expensive disks of course support TRIM so you'd want to pass -t to
  newfs to enable it.

Thanks.  Next time I blow around AU$455 on a 120GB flashdrive, I'll be 
glad to be better informed about getting the most out of it :)

At least with sysinstall|sade you can set extra newfs options such as 
-t, and as importantly for me, you can toggle whether or not to newfs 
particular partition/s, such as leaving say /home alone on an existing 
partitioning, which didn't seem straightforward with bsdinstall last I 
tried (admittedly at 9.0-BETA1) but I've not followed later updates.

I might take Matthew's suggestion and try the PCBSD 9 installer; I did 
boot a PCBSD 8 memstick at one stage, and was surprisingly impressed -
or I could use freebsd-update instead of sources to go from 7.4 to 9.1

It's the options that drive ya crazy -- Silly Symphony C.'83

cheers, Ian
___
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: Format a USB flash drive using gpart

2012-07-09 Thread Warren Block

On Mon, 9 Jul 2012, Bruce Cran wrote:


On 09/07/2012 11:16, Polytropon wrote:

If you're talking about an MS-DOS disk, then yes, it contains
a DOS partition which is formatted. In FreeBSD, we would call
it a slice (slice == DOS primary partition). In this case,
there is no (sub)partitioning, the _slice_ carries the MS-DOS
file system here. You know that MS-DOS does not have support
for partitioning.


Floppy disks aren't partitioned/sliced - they use 'dangerously dedicated' 
mode, containing nothing except the filesystem.


Dangerously dedicated refers to a disk with a bsdlabel partition table 
and boot block.  Floppies don't have even that, it's just a raw 
filesystem.

___
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: Format a USB flash drive using gpart

2012-07-09 Thread Jerry McAllister
On Mon, Jul 09, 2012 at 07:44:28AM +0200, Wojciech Puchar wrote:

 You don't.  You wipe the FAT32 with fdisk and make a FreeBSD slice on it.
 Then you can bsdlabel it with one partition and newfs it.  Or you can
 
 repeat 100 times more that you have to make fdisk and bsdlabel. you 
 don't, and it doesn't make sense

You can do many things as indicated in several posts and most of them 
will work if you want it that way.   But, they do not answer the
question as posted.

Turning the USB stick into a FreeBSD type or mounting it as MSDOSFS
does answer that question.   

I am not sure why the rabid promotion of non-slicing, but it not
worth all the extra bandwidth applied to it.

jerry



 ___
 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
___
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: Format a USB flash drive using gpart

2012-07-08 Thread Wojciech Puchar

Magdeburg, Germany


I have used gpart to partition a USB flash drive into FreeBSD boot partition, 
root partition and swap partition.


making swap partition on USB pendrive is at least stupid. if you won't 
swap at all - wasted space.
If you will it would be so slow and wear USB pendrive so quickly that you 
certainly don't want this.



bsdlabel -w device

bsdabel -e  device and make a partition start from 0 to end, 4.2BSD

newfs it

bsdlabel -B

and put everything in one partition.

make heavy use of tmpfs, make sure noatime is put in fstab to limit writes 
to pendrive.

___
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: Format a USB flash drive using gpart

2012-07-08 Thread Polytropon
On Sat, 07 Jul 2012 17:45:17 -0400, Thomas Mueller wrote:
 Does a USB flash drive also work as a giant floppy, no partitions? 
 Can you make a flash drive bootable when nonpartitioned and
 formatted that way?

Yes, that's exactly what my advice was aiming to, but let's
try to keep the terminology clean: You cannot do without
partitions. A partition carries a file system.

You _can_ do without slices. A slice holds one or more partitions.
A slice is a DOS primary partition. Omitting it is called
dedicated mode. There may be some circumstances where a
dedicated disk doesn't boot. Personally I haven't met one,
but it's still possible due to BIOSes expecting MS-DOS-alike
structures.

For the file system side, it's just a matter of having
created one partition covering the whole disk, newfs and
tunefs it, and install the boot code. Wojciech Puchar did
already explain how this works and which tools are involved.

However, there _is_ a way to make a giant floppy without a
file system (as you said without partitions, and I'll take
that literally): You can use tar, the universal file system
that isn't a file system to write data to the USB stick.

Writing stuff:

# tar cf /dev/da0 /my/files

Reading stuff:

# tar xf /dev/da0

This works, but it may appear that no other system can read it.
If you consider using it for FreeBSD only, no problem. The big
advantage: You don't need to mount and umount the stick.

I'm assume _that_ construct cannot be booted.


-- 
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: Format a USB flash drive using gpart

2012-07-08 Thread Polytropon
On Sun, 8 Jul 2012 09:49:30 +0200 (CEST), Wojciech Puchar wrote:
  Magdeburg, Germany
 
  I have used gpart to partition a USB flash drive into FreeBSD boot 
  partition, root partition and swap partition.
 
 making swap partition on USB pendrive is at least stupid. if you won't 
 swap at all - wasted space.
 If you will it would be so slow and wear USB pendrive so quickly that you 
 certainly don't want this.
 
 
 bsdlabel -w device
 
 bsdabel -e  device and make a partition start from 0 to end, 4.2BSD
 
 newfs it
 
 bsdlabel -B
 
 and put everything in one partition.
 
 make heavy use of tmpfs, make sure noatime is put in fstab to limit writes 
 to pendrive.

An addition: You can label the a partition (e. g. /dev/da0a)
or use its UFSID in /etc/fstab, so you don't depend on the
exact device name, which in turn depends on the detection
order of mass storage which is hard to predict.

I'd like to recommend reading for details:
http://www.wonkity.com/~wblock/docs/html/disksetup.html
and
http://www.freebsd.org/doc/handbook/geom-glabel.html



-- 
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: Format a USB flash drive using gpart

2012-07-08 Thread Carmel
On Sat, 7 Jul 2012 20:36:36 -0600 (MDT)
Warren Block articulated:

 On Sat, 7 Jul 2012, Carmel wrote:
 
  This is probably a dumb question, but does gpart even work on a USB
  flash drive? I have not been able to figure out how to do it. I
  want to erase the entire drive and format it for a FreeBSD UFS2
  file system.
 
 Yes, gpart will work with pretty much any storage device.
 
 If you want the drive to be bootable, it needs boot blocks.  This is 
 easier with GPT than MBR.  For an 8G drive:
 
 # gpart create -s gpt da0
 # gpart add -t freebsd-boot -s 512k da0
 # gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 da0
 # gpart add -t freebsd-ufs -b 1M -s 7G da0
 # gpart add -t freebsd-swap da0
 # newfs -U /dev/da0p2

Thanks Warren, you win the prize for the most detailed answer.
Polytropon gave me the easiest answer if I just want to use the drive
as a simple storage device; however, if at some point I actually want
to go beyond that your answer is what I would require.

Interestingly enough, I searched through the man pages and FreeBSD help
but never came across anything that specifically addressed flash drive.
Perhaps I was just not looking hard enough.

Perhaps, and I know that this will offend some purists, but a nice GUI
that would do what your instructions detail above would be helpful.
There is no way that I am going to remember all of those instructions in
six months time. Just my 2¢.

-- 
Carmel ✌
carmel...@hotmail.com

___
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: Format a USB flash drive using gpart

2012-07-08 Thread Polytropon
On Sun, 8 Jul 2012 07:41:59 -0400, Carmel wrote:
 Perhaps, and I know that this will offend some purists, but a nice GUI
 that would do what your instructions detail above would be helpful.
 There is no way that I am going to remember all of those instructions in
 six months time. Just my 2¢.

Why not put the commands into a text file locally?
Try _that_ with a GUI. :-)

I'm almost sure KDE or Gnome offer means to initialize mass
storage, but because those seem to be quite Linux-centric,
it's possible FreeBSD's system tools won't be utilized. So
with using the commands provided by Warren, you will be fine
every time. If you practice them regularly, you will remember
them, and if you do so, you'll surely write a script that
allows you to automate the task so you can forget the commands
again. :-)


-- 
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: Format a USB flash drive using gpart

2012-07-08 Thread Warren Block

On Sun, 8 Jul 2012, Carmel wrote:


Yes, gpart will work with pretty much any storage device.

If you want the drive to be bootable, it needs boot blocks.  This is
easier with GPT than MBR.  For an 8G drive:

# gpart create -s gpt da0
# gpart add -t freebsd-boot -s 512k da0
# gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 da0
# gpart add -t freebsd-ufs -b 1M -s 7G da0
# gpart add -t freebsd-swap da0
# newfs -U /dev/da0p2


Thanks Warren, you win the prize for the most detailed answer.
Polytropon gave me the easiest answer if I just want to use the drive
as a simple storage device; however, if at some point I actually want
to go beyond that your answer is what I would require.

Interestingly enough, I searched through the man pages and FreeBSD help
but never came across anything that specifically addressed flash drive.
Perhaps I was just not looking hard enough.


FreeBSD sees no significant difference between a flash drive and a disk 
drive.  They are treated the same.



Perhaps, and I know that this will offend some purists, but a nice GUI
that would do what your instructions detail above would be helpful.
There is no way that I am going to remember all of those instructions in
six months time. Just my 2¢.


bsdinstall(8) has a curses partition editor.  There is probably a trick 
needed to use that outside of an install context.  I find gpart easier.___
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: Format a USB flash drive using gpart

2012-07-08 Thread Wojciech Puchar


Interestingly enough, I searched through the man pages and FreeBSD help
but never came across anything that specifically addressed flash drive.


because there is no need to. For freebsd it is just a storage device.

for FreeBSD only i recommend using bsdlabel, not gpart, for multiOS using 
fdisk.


it is simpler and boot0cfg allows you to add boot selector, so you can 
make multisystem pendrive, just as my triple-boot 16GB pendrive holding 
FreeBSD/i386, FreeBSD/amd64, lots of packages, DOS with lots of tools and 
windoze installers.



Perhaps, and I know that this will offend some purists, but a nice GUI


not about purism but (lack of) usability.

GUI interfaces never helps, only hides real things and prevent 
understanding anything. You maybe understand it, maybe not. Most people 
will not.


GUI interfaces are actual a PROBLEM with today software.
___
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: Format a USB flash drive using gpart

2012-07-08 Thread Wojciech Puchar

with using the commands provided by Warren, you will be fine
every time. If you practice them regularly, you will remember
them, and if you do so, you'll surely write a script that


after doing

man gpart

he will understand it, so remembering is easy.
___
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: Format a USB flash drive using gpart

2012-07-08 Thread Polytropon
On Sun, 8 Jul 2012 14:16:31 +0200 (CEST), Wojciech Puchar wrote:
  Perhaps, and I know that this will offend some purists, but a nice GUI
 
 not about purism but (lack of) usability.
 
 GUI interfaces never helps, only hides real things and prevent 
 understanding anything. You maybe understand it, maybe not. Most people 
 will not.
 
 GUI interfaces are actual a PROBLEM with today software.

The main problem here is that you have no efficient way of
documentation. What do you want to do? Describe pictures?
And as soon as the GUI changes (e. g. different toolkit
version), things may change, not look the same anymore.

Also GUIs seem to be limited, especially if you want to
apply options that make better use of characteristics of
a flash drive (compared to a regular hard disk). A GUI
disk initializer would have to take _every_ possibility
into mind, everything that might be specific to the OS
it runs on (as for example Linux differs from FreeBSD
filesystem-wise), making things much more complicated
than they need to.

With few routine, tasks are performed more natural using
the desired CLI tools. You don't go Now I have to remember
which command to format the disk, you just format the disk,
which means spaking to newfs. The more often you do it,
the more obvious the tools are, and they won't change in
look and feel (or options). That makes them superior.

I admit that they might be confusing for people who do not
want to read, learn and practice. That's okay. Those should
use GUI tools and live with the (limited) set of selections
they are presented. As there is no real distinction between
user and administrator anymore, this is something we need
to live with.

That being said, CLI tools offer the easier interface to
the more advanced functionality and better flexibility, which
is especially useful in the discussed case: initializing a
USB flash drive that might need different options than what
you could default to for a regular disk drive.



-- 
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: Format a USB flash drive using gpart

2012-07-08 Thread Bruce Cran

On 08/07/2012 13:30, Polytropon wrote:

With few routine, tasks are performed more natural using
the desired CLI tools. You don't go Now I have to remember
which command to format the disk, you just format the disk,
which means spaking to newfs. The more often you do it,
the more obvious the tools are, and they won't change in
look and feel (or options). That makes them superior.


How do you format a FAT32 partition? newfs won't work. Is it newfs_vfat, 
newfs_fat32, newfs_msdos etc.? And how do you specify you want FAT32 
instead of FAT12 or FAT16? With a good GUI tool like diskmgmt.msc in 
Windows 2008 you simply right-click the partition and click New Volume 
to create a new partition, or Format to format it - and then follow 
the prompts.  Of course using diskpart is faster if you know the 
commands and parameters, but for an ordinary user adding a new disk 
maybe once a year it's most likely more efficient to just use the GUI.


--
Bruce Cran
___
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: Format a USB flash drive using gpart

2012-07-08 Thread Polytropon
On Sun, 08 Jul 2012 14:27:05 +0100, Bruce Cran wrote:
 On 08/07/2012 13:30, Polytropon wrote:
  With few routine, tasks are performed more natural using
  the desired CLI tools. You don't go Now I have to remember
  which command to format the disk, you just format the disk,
  which means spaking to newfs. The more often you do it,
  the more obvious the tools are, and they won't change in
  look and feel (or options). That makes them superior.
 
 How do you format a FAT32 partition? newfs won't work. Is it newfs_vfat, 
 newfs_fat32, newfs_msdos etc.? And how do you specify you want FAT32 
 instead of FAT12 or FAT16?

In such cases, you use the _proper_ CLI tools for that job.
As I said, those are typically specific to the file system
one wants to use, and depending on the file system design,
there may be options that are individual to those tools.
For every fs-related task, there is a system-level tool
that does the job.



 With a good GUI tool like diskmgmt.msc in 
 Windows 2008 you simply right-click the partition and click New Volume 
 to create a new partition, or Format to format it - and then follow 
 the prompts. 

And of course you cannot create UFS partitions that way. :-)

I still remember the initalize disk function from the original
Amiga or Atari ST graphical interfaces. They were bound to those
systems and their supported file systems. Intending to have
something similar (a GUI) for UNIX and Linux would be possible,
but very complicated under the hood, and it would be even more
complicated to make all that power utilizable to a novice user.
In that specific case, reasonable defaults would have to be
provided, which typically fail in edge cases. This is where you
use the power of CLI.

Another advantage: It's less interactive, giving you potential
for automating tasks. Follow the prompts might even be too
complicated for some kinds of users. :-)



 Of course using diskpart is faster if you know the 
 commands and parameters, but for an ordinary user adding a new disk 
 maybe once a year it's most likely more efficient to just use the GUI.

If the GUI takes the considerations about file system and media
type (and their implications) into mind -- no problem. Sadly, I
don't know of a tool yet that exactly works that way.

Especially in trial  error scenarios the CLI is simpler in
use. For example, you compose a newfs command. Then you apply
it. Not happy with the result? Recall the command from the
command line history, change the parameters you want, and then
try again. It's surely harder to do that within a GUI. :-)

On the other hand, a proper tool would efficiently visualize
the content of a disk, showing how slices and partitions are
laid out and what options they have. This is a real benefit
in testing scenarios where you need a quick overview of the
status quo.



-- 
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: Format a USB flash drive using gpart

2012-07-08 Thread Ian Smith
In freebsd-questions Digest, Vol 422, Issue 10, Message: 29
On Sun, 8 Jul 2012 07:41:59 -0400 Carmel carmel...@hotmail.com wrote:
  On Sat, 7 Jul 2012 20:36:36 -0600 (MDT)
  Warren Block articulated:
  
   On Sat, 7 Jul 2012, Carmel wrote:
   
This is probably a dumb question, but does gpart even work on a USB
flash drive? I have not been able to figure out how to do it. I
want to erase the entire drive and format it for a FreeBSD UFS2
file system.
   
   Yes, gpart will work with pretty much any storage device.
   
   If you want the drive to be bootable, it needs boot blocks.  This is 
   easier with GPT than MBR.  For an 8G drive:
   
   # gpart create -s gpt da0
   # gpart add -t freebsd-boot -s 512k da0
   # gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 da0
   # gpart add -t freebsd-ufs -b 1M -s 7G da0
   # gpart add -t freebsd-swap da0
   # newfs -U /dev/da0p2
  
  Thanks Warren, you win the prize for the most detailed answer.
  Polytropon gave me the easiest answer if I just want to use the drive
  as a simple storage device; however, if at some point I actually want
  to go beyond that your answer is what I would require.
  
  Interestingly enough, I searched through the man pages and FreeBSD help
  but never came across anything that specifically addressed flash drive.
  Perhaps I was just not looking hard enough.

In general they're not distinct in usage from any other type of disk.

  Perhaps, and I know that this will offend some purists, but a nice GUI
  that would do what your instructions detail above would be helpful.
  There is no way that I am going to remember all of those instructions in
  six months time. Just my 2¢.

Well one of the reasons I'm replying to this is to keep a copy of 
Warren's recipe handy :)  Another is to point out that rumours of the 
death of MBR partitioning, especially on small disks, are premature.

I know your question specified gpart, but the easiest way I know of to 
put UFS filesystems on flash drives is to use sade(8), incorporating the 
fdisk  bsdlabel  newfs functions from sysinstall .. it still works as 
well as ever, however old-fashioned or deprecated some may call it.

sade's GUI at the curses level :) and does all the heavy maths for you, 
both for slicing the disk and partitioning the slice(s).  As mentioned 
in boot0cfg(8), you have to set  # sysctl kern.geom.debugflags=16
before sade (or anything) can write to any GEOM disk's boot sectors.  
Remember to reset it to 0 later.

You might even like to put a small msdosfs slice first, so you can use 
some of that stick to transfer files between UFS and DOS systems.  And 
yes you can multiboot from a memstick if you (or sade) put boot0 on it, 
assuming your computer supports booting from USB drives.

I don't know what the gpart equivalent of boot0 is, if there is one yet? 
Last I heard, seemed you had to use Linux tools to multiboot GPT disks.

There was some muttering about updating sade to handle GPT too .. that 
would be very welcome, maybe restoring some of the lost functionality 
from sysinstall/sade back into bsdinstall, both for GPT and MBR systems.

cheers, Ian___
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: Format a USB flash drive using gpart

2012-07-08 Thread Wojciech Puchar

I know your question specified gpart, but the easiest way I know of to
put UFS filesystems on flash drives is to use sade(8), incorporating the
the easiest way to put UFS filesystem on flash drives is to ... put 
UFS filesystem using newfs command.


You DO NOT NEED any partitioning.
___
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: Format a USB flash drive using gpart

2012-07-08 Thread Bruce Cran

On 08/07/2012 16:06, Ian Smith wrote:

In general they're not distinct in usage from any other type of disk.


The more expensive disks of course support TRIM so you'd want to pass -t 
to newfs to enable it.


--
Bruce Cran
___
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: Format a USB flash drive using gpart

2012-07-08 Thread Wojciech Puchar

In general they're not distinct in usage from any other type of disk.


The more expensive disks of course support TRIM so you'd want to pass -t to 
newfs to enable it.

can you give me an example of pendrive that supports TRIM?
___
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: Format a USB flash drive using gpart

2012-07-08 Thread Bruce Cran

On 08/07/2012 21:51, Wojciech Puchar wrote:

can you give me an example of pendrive that supports TRIM?


LaCie FastKey 
(http://www.tomshardware.co.uk/usb-3.0-thumb-drive-flash-drive,review-32174-5.html).


--
Bruce Cran
___
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: Format a USB flash drive using gpart

2012-07-08 Thread Wojciech Puchar

seems like SSD style controller+USB 3.0 bridge. sizes suggest this.

thanks.

On Sun, 8 Jul 2012, Bruce Cran wrote:


On 08/07/2012 21:51, Wojciech Puchar wrote:

can you give me an example of pendrive that supports TRIM?


LaCie FastKey 
(http://www.tomshardware.co.uk/usb-3.0-thumb-drive-flash-drive,review-32174-5.html).


--
Bruce Cran


___
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: Format a USB flash drive using gpart

2012-07-08 Thread Thomas Mueller
On Sat, 07 Jul 2012 17:45:17 -0400, Thomas Mueller wrote:
 Does a USB flash drive also work as a giant floppy, no partitions?
 Can you make a flash drive bootable when nonpartitioned and
 formatted that way?

Polytropon responded:

 Yes, that's exactly what my advice was aiming to, but let's
 try to keep the terminology clean: You cannot do without
 partitions. A partition carries a file system.

 You _can_ do without slices. A slice holds one or more partitions.
 A slice is a DOS primary partition. Omitting it is called
 dedicated mode. There may be some circumstances where a
 dedicated disk doesn't boot. Personally I haven't met one,
 but it's still possible due to BIOSes expecting MS-DOS-alike
 structures.

 For the file system side, it's just a matter of having
 created one partition covering the whole disk, newfs and
 tunefs it, and install the boot code. Wojciech Puchar did
 already explain how this works and which tools are involved.

 However, there _is_ a way to make a giant floppy without a
 file system (as you said without partitions, and I'll take
 that literally): You can use tar, the universal file system
 that isn't a file system to write data to the USB stick.

 Writing stuff:

 # tar cf /dev/da0 /my/files

 Reading stuff:

 # tar xf /dev/da0

 This works, but it may appear that no other system can read it.
 If you consider using it for FreeBSD only, no problem. The big
 advantage: You don't need to mount and umount the stick.

 I'm assume _that_ construct cannot be booted.

You mean the non-subdivided 1.44 MB or other capacity of a floppy is called a 
partition?

Same question for CDs?

One does not usually think of something that can't be created by subdividing as 
a partition.

Also, a file system can be contained in an image file.  Or is this a virtual 
partition?

Might 
 # tar xf /dev/da0
work in other BSDs or even other (quasi-)Unixes including Linux, using the 
appropriate device name where applicable in place of da0?

While that particular construst could probably not be booted, it is possible to 
boot from a floppy or image file that does not contain a file system.

Some of the disk images on the System Rescue CD (sysresccd.org) are not 
viewable/mountable as file systems.

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: Format a USB flash drive using gpart

2012-07-08 Thread Jerry McAllister
On Sun, Jul 08, 2012 at 02:27:05PM +0100, Bruce Cran wrote:

 On 08/07/2012 13:30, Polytropon wrote:
 With few routine, tasks are performed more natural using
 the desired CLI tools. You don't go Now I have to remember
 which command to format the disk, you just format the disk,
 which means spaking to newfs. The more often you do it,
 the more obvious the tools are, and they won't change in
 look and feel (or options). That makes them superior.
 
 How do you format a FAT32 partition? 

You don't.  You wipe the FAT32 with fdisk and make a FreeBSD slice on it.
Then you can bsdlabel it with one partition and newfs it.  Or you can 
use the gpart tools with I am not yet familiar.   But, in any case,
the FAT32 is irrelevant.  You just overwrite that with the FreeBSD stuff.

If you have a FAT32 on it and if you want to use it as a FAT32, then you 
leave the FAT32 alone and just mount the thing as type msdosfs.

Make a mount point for it.  I commonly use /stick
Add something like the following in your /etc/fstab

  /dev/da2s1  /stick  msdosfs rw,noauto   0   0

and then do 
  #mount /stick  
on the command line.

You will have to figure out the correct /dev/...  address for it.
Generally you dan find the info in dmesg.

jerry  

newfs won't work. Is it newfs_vfat, 
 newfs_fat32, newfs_msdos etc.? And how do you specify you want FAT32 
 instead of FAT12 or FAT16? With a good GUI tool like diskmgmt.msc in 
 Windows 2008 you simply right-click the partition and click New Volume 
 to create a new partition, or Format to format it - and then follow 
 the prompts.  Of course using diskpart is faster if you know the 
 commands and parameters, but for an ordinary user adding a new disk 
 maybe once a year it's most likely more efficient to just use the GUI.
 
 -- 
 Bruce Cran
 ___
 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
___
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: Format a USB flash drive using gpart

2012-07-08 Thread Wojciech Puchar

You don't.  You wipe the FAT32 with fdisk and make a FreeBSD slice on it.
Then you can bsdlabel it with one partition and newfs it.  Or you can


repeat 100 times more that you have to make fdisk and bsdlabel. you 
don't, and it doesn't make sense

___
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: Format a USB flash drive using gpart

2012-07-08 Thread Wojciech Puchar

file system (as you said without partitions, and I'll take
that literally): You can use tar, the universal file system
that isn't a file system to write data to the USB stick.




which is best in USB pendrive wear and speed point of view.

pendrive's flash translation layers are just awful, only linear writes 
works well.



Writing stuff:



# tar cf /dev/da0 /my/files


i would recomment

tar -b 128 -cf /dev/da0 /my/files


Might
# tar xf /dev/da0
work in other BSDs or even other (quasi-)Unixes including Linux, using the 
appropriate device name where applicable in place of da0?


yes it will run fine under linux, openbsd, netbsd, slowlaris etc.



While that particular construst could probably not be booted, it is possible to 
boot from a floppy or image file that does not contain a file system.


If you need bootable pendrive then you have to use disklabel and make 
filesystem.


___
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


GUI for gpart

2012-07-07 Thread Carmel
I have heard, although I never personally saw it, a GUI for gpart I
heard that there exists one for Linux. Is there any comparable one for
FreeBSD and comparable with KDE?

-- 
Carmel ✌
carmel...@hotmail.com
___
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: GUI for gpart

2012-07-07 Thread Polytropon
On Sat, 7 Jul 2012 08:58:06 -0400, Carmel wrote:
 I have heard, although I never personally saw it, a GUI for gpart I
 heard that there exists one for Linux. Is there any comparable one for
 FreeBSD and comparable with KDE?

I'd suggest to look into the PC-BSD installer and the
utilities that come with that system.


-- 
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: GUI for gpart

2012-07-07 Thread Wojciech Puchar

I have heard, although I never personally saw it, a GUI for gpart I
heard that there exists one for Linux. Is there any comparable one for
FreeBSD and comparable with KDE?
no idea. If you want it with already installed system, try to compile 
linux software.


Anyway i see no reason for such a software, click-click solutions are 
always inefficient relative to normal text based ones, and partitioning is 
not a job that end user (who want click-click interfaces at all cost) is 
supposed to do

___
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


  1   2   3   >