Re: FreeBSD slices and the Boot Manager

2013-07-29 Thread Ian Smith
On Mon, 29 Jul 2013 01:04:04 +0200 (CEST), Conny Andersson wrote:
  Hi Devin,
  
  Apropos sade (sysadmins disk editor). I have it at /usr/sbin/sade and I am
  running a FreeBSD 8.3. I also mounted FreeBSD 8.1 and FreeBSD 8.2 and found
  sade at /usr/sbin/ even in these older FreeBSDs.

I can't recall if sade was in 6.x but it certainly is in 7.x.  I think 
Devin meant to say 'in 9 and earlier'.  Yes it's taken from the fdisk 
and bsdlabel sections of sysinstall, but existed long before there was 
talk of deprecating sysinstall, apart from Jordan's self-deprecatory 
comments some 18 years ago suggesting it should be updated/replaced, as 
found under BUGS in sysinstall(8) up to at least 8.2, but not in 9.x:

 This utility is a prototype which lasted several years past its expira-
 tion date and is greatly in need of death.

  Regards,
  
  Conny
  
   On Sun, 28 Jul 2013, Teske, Devin wrote:
   
   In this case, sade is (or was) a direct by-product of the death of
   sysinstall(8). It only exists in 9 or higher.
   
   In-fact... sade was (up until recently in HEAD) actual code removed from
   sysinstall(8).
   
   NOTE: In HEAD, sade(8) is now a direct path to bsdinstall partedit

Well that will be alright if 'bsdinstall partedit' now does the hitherto 
missing sade functions, particulary Disklabel Editor functions such as 
allowing one to toggle newfs on particular (BSD) partitions, toggle 
softupdates, use custom newfs options, and delete-and-merge partitions?

   I don't know what the long-term goals are for sade, but it's a nice
   4-letter acronym that's a nice keystroke saver (at the very least).

As I said, unless you're into the arcane maths needed to run fdisk and 
bsdlabel manually, sade (or its functions in sysinstall) is the only 
safe and sane way to manage MBR disks.  I'd love to be proven wrong ..

And credit to you, Devin, for developing bsdconfig to replace most of 
sysinstall's other post-installation functions.  I'll have a play with 
that when I upgrade my 9.1 to 9.2 fairly soon.

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: FreeBSD slices and the Boot Manager

2013-07-29 Thread Polytropon
On Mon, 29 Jul 2013 13:34:10 +0930, Shane Ambler wrote:
 On 29/07/2013 08:23, Polytropon wrote:
  On Sun, 28 Jul 2013 22:23:38 +, Teske, Devin wrote:
  In this case, sade is (or was) a direct by-product of the death
  of sysinstall(8). It only exists in 9 or higher.
 
  % which sade
  /usr/sbin/sade
 
  System is FreeBSD 8.2-STABLE of August 2011. I think sade has
  been introduced in a v8 version of FreeBSD.
 
 
 Or earlier. On 9.1 man sade says --
 
 HISTORY
   This version of sade first  appeared in FreeBSD 6.3.  The code is
   extracted from the  sysinstall(8) utility.


Really _that_ old? I have to admit that I never really _knew_
about sade, and that is has been mentioned to me when I was
already using FreeBSD 8.x, so my memory can be distorted in
this regards. Out of lazyness, I've been using the corresponding
functionality of sysinstall - formerly also known as
/stand/sysinstall :-) - to access what sade can also do.




-- 
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: FreeBSD slices and the Boot Manager

2013-07-28 Thread Peter Andreev
Why wouldn't you simply update your 8.1 to 8.4?


2013/7/27 Conny Andersson atar...@telia.com

 Hi,

 I have a workstation with two factory installed hard disks. The first
 disk, ada0, is occupied by a Windows 7 Pro OS (mainly kept for the three
 year warranty of the workstation as Dell techs mostly speak the Microsoft
 language).

 Instead I have configured the BIOS to boot from the MBR on the second disk
 as I most of the time (99%) use FreeBSD. The MBR on ada1 was installed with
 sysinstall's option Install the FreeBSD Boot Manager, when I installed
 the FreeBSD 8.3-RELEASE.

 (The latest BIOS version 2.4.0 for Dell T1500 does not support
 UEFI/GPT/GUID.)

 The second disk ada1, now has three FreeBSD slices:

 1) ada1s1 with FreeBSD 8.1-RELEASE

 2) ada1s2 with FreeBSD 8.2-RELEASE

 3) ada1s3 with FreeBSD 8.3-RELEASE

 I want to install the new FreeBSD 8.4-RELEASE on ada1s1 by overwriting the
 now existing two first slices. This means that ada1s3, must become ada1s2
 instead. Is this possible to do?

 A very important question is if sysinstall's option Install the FreeBSD
 Boot Manager detects that I have a FreeBSD 8.3 and detect it as slice 2 on
 disk 1? So it becomes a boot option when I am rebooting? (Maybe the slice
 may come up as ad6s2, because AHCI in FreeBSD 8.4 isn't enabled at the time
 of the install.)

 If the answer to these questions is yes, then the next two questions arise.

 Can I mount ada1s2a (FreeBSD 8.3) from the newly installed FreeBSD 8.4 and
 edit my FreeBSD's 8.3-R /etc/fstab according to the new disk layout, and
 occasionally run FreeBSD 8.3 without problems? Or do I have to do more to
 get it to work?

 The idea behind this kind of 'reverse' disk layout of mine is to have
 FreeBSD 8.4 as my new default OS. And have FreeBSD 8.3 untouched for
 configuring FreeBSD 8.4 and booting into it when ever needed. If I can do
 this as described above, I will have plenty of space on the disk for the
 future and a new FreeBSD release.


 Thanks for your interest in my questions,

 Conny Andersson

 =-=-=-=-=-=-=-=-=-=
   Conny Andersson
 atar...@telia.com
 =-=-=-=-=-=-=-=-=-=
 __**_
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/**mailman/listinfo/freebsd-**questionshttp://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to freebsd-questions-**
 unsubscr...@freebsd.org freebsd-questions-unsubscr...@freebsd.org




-- 
Is there any problem Exterminatus cannot solve? I have not found one yet.
___
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: FreeBSD slices and the Boot Manager

2013-07-28 Thread Polytropon
On Sat, 27 Jul 2013 19:39:30 +0200 (CEST), Conny Andersson wrote:
 Hi,
 
 I have a workstation with two factory installed hard disks. The first disk, 
 ada0, is occupied by a Windows 7 Pro OS (mainly kept for the three year 
 warranty of the workstation as Dell techs mostly speak the Microsoft 
 language).

It's just a series of pictures, not a language. ;-)



 Instead I have configured the BIOS to boot from the MBR on the second disk 
 as I most of the time (99%) use FreeBSD. The MBR on ada1 was installed with 
 sysinstall's option Install the FreeBSD Boot Manager, when I installed 
 the FreeBSD 8.3-RELEASE.
 
 (The latest BIOS version 2.4.0 for Dell T1500 does not support 
 UEFI/GPT/GUID.)
 
 The second disk ada1, now has three FreeBSD slices:
 
 1) ada1s1 with FreeBSD 8.1-RELEASE
 
 2) ada1s2 with FreeBSD 8.2-RELEASE
 
 3) ada1s3 with FreeBSD 8.3-RELEASE
 
 I want to install the new FreeBSD 8.4-RELEASE on ada1s1 by overwriting the 
 now existing two first slices. This means that ada1s3, must become ada1s2 
 instead. Is this possible to do?

Why do you want to do this? If you keep the s1 slice, you can
easily install FreeBSD 8.4 into that slice, leading to this
result:

1) ada1s1 with FreeBSD 8.4-RELEASE
2) ada1s2 with FreeBSD 8.2-RELEASE
3) ada1s3 with FreeBSD 8.3-RELEASE

Or is the numbering order important to you?

You could even keep the partitioning inside s1, but there is
no problem re-partitioning inside s1.



 A very important question is if sysinstall's option Install the FreeBSD 
 Boot Manager detects that I have a FreeBSD 8.3 and detect it as slice 2 on 
 disk 1?

I'm not sure I'm following you correctly. The sysinstall program
is considered obsolete, the new system installer is bsdinstall.



 So it becomes a boot option when I am rebooting? (Maybe the slice 
 may come up as ad6s2, because AHCI in FreeBSD 8.4 isn't enabled at the time 
 of the install.)

That is a _good_ consideration! To make sure things work independently
from boot-time recognition, use labels for the file system and then
mount them by using the labels. Encode the OS version number in the
labels, so it's even easier to deal with them. Use newfs -L on
un-mounted partitions (you can do that from the install media).

From the install media, you can easily go to the CLI and use the
bsdlabel program to re-write the boot blocks and boot manager if
needed.



 Can I mount ada1s2a (FreeBSD 8.3) from the newly installed FreeBSD 8.4 and 
 edit my FreeBSD's 8.3-R /etc/fstab according to the new disk layout, and 
 occasionally run FreeBSD 8.3 without problems? Or do I have to do more to 
 get it to work?

Yes, that should be possible. I don't see any problem because this
is a UFS partition. As I mentioned earlier, if you apply labels to
the partitions on the slices, it's even easier to determine _which_
'a' partition (root partition) you are currently dealing with. And
if you continue your installation scheme in further versions, you
will be freed from remembering what OS version resides on what slice.
You then simply do mount /dev/ufs/root83 /mnt; vi /mnt/etc/fstab
and you _immediately_ know which installation you're currently
dealing with.





-- 
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: FreeBSD slices and the Boot Manager

2013-07-28 Thread Warren Block

On Sun, 28 Jul 2013, Polytropon wrote:

On Sat, 27 Jul 2013 19:39:30 +0200 (CEST), Conny Andersson wrote:



A very important question is if sysinstall's option Install the FreeBSD
Boot Manager detects that I have a FreeBSD 8.3 and detect it as slice 2 on
disk 1?


I'm not sure I'm following you correctly. The sysinstall program
is considered obsolete, the new system installer is bsdinstall.


AFAIK, sysinstall is still used in FreeBSD 8.X, and bsdinstall does not 
have a boot manager option anyway.



So it becomes a boot option when I am rebooting? (Maybe the slice
may come up as ad6s2, because AHCI in FreeBSD 8.4 isn't enabled at the time
of the install.)


Sorry, I don't understand this at all.  AHCI should not be involved with 
identifying slices.



That is a _good_ consideration! To make sure things work independently
from boot-time recognition, use labels for the file system and then
mount them by using the labels. Encode the OS version number in the
labels, so it's even easier to deal with them. Use newfs -L on
un-mounted partitions (you can do that from the install media).


For existing filesystems, that would be tunefs -L.  And agreed, 
filesystem labels make relocation much 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: FreeBSD slices and the Boot Manager

2013-07-28 Thread Polytropon
On Sun, 28 Jul 2013 08:18:39 -0600 (MDT), Warren Block wrote:
 On Sun, 28 Jul 2013, Polytropon wrote:
  On Sat, 27 Jul 2013 19:39:30 +0200 (CEST), Conny Andersson wrote:
 
  A very important question is if sysinstall's option Install the FreeBSD
  Boot Manager detects that I have a FreeBSD 8.3 and detect it as slice 2 on
  disk 1?
 
  I'm not sure I'm following you correctly. The sysinstall program
  is considered obsolete, the new system installer is bsdinstall.
 
 AFAIK, sysinstall is still used in FreeBSD 8.X, and bsdinstall does not 
 have a boot manager option anyway.

Sometimes I'm confusing them, because I usually don't use the
installer and usually use fdisk (if needed), bsdlabel and
newfs. :-)




  So it becomes a boot option when I am rebooting? (Maybe the slice
  may come up as ad6s2, because AHCI in FreeBSD 8.4 isn't enabled at the time
  of the install.)
 
 Sorry, I don't understand this at all.  AHCI should not be involved with 
 identifying slices.

Maybe the required device driver is not part of the 8.x
GENERIC kernel? So for example a drive could come up either
as /dev/ada0 or as /dev/ad6, depending on how the recognition
order and PATA / SATA thing is handled by the system and
its BIOS. Labels will work independently from wheather
the device will be recognized as ATA disk (for example
/dev/ad6s1a being the root disk) or SATA disk (where
/dev/ada6s1 would be the root disk).





-- 
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: FreeBSD slices and the Boot Manager

2013-07-28 Thread Warren Block

On Sun, 28 Jul 2013, Polytropon wrote:


On Sun, 28 Jul 2013 08:18:39 -0600 (MDT), Warren Block wrote:

On Sun, 28 Jul 2013, Polytropon wrote:

On Sat, 27 Jul 2013 19:39:30 +0200 (CEST), Conny Andersson wrote:



A very important question is if sysinstall's option Install the FreeBSD
Boot Manager detects that I have a FreeBSD 8.3 and detect it as slice 2 on
disk 1?


I'm not sure I'm following you correctly. The sysinstall program
is considered obsolete, the new system installer is bsdinstall.


AFAIK, sysinstall is still used in FreeBSD 8.X, and bsdinstall does not
have a boot manager option anyway.


Sometimes I'm confusing them, because I usually don't use the
installer and usually use fdisk (if needed), bsdlabel and
newfs. :-)


gpart does a lot more than both fdisk and bsdlabel, and is easier to 
use. :)



So it becomes a boot option when I am rebooting? (Maybe the slice
may come up as ad6s2, because AHCI in FreeBSD 8.4 isn't enabled at the time
of the install.)


Sorry, I don't understand this at all.  AHCI should not be involved with
identifying slices.


Maybe the required device driver is not part of the 8.x
GENERIC kernel? So for example a drive could come up either
as /dev/ada0 or as /dev/ad6, depending on how the recognition
order and PATA / SATA thing is handled by the system and
its BIOS.


Really, it should always be ada, unless someone has built a custom 
kernel that intentionally uses the old form.  That's usually a mistake.

(AHCI is a separate, unrelated thing.)

Labels will work independently from wheather the device will be 
recognized as ATA disk (for example /dev/ad6s1a being the root disk) 
or SATA disk (where /dev/ada6s1 would be the root disk).


Yes.  Labels don't care about the hardware connection.  So they'll 
continue to work when you take a drive out of a machine and put it in a 
USB enclosure, for example.

___
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: FreeBSD slices and the Boot Manager

2013-07-28 Thread Ian Smith
In freebsd-questions Digest, Vol 477, Issue 8, Message: 10
On Sat, 27 Jul 2013 19:39:30 +0200 (CEST) Conny Andersson atar...@telia.com 
wrote:
  Hi,
  
  I have a workstation with two factory installed hard disks. The first disk, 
  ada0, is occupied by a Windows 7 Pro OS (mainly kept for the three year 
  warranty of the workstation as Dell techs mostly speak the Microsoft 
  language).

Yes, best humour adherents of the Almighty Bill - keeps them sweet.

  Instead I have configured the BIOS to boot from the MBR on the second disk 
  as I most of the time (99%) use FreeBSD. The MBR on ada1 was installed with 
  sysinstall's option Install the FreeBSD Boot Manager, when I installed 
  the FreeBSD 8.3-RELEASE.

Right.  sysinstall(8) - or at least the fdisk and bsdlabel modules that 
constitute sade(8) - remains the only safe and sane way to handle MBR 
disks.  bsdinstall seems fine for GPT, but its paradigm doesn't play so 
well with trying to do the sorts of manipulations you're talking about 
here.  Why noone's tried to update sade(8) for GPT I don't understand; 
it's a far better, more forgiving interface, in my old-fashioned? view.

  (The latest BIOS version 2.4.0 for Dell T1500 does not support 
  UEFI/GPT/GUID.)
  
  The second disk ada1, now has three FreeBSD slices:
  
  1) ada1s1 with FreeBSD 8.1-RELEASE
  
  2) ada1s2 with FreeBSD 8.2-RELEASE
  
  3) ada1s3 with FreeBSD 8.3-RELEASE
  
  I want to install the new FreeBSD 8.4-RELEASE on ada1s1 by overwriting the 
  now existing two first slices. This means that ada1s3, must become ada1s2 
  instead. Is this possible to do?

Yes and no.  Using sysinstall|sade on my 9.1 laptop -- without setting 
sysctl kern.geom.debugflags=16 so it can't write any inadvertent changes 
to my disk :) -- in the fdisk screen you can delete the first two slices 
freeing their space for a new slice (or two) and you can then allocate 
s1 ok, but the existing s3 is still called s3.  Would that be a problem?

If you only created one slice there you'd have s1 and s3, with s2 and s4 
marked as empty in the MBR shown by fdisk(8).  MBR slice order need not 
follow disk allocations, eg s4 might point to an earlier disk region.

sysinstall|sade has undo options for both fdisk and bsdlabel modules; 
it's easy to play with, no chance of damage - even with foot-shooting 
flag set, unless/until you commit to changes.  If in doubt hit escape 
until it backs right out, nothing will be written.

  A very important question is if sysinstall's option Install the FreeBSD 
  Boot Manager detects that I have a FreeBSD 8.3 and detect it as slice 2 on 
  disk 1? So it becomes a boot option when I am rebooting? (Maybe the slice 
  may come up as ad6s2, because AHCI in FreeBSD 8.4 isn't enabled at the time 
  of the install.)

If you're running 8.4 sysinstall as init, ie booted into the installer, 
and you've told it to install to s1, then it should set s1 as the active 
partition in the disk table and in boot0cfg's active slice table.  I've 
never tried it with a second disk so I can't confirm that will all play 
nice, but you seem to have installed 3 versions ok before :)

If not, you can run boot0cfg(8) anytime to set the active slice etc, so 
that shouldn't be a worry.  Likely need to set debugflags=16 to do that 
on a running system also .. don't forget to set them back to 0 later!

(For anyone) still nervous about sade for setting up MBR disks, play 
with a spare memstick, setup a couple of slices, boot0cfg etc, allocate 
and delete slices and partitions.  Jordan got that together 15years ago 
so noone would ever need to do those icky slice/partition maths again.  
My theory: few have been brave enough to dare mess with $deity's work, 
though it just needs some updates for modern realities, not abandonment.

[ Polytropon, it's not 'obsolete' at all; still in 9 anyway.  It'll be 
obsolete when there are no more MBR-only systems in use - say 7 years - 
OR when bsdinstall incorporates all the missing good sade(8) features, 
which requires it making a clear distinction between GPT and MBR and 
working accordingly, including cleaning up GPT stuff if MBR chosen.  At 
9.1-R anyway, it doesn't do it so well for MBR.  Try installing over an 
existing desired slice partitioning, newfs'ing everything EXCEPT your 
valuable /home partition.  Not for beginners, yet simple in sade(8) ]

  If the answer to these questions is yes, then the next two questions arise.
  
  Can I mount ada1s2a (FreeBSD 8.3) from the newly installed FreeBSD 8.4 and 
  edit my FreeBSD's 8.3-R /etc/fstab according to the new disk layout, and 
  occasionally run FreeBSD 8.3 without problems? Or do I have to do more to 
  get it to work?

Except it likely will still be called ada1s3a, it should be no problem. 
Once boot0cfg(8) is working right, you can boot from any bootable slice; 
it 'knows' but doesn't care what (if any) OS is on any other slices.

  The idea behind this kind of 'reverse' disk layout of mine is to have

Re: FreeBSD slices and the Boot Manager

2013-07-28 Thread Conny Andersson

Hi Ian,

Thank you for all of your advices regarding my questions. I have been using 
FreeBSD for more than ten years, but I never heard of sade (sysadmins disk 
editor). That is one of the joyful things with running FreeBSD/Unix; there 
is always something earlier unheard of to explore. And, there is always 
more than one way to approach a problem.


Thank you Ian,

Conny


On Mon, 29 Jul 2013, Ian Smith wrote:



In freebsd-questions Digest, Vol 477, Issue 8, Message: 10
On Sat, 27 Jul 2013 19:39:30 +0200 (CEST) Conny Andersson atar...@telia.com 
wrote:
 Hi,

 I have a workstation with two factory installed hard disks. The first disk,
 ada0, is occupied by a Windows 7 Pro OS (mainly kept for the three year
 warranty of the workstation as Dell techs mostly speak the Microsoft
 language).

Yes, best humour adherents of the Almighty Bill - keeps them sweet.

 Instead I have configured the BIOS to boot from the MBR on the second disk
 as I most of the time (99%) use FreeBSD. The MBR on ada1 was installed with
 sysinstall's option Install the FreeBSD Boot Manager, when I installed
 the FreeBSD 8.3-RELEASE.

Right.  sysinstall(8) - or at least the fdisk and bsdlabel modules that
constitute sade(8) - remains the only safe and sane way to handle MBR
disks.  bsdinstall seems fine for GPT, but its paradigm doesn't play so
well with trying to do the sorts of manipulations you're talking about
here.  Why noone's tried to update sade(8) for GPT I don't understand;
it's a far better, more forgiving interface, in my old-fashioned? view.

 (The latest BIOS version 2.4.0 for Dell T1500 does not support
 UEFI/GPT/GUID.)

 The second disk ada1, now has three FreeBSD slices:

 1) ada1s1 with FreeBSD 8.1-RELEASE

 2) ada1s2 with FreeBSD 8.2-RELEASE

 3) ada1s3 with FreeBSD 8.3-RELEASE

 I want to install the new FreeBSD 8.4-RELEASE on ada1s1 by overwriting the
 now existing two first slices. This means that ada1s3, must become ada1s2
 instead. Is this possible to do?

Yes and no.  Using sysinstall|sade on my 9.1 laptop -- without setting
sysctl kern.geom.debugflags=16 so it can't write any inadvertent changes
to my disk :) -- in the fdisk screen you can delete the first two slices
freeing their space for a new slice (or two) and you can then allocate
s1 ok, but the existing s3 is still called s3.  Would that be a problem?

If you only created one slice there you'd have s1 and s3, with s2 and s4
marked as empty in the MBR shown by fdisk(8).  MBR slice order need not
follow disk allocations, eg s4 might point to an earlier disk region.

sysinstall|sade has undo options for both fdisk and bsdlabel modules;
it's easy to play with, no chance of damage - even with foot-shooting
flag set, unless/until you commit to changes.  If in doubt hit escape
until it backs right out, nothing will be written.

 A very important question is if sysinstall's option Install the FreeBSD
 Boot Manager detects that I have a FreeBSD 8.3 and detect it as slice 2 on
 disk 1? So it becomes a boot option when I am rebooting? (Maybe the slice
 may come up as ad6s2, because AHCI in FreeBSD 8.4 isn't enabled at the time
 of the install.)

If you're running 8.4 sysinstall as init, ie booted into the installer,
and you've told it to install to s1, then it should set s1 as the active
partition in the disk table and in boot0cfg's active slice table.  I've
never tried it with a second disk so I can't confirm that will all play
nice, but you seem to have installed 3 versions ok before :)

If not, you can run boot0cfg(8) anytime to set the active slice etc, so
that shouldn't be a worry.  Likely need to set debugflags=16 to do that
on a running system also .. don't forget to set them back to 0 later!

(For anyone) still nervous about sade for setting up MBR disks, play
with a spare memstick, setup a couple of slices, boot0cfg etc, allocate
and delete slices and partitions.  Jordan got that together 15years ago
so noone would ever need to do those icky slice/partition maths again.
My theory: few have been brave enough to dare mess with $deity's work,
though it just needs some updates for modern realities, not abandonment.

[ Polytropon, it's not 'obsolete' at all; still in 9 anyway.  It'll be
obsolete when there are no more MBR-only systems in use - say 7 years -
OR when bsdinstall incorporates all the missing good sade(8) features,
which requires it making a clear distinction between GPT and MBR and
working accordingly, including cleaning up GPT stuff if MBR chosen.  At
9.1-R anyway, it doesn't do it so well for MBR.  Try installing over an
existing desired slice partitioning, newfs'ing everything EXCEPT your
valuable /home partition.  Not for beginners, yet simple in sade(8) ]

 If the answer to these questions is yes, then the next two questions arise.

 Can I mount ada1s2a (FreeBSD 8.3) from the newly installed FreeBSD 8.4 and
 edit my FreeBSD's 8.3-R /etc/fstab according to the new disk layout, and
 occasionally run FreeBSD 8.3 without problems? Or do I have

Re: FreeBSD slices and the Boot Manager

2013-07-28 Thread Conny Andersson

Hi Peter,

I need much more disk space for the FreeBSD 8.4-RELEASE, so I will need the 
space of the two 'old' slices.


Thanks,

Conny



On Sun, 28 Jul 2013, Peter Andreev wrote:



Why wouldn't you simply update your 8.1 to 8.4?


2013/7/27 Conny Andersson atar...@telia.com


Hi,

I have a workstation with two factory installed hard disks. The first
disk, ada0, is occupied by a Windows 7 Pro OS (mainly kept for the three
year warranty of the workstation as Dell techs mostly speak the Microsoft
language).

Instead I have configured the BIOS to boot from the MBR on the second disk
as I most of the time (99%) use FreeBSD. The MBR on ada1 was installed with
sysinstall's option Install the FreeBSD Boot Manager, when I installed
the FreeBSD 8.3-RELEASE.

(The latest BIOS version 2.4.0 for Dell T1500 does not support
UEFI/GPT/GUID.)

The second disk ada1, now has three FreeBSD slices:

1) ada1s1 with FreeBSD 8.1-RELEASE

2) ada1s2 with FreeBSD 8.2-RELEASE

3) ada1s3 with FreeBSD 8.3-RELEASE

I want to install the new FreeBSD 8.4-RELEASE on ada1s1 by overwriting the
now existing two first slices. This means that ada1s3, must become ada1s2
instead. Is this possible to do?

A very important question is if sysinstall's option Install the FreeBSD
Boot Manager detects that I have a FreeBSD 8.3 and detect it as slice 2 on
disk 1? So it becomes a boot option when I am rebooting? (Maybe the slice
may come up as ad6s2, because AHCI in FreeBSD 8.4 isn't enabled at the time
of the install.)

If the answer to these questions is yes, then the next two questions arise.

Can I mount ada1s2a (FreeBSD 8.3) from the newly installed FreeBSD 8.4 and
edit my FreeBSD's 8.3-R /etc/fstab according to the new disk layout, and
occasionally run FreeBSD 8.3 without problems? Or do I have to do more to
get it to work?

The idea behind this kind of 'reverse' disk layout of mine is to have
FreeBSD 8.4 as my new default OS. And have FreeBSD 8.3 untouched for
configuring FreeBSD 8.4 and booting into it when ever needed. If I can do
this as described above, I will have plenty of space on the disk for the
future and a new FreeBSD release.


Thanks for your interest in my questions,

Conny Andersson

=-=-=-=-=-=-=-=-=-=
  Conny Andersson
atar...@telia.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: FreeBSD slices and the Boot Manager

2013-07-28 Thread Conny Andersson

Hi Warren and Polytropon,

A few minutes ago I booted up from a FreeBSD-8.4-RELEASE-amd64-memstick.img 
to experience that it is sysinstall that is used in that release.


Next, I did a 'dummy' custom installation. And, as I supposed sysinstall 
recognized disk ada0 as ad4 and disk ada1 as ad6. Then I aborted sysinstall 
and rebooted in to my FreeBSD 8.3-Release.


Well, AHCI (Serial ATA Advanced Host Controller Interface driver) seems 
involved when identifying disks and slices. But, only on newer computers 
who has this option set to on in the BIOS. Maybe, bsdinstall in FreeBSD 9.0 
and onwards can make use of AHCI directly.


When I bought this workstation and installed FreeBSD I thought something 
was very much wrong with the wiring of the hardware/disks and I phoned 
Dell's support ... without being much wiser.


My old Dell workstation on which I have used all the FreeBSD's from release 
4.8 up to 8.0 I always got ad0 and ad1 as the disks in use. So, I had to 
search the Internet for an answer why my new computer numbered disks oddly. 
And I found your web page Warren 
(http://www.wonkity.com/~wblock/docs/html/ahci.html) and I also read the 
ahci man page. I also had to edit my /etc/fstab accordingly.


My FreeBSD 8.3 /etc/fstab:

# DeviceMountpoint  FStype  Options  Dump   Pass#
/dev/ada1s3bnoneswapsw   0  0
/dev/ada1s3a/   ufs rw   1  1
/dev/ada1s3d/home   ufs rw   2  2
/dev/acd0   /cdrom  cd9660  ro,noauto0  0
proc/proc   procfs  rw   0  0
linproc  /compat/linux/proc   linprocfs rw   0  0

Apropos labels, I only have two filesystems (+swap) on each slice, as I 
only run a desktop workstation. I do that following Greg Lehey's advise in 
his book The Complete FreeBSD 4th Edition.


More apropos labels: The latest BIOS version 2.4.0 for Dell T1500 does not 
support UEFI/GPT/GUID. As far as I know, Dell only have the Unified 
Extensible Firmware Interface on its PowerEdge servers.


(The reason why I want to merge two slices into one big ada1s1 is the need 
for more disk space for FreeBSD 8.4 and keep 8.3 as it is, but then as 
slice 2).


Thank you,

Conny


On Sun, 28 Jul 2013, Warren Block wrote:



On Sun, 28 Jul 2013, Polytropon wrote:

On Sat, 27 Jul 2013 19:39:30 +0200 (CEST), Conny Andersson wrote:



A very important question is if sysinstall's option Install the FreeBSD
Boot Manager detects that I have a FreeBSD 8.3 and detect it as slice 2 
on

disk 1?


I'm not sure I'm following you correctly. The sysinstall program
is considered obsolete, the new system installer is bsdinstall.


AFAIK, sysinstall is still used in FreeBSD 8.X, and bsdinstall does not have 
a boot manager option anyway.



So it becomes a boot option when I am rebooting? (Maybe the slice
may come up as ad6s2, because AHCI in FreeBSD 8.4 isn't enabled at the 
time

of the install.)


Sorry, I don't understand this at all.  AHCI should not be involved with 
identifying slices.



That is a _good_ consideration! To make sure things work independently
from boot-time recognition, use labels for the file system and then
mount them by using the labels. Encode the OS version number in the
labels, so it's even easier to deal with them. Use newfs -L on
un-mounted partitions (you can do that from the install media).


For existing filesystems, that would be tunefs -L.  And agreed, filesystem 
labels make relocation much 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: FreeBSD slices and the Boot Manager

2013-07-28 Thread Warren Block

On Sun, 28 Jul 2013, Conny Andersson wrote:


Hi Warren and Polytropon,

A few minutes ago I booted up from a FreeBSD-8.4-RELEASE-amd64-memstick.img 
to experience that it is sysinstall that is used in that release.


Next, I did a 'dummy' custom installation. And, as I supposed sysinstall 
recognized disk ada0 as ad4 and disk ada1 as ad6. Then I aborted sysinstall 
and rebooted in to my FreeBSD 8.3-Release.


Well, AHCI (Serial ATA Advanced Host Controller Interface driver) seems 
involved when identifying disks and slices. But, only on newer computers who 
has this option set to on in the BIOS. Maybe, bsdinstall in FreeBSD 9.0 and 
onwards can make use of AHCI directly.


At some point, the old ad(4) driver was replaced with the new ada(4) 
driver.  To provide backwards compatability, the old ad devices names 
are still available in /dev.  I don't know when FreeBSD 8.X switched to 
the ada(4) driver.


Neither ad nor ada devices require AHCI.  If it is available, it gives a 
small but noticeable speed increase.  Otherwise, it should make no 
difference.


More apropos labels: The latest BIOS version 2.4.0 for Dell T1500 does not 
support UEFI/GPT/GUID. As far as I know, Dell only have the Unified 
Extensible Firmware Interface on its PowerEdge servers.


There is more than one kind of label.  There are filesystem labels 
like we are talking about, there are GPT labels, there are generic 
labels.  The ones being suggested are filesystem labels:

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

FreeBSD supports GPT without UEFI.  It doesn't matter in this case, 
since you already have 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: FreeBSD slices and the Boot Manager

2013-07-28 Thread Teske, Devin

On Jul 28, 2013, at 12:55 PM, Conny Andersson wrote:

 Hi Ian,
 
 Thank you for all of your advices regarding my questions. I have been using 
 FreeBSD for more than ten years, but I never heard of sade (sysadmins disk 
 editor). That is one of the joyful things with running FreeBSD/Unix; there is 
 always something earlier unheard of to explore. And, there is always more 
 than one way to approach a problem.
 

In this case, sade is (or was) a direct by-product of the death of 
sysinstall(8). It only exists in 9 or higher.

In-fact... sade was (up until recently in HEAD) actual code removed from 
sysinstall(8).

NOTE: In HEAD, sade(8) is now a direct path to bsdinstall partedit

I don't know what the long-term goals are for sade, but it's a nice 4-letter 
acronym that's a nice keystroke saver (at the very least).
-- 
Devin



 On Mon, 29 Jul 2013, Ian Smith wrote:
 
 In freebsd-questions Digest, Vol 477, Issue 8, Message: 10
 On Sat, 27 Jul 2013 19:39:30 +0200 (CEST) Conny Andersson 
 atar...@telia.com wrote:
  Hi,
 
  I have a workstation with two factory installed hard disks. The first disk,
  ada0, is occupied by a Windows 7 Pro OS (mainly kept for the three year
  warranty of the workstation as Dell techs mostly speak the Microsoft
  language).
 
 Yes, best humour adherents of the Almighty Bill - keeps them sweet.
 
  Instead I have configured the BIOS to boot from the MBR on the second disk
  as I most of the time (99%) use FreeBSD. The MBR on ada1 was installed with
  sysinstall's option Install the FreeBSD Boot Manager, when I installed
  the FreeBSD 8.3-RELEASE.
 
 Right.  sysinstall(8) - or at least the fdisk and bsdlabel modules that
 constitute sade(8) - remains the only safe and sane way to handle MBR
 disks.  bsdinstall seems fine for GPT, but its paradigm doesn't play so
 well with trying to do the sorts of manipulations you're talking about
 here.  Why noone's tried to update sade(8) for GPT I don't understand;
 it's a far better, more forgiving interface, in my old-fashioned? view.
 
  (The latest BIOS version 2.4.0 for Dell T1500 does not support
  UEFI/GPT/GUID.)
 
  The second disk ada1, now has three FreeBSD slices:
 
  1) ada1s1 with FreeBSD 8.1-RELEASE
 
  2) ada1s2 with FreeBSD 8.2-RELEASE
 
  3) ada1s3 with FreeBSD 8.3-RELEASE
 
  I want to install the new FreeBSD 8.4-RELEASE on ada1s1 by overwriting the
  now existing two first slices. This means that ada1s3, must become ada1s2
  instead. Is this possible to do?
 
 Yes and no.  Using sysinstall|sade on my 9.1 laptop -- without setting
 sysctl kern.geom.debugflags=16 so it can't write any inadvertent changes
 to my disk :) -- in the fdisk screen you can delete the first two slices
 freeing their space for a new slice (or two) and you can then allocate
 s1 ok, but the existing s3 is still called s3.  Would that be a problem?
 
 If you only created one slice there you'd have s1 and s3, with s2 and s4
 marked as empty in the MBR shown by fdisk(8).  MBR slice order need not
 follow disk allocations, eg s4 might point to an earlier disk region.
 
 sysinstall|sade has undo options for both fdisk and bsdlabel modules;
 it's easy to play with, no chance of damage - even with foot-shooting
 flag set, unless/until you commit to changes.  If in doubt hit escape
 until it backs right out, nothing will be written.
 
  A very important question is if sysinstall's option Install the FreeBSD
  Boot Manager detects that I have a FreeBSD 8.3 and detect it as slice 2 on
  disk 1? So it becomes a boot option when I am rebooting? (Maybe the slice
  may come up as ad6s2, because AHCI in FreeBSD 8.4 isn't enabled at the time
  of the install.)
 
 If you're running 8.4 sysinstall as init, ie booted into the installer,
 and you've told it to install to s1, then it should set s1 as the active
 partition in the disk table and in boot0cfg's active slice table.  I've
 never tried it with a second disk so I can't confirm that will all play
 nice, but you seem to have installed 3 versions ok before :)
 
 If not, you can run boot0cfg(8) anytime to set the active slice etc, so
 that shouldn't be a worry.  Likely need to set debugflags=16 to do that
 on a running system also .. don't forget to set them back to 0 later!
 
 (For anyone) still nervous about sade for setting up MBR disks, play
 with a spare memstick, setup a couple of slices, boot0cfg etc, allocate
 and delete slices and partitions.  Jordan got that together 15years ago
 so noone would ever need to do those icky slice/partition maths again.
 My theory: few have been brave enough to dare mess with $deity's work,
 though it just needs some updates for modern realities, not abandonment.
 
 [ Polytropon, it's not 'obsolete' at all; still in 9 anyway.  It'll be
 obsolete when there are no more MBR-only systems in use - say 7 years -
 OR when bsdinstall incorporates all the missing good sade(8) features,
 which requires it making a clear distinction between GPT and MBR and
 working accordingly, including

Re: FreeBSD slices and the Boot Manager

2013-07-28 Thread Polytropon
On Sun, 28 Jul 2013 22:23:38 +, Teske, Devin wrote:
 In this case, sade is (or was) a direct by-product of the death
 of sysinstall(8). It only exists in 9 or higher.

% which sade
/usr/sbin/sade

System is FreeBSD 8.2-STABLE of August 2011. I think sade has
been introduced in a v8 version of FreeBSD.



-- 
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: FreeBSD slices and the Boot Manager

2013-07-28 Thread Conny Andersson

Hi Devin,

Apropos sade (sysadmins disk editor). I have it at /usr/sbin/sade and I am 
running a FreeBSD 8.3. I also mounted FreeBSD 8.1 and FreeBSD 8.2 and found 
sade at /usr/sbin/ even in these older FreeBSDs.


Regards,

Conny


On Sun, 28 Jul 2013, Teske, Devin wrote:

In this case, sade is (or was) a direct by-product of the death of 
sysinstall(8). It only exists in 9 or higher.


In-fact... sade was (up until recently in HEAD) actual code removed from 
sysinstall(8).


NOTE: In HEAD, sade(8) is now a direct path to bsdinstall partedit

I don't know what the long-term goals are for sade, but it's a nice 
4-letter acronym that's a nice keystroke saver (at the very least).

--
Devin



On Mon, 29 Jul 2013, Ian Smith wrote:
--- --- ---
Right.  sysinstall(8) - or at least the fdisk and bsdlabel modules that
constitute sade(8) - remains the only safe and sane way to handle MBR
disks.

___
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: FreeBSD slices and the Boot Manager

2013-07-28 Thread Shane Ambler

On 29/07/2013 08:23, Polytropon wrote:

On Sun, 28 Jul 2013 22:23:38 +, Teske, Devin wrote:

In this case, sade is (or was) a direct by-product of the death
of sysinstall(8). It only exists in 9 or higher.


% which sade
/usr/sbin/sade

System is FreeBSD 8.2-STABLE of August 2011. I think sade has
been introduced in a v8 version of FreeBSD.



Or earlier. On 9.1 man sade says --

HISTORY
 This version of sade first appeared in FreeBSD 6.3.  The code is
 extracted from the sysinstall(8) utility.

___
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 slices and the Boot Manager

2013-07-27 Thread Conny Andersson

Hi,

I have a workstation with two factory installed hard disks. The first disk, 
ada0, is occupied by a Windows 7 Pro OS (mainly kept for the three year 
warranty of the workstation as Dell techs mostly speak the Microsoft 
language).


Instead I have configured the BIOS to boot from the MBR on the second disk 
as I most of the time (99%) use FreeBSD. The MBR on ada1 was installed with 
sysinstall's option Install the FreeBSD Boot Manager, when I installed 
the FreeBSD 8.3-RELEASE.


(The latest BIOS version 2.4.0 for Dell T1500 does not support 
UEFI/GPT/GUID.)


The second disk ada1, now has three FreeBSD slices:

1) ada1s1 with FreeBSD 8.1-RELEASE

2) ada1s2 with FreeBSD 8.2-RELEASE

3) ada1s3 with FreeBSD 8.3-RELEASE

I want to install the new FreeBSD 8.4-RELEASE on ada1s1 by overwriting the 
now existing two first slices. This means that ada1s3, must become ada1s2 
instead. Is this possible to do?


A very important question is if sysinstall's option Install the FreeBSD 
Boot Manager detects that I have a FreeBSD 8.3 and detect it as slice 2 on 
disk 1? So it becomes a boot option when I am rebooting? (Maybe the slice 
may come up as ad6s2, because AHCI in FreeBSD 8.4 isn't enabled at the time 
of the install.)


If the answer to these questions is yes, then the next two questions arise.

Can I mount ada1s2a (FreeBSD 8.3) from the newly installed FreeBSD 8.4 and 
edit my FreeBSD's 8.3-R /etc/fstab according to the new disk layout, and 
occasionally run FreeBSD 8.3 without problems? Or do I have to do more to 
get it to work?


The idea behind this kind of 'reverse' disk layout of mine is to have 
FreeBSD 8.4 as my new default OS. And have FreeBSD 8.3 untouched for 
configuring FreeBSD 8.4 and booting into it when ever needed. If I can do 
this as described above, I will have plenty of space on the disk for the 
future and a new FreeBSD release.



Thanks for your interest in my questions,

Conny Andersson

=-=-=-=-=-=-=-=-=-=
  Conny Andersson
atar...@telia.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: Groupping restored partitions into slices

2012-11-06 Thread Thomas Mueller
 Short version: Is it possible to group existing partitions into slices
 without affecting data?

 Long version:

 I had a disk sliced/partitioned like this:

 ad4s1
   ad4s1a
   ad4s1b (swap)
   ad4s1d
   ad4s1e
   ad4s1f
 ad4s2 (storage)
 ad4s3
   ad4s3a
   ad4s3b (swap)
   ad4s3d
   ad4s3e
   ad4s3f

 Then, I accidentally deleted *something* (wrong use of boot0cfg),
 which left me with /dev/ad4 only!

 scan_ffs correctly detected where all 9 data partitions begin. I
 created new bsdlabel table, wrote it to ad4, so I now have

 ad4a (former ad4s1a)
 ad4b (former ad4s1b - swap)
 ad4d (former ad4s1d)
 ad4e (former ad4s1e)
 ad4f (former ad4s1f)
 ad4g (former ad4s2)
 ad4h (former ad4s3a)
 and beginning sectors of the rest (former ad4s3d-f). Of course, I
 can't make more than 8 labels.

 I can mount all of them and I see my data. I can even 'swapon ad4b'.

 Now, the question: how can I restore s1, s2 and s3? As you can guess,
 s1 and s3 were working systems.

 Processing all this from FreeBSD-8/amd64 on another disc.

 Thanks!
 Sergi M

For FreeBSD as opposed to NetBSD, and I believe, OpenBSD, disklabels/bsdlabels
are for the slice rather than the whole disk, unless you partition the disk in
dangerously dedicated mode.  So you should create one bsdlabel for ad4s1 and
install to the beginning of that partition, and ahother bsdlabel for ad4s3 and
install to the beginning of ad4s3.  Installation would be using bsdlabel.

That's what I think, I could possibly be wrong.

You can check the bsdlabel man page, accessible online from www.freebsd.org,
even if you have no working installation of FreeBSD.

One, or actually twice, NetBSD overwrote my FreeBSD disklabel/bsdlabel.  The 
first time, I lost my FreeBSD installation but had nothing really to save,
it was time to upgrade to FreeBSD 8.0.  The second time, I had much software
installed, but had the bsdlabel information saved in a file.  I booted a
FreeBSD rescue CD and restored the FreeBSD disklabel/bsdlabel, and was back
in business.

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: Groupping restored partitions into slices

2012-11-06 Thread Snow Mountains
Thomas, thank you for reply! No, it wasn't dangerously dedicated disk.

However, what is the exact command to add ad4s1 and ad4s3 using
bsdlabel? Is it possible  at all? I thought I should use fdisk or
gpart for that.

Thanks,
Sergi M
___
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: Groupping restored partitions into slices

2012-11-06 Thread Thomas Mueller
 Thomas, thank you for reply! No, it wasn't dangerously dedicated disk.

 However, what is the exact command to add ad4s1 and ad4s3 using
 bsdlabel? Is it possible  at all? I thought I should use fdisk or
 gpart for that.

 Thanks,
 Sergi M

You use fdisk to create what FreeBSD calls slices such as ad4s1, ad4s2, ad4s3
and disklabel to subdivide a slice into FreeBSD partitions such as ad4s1a,
ad4s1b, ad4s1c, etc.  gpart is used to create GPT partitions such as ad4p1,
ad4p2, ad4p3, etc.  Subdividing a slice into FreeBSD partitions is used with
MBR partition/slice table but not recommended with GPT.

The online FreeBSD bsdlabel man page is online at

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

One example given is

This is an example disk label that uses some of the new partition size
 types such as %, M, G, and *, which could be used as a source file for
 ``bsdlabel -R ad0s1 new_label_file'':

 # /dev/ad0s1:

 8 partitions:
 #size   offsetfstype   [fsize bsize bps/cpg]
   a:   400M   164.2BSD 4096 1638475 # (Cyl.0 - 
812*)
   b: 1G*  swap
   c:  **unused
   e: 204800*4.2BSD
   f: 5g*4.2BSD
   g:  **4.2BSD

but you would have to replace the * with actual appropriate numbers.

After you install the disklabel, you could mount each data partition, but not
the swap partition, to see if the directory and file structure looks right.

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: Groupping restored partitions into slices

2012-11-06 Thread Snow Mountains
Thomas, thank you very much for your mail, but that isn't what I asked.

Of course, I know that bsdlabel -R ad0s1 new_label_file writes new
labels to ad0s1.

My question is: what to do if I _lost_ s1, s2, and s3 - how to recover
_them_ first? Without that, all I can do is to write labels table
directly on ad0.

SergiM.
___
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: Groupping restored partitions into slices

2012-11-06 Thread Thomas Mueller
 Thomas, thank you very much for your mail, but that isn't what I asked.

 Of course, I know that bsdlabel -R ad0s1 new_label_file writes new
 labels to ad0s1.

 My question is: what to do if I _lost_ s1, s2, and s3 - how to recover
 _them_ first? Without that, all I can do is to write labels table
 directly on ad0.

 SergiM.

I thought you had found where the slices and partitions had been.  Otherwise,
if you only have the BSD partitions and need to label more than 8, there is
gpart in FreeBSD base system and Rod Smith's gdisk, available in FreeBSD ports
and also on the System Rescue CD (sysresccd.org).  If you switch to GPT, you 
can accommodate 128 partitions by default, and you wouldn't need the original
slices, just the BSD partitions in what had been the slices.

If you switch to GPT as opposed to MBR, you won't use bsdlabel; partitions for
each FreeBSD installation would be listed in /etc/fstab.

If you have the data, where each slice began and ended, you can restore the
slices with fdisk.

If you can find the BSD partitions and have the media space to backup to, you
might want to backup the partitions if feasible, as protection in case you
mess up.

NetBSD disklabel can accommodate up to 16 partitions per hard disk, but
FreeBSD might not be able to properly read a NetBSD disklabel.  Also, NetBSD
disklabel is very tricky and temperamental; I'd surely trust gdisk or gpart
over NetBSD disklabel.

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: Can't find kernel, finds slices but no files on them

2012-09-20 Thread Matthew Seaman
On 19/09/2012 23:59, Polytropon wrote:
 The terminology is simple and as follows:
 
 A disk is a disk, e. g. /dev/ad0.
 
 A slice is a DOS primary partition on the disk, e. g. /dev/ad0s1.
 
 A partition is a subdivision of a slice, e. g. /dev/ad0s1a.
 
 Partitions can be used without a slice that encloses them,
 e. g. /dev/ad0a; this is called dedicated mode (because
 some obscure operating systems may have problems accessing
 something they cannot even understand).
 
 Tools like dump and restore operate on partitions.
 
 Tools like dd operate on everything.

What Polytropon says is perfectly correct, and accurate for setups using
MBR, fdisk(8) and bsdlabel(8).  However nowadays, the move is towards
using gpart(8) and the terminology is different there.  It looks like this:

% gpart show -p da0
=   34  134217661da0  GPT  (64G)
 34128  da0p1  freebsd-boot  (64k)
1624194304  da0p2  freebsd-swap  (2.0G)
4194466  130023229  da0p3  freebsd-zfs  (62G)

'da0' is the disk -- this is from a VM emulating a SAS controller, hence
'da' as the disk device.  That's not gpart specific, and you'll also
commonly see 'ad' or 'ada' for disk devices, plus some others specific
to certain hardware RAID controllers.

The disk has three partitions: da0p1, p2 and p3 of the indicated types.
There's also a freebsd-ufs type for those that don't want ZFS.

That's really all there is to it for all practical purposes.  There's no
need for 'partitions inside slices' or 'logical partitions' or any of
that malarkey.  I believe you could create partitions inside partitions
recursively to your heart's content but never cared enough to try that
out -- I think the device names would come out like 'da0p3p1' but I
could be wrong.

Cheers,

Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.
PGP: http://www.infracaninophile.co.uk/pgpkey




signature.asc
Description: OpenPGP digital signature


Re: Can't find kernel, finds slices but no files on them

2012-09-20 Thread Fritiof Hedman
On 20 September 2012 00:59, Polytropon free...@edvax.de wrote:
 On Thu, 20 Sep 2012 00:22:20 +0200, Fritiof Hedman wrote:
 On 19 September 2012 23:37, Polytropon free...@edvax.de wrote:
  On Wed, 19 Sep 2012 23:28:30 +0200, Fritiof Hedman wrote:
  Hi list!
 
  I must warn you, I'm quite new to FreeBSD (I'm mostly using Linux
  otherwise). I have inherited an old (yes, very old) BSD 4.7 machine on
  my work that I need to clone. I've setuped an identical copy of the
  slices on the target machine, ran dump the source machine and restore
  on the target machine, edited /etc/fstab to match the filesystems. I'm
  also running the GENERIC-kernel, I've done this using the FreeSBIE
  live CD.
 
  What procedure did you use to clone? There basically is
  the one way, using dump + restore on partitions (not
  slices!), or dd on either partitions, slices, or the
  whole disk.
 

 I maybe not so sure about the nomenclature that is used in FreeBSD.

 The terminology is simple and as follows:

 A disk is a disk, e. g. /dev/ad0.

 A slice is a DOS primary partition on the disk, e. g. /dev/ad0s1.

 A partition is a subdivision of a slice, e. g. /dev/ad0s1a.

 Partitions can be used without a slice that encloses them,
 e. g. /dev/ad0a; this is called dedicated mode (because
 some obscure operating systems may have problems accessing
 something they cannot even understand).

 Tools like dump and restore operate on partitions.

 Tools like dd operate on everything.

Thanks for the clarification!




 However, I dumped /  on the source machine, and restored on /mnt/tmp
 on the source machine.

 I assume you did dump and restore via network?

 Like this?
 http://www.wonkity.com/~wblock/docs/html/backup.html#_tt_dump_tt_via_ssh

 Or this?
 http://www.wonkity.com/~wblock/docs/html/backup.html#_copying_filesystems

A combination of those...

dump -C16 -b64 -0uan -h0 -f - /|  ssh -c blowfish user@otherhost
(cd /tmp  restore -ruf -)



 Or did you have both disks in the same machine and transfer
 from one disk to the other?

 Anyway, if you have already reliably (!) confirmed that all
 data is in the location they are supposed to be, your
 copying procedure should have been fine.



  However, when I boot I get to BTX loader (so I guess boot0 and boot2
  is correct), that can't load kernel nor kernel.old. see attached
  img1.png .
 
  Images cannot be attached to list messages. :-(
 

 Oh, I see. It essentilally says something like:

 BTX loader 1.00 BTX version is 1.01
 Console: internal video/keyboard
 BIOS drive A: is disk0
 BIOS drive C: is disk1
 BIOS 638kB/1046464kB available memory

 FreeBSD/i386 bootstrap loader, Revision 0.8
 (r...@builder.freebsdmall.com, Wed Oct 9 12:33:26 GMT 2002)
 \
 Hit [Enter] to boot immediately, or any other key for command prompt.
 Booting [kernel]
 can't load 'kernel'
 can't load 'kernel.old'

 Type '?' for a list of commands, 'help' for more detailed help.
 ok ls
 open '/' failed: no such file or directory
 ok

 Did you try echo * and echo /boot/* (and related important
 directories) to make sure? Note that the * is _required_ in
 this specific case.


As you saw, the prompt just returns *.




  I can't ls, as the loader says there is no such file or
  directory (also seen in img1.png).
 
  You can use echo * in the loader stage, if I remember
  correctly. Enter ? for a list of the available loader
  commands (or was it help?).
 
 echo * just prints a pretty asterisk :)

 I'm not sure if this is really the proper command at the ok
 prompt (which is the state prior to loading the kernel); I
 could shutdown my machine to check...

 As I'm not very often sitting at the low level prompts,
 Ok and boot:, I'm not really sure.



 It was more or less that way I did id,  the difference were that I
 mounted /usr under /, and not unmount each partition every time.

 That's not required as long as your CWD within the hierarchy
 for restoring is correct, and the mountpoints you want to
 restore to are correctly accessible. For example, if you
 missed to mount /mnt/usr to (let's say) /dev/ad1s1e (the
 partition that would be /usr soon), stuff would go to the
 wrong place.

Everything got to the new place, so that should not be the problem.
 Did you transfer a multi-partition system (typically /, /var,
 /tmp, /usr and /home) or do you have everything in one big /
 partition?

Multi-partiton system



 I'm
 rerunning as the first document says that I should do (ie unmount the
 partition that I've just dumped and restored). I've  justed tested to
 do as described in the document, with the very same result.

 You should not mount the partition you _dump from_ (even
 though it's possible); only the partition you _restore to_
 has to be (!) mounted. It doesn't basically matter _where_
 it is mounted. As you could already locate the data at the
 correct places, we can assume that you did everything correct.

 To be sure, you could fsck the destination disks's partitions.
 Make sure they are not mounted

Can't find kernel, finds slices but no files on them

2012-09-19 Thread Fritiof Hedman
Hi list!

I must warn you, I'm quite new to FreeBSD (I'm mostly using Linux
otherwise). I have inherited an old (yes, very old) BSD 4.7 machine on
my work that I need to clone. I've setuped an identical copy of the
slices on the target machine, ran dump the source machine and restore
on the target machine, edited /etc/fstab to match the filesystems. I'm
also running the GENERIC-kernel, I've done this using the FreeSBIE
live CD.

However, when I boot I get to BTX loader (so I guess boot0 and boot2
is correct), that can't load kernel nor kernel.old. see attached
img1.png . I can't ls, as the loader says there is no such file or
directory (also seen in img1.png).
lsdev gives a correct answer, all slices are there with their correct
size. echo $currdev returns disk1s1a as it should (see attached
img2.png).

Mounting the disks works, and their content is correct, with all file
params set.

Any ideas how to get this target machine to boot?

Thanks in advance,
Fritiof Hedman
___
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: Can't find kernel, finds slices but no files on them

2012-09-19 Thread Polytropon
On Wed, 19 Sep 2012 23:28:30 +0200, Fritiof Hedman wrote:
 Hi list!
 
 I must warn you, I'm quite new to FreeBSD (I'm mostly using Linux
 otherwise). I have inherited an old (yes, very old) BSD 4.7 machine on
 my work that I need to clone. I've setuped an identical copy of the
 slices on the target machine, ran dump the source machine and restore
 on the target machine, edited /etc/fstab to match the filesystems. I'm
 also running the GENERIC-kernel, I've done this using the FreeSBIE
 live CD.

What procedure did you use to clone? There basically is
the one way, using dump + restore on partitions (not
slices!), or dd on either partitions, slices, or the
whole disk.



 However, when I boot I get to BTX loader (so I guess boot0 and boot2
 is correct), that can't load kernel nor kernel.old. see attached
 img1.png .

Images cannot be attached to list messages. :-(



 I can't ls, as the loader says there is no such file or
 directory (also seen in img1.png).

You can use echo * in the loader stage, if I remember
correctly. Enter ? for a list of the available loader
commands (or was it help?).



 lsdev gives a correct answer, all slices are there with their correct
 size. echo $currdev returns disk1s1a as it should (see attached
 img2.png).

Good, so the copy you've created seems to be okay.



 Mounting the disks works, and their content is correct, with all file
 params set.
 
 Any ideas how to get this target machine to boot?

Maybe you just missed to prepare the boot attributes of the
new disk properly?

I suggest having a look at those documents:

Disk Setup On FreeBSD
http://www.wonkity.com/~wblock/docs/html/disksetup.html

Backup Options For FreeBSD
dump(8)/restore(8)
http://www.wonkity.com/~wblock/docs/html/backup.html#_em_dump_8_em_em_restore_8_em

I'm almost sure that you will need to re-initialize something
within the boot chain (guess without further diagnostics)...




-- 
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: Can't find kernel, finds slices but no files on them

2012-09-19 Thread Fritiof Hedman
On 19 September 2012 23:37, Polytropon free...@edvax.de wrote:
 On Wed, 19 Sep 2012 23:28:30 +0200, Fritiof Hedman wrote:
 Hi list!

 I must warn you, I'm quite new to FreeBSD (I'm mostly using Linux
 otherwise). I have inherited an old (yes, very old) BSD 4.7 machine on
 my work that I need to clone. I've setuped an identical copy of the
 slices on the target machine, ran dump the source machine and restore
 on the target machine, edited /etc/fstab to match the filesystems. I'm
 also running the GENERIC-kernel, I've done this using the FreeSBIE
 live CD.

 What procedure did you use to clone? There basically is
 the one way, using dump + restore on partitions (not
 slices!), or dd on either partitions, slices, or the
 whole disk.


I maybe not so sure about the nomenclature that is used in FreeBSD.
However, I dumped /  on the source machine, and restored on /mnt/tmp
on the source machine.




 However, when I boot I get to BTX loader (so I guess boot0 and boot2
 is correct), that can't load kernel nor kernel.old. see attached
 img1.png .

 Images cannot be attached to list messages. :-(


Oh, I see. It essentilally says something like:

BTX loader 1.00 BTX version is 1.01
Console: internal video/keyboard
BIOS drive A: is disk0
BIOS drive C: is disk1
BIOS 638kB/1046464kB available memory

FreeBSD/i386 bootstrap loader, Revision 0.8
(r...@builder.freebsdmall.com, Wed Oct 9 12:33:26 GMT 2002)
\
Hit [Enter] to boot immediately, or any other key for command prompt.
Booting [kernel]
can't load 'kernel'
can't load 'kernel.old'

Type '?' for a list of commands, 'help' for more detailed help.
ok ls
open '/' failed: no such file or directory
ok


 I can't ls, as the loader says there is no such file or
 directory (also seen in img1.png).

 You can use echo * in the loader stage, if I remember
 correctly. Enter ? for a list of the available loader
 commands (or was it help?).

echo * just prints a pretty asterisk :)



 lsdev gives a correct answer, all slices are there with their correct
 size. echo $currdev returns disk1s1a as it should (see attached
 img2.png).

 Good, so the copy you've created seems to be okay.



 Mounting the disks works, and their content is correct, with all file
 params set.

 Any ideas how to get this target machine to boot?

 Maybe you just missed to prepare the boot attributes of the
 new disk properly?

 I suggest having a look at those documents:

 Disk Setup On FreeBSD
 http://www.wonkity.com/~wblock/docs/html/disksetup.html

 Backup Options For FreeBSD
 dump(8)/restore(8)
 http://www.wonkity.com/~wblock/docs/html/backup.html#_em_dump_8_em_em_restore_8_em

 I'm almost sure that you will need to re-initialize something
 within the boot chain (guess without further diagnostics)...

It was more or less that way I did id,  the difference were that I
mounted /usr under /, and not unmount each partition every time. I'm
rerunning as the first document says that I should do (ie unmount the
partition that I've just dumped and restored). I've  justed tested to
do as described in the document, with the very same result.

Yeah, that's my guess as well. Maybe I should do the minimal install
of the FreeBSD image first, boot into  a live mode and then restore
everything upon the disks? That would keep any boot flags on the disks
right. But the thing that is annoying is that the loader can't browse
the content of the disk. I guess that's the main issue here.

Cheers,
Fritiof






 --
 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: Can't find kernel, finds slices but no files on them

2012-09-19 Thread Polytropon
On Thu, 20 Sep 2012 00:22:20 +0200, Fritiof Hedman wrote:
 On 19 September 2012 23:37, Polytropon free...@edvax.de wrote:
  On Wed, 19 Sep 2012 23:28:30 +0200, Fritiof Hedman wrote:
  Hi list!
 
  I must warn you, I'm quite new to FreeBSD (I'm mostly using Linux
  otherwise). I have inherited an old (yes, very old) BSD 4.7 machine on
  my work that I need to clone. I've setuped an identical copy of the
  slices on the target machine, ran dump the source machine and restore
  on the target machine, edited /etc/fstab to match the filesystems. I'm
  also running the GENERIC-kernel, I've done this using the FreeSBIE
  live CD.
 
  What procedure did you use to clone? There basically is
  the one way, using dump + restore on partitions (not
  slices!), or dd on either partitions, slices, or the
  whole disk.
 
 
 I maybe not so sure about the nomenclature that is used in FreeBSD.

The terminology is simple and as follows:

A disk is a disk, e. g. /dev/ad0.

A slice is a DOS primary partition on the disk, e. g. /dev/ad0s1.

A partition is a subdivision of a slice, e. g. /dev/ad0s1a.

Partitions can be used without a slice that encloses them,
e. g. /dev/ad0a; this is called dedicated mode (because
some obscure operating systems may have problems accessing
something they cannot even understand).

Tools like dump and restore operate on partitions.

Tools like dd operate on everything.



 However, I dumped /  on the source machine, and restored on /mnt/tmp
 on the source machine.

I assume you did dump and restore via network?

Like this?
http://www.wonkity.com/~wblock/docs/html/backup.html#_tt_dump_tt_via_ssh

Or this?
http://www.wonkity.com/~wblock/docs/html/backup.html#_copying_filesystems

Or did you have both disks in the same machine and transfer
from one disk to the other?

Anyway, if you have already reliably (!) confirmed that all
data is in the location they are supposed to be, your
copying procedure should have been fine.



  However, when I boot I get to BTX loader (so I guess boot0 and boot2
  is correct), that can't load kernel nor kernel.old. see attached
  img1.png .
 
  Images cannot be attached to list messages. :-(
 
 
 Oh, I see. It essentilally says something like:
 
 BTX loader 1.00 BTX version is 1.01
 Console: internal video/keyboard
 BIOS drive A: is disk0
 BIOS drive C: is disk1
 BIOS 638kB/1046464kB available memory
 
 FreeBSD/i386 bootstrap loader, Revision 0.8
 (r...@builder.freebsdmall.com, Wed Oct 9 12:33:26 GMT 2002)
 \
 Hit [Enter] to boot immediately, or any other key for command prompt.
 Booting [kernel]
 can't load 'kernel'
 can't load 'kernel.old'
 
 Type '?' for a list of commands, 'help' for more detailed help.
 ok ls
 open '/' failed: no such file or directory
 ok

Did you try echo * and echo /boot/* (and related important
directories) to make sure? Note that the * is _required_ in
this specific case.




  I can't ls, as the loader says there is no such file or
  directory (also seen in img1.png).
 
  You can use echo * in the loader stage, if I remember
  correctly. Enter ? for a list of the available loader
  commands (or was it help?).
 
 echo * just prints a pretty asterisk :)

I'm not sure if this is really the proper command at the ok
prompt (which is the state prior to loading the kernel); I
could shutdown my machine to check...

As I'm not very often sitting at the low level prompts,
Ok and boot:, I'm not really sure.



 It was more or less that way I did id,  the difference were that I
 mounted /usr under /, and not unmount each partition every time.

That's not required as long as your CWD within the hierarchy
for restoring is correct, and the mountpoints you want to
restore to are correctly accessible. For example, if you
missed to mount /mnt/usr to (let's say) /dev/ad1s1e (the
partition that would be /usr soon), stuff would go to the
wrong place.

Did you transfer a multi-partition system (typically /, /var,
/tmp, /usr and /home) or do you have everything in one big /
partition?



 I'm
 rerunning as the first document says that I should do (ie unmount the
 partition that I've just dumped and restored). I've  justed tested to
 do as described in the document, with the very same result.

You should not mount the partition you _dump from_ (even
though it's possible); only the partition you _restore to_
has to be (!) mounted. It doesn't basically matter _where_
it is mounted. As you could already locate the data at the
correct places, we can assume that you did everything correct.

To be sure, you could fsck the destination disks's partitions.
Make sure they are not mounted. That should be no problem from
a FreeSBIE disc (which I also consider a very good tool).



 Yeah, that's my guess as well. Maybe I should do the minimal install
 of the FreeBSD image first, boot into  a live mode and then restore
 everything upon the disks?

As a lazyness graduate, this is what I do (when I don't have
a scripted solution, e. g. for only _one_ use). :-)

Make sure you have

Re: Does FreeBSD start slices at head boundaries?

2012-07-07 Thread Wojciech Puchar

it without any problem. It _may_ be possible that some
systems like Windows have trouble with this approach,


what trouble? Windows doesn't probably see anything.

anyway i would not risk running windows with FreeBSD containing disk 
connected at the same time anyway. it's always risky.



To OP:

If you omit the slice and just create two partitions (one for
FS and one for swap), FreeBSD will use this fine. Just make

bsdlabel -B device is just enough after 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: Does FreeBSD start slices at head boundaries?

2012-07-07 Thread Wojciech Puchar

Ah the FAQ
http://www.freebsd.org/doc/en/books/faq/disks.html#DANGEROUSLY-DEDICATED

I don't think it's dangerous either.
Thanks for your explanations.


While it's far simpler. Anyway i wasn't aware it's called that way as i 
don't use installer

___
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: Does FreeBSD start slices at head boundaries?

2012-07-07 Thread Wojciech Puchar

disks. Maybe you get a
few kb of extra space. Don't do it.

because?


___
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: Does FreeBSD start slices at head boundaries?

2012-07-07 Thread Wojciech Puchar


Is there any performance advantage to using a dedicated disk layout


no. it is simplicity adventage, as well as (for SSD and 4K sector disks) 
far easier to put partitions aligned.

___
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: Does FreeBSD start slices at head boundaries?

2012-07-07 Thread Polytropon
On Sat, 7 Jul 2012 11:16:33 +0200 (CEST), Wojciech Puchar wrote:
  Ah the FAQ
  http://www.freebsd.org/doc/en/books/faq/disks.html#DANGEROUSLY-DEDICATED
 
  I don't think it's dangerous either.
  Thanks for your explanations.
 
 While it's far simpler. Anyway i wasn't aware it's called that way as i 
 don't use installer

As far as I know, the installer dropped dedicated mode some time
ago. So if you intendedly want to use it, you need to bypass the
installer and do the few simple steps using the CLI.



-- 
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: Does FreeBSD start slices at head boundaries?

2012-07-07 Thread Polytropon
On Sat, 7 Jul 2012 11:15:44 +0200 (CEST), Wojciech Puchar wrote:
  it without any problem. It _may_ be possible that some
  systems like Windows have trouble with this approach,
 
 what trouble? Windows doesn't probably see anything.

I have _no_ idea. Systems behaving in a manner you cannot
expect or predict are hard to tell in what they could do
wrong on a non-standard setting (from their point of
view of course).



 anyway i would not risk running windows with FreeBSD containing disk 
 connected at the same time anyway. it's always risky.

It maybe suggests to repair it... :-)



-- 
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: Does FreeBSD start slices at head boundaries?

2012-07-07 Thread Wojciech Puchar


While it's far simpler. Anyway i wasn't aware it's called that way as i
don't use installer


As far as I know, the installer dropped dedicated mode some time
ago. So if you intendedly want to use it, you need to bypass the
installer and do the few simple steps using the CLI.

i already do this, by not starting it at all.

bootable pendrive with complete system is all i need. nothing more than 
bsdlabel newfs and COPY 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: Does FreeBSD start slices at head boundaries?

2012-07-07 Thread Wojciech Puchar


http://www.unixguide.net/freebsd/faq/09.03.shtml


That is EXTREMELY old advice.

completely irrevelant now.

Why so many people blindly repeat some rules without understanding it. 
Even years after that rule no longer matters.


The other example is creating lots of partitions.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Does FreeBSD start slices at head boundaries?

2012-07-07 Thread Wojciech Puchar

environment.


gpart(8) can create MBR slice/partition layouts (and GPT and other partition 
schemes).  See the man page.  There is little reason to use fdisk and 
bsdlabel any more.


i use only disklabel, no fdisk at all. i put partition start sector where 
i want - no align problems.


I did not use gpart for now in production as i have no 2TB disk where i 
want to do partition at all.


Actually i've got quite a few 3TB disks recently but there are no both 
gpart, fdisk or disklabels on them, just single full disk(*) filesystem 
for user data.


* - actually gmirror of 3 disks.
___
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


Does FreeBSD start slices at head boundaries?

2012-07-06 Thread Rick Miller
Hi All,

Installing FreeBSD 8.x I select A at the fdisk partition editor to
use the entire disk.  It creates an unused slice with offset 0 and 63
sectors in size.  Then partition 1 starts at sector 63 and utilizes
the remaining disk space.  Does sysinstall's diskPartitonEditor macro
automatically start partitions at head boundaries?  The reason I ask
is because I am most familiar with sector 64 being the start of a head
boundary as opposed to 63.  Is my understanding incorrect?

-- 
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: Does FreeBSD start slices at head boundaries?

2012-07-06 Thread Wojciech Puchar

automatically start partitions at head boundaries?  The reason I ask
is because I am most familiar with sector 64 being the start of a head
boundary as opposed to 63.  Is my understanding incorrect?

yes. 63 is normal.

Anyway just don't make slices at all if your disk is dedicated to FreeBSD
___
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: Does FreeBSD start slices at head boundaries?

2012-07-06 Thread Ryan Coleman

On 7/6/2012 11:43 AM, Wojciech Puchar wrote:

automatically start partitions at head boundaries?  The reason I ask
is because I am most familiar with sector 64 being the start of a head
boundary as opposed to 63.  Is my understanding incorrect?

yes. 63 is normal.

Anyway just don't make slices at all if your disk is dedicated to FreeBSD 


Except for swap, right?

___
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: Does FreeBSD start slices at head boundaries?

2012-07-06 Thread Robert Huff

Ryan Coleman writes:

   Anyway just don't make slices at all if your disk is dedicated
   to FreeBSD  
  
  Except for swap, right?

Why do you say that?


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: Does FreeBSD start slices at head boundaries?

2012-07-06 Thread Bas Smeelen

On 07/06/2012 07:28 PM, Robert Huff wrote:

Ryan Coleman writes:


   Anyway just don't make slices at all if your disk is dedicated
   to FreeBSD
  
  Except for swap, right?

Why do you say that?


Robert huff





I think Ryan means partition and not slice?
I would not recommend no slices at all, It's deprecated to use 
dangerously dedicated disks


Starting with 9 I don't see slices in mount ouput anymore but still 
there are FreeBSD partitions in slices (which is a partitions in dos terms)

Example / is now disk0p1 it used to be disk0s1a







Disclaimer: http://www.ose.nl/email

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


Re: Does FreeBSD start slices at head boundaries?

2012-07-06 Thread Rick Miller
On Fri, Jul 6, 2012 at 11:19 AM, Ryan Coleman edi...@d3photography.com wrote:
 Sector 64 is sector 63 when you start at 0.

OMG, so right...I cannot believe that went over my head!  Thanks for
pointing it out.  It lets me know that diskPartitionEditor is
automatically selecting start and end sectors at boundaries.  Thanks!

-- 
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: Does FreeBSD start slices at head boundaries?

2012-07-06 Thread Wojciech Puchar


Anyway just don't make slices at all if your disk is dedicated to FreeBSD 


Except for swap, right?



wrong.

i said slices (==DOS/Windoze MBR partitions), not disklabel
___
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: Does FreeBSD start slices at head boundaries?

2012-07-06 Thread Wojciech Puchar

I think Ryan means partition and not slice?
I would not recommend no slices at all, It's deprecated to use dangerously 
dedicated disks


Starting with 9 I don't see slices in mount ouput anymore but still there are 
FreeBSD partitions in slices (which is a partitions in dos terms)

Example / is now disk0p1 it used to be disk0s1a


you use GUID partition table.
___
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: Does FreeBSD start slices at head boundaries?

2012-07-06 Thread Polytropon
On Fri, 06 Jul 2012 19:47:27 +0200, Bas Smeelen wrote:
 On 07/06/2012 07:28 PM, Robert Huff wrote:
  Ryan Coleman writes:
 
 Anyway just don't make slices at all if your disk is dedicated
 to FreeBSD

Except for swap, right?
  Why do you say that?
 
 
  Robert huff
 
 
 
 
 I think Ryan means partition and not slice?
 I would not recommend no slices at all, It's deprecated to use 
 dangerously dedicated disks

First of all, it's dedicated disks, there's nothing dangerous
related. :-)

If you are using the MBR approach (old way), you can do
either creating a DOS primary partition, a slice, which
then will contain your partitions: a swap partition and
one or more UFS partitions. So you have ad0s1a, ad0s1b
and so on.

When you omit the slice and create the partitions on the bare
disk, you have a dedicated layout. FreeBSD will run with
it without any problem. It _may_ be possible that some
systems like Windows have trouble with this approach,
but if you're going to use FreeBSD only on that disk, there
is no danger, no problem. You have ad0a, ad0b and so on.

If you are using the GPT approach (new way), you create
partitions using a different tool set, setting them to be
a file system or a swap partition. You end up in ad0p1,
ad0p2 and so on. Note that those aren't DOS primary
partitions anymore, outdated systems may not properly
recognize them.

If you label your partitions (you can do that with both
approaches), you don't need to deal with device names at
all.



 Starting with 9 I don't see slices in mount ouput anymore but still 
 there are FreeBSD partitions in slices (which is a partitions in dos terms)
 Example / is now disk0p1 it used to be disk0s1a

Correct, this relation can be constructed.



To OP:

If you omit the slice and just create two partitions (one for
FS and one for swap), FreeBSD will use this fine. Just make
sure to set the boot parameters properly. Or simply use the
GPT-related tools, so you don't have to deal with the question
at all.




-- 
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: Does FreeBSD start slices at head boundaries?

2012-07-06 Thread Bas Smeelen

On 07/06/2012 08:25 PM, Polytropon wrote:

On Fri, 06 Jul 2012 19:47:27 +0200, Bas Smeelen wrote:

On 07/06/2012 07:28 PM, Robert Huff wrote:

Ryan Coleman writes:


Anyway just don't make slices at all if your disk is dedicated
to FreeBSD
   
   Except for swap, right?

Why do you say that?


Robert huff




I think Ryan means partition and not slice?
I would not recommend no slices at all, It's deprecated to use
dangerously dedicated disks

First of all, it's dedicated disks, there's nothing dangerous
related. :-)


Hi Polytropon
I got this from the docs somewhere, let me search
Ah the FAQ
http://www.freebsd.org/doc/en/books/faq/disks.html#DANGEROUSLY-DEDICATED

I don't think it's dangerous either.
Thanks for your explanations.



If you are using the MBR approach (old way), you can do
either creating a DOS primary partition, a slice, which
then will contain your partitions: a swap partition and
one or more UFS partitions. So you have ad0s1a, ad0s1b
and so on.

When you omit the slice and create the partitions on the bare
disk, you have a dedicated layout. FreeBSD will run with
it without any problem. It _may_ be possible that some
systems like Windows have trouble with this approach,
but if you're going to use FreeBSD only on that disk, there
is no danger, no problem. You have ad0a, ad0b and so on.

If you are using the GPT approach (new way), you create
partitions using a different tool set, setting them to be
a file system or a swap partition. You end up in ad0p1,
ad0p2 and so on. Note that those aren't DOS primary
partitions anymore, outdated systems may not properly
recognize them.

If you label your partitions (you can do that with both
approaches), you don't need to deal with device names at
all.




Starting with 9 I don't see slices in mount ouput anymore but still
there are FreeBSD partitions in slices (which is a partitions in dos terms)
Example / is now disk0p1 it used to be disk0s1a

Correct, this relation can be constructed.



To OP:

If you omit the slice and just create two partitions (one for
FS and one for swap), FreeBSD will use this fine. Just make
sure to set the boot parameters properly. Or simply use the
GPT-related tools, so you don't have to deal with the question
at all.









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


Re: Does FreeBSD start slices at head boundaries?

2012-07-06 Thread Rick Miller
[snip]

 I think Ryan means partition and not slice?
 I would not recommend no slices at all, It's deprecated to use
 dangerously dedicated disks

 First of all, it's dedicated disks, there's nothing dangerous
 related. :-)

 If you are using the MBR approach (old way), you can do
 either creating a DOS primary partition, a slice, which
 then will contain your partitions: a swap partition and
 one or more UFS partitions. So you have ad0s1a, ad0s1b
 and so on.

 When you omit the slice and create the partitions on the bare
 disk, you have a dedicated layout. FreeBSD will run with
 it without any problem. It _may_ be possible that some
 systems like Windows have trouble with this approach,
 but if you're going to use FreeBSD only on that disk, there
 is no danger, no problem. You have ad0a, ad0b and so on.

 If you are using the GPT approach (new way), you create
 partitions using a different tool set, setting them to be
 a file system or a swap partition. You end up in ad0p1,
 ad0p2 and so on. Note that those aren't DOS primary
 partitions anymore, outdated systems may not properly
 recognize them.

 If you label your partitions (you can do that with both
 approaches), you don't need to deal with device names at
 all.

Thanks for this explanation.

Is there any performance advantage to using a dedicated disk layout
over the old way of creating a slice and having your partitions within
it?

[snip]

 To OP:

 If you omit the slice and just create two partitions (one for
 FS and one for swap), FreeBSD will use this fine. Just make
 sure to set the boot parameters properly. Or simply use the
 GPT-related tools, so you don't have to deal with the question
 at all.

Thanks again for the concise explanation.
___
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: Does FreeBSD start slices at head boundaries?

2012-07-06 Thread Eitan Adler
On 6 July 2012 11:44, Rick Miller vmil...@hostileadmin.com wrote:
 Thanks for this explanation.

 Is there any performance advantage to using a dedicated disk layout
 over the old way of creating a slice and having your partitions within
 it?

Slices isn't the old way. There is no perf advantage for dedicated
disks. Maybe you get a
few kb of extra space. Don't do it.

http://www.unixguide.net/freebsd/faq/09.03.shtml

-- 
Eitan Adler
___
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: Does FreeBSD start slices at head boundaries?

2012-07-06 Thread Polytropon
On Fri, 6 Jul 2012 11:58:03 -0700, Eitan Adler wrote:
 On 6 July 2012 11:44, Rick Miller vmil...@hostileadmin.com wrote:
  Thanks for this explanation.
 
  Is there any performance advantage to using a dedicated disk layout
  over the old way of creating a slice and having your partitions within
  it?
 
 Slices isn't the old way.

Compared to the new and modern GPT, it is. :-)

However, if you keep using the old way, it will still be
supported and will not confuse either BIOSes or other systems
that are maybe installed on your machine.



 There is no perf advantage for dedicated
 disks. Maybe you get a
 few kb of extra space.

I'm also not aware of any performance issues.



 Don't do it.
 
 http://www.unixguide.net/freebsd/faq/09.03.shtml

According to the article, there are some BIOSes that don't
seem to like disks not containing a DOS primary partition
to start their boot chain. While this may be true, I have
never experienced it.

For maximum security, you can use the old approach of
using fdisk + disklabel (creating slice, creating partitions
within slice). This also delivers most compatibility for
other systems, if it should be needed, e. g. in a multiboot
environment.





-- 
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: Does FreeBSD start slices at head boundaries?

2012-07-06 Thread Michael Sierchio
On Fri, Jul 6, 2012 at 11:58 AM, Eitan Adler li...@eitanadler.com wrote:

 Slices isn't the old way. There is no perf advantage for dedicated
 disks. Maybe you get a
 few kb of extra space. Don't do it.

 http://www.unixguide.net/freebsd/faq/09.03.shtml

That is EXTREMELY old advice.  The general advice, for this and many
other things, is - don't do it, but if you do it, know what you're
doing. ;-)
___
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: Does FreeBSD start slices at head boundaries?

2012-07-06 Thread Bas Smeelen

On 07/06/2012 09:06 PM, Michael Sierchio wrote:

On Fri, Jul 6, 2012 at 11:58 AM, Eitan Adler li...@eitanadler.com wrote:


Slices isn't the old way. There is no perf advantage for dedicated
disks. Maybe you get a
few kb of extra space. Don't do it.

http://www.unixguide.net/freebsd/faq/09.03.shtml

That is EXTREMELY old advice.  The general advice, for this and many
other things, is - don't do it, but if you do it, know what you're
doing. ;-)


agree, advice: don't use dedicated disks, it might be dangerous if 
another fdisk silently modifies your disk or the BIOS does not 
understand it.

It's still in the FAQ though :)
http://www.freebsd.org/doc/en/books/faq/disks.html#DANGEROUSLY-DEDICATED






Disclaimer: http://www.ose.nl/email

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


Re: Does FreeBSD start slices at head boundaries?

2012-07-06 Thread Rick Miller
I went through this exercise to determine if there were boundary
issues installing FreeBSD on disks.  I concluded that FreeBSD was
indeed installing at head boundaries.  A colleague then pointed me to
http://ivoras.net/blog/tree/2011-01-01.freebsd-on-4k-sector-drives.html
which calls into question whether sysinstall and fdisk really are
installing FreeBSD's slice at the 64th cylinder.  Should I be
concerned with this?

This came about due to a scenario where Linux would start its
filesystem at sector 63, right before the head boundary.  On I/O
intensive applications, it was common for reads/write to cross the
head boundary resulting in unnecessary disk thrashing and long I/O
wait times.  The issue was corrected in Linux by changing the start
cylinder to 2048.  Some theorized that FreeBSD was vulnerable to this
scenario.

Thoughts/feedback?

On Fri, Jul 6, 2012 at 11:09 AM, Rick Miller vmil...@hostileadmin.com wrote:
 Hi All,

 Installing FreeBSD 8.x I select A at the fdisk partition editor to
 use the entire disk.  It creates an unused slice with offset 0 and 63
 sectors in size.  Then partition 1 starts at sector 63 and utilizes
 the remaining disk space.  Does sysinstall's diskPartitonEditor macro
 automatically start partitions at head boundaries?  The reason I ask
 is because I am most familiar with sector 64 being the start of a head
 boundary as opposed to 63.  Is my understanding incorrect?

 --
 Take care
 Rick Miller



-- 
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: Does FreeBSD start slices at head boundaries?

2012-07-06 Thread Warren Block

On Fri, 6 Jul 2012, Polytropon wrote:


For maximum security, you can use the old approach of
using fdisk + disklabel (creating slice, creating partitions
within slice). This also delivers most compatibility for
other systems, if it should be needed, e. g. in a multiboot
environment.


gpart(8) can create MBR slice/partition layouts (and GPT and other 
partition schemes).  See the man page.  There is little reason to use 
fdisk and bsdlabel any more.

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


Re: Partitioning with gpart or old style slices?

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

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

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

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


Re: Partitioning with gpart or old style slices?

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

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

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

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


Re: Partitioning with gpart or old style slices?

2011-06-05 Thread Erik Nørgaard

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

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

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


You need to install the bootcode:

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

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


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


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


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


Re: Partitioning with gpart or old style slices?

2011-06-05 Thread Warren Block

On Sat, 4 Jun 2011, Robert Simmons wrote:


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

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

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


Looks good.  I have a few critiques:

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


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



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


Yikes, yes.


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


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


Partitioning with gpart or old style slices?

2011-06-04 Thread Erik Nørgaard

Hi:

I just realized how many years ago I haven't been partitioning any disks 
.. this system is so stable :) So, now I see I have gpart as alternative 
to fdisk/bsdlabel.


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


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


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


Re: Partitioning with gpart or old style slices?

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

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

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


Re: Partitioning with gpart or old style slices?

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

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


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

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


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

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


Re: Partitioning with gpart or old style slices?

2011-06-04 Thread Warren Block

On Sat, 4 Jun 2011, Robert Simmons wrote:


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


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


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

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


Re: Partitioning with gpart or old style slices?

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

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

Looks good.  I have a few critiques:

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

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

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

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


Re: Partitioning with gpart or old style slices?

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

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

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

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

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

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

matthias

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


Re: Partitioning with gpart or old style slices?

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

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

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



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

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





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


Re: Partitioning with gpart or old style slices?

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

You need to install the bootcode:

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

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


Re: Partitioning with gpart or old style slices?

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

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

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

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

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

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


Re: Partitioning with gpart or old style slices?

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

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

 You need to install the bootcode:

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

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


This is interesting and here is my question:

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

gpart destroy ad4 ??

Why is there no sysinstall-style GUI for gpart?


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

Re: Partitioning with gpart or old style slices?

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

 You need to install the bootcode:

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

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


 This is interesting and here is my question:

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

 gpart destroy ad4 ??

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

 Why is there no sysinstall-style GUI for gpart?

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


my slices are gone

2009-12-03 Thread Tom Worster
using sysinstall on the 8.0-RELEASE ISO Disk 1, i looked at the status of
the disks and found some alarming things:

the label editor shows no labels on either disk. that seems pretty bad.

and the slice editor says:

Disk slicing warning:
chunk 'ad6p1' [40..409639] does not start on a track boundary
chunk 'ad6p2' [409640..1464784583] does not start on a track boundary

which seems pretty bad in two different ways.

would anyone disagree that freebsd-update -r 8.0-RELEASE upgrade has left
this system unusable and the only next step is reformat at reinstall (that
old windows routine)?

tom


 On 12/3/09 11:14 AM, Tom Worster f...@thefsb.org wrote:
 
 after running freebsd-update -r 8.0-RELEASE upgrade my system won't boot. it
 gets stuck on mountroot and i can't find the magic word it wants.
 
 the system used to have two sata drives /dev/ad4 and ad6. they were
 partitioned and sliced using the deafaults that sysinstall suggested.
 
 at the boot prompt, lsdev says:
 
 disk devices
   disk0: BIOS drive C:
 disk0s1a: FFS
 disk0s1b: swap
 disk0s1d: FFS
 disk0s1e: FFS
 disk0s1f: FFS
disk1: BIOS drive D:
 disk1s1a: FFS
 disk1s1b: swap
 disk1s1d: FFS
 disk1s1e: FFS
 disk1s1f: FFS
 
 which looks right, although i'm not familiar with the disk nomenclature.
 
 entering ? at mountroot mentions ad4 and ad6.
 
 geom_mirror was being used.
 
 i've tried saying load geom_mirror and/or enable-module geom_mirror at
 the 
 boot prompt. neither made any difference.
 
 nothing i've said to mountroot works:
 
 ufs:/dev/ad4s1a
 ufs:/dev/ad6s1a
 ufs:/dev/mirror/gm0s1a
 ufs:/dev/disk0s1a
 ufs:/dev/disk1s1a
 
 does anyone know the magic word? i'd be very grateful.
 
 and i'm not getting anywhere with fixit using livefs. it says: ldconfig could
 not create the ld.so hints file and indeed programs like ls fail in a most
 ugly manner.
 
 is there anything useful to be done with the holographic shell? the only mount
 i can find is mount_nfs.


___
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: my slices are gone

2009-12-03 Thread David Rawling
-Original Message-
From: owner-freebsd-questi...@freebsd.org on behalf of Tom Worster
Sent: Fri 4/12/2009 8:19 AM
To: freebsd-questions@freebsd.org
Subject: my slices are gone
 
using sysinstall on the 8.0-RELEASE ISO Disk 1, i looked at the status of
the disks and found some alarming things:

the label editor shows no labels on either disk. that seems pretty bad.

and the slice editor says:

Disk slicing warning:
chunk 'ad6p1' [40..409639] does not start on a track boundary
chunk 'ad6p2' [409640..1464784583] does not start on a track boundary

which seems pretty bad in two different ways.

would anyone disagree that freebsd-update -r 8.0-RELEASE upgrade has left
this system unusable and the only next step is reformat at reinstall (that
old windows routine)?

I'm barely starting off in the FreeBSD world after a long hiatus, but might
you perchance have been using Dangerously Dedicated disks? It doesn't seem to
match the disk layout but you never know.

Lots of people have had trouble since DD mode disappeared (it took me ages to
figure out why my VMs with DD mode always broke).

Dave.
--
David Rawling
PD Consulting And Security
Email: d...@pdconsec.net
___
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: my slices are gone

2009-12-03 Thread Tom Worster
On 12/3/09 4:34 PM, David Rawling d...@pdconsec.net wrote:

 -Original Message-
 From: owner-freebsd-questi...@freebsd.org on behalf of Tom Worster
 Sent: Fri 4/12/2009 8:19 AM
 To: freebsd-questions@freebsd.org
 Subject: my slices are gone
 
 using sysinstall on the 8.0-RELEASE ISO Disk 1, i looked at the status of
 the disks and found some alarming things:
 
 the label editor shows no labels on either disk. that seems pretty bad.
 
 and the slice editor says:
 
 Disk slicing warning:
 chunk 'ad6p1' [40..409639] does not start on a track boundary
 chunk 'ad6p2' [409640..1464784583] does not start on a track boundary
 
 which seems pretty bad in two different ways.
 
 would anyone disagree that freebsd-update -r 8.0-RELEASE upgrade has left
 this system unusable and the only next step is reformat at reinstall (that
 old windows routine)?
 
 I'm barely starting off in the FreeBSD world after a long hiatus, but might
 you perchance have been using Dangerously Dedicated disks? It doesn't seem to
 match the disk layout but you never know.
 
 Lots of people have had trouble since DD mode disappeared (it took me ages to
 figure out why my VMs with DD mode always broke).

i don't really see why this should have been working and then stop working
on a freebsd-update.


___
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: my slices are gone

2009-12-03 Thread David Rawling
-Original Message-
From: Tom Worster [mailto:f...@thefsb.org]
Subject: Re: my slices are gone
 
On 12/3/09 4:34 PM, David Rawling d...@pdconsec.net wrote:

 I'm barely starting off in the FreeBSD world after a long hiatus, but might
 you perchance have been using Dangerously Dedicated disks? It doesn't seem to
 match the disk layout but you never know.
 
 Lots of people have had trouble since DD mode disappeared (it took me ages to
 figure out why my VMs with DD mode always broke).

i don't really see why this should have been working and then stop working
on a freebsd-update.

I should have clarified - FreeBSD 8.0 seems to have done away with DD disks
completely. They are no longer configurable in sysinstall, for example, and I
have seen reports of failure with the 8.0 kernels on existing DD systems, after
freebsd-update.

Dave.
--
David Rawling
PD Consulting And Security
Email: d...@pdconsec.net

___
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


cannot mount slices of usbdrive

2009-05-01 Thread till plewe
I have a  usbdrive which was used on FreeBSD 6 or 7 but cannot
be mounted now (on CURRENT with generic kernel). The drive is
recognized but the individual slices do not seem to exist (see below).

Any pointers on how to recover the content of the disk would be appreciated.
I was thinking of building a new disk label from the fdisk output but
am not sure
that I understand what is involved properly (where does the in-core disklabel
fdisk uses come from?)

1) # mount /dev/da1s1 /mnt1
mount: /dev/da1s1 : No such file or directory
-
2) # dmesg
da1 at umass-sim2 bus 2 target 0 lun 0
da1: SAMSUNG HD753LJ  Fixed Direct Access SCSI-2 device
da1: 40.000MB/s transfers
da1: 715404MB (1465149168 512 byte sectors: 255H 63S/T 91201C)

3) # bsdlabel /dev/da1
# /dev/da1:
8 partitions:
#size   offsetfstype   [fsize bsize bps/cpg]
  a: 1465149152   16unused0 0
  c: 14651491680unused0 0 # raw
part, don't edit

4) # fdisk /dev/da1
*** Working on device /dev/da1 ***
parameters extracted from in-core disklabel are:
cylinders=91201 heads=255 sectors/track=63 (16065 blks/cyl)

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

Media sector size is 512
Warning: BIOS sector numbering starts with sector 1
Information from DOS bootblock is:
The data for partition 1 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
start 63, size 377479242 (184316 Meg), flag 80 (active)
beg: cyl 0/ head 1/ sector 1;
end: cyl 1023/ head 254/ sector 63
The data for partition 2 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
start 377479305, size 377479305 (184316 Meg), flag 80 (active)
beg: cyl 1023/ head 255/ sector 63;
end: cyl 1023/ head 254/ sector 63
The data for partition 3 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
start 754958610, size 377479305 (184316 Meg), flag 80 (active)
beg: cyl 1023/ head 255/ sector 63;
end: cyl 1023/ head 254/ sector 63
The data for partition 4 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
start 1132437915, size 332706150 (162454 Meg), flag 80 (active)
beg: cyl 1023/ head 255/ sector 63;
end: cyl 1023/ head 254/ sector 63

5) # fdisk /dev/da1s1
fdisk: unable to get correct path for /dev/da1s1: No such file or directory
___
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: cannot mount slices of usbdrive

2009-05-01 Thread Matthias Apitz
El día Saturday, May 02, 2009 a las 01:06:09PM +0900, till plewe escribió:

 I have a  usbdrive which was used on FreeBSD 6 or 7 but cannot
 be mounted now (on CURRENT with generic kernel). The drive is
 recognized but the individual slices do not seem to exist (see below).
...

I have had the same problem: booting CURRENT from an USB key and wanting
to get access to the SSD partitions created with RELENG_7 kernel in the
EeePC. I've found no way to do and labeled the SSD from scratch (had
even to overwrite the 1st blocks with dd(1) to make fdisk(1M) create
partitions there).

In your case: boot a RELENG_7 rescue CD, mount the usbdrive and backup
the data (via LAN) to some other place.

matthias

-- 
Matthias Apitz
Manager Technical Support - OCLC GmbH
Gruenwalder Weg 28g - 82041 Oberhaching - Germany
t +49-89-61308 351 - f +49-89-61308 399 - m +49-170-4527211
e matthias.ap...@oclc.org - w http://www.oclc.org/ http://www.UnixArea.de/
People who hate Microsoft Windows use Linux but people who love UNIX use 
FreeBSD.
___
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: cannot mount slices of usbdrive

2009-05-01 Thread till plewe
On 5/2/09, Matthias Apitz g...@unixarea.de wrote:
 El día Saturday, May 02, 2009 a las 01:06:09PM +0900, till plewe escribió:

 I have a  usbdrive which was used on FreeBSD 6 or 7 but cannot
 be mounted now (on CURRENT with generic kernel). The drive is
 recognized but the individual slices do not seem to exist (see below).
 ...

 I have had the same problem: booting CURRENT from an USB key and wanting
 to get access to the SSD partitions created with RELENG_7 kernel in the
 EeePC. I've found no way to do and labeled the SSD from scratch (had
 even to overwrite the 1st blocks with dd(1) to make fdisk(1M) create
 partitions there).

 In your case: boot a RELENG_7 rescue CD, mount the usbdrive and backup
 the data (via LAN) to some other place.

   matthias


Thanks. That sounds much more reasonable than what I was planning to do.
I don't know why I wasn't thinking of the rescue CDs (most likely
since I did not
have to use them before).
I'll give it a try once I find a big enough backup disk.

- Till


 --
 Matthias Apitz
 Manager Technical Support - OCLC GmbH
 Gruenwalder Weg 28g - 82041 Oberhaching - Germany
 t +49-89-61308 351 - f +49-89-61308 399 - m +49-170-4527211
 e matthias.ap...@oclc.org - w http://www.oclc.org/ http://www.UnixArea.de/
 People who hate Microsoft Windows use Linux but people who love UNIX use
 FreeBSD.

___
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


slices to dangerously dedicated

2009-01-20 Thread Robert Huff

Suppose I have a disk which was - for various reasons - lebeled
using slices.
Is it possible to change it to dangerously dedicated without
backup-wipe-relabel-restore cycle?


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: slices to dangerously dedicated

2009-01-20 Thread Chuck Swiger

On Jan 20, 2009, at 11:47 AM, Robert Huff wrote:

Suppose I have a disk which was - for various reasons - lebeled
using slices.  Is it possible to change it to dangerously  
dedicated without

backup-wipe-relabel-restore cycle?


Nope.  Since you'd only gain a megabyte of disk space (probably less)  
from the change, it's not worth bothering with, frankly...


Regards,
--
-Chuck

___
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: slices to dangerously dedicated

2009-01-20 Thread Jerry McAllister
On Tue, Jan 20, 2009 at 02:47:24PM -0500, Robert Huff wrote:

 
   Suppose I have a disk which was - for various reasons - lebeled
 using slices.
   Is it possible to change it to dangerously dedicated without
 backup-wipe-relabel-restore cycle?
 

Not really.And why would you want to?
Just leave it.   You will gain nothing by the change.  

jerry


 
   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
___
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: slices to dangerously dedicated

2009-01-20 Thread Wojciech Puchar
using live CD/DVD make your new disklabel that mirrors existing but is in 
/dev/disk not /dev/diskslice, check it (try mount -r your partitions from 
/dev/disk[a-h]), clean MBR with fdisk, install bootrecord with


bsdlabel -B /dev/disk

then mount your / partition and fix etc/fstab

it's not just about having few kB more space, but NOT having MS-partition 
table. for religious reason, for making thing simpler or less risky if 
you sometimes connect that drive to computer running windoze.

___
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: slices to dangerously dedicated

2009-01-20 Thread Maxim Khitrov
On Tue, Jan 20, 2009 at 2:47 PM, Robert Huff roberth...@rcn.com wrote:

Suppose I have a disk which was - for various reasons - lebeled
 using slices.
Is it possible to change it to dangerously dedicated without
 backup-wipe-relabel-restore cycle?


Robert Huff

It is possible, but is probably a bad idea (it all depends on why you
want to do this). I just ran a quick test in a virtual machine with a
clean drive. The procedure was:

# sysinstall (run the Fdisk tool to create a single s1 slice on /dev/da4)
# bsdlabel -w /dev/da4s1
# newfs -U /dev/da4s1a
# mount /dev/da4s1a /mnt
# echo hello  /mnt/world
# umount /mnt
# fdisk (to find the starting block of s1)
# sysctl kern.geom.debugflags=0x10 (may not be needed)
# dd if=/dev/da4 of=/dev/da4 bs=16k skip=1 (might also want to specify
'count=' to limit the amount of data copied)
# reboot

After the reboot, I could mount /dev/da4a and read the original
contents, s1 was no more. The key to getting it right is proper input
positioning; you cannot do something like `dd if=/dev/da4s1
of=/dev/da4`. In my case, s1 started at block 32, so I set my dd block
size to 16k and skipped the first block, placing me exactly at the
start of s1 (512 * 32 = 16384 or 16k). You really don't want to copy
one sector at a time (bs=512), and in my case, 16k is the highest that
I could go. If you are moving some other slice like s2, you can set bs
to 1 or 2 megs and just do proper calculation for what skip should be
set to (bs * skip should equal 512 * staring block as reported by
fdisk).

Realize, however, that this isn't exactly the same as creating a
dangerously dedicated disk from the start. You're just moving the
first (or whatever slice you need) to the start of the drive along
with any data that follows. You will not reclaim any disk space this
way, though you may be able to use bsdlabel and growfs later to expand
your partitions.

Good luck!
- Max

P.S. Once again would like to emphasize that I would never do this on
any real data because of the risks involved, but it was a fun exercise
to try :)
___
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: gjournal: journaled slices vs. journaled partitions

2008-11-04 Thread Volodymyr Kostyrko

Carl wrote:

Volodymyr Kostyrko wrote:

I have some setups were gjournal was put on device rather the on 
partition, i.e.:


[umgah] ~ gmirror status
  NameStatus  Components
mirror/umgah0  COMPLETE  ad0
  ad1
[umgah] ~ gjournal status
  Name  Status  Components
mirror/umgah0.journal N/A  mirror/umgah0
[umgah] ~ glabel status
 Name  Status  Components
   ufs/umgah0root N/A  mirror/umgah0.journala
label/umgah0swap N/A  mirror/umgah0.journalb
ufs/umgah0usr N/A  mirror/umgah0.journald
ufs/umgah0var N/A  mirror/umgah0.journale


Does the above suggest that you've ended up with individual journal 
providers for each partition anyway? If so, where are they and have you 
really achieved anything functionally different? Are they at the end of 
their individually associated partitions or all together somewhere else? 
Has the ill-advised journaled small partition issue been successfully 
overcome through what you've done?


First, there is only one journal - for /dev/mirror/umgah0 and it is 
named /dev/mirror/umgah0.journal. Anything else is just a bsdlabel 
partitions, there are four of 'em.





[umgah] ~ mount
/dev/ufs/umgah0root on / (ufs, asynchronous, local, noatime, gjournal)
devfs on /dev (devfs, local)
/dev/md0 on /tmp (ufs, asynchronous, local)
/dev/ufs/umgah0var on /var (ufs, asynchronous, local, noatime, gjournal)
/dev/ufs/umgah0usr on /usr (ufs, asynchronous, local, noatime, gjournal)
devfs on /var/named/dev (devfs, local)

And yes, mirror autosynchronization is turned off, gjournal takes care 
of that too.


It's not stated in manual, but gjournal is typically transparent for 
any type of access, just in case of UFS file system is marked as 
journaled so any metadata writes can be distinguished from data 
writes. Without that gjournal does literally nothing.


And what does this mean for your swap partition?


Just nothing, it's just swap. It can't be journaled.


Laszlo Nagy wrote earlier:

Another tricky question: why would you journal a SWAP partition?


Volodymyr, does your assertion that gjournal does nothing when a file 
system is not UFS mean that there is no penalty with regard to your swap 
partition despite the existence of mirror/umgah0.journalb?


I haven't seen any perfomance decrease in this configuration. And 
according to manual and articles about gjournal it should work this way.


Any chance you'd like to share your command sequence for constructing 
your gmirror'd and gjournal'd filesystem, Volodymyr? :-)


If we have two disks (ad0, ad1) it should look like this:

 gmirror label -b load -n umgah0 ad1

We are getting all drive gmirrored without synchronization (we don't 
need it - journal would take care of any discrepancies) and with load 
balance (load was fixed not so long ago in stable and should be fine to 
go with).


 gjournal label mirror/umgah0

We are creating a journal on top of our gmirror. It eats 1G from the end 
of the disks and gives us the rest to use.


 bsdlabel -wB mirror/umgah0.journal

We are writing the standard bsdlabel to the disk and making it bootable. 
After that we will get one partition 'a'.


spam
Yes, no fdisk. I don't think this old piece of rough junk is ever needed 
on machine running FreeBSD solely. It just takes space, it requires 
compatibility to forgotten-and-abandoned standards and gives nothing 
more. You have your server dual-booting Windows or Linux? This is the 
only case you need fdisk for.

/spam

 bsdlabel -e mirror/umgah0.journal

Now we are splitting our journal to some partitions. I did it this way:

# /dev/mirror/umgah0.journal:
8 partitions:
#size   offsetfstype   [fsize bsize bps/cpg]
  a:   524288   164.2BSD
  b: 16777216   *  swap
  c: 7793256140unused0 0 # raw part, 
don't edit

  d: 33554432 *4.2BSD
  e: * *4.2BSD

After that we can format this filesystems:

 newfs -J -L umgah0root /dev/mirror/umgah0.journala
 newfs -J -L umgah0var /dev/mirror/umgah0.journald
 newfs -J -L umgah0usr /dev/mirror/umgah0.journale

And label the swap:

 glabel label umgah0swap /dev/mirror/umgah0.journalb

You can skip all this glabel thing, I just prefer to have slim fstab, as 
slim as possible.


fstab
/dev/label/umgah0swap none swap sw 0 0

md /tmp mfs rw,-s1024m,-S,-oasync 0 0

/dev/ufs/umgah0root / ufs rw,async,noatime 0 1
/dev/ufs/umgah0var /var ufs rw,async,noatime 0 2
/dev/ufs/umgah0usr /usr ufs rw,async,noatime 0 2
/fstab

There's a lot more here to describe from moving system to newly created 
partitions to inserting and rebuilding our first disk to gmirror. All 
this issues are described in handbook or other articles found on the net.


--
Sphinx of black quartz judge my vow.

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


Re: gjournal: journaled slices vs. journaled partitions

2008-11-04 Thread Gabriel Lavoie
Hello,
 I built a similar setup last weekend on a new home server with two
500GB drives. I didn't want to only put gmirror and have full drives rebuild
on power failure/reset on the system. I was told that putting bsdlabels on a
gjournal provider wasn't a good idea but I have yet to have an answer about
why... I went with this setup anyway and I made some reset tests to see what
happens on reboot and everything always went fine.

When building this setup I got one big problem. If the root filesystem (/)
was on a gjournal provider, an unclean shutdown when data was being written
on the disk rendered the system completely unbootable. I got this message:

GEOM_MIRROR: Device mirror/gm launched (2/2)
GEOM_JOURNAL: Journal 3672855181: mirror/gma contains data.
GEOM_JOURNAL: Journal 3672855181: mirror/gma contains journal.
GEOM_JOURNAL: Journal 3868799910: mirror/gmd contains data.
GEOM_JOURNAL: Journal 3868799910: mirror/gmd contains journal.
GEOM_JOURNAL: Journal mirror/gmd consistent.
Trying to mount root from ufs:/dev/mirror/gm.journal

Manual root filesystem specification:
fstype:device  Mount device using filesystem fstype
   eg. ufs:da0s1a
? List valid disk boot devices
empty line  Abort manual input


mountroot ?

List of GEOM managed disk devices:
 mirror/gmd.journal mirror/gmd mirror/gmc mirror/gma mirror/gm ad10s1c
ad10s1b ad8s1c ad8s1b ad10s2 ad10s1 ad8s1 ad10 ad8 acd0


As you can see, in the proposed list of disk devices devices to boot on,
mirror/gm.journala is absent. As I and Ivan Voras, that I contacted about
this problem, found, the GEOM_JOURNAL thread that is supposed to mark the
journal consistent takes too much time to do it with the root filesystem's
provider and the kernel try to mount a device that doesn't yet exist. A bug
report has been opened about this problem. For my final setup I decided to
put the root filesystem on a separate mirrorred slice of 1GB. Since this
slice isn't often written on, not many rebuilds should occur in case of
power failure. And I made my power failure test by hitting the reset
button while writing data on this filesystem and the rebuild on 1GB doesn't
takes too much time (at most 20-30 seconds).

Now I have the question. Why the load algorith wasn't recommended? Is it
fixed in 7.0-RELEASE-p5?

Here is my complete setup that seems to boot correctly every times I made my
reset tests while writing data on each filesystems. The 2GB gjournal
provider is directly on the mirror provider for all mirrored filesystems
exept the root one and I made my bsd labels on the gjournal provider,
instead of creating a journal for every filesystem.


[EMAIL PROTECTED] ~]# cat /etc/fstab
# DeviceMountpoint  FStype  Options Dump
Pass#
/dev/ad10s1bnoneswapsw  0   0
/dev/ad8s1b noneswapsw  0   0
/dev/mirror/root/   ufs rw  1   1
/dev/ufs/usr/usrufs rw,async2   2
/dev/ufs/var/varufs rw,async2   2
/dev/ufs/tmp/tmpufs rw,async2   2
/dev/ufs/home   /home   ufs rw,async2   2
/dev/ufs/data   /mnt/data   ufs rw,async2   2
/dev/acd0   /cdrom  cd9660  ro,noauto   0   0


[EMAIL PROTECTED] ~]# mount
/dev/mirror/root on / (ufs, local, soft-updates)
devfs on /dev (devfs, local)
/dev/ufs/usr on /usr (ufs, asynchronous, local, gjournal)
/dev/ufs/var on /var (ufs, asynchronous, local, gjournal)
/dev/ufs/tmp on /tmp (ufs, asynchronous, local, gjournal)
/dev/ufs/home on /home (ufs, asynchronous, local, acls, gjournal)
/dev/ufs/data on /mnt/data (ufs, asynchronous, local, acls, gjournal)


[EMAIL PROTECTED] ~]# glabel status
Name  Status  Components
 ufs/usr N/A  mirror/data.journald
 ufs/var N/A  mirror/data.journale
 ufs/tmp N/A  mirror/data.journalf
ufs/home N/A  mirror/data.journalg
ufs/data N/A  mirror/data.journalh


[EMAIL PROTECTED] ~]# gjournal list
Geom name: gjournal 372943514
ID: 372943514
Providers:
1. Name: mirror/data.journal
   Mediasize: 495810966528 (462G)
   Sectorsize: 512
   Mode: r5w5e11
Consumers:
1. Name: mirror/data
   Mediasize: 497958450688 (464G)
   Sectorsize: 512
   Mode: r1w1e1
   Jend: 497958450176
   Jstart: 495810966528
   Role: Data,Journal


[EMAIL PROTECTED] ~]# gmirror list
Geom name: data
State: COMPLETE
Components: 2
Balance: split
Slice: 4096
Flags: NOFAILSYNC
GenID: 0
SyncID: 1
ID: 990032118
Providers:
1. Name: mirror/data
   Mediasize: 497958450688 (464G)
   Sectorsize: 512
   Mode: r1w1e1
Consumers:
1. Name: ad8s2
   Mediasize: 497958451200 (464G)
   Sectorsize: 512
   Mode: r1w1e1
   State: ACTIVE
   Priority: 0
   Flags: HARDCODED
   GenID: 0
   SyncID: 1
   ID: 235591066
2. 

Re: gjournal: journaled slices vs. journaled partitions

2008-11-04 Thread Gabriel Lavoie
2008/11/4 Volodymyr Kostyrko [EMAIL PROTECTED]

 2008/11/4 Gabriel Lavoie [EMAIL PROTECTED]:
  When building this setup I got one big problem. If the root filesystem
 (/)
  was on a gjournal provider, an unclean shutdown when data was being
 written
  on the disk rendered the system completely unbootable. I got this
 message:
 
  GEOM_MIRROR: Device mirror/gm launched (2/2)
  GEOM_JOURNAL: Journal 3672855181: mirror/gma contains data.
  GEOM_JOURNAL: Journal 3672855181: mirror/gma contains journal.
  GEOM_JOURNAL: Journal 3868799910: mirror/gmd contains data.
 
  GEOM_JOURNAL: Journal 3868799910: mirror/gmd contains journal.
  GEOM_JOURNAL: Journal mirror/gmd consistent.

 Just one thing - you have two separate journaled partitions, one
 journal per one partition.


Yes, this is the test setup I made with one journal for / and one journal
for /usr. Only an unclean journal on / rendered the journal unbootable. An
unclean journal on /usr gave me no problem.

If I put the journal on the slice level, with the root filesystem over the
journal. Resetting the system while writing data on any filesystem causes
the problem as the journal is shared to the root filesystem too.




  Trying to mount root from ufs:/dev/mirror/gm.journal
 
  Manual root filesystem specification:
  fstype:device  Mount device using filesystem fstype
 
 eg. ufs:da0s1a
  ? List valid disk boot devices
  empty line  Abort manual input
 
 
  mountroot ?
 
  List of GEOM managed disk devices:
 
   mirror/gmd.journal mirror/gmd mirror/gmc mirror/gma mirror/gm
 ad10s1c
  ad10s1b ad8s1c ad8s1b ad10s2 ad10s1 ad8s1 ad10 ad8 acd0
 
  As you can see, in the proposed list of disk devices devices to boot on,
  mirror/gm.journala is absent. As I and Ivan Voras, that I contacted
 about
  this problem, found, the GEOM_JOURNAL thread that is supposed to mark the
  journal consistent takes too much time to do it with the root
 filesystem's
  provider and the kernel try to mount a device that doesn't yet exist. A
 bug
  report has been opened about this problem. For my final setup I decided
 to
  put the root filesystem on a separate mirrorred slice of 1GB. Since this
  slice isn't often written on, not many rebuilds should occur in case of
  power failure. And I made my power failure test by hitting the reset
  button while writing data on this filesystem and the rebuild on 1GB
 doesn't
  takes too much time (at most 20-30 seconds).

 Good to hear it, i've fallen for that too, but the machine isn't
 powercycled at all and runs on guaranteed power. I had the similar
 problems with described setup on virtual test machine too, yet
 entering anything at mountroot prompt gave gjournal a chance to keep
 up and needed partition comes up eventually... I didn't reported that,
 thought it was a virtual machine issue.


Same thing here, I had a backup installation on another slice and when I
gave this one on the prompt, as soon as I hit Enter, GEOM_JOURNAL was
marking the journal consistent. I'm happy to hear that I'm not the only one
that had this problem. As for my setup. I put / on its own 1GB mirrored
slice with auto-synchronization and soft-updates and I put the other
filesystems (/home /usr /var /tmp) on a second fully mirrored/journalised
slice (with the journal at the slice level), with auto-synchronization on
power failure turned off and async mount option.

As for the bug report, I consider this is an easily reproductible bug and I
hope it will be solved soon! :)



  Now I have the question. Why the load algorith wasn't recommended? Is
 it
  fixed in 7.0-RELEASE-p5?

 Nope...

 http://www.freebsd.org/cgi/query-pr.cgi?pr=113885

 --
 Sphinx of black quartz judge my vow.



Gabriel

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


Re: gjournal: journaled slices vs. journaled partitions

2008-11-04 Thread Volodymyr Kostyrko
2008/11/4 Gabriel Lavoie [EMAIL PROTECTED]:
 When building this setup I got one big problem. If the root filesystem (/)
 was on a gjournal provider, an unclean shutdown when data was being written
 on the disk rendered the system completely unbootable. I got this message:

 GEOM_MIRROR: Device mirror/gm launched (2/2)
 GEOM_JOURNAL: Journal 3672855181: mirror/gma contains data.
 GEOM_JOURNAL: Journal 3672855181: mirror/gma contains journal.
 GEOM_JOURNAL: Journal 3868799910: mirror/gmd contains data.

 GEOM_JOURNAL: Journal 3868799910: mirror/gmd contains journal.
 GEOM_JOURNAL: Journal mirror/gmd consistent.

Just one thing - you have two separate journaled partitions, one
journal per one partition.

 Trying to mount root from ufs:/dev/mirror/gm.journal

 Manual root filesystem specification:
 fstype:device  Mount device using filesystem fstype

eg. ufs:da0s1a
 ? List valid disk boot devices
 empty line  Abort manual input


 mountroot ?

 List of GEOM managed disk devices:

  mirror/gmd.journal mirror/gmd mirror/gmc mirror/gma mirror/gm ad10s1c
 ad10s1b ad8s1c ad8s1b ad10s2 ad10s1 ad8s1 ad10 ad8 acd0

 As you can see, in the proposed list of disk devices devices to boot on,
 mirror/gm.journala is absent. As I and Ivan Voras, that I contacted about
 this problem, found, the GEOM_JOURNAL thread that is supposed to mark the
 journal consistent takes too much time to do it with the root filesystem's
 provider and the kernel try to mount a device that doesn't yet exist. A bug
 report has been opened about this problem. For my final setup I decided to
 put the root filesystem on a separate mirrorred slice of 1GB. Since this
 slice isn't often written on, not many rebuilds should occur in case of
 power failure. And I made my power failure test by hitting the reset
 button while writing data on this filesystem and the rebuild on 1GB doesn't
 takes too much time (at most 20-30 seconds).

Good to hear it, i've fallen for that too, but the machine isn't
powercycled at all and runs on guaranteed power. I had the similar
problems with described setup on virtual test machine too, yet
entering anything at mountroot prompt gave gjournal a chance to keep
up and needed partition comes up eventually... I didn't reported that,
thought it was a virtual machine issue.

 Now I have the question. Why the load algorith wasn't recommended? Is it
 fixed in 7.0-RELEASE-p5?

Nope...

http://www.freebsd.org/cgi/query-pr.cgi?pr=113885

-- 
Sphinx of black quartz judge my vow.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: gjournal: journaled slices vs. journaled partitions

2008-11-04 Thread Volodymyr Kostyrko

Carl wrote:

So how do I achieve per-slice journaling instead of per-partition?
The docs only says this: gjournal only supports UFS2. It does not 
specifically say that you cannot have per-slice journaling. However, 
since you could have other filesystems on your slice, I bet that slice 
based journaling is not supported.


I thought I read somewhere that because gjournal is block based and not 
really part of the filesystem, that it could easily be extended for any 
other filesystem. My imagination said that gjournal was probably 
therefore only temporarily limited to a slice full of UFS partitions. 
Anyone know for sure?


gjournal needs to know what what data is actually metadata. In case of 
UFS the -J flag given to newfs tells system that using this fs we should 
mark metadata for gjournal use.



Another tricky question: why would you journal a SWAP partition?


Well, I don't really want to, but how big does a partition like /var 
have to be before it's no longer ill-advised to journal it individually? 
A fair bit of writing can occur in /var and the scenario my server will 
occupy has me concerned about inglorious shutdowns.


What are the actual reasons for why journaling a small partition is 
considered a bad idea?


Journal needs to bee big enough to amass all modifications. By default 
it's 1G. Just compare this to the size of your /var.


--
Sphinx of black quartz judge my vow.

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


Re: gjournal: journaled slices vs. journaled partitions

2008-10-21 Thread Carl

Laszlo Nagy wrote:

So how do I achieve per-slice journaling instead of per-partition?
The docs only says this: gjournal only supports UFS2. It does not 
specifically say that you cannot have per-slice journaling. However, 
since you could have other filesystems on your slice, I bet that slice 
based journaling is not supported.


I thought I read somewhere that because gjournal is block based and not 
really part of the filesystem, that it could easily be extended for any 
other filesystem. My imagination said that gjournal was probably 
therefore only temporarily limited to a slice full of UFS partitions. 
Anyone know for sure?



Another tricky question: why would you journal a SWAP partition?


Well, I don't really want to, but how big does a partition like /var 
have to be before it's no longer ill-advised to journal it individually? 
A fair bit of writing can occur in /var and the scenario my server will 
occupy has me concerned about inglorious shutdowns.


What are the actual reasons for why journaling a small partition is 
considered a bad idea?


Carl / K0802647

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


Re: gjournal: journaled slices vs. journaled partitions

2008-10-21 Thread Volodymyr Kostyrko

Carl wrote:
My goal is to build a 2-disk server configured with gmirror and gjournal 
for maximum reliability. There will never be a second operating system 
on the system, but I prefer not to freak out any non-FreeBSD repair 
tools that might be used, so I will use compatibility instead of 
dangerously dedicated mode. This means I need one slice, but see no 
reason for more. Inside that one slice will be the usual array of 
partitions (ie. /, swap, /var, /tmp, /usr, /data).


Now, I think gmirror allows me to mirror the entire drive rather than 
forcing me to do per-slice or even per-partition mirroring. I'm looking 
for the simplest in-field replacement procedure when one of the drives 
dies and I imagine a whole drive mirror achieves this. Am I right?


gjournal, OTOH, has me really confused. The man page for gjournal(8) 
specifically does not recommend that small partitions be journaled. I 
assume that's because the journal provider rivals the partition in size 
and is therefore overhead heavy. It seems to me, though, that if I can 
journal the slice as a whole instead of per-partition journaling, that 
there will essentially then be only one journal provider for the 
combination of all partitions (ie. slice) and that the aforementioned 
overhead becomes minor. Having smaller partitions included in journaling 
 seems like a good thing to me. So how do I achieve per-slice journaling 
instead of per-partition? Every time I read up on someone else's 
gjournal implementation, it seems to end with adding partition.journal 
entries to /etc/fstab. Am I trying to achieve the impossible or 
ill-advised here?


I have some setups were gjournal was put on device rather the on 
partition, i.e.:


[umgah] ~ gmirror status
 NameStatus  Components
mirror/umgah0  COMPLETE  ad0
 ad1
[umgah] ~ gjournal status
 Name  Status  Components
mirror/umgah0.journal N/A  mirror/umgah0
[umgah] ~ glabel status
Name  Status  Components
  ufs/umgah0root N/A  mirror/umgah0.journala
label/umgah0swap N/A  mirror/umgah0.journalb
   ufs/umgah0usr N/A  mirror/umgah0.journald
   ufs/umgah0var N/A  mirror/umgah0.journale
[umgah] ~ mount
/dev/ufs/umgah0root on / (ufs, asynchronous, local, noatime, gjournal)
devfs on /dev (devfs, local)
/dev/md0 on /tmp (ufs, asynchronous, local)
/dev/ufs/umgah0var on /var (ufs, asynchronous, local, noatime, gjournal)
/dev/ufs/umgah0usr on /usr (ufs, asynchronous, local, noatime, gjournal)
devfs on /var/named/dev (devfs, local)

And yes, mirror autosynchronization is turned off, gjournal takes care 
of that too.


It's not stated in manual, but gjournal is typically transparent for any 
type of access, just in case of UFS file system is marked as journaled 
so any metadata writes can be distinguished from data writes. Without 
that gjournal does literally nothing.


--
Sphinx of black quartz judge my vow.

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


Re: gjournal: journaled slices vs. journaled partitions

2008-10-21 Thread Carl

Volodymyr Kostyrko wrote:

I have some setups were gjournal was put on device rather the on 
partition, i.e.:


[umgah] ~ gmirror status
  NameStatus  Components
mirror/umgah0  COMPLETE  ad0
  ad1
[umgah] ~ gjournal status
  Name  Status  Components
mirror/umgah0.journal N/A  mirror/umgah0
[umgah] ~ glabel status
 Name  Status  Components
   ufs/umgah0root N/A  mirror/umgah0.journala
label/umgah0swap N/A  mirror/umgah0.journalb
ufs/umgah0usr N/A  mirror/umgah0.journald
ufs/umgah0var N/A  mirror/umgah0.journale


Does the above suggest that you've ended up with individual journal 
providers for each partition anyway? If so, where are they and have you 
really achieved anything functionally different? Are they at the end of 
their individually associated partitions or all together somewhere else? 
Has the ill-advised journaled small partition issue been successfully 
overcome through what you've done?



[umgah] ~ mount
/dev/ufs/umgah0root on / (ufs, asynchronous, local, noatime, gjournal)
devfs on /dev (devfs, local)
/dev/md0 on /tmp (ufs, asynchronous, local)
/dev/ufs/umgah0var on /var (ufs, asynchronous, local, noatime, gjournal)
/dev/ufs/umgah0usr on /usr (ufs, asynchronous, local, noatime, gjournal)
devfs on /var/named/dev (devfs, local)

And yes, mirror autosynchronization is turned off, gjournal takes care 
of that too.


It's not stated in manual, but gjournal is typically transparent for any 
type of access, just in case of UFS file system is marked as journaled 
so any metadata writes can be distinguished from data writes. Without 
that gjournal does literally nothing.


And what does this mean for your swap partition?

Laszlo Nagy wrote earlier:

Another tricky question: why would you journal a SWAP partition?


Volodymyr, does your assertion that gjournal does nothing when a file 
system is not UFS mean that there is no penalty with regard to your swap 
partition despite the existence of mirror/umgah0.journalb?


Any chance you'd like to share your command sequence for constructing 
your gmirror'd and gjournal'd filesystem, Volodymyr? :-)


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


gjournal: journaled slices vs. journaled partitions

2008-10-20 Thread Carl
My goal is to build a 2-disk server configured with gmirror and gjournal 
for maximum reliability. There will never be a second operating system 
on the system, but I prefer not to freak out any non-FreeBSD repair 
tools that might be used, so I will use compatibility instead of 
dangerously dedicated mode. This means I need one slice, but see no 
reason for more. Inside that one slice will be the usual array of 
partitions (ie. /, swap, /var, /tmp, /usr, /data).


Now, I think gmirror allows me to mirror the entire drive rather than 
forcing me to do per-slice or even per-partition mirroring. I'm looking 
for the simplest in-field replacement procedure when one of the drives 
dies and I imagine a whole drive mirror achieves this. Am I right?


gjournal, OTOH, has me really confused. The man page for gjournal(8) 
specifically does not recommend that small partitions be journaled. I 
assume that's because the journal provider rivals the partition in size 
and is therefore overhead heavy. It seems to me, though, that if I can 
journal the slice as a whole instead of per-partition journaling, that 
there will essentially then be only one journal provider for the 
combination of all partitions (ie. slice) and that the aforementioned 
overhead becomes minor. Having smaller partitions included in journaling 
 seems like a good thing to me. So how do I achieve per-slice 
journaling instead of per-partition? Every time I read up on someone 
else's gjournal implementation, it seems to end with adding 
partition.journal entries to /etc/fstab. Am I trying to achieve the 
impossible or ill-advised here?


Carl / K0802647

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


Re: gjournal: journaled slices vs. journaled partitions

2008-10-20 Thread Laszlo Nagy



So how do I achieve per-slice journaling instead of per-partition?
The docs only says this: gjournal only supports UFS2. It does not 
specifically say that you cannot have per-slice journaling. However, 
since you could have other filesystems on your slice, I bet that slice 
based journaling is not supported.


Consider this: how would you journal an NTFS file system (and then boot 
windows after an unclean shutdown?) Another tricky question: why would 
you journal a SWAP partition?


Best,

  Laszlo

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


bsdlabel does not create geli slices ie; /dev/ad4s1.elia

2008-09-06 Thread Cem Kayali


Hello!

After initializing geli and attach geli enabled partition, i would like 
to create freebsd slices. Once i try 'bsdlabel -w /dev/ad4s1.eli' and 
then 'bsdlabel -e /dev/ad4s1.eli', this does not create ie; 
/dev/ad4s1.elia and i can not run newfs in success: 'Could not find 
special device'.


Thanks if someone has advise about this.


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


Re: bsdlabel does not create geli slices ie; /dev/ad4s1.elia

2008-09-06 Thread Wojciech Puchar




Hello!

After initializing geli and attach geli enabled partition, i would like to 
create freebsd slices. Once i try 'bsdlabel -w /dev/ad4s1.eli' and then 
'bsdlabel -e /dev/ad4s1.eli', this does not create ie; /dev/ad4s1.elia and i 
can not run newfs in success: 'Could not find special device'.


Thanks if someone has advise about this.


no idea. i have partitioned geli devices and i partitioned it just as you 
said (bsdlabel -w and -e), just i don't use fdisk but it shouldn't matter

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


Re: bsdlabel does not create geli slices ie; /dev/ad4s1.elia

2008-09-06 Thread Cem Kayali


Well, could this be because i partitioned ad4 hard disk by gparted? Disk 
has other OSs on other partitions... Very strange, i couldn't find any 
helpfull information about this on the net --- nor similar problem. 
Maybe i should try a latest snaphot instead of FreeBSD 7 release.


Regards,
Cem





Wojciech Puchar, 09/06/08 19:27:




Hello!

After initializing geli and attach geli enabled partition, i would 
like to create freebsd slices. Once i try 'bsdlabel -w 
/dev/ad4s1.eli' and then 'bsdlabel -e /dev/ad4s1.eli', this does not 
create ie; /dev/ad4s1.elia and i can not run newfs in success: 'Could 
not find special device'.


Thanks if someone has advise about this.


no idea. i have partitioned geli devices and i partitioned it just as 
you said (bsdlabel -w and -e), just i don't use fdisk but it shouldn't 
matter

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




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


Re: bsdlabel does not create geli slices ie; /dev/ad4s1.elia

2008-09-06 Thread Wojciech Puchar

did you check that after bsdlabel -e partitions are actually updated?


On Sun, 7 Sep 2008, Cem Kayali wrote:



Well, could this be because i partitioned ad4 hard disk by gparted? Disk has 
other OSs on other partitions... Very strange, i couldn't find any helpfull 
information about this on the net --- nor similar problem. Maybe i should try 
a latest snaphot instead of FreeBSD 7 release.


Regards,
Cem





Wojciech Puchar, 09/06/08 19:27:




Hello!

After initializing geli and attach geli enabled partition, i would like to 
create freebsd slices. Once i try 'bsdlabel -w /dev/ad4s1.eli' and then 
'bsdlabel -e /dev/ad4s1.eli', this does not create ie; /dev/ad4s1.elia and 
i can not run newfs in success: 'Could not find special device'.


Thanks if someone has advise about this.


no idea. i have partitioned geli devices and i partitioned it just as you 
said (bsdlabel -w and -e), just i don't use fdisk but it shouldn't matter

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






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


Re: bsdlabel does not create geli slices ie; /dev/ad4s1.elia - fix

2008-09-06 Thread Cem Kayali


Hi,

OK, i think i found the problem:


I have attached a usb-memory disk and tried to same steps, i got same 
error: 'bsdlabel -w /dev/da0s1.eli', 'bsdlabel -e /dev/da0s1.eli', and 
'newfs /dev/da0s1.elia': 'Could not find special device'.


Then, i deleted all partitions, and created single partition and 
labelled it as FreeBSD partition = 165. Then i followed same steps and 
i did see '/dev/da0s1.elia' device node in /dev.



In short, the partition should be labblled as FreeBSD (165). I don't 
know why this is must.


Regards,
Cem








Wojciech Puchar, 09/07/08 01:41:

did you check that after bsdlabel -e partitions are actually updated?


On Sun, 7 Sep 2008, Cem Kayali wrote:



Well, could this be because i partitioned ad4 hard disk by gparted? 
Disk has other OSs on other partitions... Very strange, i couldn't 
find any helpfull information about this on the net --- nor similar 
problem. Maybe i should try a latest snaphot instead of FreeBSD 7 
release.


Regards,
Cem





Wojciech Puchar, 09/06/08 19:27:




Hello!

After initializing geli and attach geli enabled partition, i would 
like to create freebsd slices. Once i try 'bsdlabel -w 
/dev/ad4s1.eli' and then 'bsdlabel -e /dev/ad4s1.eli', this does 
not create ie; /dev/ad4s1.elia and i can not run newfs in success: 
'Could not find special device'.


Thanks if someone has advise about this.


no idea. i have partitioned geli devices and i partitioned it just 
as you said (bsdlabel -w and -e), just i don't use fdisk but it 
shouldn't matter

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









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


Resizing partitions and slices

2008-08-07 Thread David Gurvich
I have a hard drive with one slice and 3 partitions.  Only two
partitions are actually being used.  I would like to delete the
3rd partition, resize the slice, and create a second slice the size of
the deleted partition.  Is there a safe way, one that preserves
the data on the other 2 partitions, that this can be done?
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


update /dev files with slices

2008-01-21 Thread Martin Laabs

Hi,

I created a dvd with two slices a and b. (Don't ask for the
reason - it is a test for my backup system)
This slices are ufs formated and gbde encrypted. However -
if I insert the DVD the device nodes acd0a and acd0b are not
created automaticly. But if the DVD is inserted *before*
boot this two nodes are there and stay even if I insert a
normal DVD without slices.

An other way to update the device nodes is to detach an
attach the ata channel with atacontrol while the sliced DVD
is beeing inserted. But this is not very smart. (In particular
if there is i.e. a second device at this channel)
A similar way it to reload the atapicam modul. In this case
the cd0* device nodes are updated. The problems are the same
as with atacontroll de-/attach.

So I'am searching for a better way to tell the kernel/devfs
to update the device node list of the atapi devices.

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


Re: update /dev files with slices

2008-01-21 Thread Wojciech Puchar

reason - it is a test for my backup system)
This slices are ufs formated and gbde encrypted. However -
if I insert the DVD the device nodes acd0a and acd0b are not


FreeBSD doesn't know that you inserted DVD until you will read it
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: update /dev files with slices

2008-01-21 Thread Martin Laabs
On Mon, 21 Jan 2008 13:26:42 +0100, Wojciech Puchar  
[EMAIL PROTECTED] wrote:



reason - it is a test for my backup system)
This slices are ufs formated and gbde encrypted. However -
if I insert the DVD the device nodes acd0a and acd0b are not


FreeBSD doesn't know that you inserted DVD until you will read it


Yes - you are right. I forgot to mention that I actually
made a read access i.e. with 'dd if=/dev/acd0 of=/dev/null bs=2k'
But this didn't solved the problem with the missing device
nodes.

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


  1   2   >