Re: sysinstall(8) bsdlabel a new disk

2010-11-02 Thread Matthias Apitz
El día Monday, November 01, 2010 a las 10:03:58PM -0700, per...@pluto.rain.com 
escribió:

 Devin Teske dte...@vicor.com wrote:
 
  sysinstall probes hardware when it starts. Therefore, after making
  changes (specifically after writing) to the disk in the FDISK
  partition editor, you need to Ctrl-C and Abort-out and relaunch
  sysinstall so that it probes the new disk devices (ad4s1, ad4s2,
  etc.) before you can start adding BSD disklabels (ad4s1a, ad4s1b,
  etc.) to the slice (aka partition).
 
  This has been an age-old problem (hmmm, perhaps get could some mad
  karma for fixing it).
 
 At least in 8.1, there is a sysinstall operation somewhere to
 re-probe devices, presumably to cover exactly this sort of
 situation.  Does it not work?

My situation was in 9-CURRENT.

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: sysinstall(8) bsdlabel a new disk

2010-11-02 Thread Ian Smith
In freebsd-questions Digest, Vol 335, Issue 3, Message: 2
On Tue, 2 Nov 2010 07:04:08 +0100 Matthias Apitz g...@unixarea.de wrote:
  El día Monday, November 01, 2010 a las 10:03:58PM -0700, 
  per...@pluto.rain.com escribió:
  
   Devin Teske dte...@vicor.com wrote:
   
sysinstall probes hardware when it starts. Therefore, after making
changes (specifically after writing) to the disk in the FDISK
partition editor, you need to Ctrl-C and Abort-out and relaunch
sysinstall so that it probes the new disk devices (ad4s1, ad4s2,
etc.) before you can start adding BSD disklabels (ad4s1a, ad4s1b,
etc.) to the slice (aka partition).
   
This has been an age-old problem (hmmm, perhaps get could some mad
karma for fixing it).
   
   At least in 8.1, there is a sysinstall operation somewhere to
   re-probe devices, presumably to cover exactly this sort of
   situation.  Does it not work?

Options menu: Rescan Devices works to pick up devices like a USB disk or 
memstick that you may even have booted off but sysinstall then fails to 
find, as it does with some older kit and/or slow devices (here memsticks 
on USB1 ports).

  My situation was in 9-CURRENT.

When running sysinstall(8) as init from a CD/DVD/memstick boot, you can 
do mostly what you like to the disk/s in terms of slicing - fdisk and 
like boot0cfg under the hood - and partitioning of slices - bsdlabel 
under the hood, or rather sysinstall's version of those utilities; it 
still uses libdisk(3) rather than libgeom(3), at 8-STABLE anyway.

When running sysinstall from a booted system (where you could exit after 
any committed steps and restart it, as mentioned above) you need to have 
previously set sysctl kern.geom.debugflags=16 (the 'foot-shooting' bit) 
if you want to be able to write to sector 0 (the boot sector including 
MBR) or to any non-boot slice - even unmounted - on the boot disk.

Sysinstall doesn't let you know when you've failed to modify the disk, 
sadly, hence mysterious problems such as the above.  It's fairly obvious 
when it fails to newfs some partitions you think you've nicely set up :)

Same goes for sade(8).  Neither manpage mentions kern.geom.debugflags, 
but boot0cfg(8) does, and points to the fuller description in geom(4).

I haven't checked up on new work on sysinstall on -CURRENT for a while, 
but suspect that you'll still have to set that flag to write to any disk 
that's in use.  Don't forget to set it back to 0 later!

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: sysinstall(8) bsdlabel a new disk

2010-11-01 Thread Matthias Apitz
El día Monday, November 01, 2010 a las 12:03:54AM +, Bruce Cran escribió:

 On Sunday 31 October 2010 20:02:58 Matthias Apitz wrote:
 
  How this is supposed to work using sysinstall(8)
  or should one use only bsdlabel(8) directly in such a case?
 
 sysinstall isn't really intended for post-install use: you should probably 
 learn how to use gpart instead - e.g.
 
 gpart create -s mbr /dev/disk
 gpart add -t freebsd /dev/disk
 gpart create -s bsd /dev/disk
 gpart add -t freebsd-ufs /dev/disks1
 
 newfs /dev/disks1a

Bruce,

Thanks for the reply. Is there any document explaining this in more
detail as the man page of gpart(8). The FreeBSD Handbook in chaptar 18.3
points still to sysinstall(8) and bsdlabel(8)...

Thanks

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: sysinstall(8) bsdlabel a new disk

2010-11-01 Thread Bruce Cran
On Monday 01 November 2010 06:09:51 Matthias Apitz wrote:

 Thanks for the reply. Is there any document explaining this in more
 detail as the man page of gpart(8). The FreeBSD Handbook in chaptar 18.3
 points still to sysinstall(8) and bsdlabel(8)...

The documentation for gpart is still rather poor, and I'm not aware of any 
official documentation. I wrote a more detailed post in 
http://lists.freebsd.org/pipermail/freebsd-fs/2010-August/009176.html which 
explains the commands.

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


Re: sysinstall(8) bsdlabel a new disk

2010-11-01 Thread Matthias Apitz
El día Monday, November 01, 2010 a las 12:03:54AM +, Bruce Cran escribió:

 On Sunday 31 October 2010 20:02:58 Matthias Apitz wrote:
 
  How this is supposed to work using sysinstall(8)
  or should one use only bsdlabel(8) directly in such a case?
 
 sysinstall isn't really intended for post-install use: you should probably 
 learn how to use gpart instead - e.g.
 
 gpart create -s mbr /dev/disk
 gpart add -t freebsd /dev/disk
 gpart create -s bsd /dev/disk
 gpart add -t freebsd-ufs /dev/disks1
 
 newfs /dev/disks1a

Combining the above and your posting in
http://lists.freebsd.org/pipermail/freebsd-fs/2010-August/009176.html
for my case I should have done:

# 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

Right?

I'm unsure about the 3rd command (gpart create -s bsd ad4s1), should it
use 'ad4' as you say above, or 'ad4s1' as in the August's post?

In any case, next time whene I have an empty disk to initialize, I will
play around with this. Thanks again

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: sysinstall(8) bsdlabel a new disk

2010-11-01 Thread Bruce Cran
On Monday 01 November 2010 09:06:53 Matthias Apitz wrote:

 I'm unsure about the 3rd command (gpart create -s bsd ad4s1), should it
 use 'ad4' as you say above, or 'ad4s1' as in the August's post?

Since you're creating the bsd scheme inside the freebsd container, you would 
use ad4s1.

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


Re: sysinstall(8) bsdlabel a new disk

2010-11-01 Thread Beat Siegenthaler
On 01.11.10 01:03, Bruce Cran wrote:
 On Sunday 31 October 2010 20:02:58 Matthias Apitz wrote:

 sysinstall isn't really intended for post-install use: you should probably 
 learn how to use gpart instead - e.g.

Maybe sade  (sysadmins disk editor) would help too... looks like
sysinstall's disk part..

Beat
___
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: sysinstall(8) bsdlabel a new disk

2010-11-01 Thread Devin Teske
On Sun, 2010-10-31 at 21:02 +0100, Matthias Apitz wrote:
 Hello,
 
 I installed a 9-CURRENT from an USB key to a hard disk of a laptop and
 encountered a strange problem: I booted the USB key to normal
 multiuser mode and wanted to wipe out the Windows on the disk, create
 one slice ad4s1 and partitions in it for /, /usr, /var, ... 
 
 I thought the simplest way would be just run sysinstall(8) and use the
 FDISK and BSDLABEL from the post-install dialog. FDISK went fine and in
 the BSDLABEL dialog I just used 'A' (auto defaults). On 'W' (write to
 disk) the sysinstall(8) complained about 'unable to open /dev/ad4s1a

sysinstall probes hardware when it starts. Therefore, after making
changes (specifically after writing) to the disk in the FDISK partition
editor, you need to Ctrl-C and Abort-out and relaunch sysinstall so that
it probes the new disk devices (ad4s1, ad4s2, etc.) before you can start
adding BSD disklabels (ad4s1a, ad4s1b, etc.) to the slice (aka
partition).

This has been an age-old problem (hmmm, perhaps get could some mad karma
for fixing it).

I imagine that sade has this problem too. Though, what annoys me about
sade is that the Ctrl-C menu doesn't work -- the Restart option does
nothing and though Continue works, I'm seething over the lack of an
Abort option (hmmm, perhaps should file a PR on that one).


  and
 so on for all the created partitions a...f. And also in the dev fs
 there were no entries created for /dev/ad4s1[a-f]. They apeared after a
 reboot of the system from the USB key.

Reboot should not be required. Just exit sysinstall(8) and go back into
it.

I've made it a habit to (when using sysinstall(8) as a userland utility
to format disks):

1. Launch sysinstall(8) (as root)
2. Main Menu
3. Custom
4. Partition
5. (if more than one disk is present in the system you'll be prompted to
select the disk... use spacebar to select disk, then TAB over to OK and
hit ENTER)
6. partition the disk in whatever manner required
7. Press `W' to write out the changes
8. (select which boot manager or None)
9. Press Ctrl-C after partition table is successfully written
10. Select `Abort' and hit ENTER

then

1. Relaunch sysinstall(8) (as root)
2. Main Menu
3. Custom
4. Partition
5. (if more than one disk is present in the system, use spacebar to
select disk, then TAB over to OK and hit ENTER)
NOTE: This is required to select which disk to operate on within the
disklabel editor
6. Press `Q' to quit-out of the FDISK partition editor (this time, we
don't want to make any changes, we just needed to indicate that this is
the disk that we're going to operate on within the disklabel editor)
7. (select which boot manager or None)
NOTE: This time around, since we're not going to write the partition
table again, it really doesn't matter what you select here
NOTE: you're now back at the custom menu from step 3/4.
8. Label
9. Now use the FreeBSD Disklabel Editor to allocate FreeBSD partitions
from the BIOS partition ad0s1 (or whatever your partition was named)
10. When finished, press `W' to write out changes, perform newfs
actions, and mount the devices as necessary

 
 How this is supposed to work using sysinstall(8)
 or should one use only bsdlabel(8) directly in such a case?
 

I'll be the first to admit that sysinstall(8) could be a little easier
to use in the userland. It should be noted that sade(8) (System
Administrator's Disk Editor) is no different -- sade, at this point at
least, is nothing more than the `Partition' and `Label' menus ripped
straight from sysinstall(8)'s `Custom' menu (with some minor other
differences, like the fact that the Ctrl-C menu doesn't work whereas it
does in sysinstall(8) -- really ought to file a PR on that one).


 Thanks
 
   matthias
-- 
Cheers,
Devin Teske

- CONTACT INFORMATION -
Business Solutions Consultant II
FIS - fisglobal.com
510-735-5650 Mobile
510-621-2038 Office
510-621-2020 Office Fax
909-477-4578 Home/Fax
devin.te...@fisglobal.com

- LEGAL DISCLAIMER -
This message  contains confidential  and proprietary  information
of the sender,  and is intended only for the person(s) to whom it
is addressed. Any use, distribution, copying or disclosure by any
other person  is strictly prohibited.  If you have  received this
message in error,  please notify  the e-mail sender  immediately,
and delete the original message without making a copy.

- END TRANSMISSION -

___
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: sysinstall(8) bsdlabel a new disk

2010-11-01 Thread Bruce Cran
On Mon, 01 Nov 2010 09:04:15 -0700
Devin Teske dte...@vicor.com wrote:

 I'll be the first to admit that sysinstall(8) could be a little easier
 to use in the userland. It should be noted that sade(8) (System
 Administrator's Disk Editor) is no different -- sade, at this point at
 least, is nothing more than the `Partition' and `Label' menus ripped
 straight from sysinstall(8)'s `Custom' menu (with some minor other
 differences, like the fact that the Ctrl-C menu doesn't work whereas
 it does in sysinstall(8) -- really ought to file a PR on that one).

There's a new version of sade being worked on by ae@ in svn /user/ae
that fixes lots of the problems. With pc-sysinstall getting all the
attention I doubt sysinstall will have any more work done on it.

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


Re: sysinstall(8) bsdlabel a new disk

2010-11-01 Thread Devin Teske
On Mon, 2010-11-01 at 23:48 +, Bruce Cran wrote:
 On Mon, 01 Nov 2010 09:04:15 -0700
 Devin Teske dte...@vicor.com wrote:
 
  I'll be the first to admit that sysinstall(8) could be a little easier
  to use in the userland. It should be noted that sade(8) (System
  Administrator's Disk Editor) is no different -- sade, at this point at
  least, is nothing more than the `Partition' and `Label' menus ripped
  straight from sysinstall(8)'s `Custom' menu (with some minor other
  differences, like the fact that the Ctrl-C menu doesn't work whereas
  it does in sysinstall(8) -- really ought to file a PR on that one).
 
 There's a new version of sade being worked on by ae@ in svn /user/ae
 that fixes lots of the problems.

Excellent! I'll have to check it out. (should we then save our PR's for
ae and neglect any problems in sade? I wonder what `ae' stands for,
alas, edamame?!, I kid).


 With pc-sysinstall getting all the
 attention I doubt sysinstall will have any more work done on it.

I'm _very_ pleased to see from...
http://www.youtube.com/watch?v=Z0yOuDelXUU
...that pc-sysinstall will support scripted installation using a syntax
similar to sysinstall's own install.cfg.

I thought I was going to have to lose sleep over this.


-- 
Cheers,
Devin Teske

- CONTACT INFORMATION -
Business Solutions Consultant II
FIS - fisglobal.com
510-735-5650 Mobile
510-621-2038 Office
510-621-2020 Office Fax
909-477-4578 Home/Fax
devin.te...@fisglobal.com

- LEGAL DISCLAIMER -
This message  contains confidential  and proprietary  information
of the sender,  and is intended only for the person(s) to whom it
is addressed. Any use, distribution, copying or disclosure by any
other person  is strictly prohibited.  If you have  received this
message in error,  please notify  the e-mail sender  immediately,
and delete the original message without making a copy.

- END TRANSMISSION -

___
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: sysinstall(8) bsdlabel a new disk

2010-11-01 Thread perryh
Devin Teske dte...@vicor.com wrote:

 sysinstall probes hardware when it starts. Therefore, after making
 changes (specifically after writing) to the disk in the FDISK
 partition editor, you need to Ctrl-C and Abort-out and relaunch
 sysinstall so that it probes the new disk devices (ad4s1, ad4s2,
 etc.) before you can start adding BSD disklabels (ad4s1a, ad4s1b,
 etc.) to the slice (aka partition).

 This has been an age-old problem (hmmm, perhaps get could some mad
 karma for fixing it).

At least in 8.1, there is a sysinstall operation somewhere to
re-probe devices, presumably to cover exactly this sort of
situation.  Does it not work?
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


sysinstall(8) bsdlabel a new disk

2010-10-31 Thread Matthias Apitz

Hello,

I installed a 9-CURRENT from an USB key to a hard disk of a laptop and
encountered a strange problem: I booted the USB key to normal
multiuser mode and wanted to wipe out the Windows on the disk, create
one slice ad4s1 and partitions in it for /, /usr, /var, ... 

I thought the simplest way would be just run sysinstall(8) and use the
FDISK and BSDLABEL from the post-install dialog. FDISK went fine and in
the BSDLABEL dialog I just used 'A' (auto defaults). On 'W' (write to
disk) the sysinstall(8) complained about 'unable to open /dev/ad4s1a and
so on for all the created partitions a...f. And also in the dev fs
there were no entries created for /dev/ad4s1[a-f]. They apeared after a
reboot of the system from the USB key.

How this is supposed to work using sysinstall(8)
or should one use only bsdlabel(8) directly in such a case?

Thanks

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: sysinstall(8) bsdlabel a new disk

2010-10-31 Thread Bruce Cran
On Sunday 31 October 2010 20:02:58 Matthias Apitz wrote:

 How this is supposed to work using sysinstall(8)
 or should one use only bsdlabel(8) directly in such a case?

sysinstall isn't really intended for post-install use: you should probably 
learn how to use gpart instead - e.g.

gpart create -s mbr /dev/disk
gpart add -t freebsd /dev/disk
gpart create -s bsd /dev/disk
gpart add -t freebsd-ufs /dev/disks1

newfs /dev/disks1a

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