boot0cfg

2003-03-04 Thread Dimitar . Peikov

Last weekend I had to reinstall Windows XP on my PC and certainly I lost
boot manager. After booting from CD and mounting as root ad0 device, I
replaced boot0 record
using the following command line :

# boot0cfg -Bv -s 1 -t 91 ad0

On my PC I have 14G Windows XP partition(primary partition), 7G Linux (2
extended partitions) and 7G FreeBSD 5.0 - Current (primary partition). On
second disk I have Windows 98.

After installing I see something like this :

F1 - ???
F3 - FreeBSD
F5 - Disk 2

It is strange that only F1 works (start Windows XP), while F3 play some
sound. Pressing F5 starts Windows XP, but it could be because Windows on
my second disk.

Yes I know that there are other boot managers like GRUB, but it is another
beer.

I haven't enough time to investigate where the problem is (boot0 code),
but this evening I should.

Any comments  would be greatly appreciated.


Dimitar Peikov
Software Developer
___
BORG INSTRUMENTS Ltd.
17 Washington str.
BG - 1040, Sofia
Tel.: +359 (0) 2 989 5523
Fax: +359 (0) 2 989 5585
mailto:[EMAIL PROTECTED]
http://www.borg.de



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message


boot0cfg -B

2002-11-17 Thread Wilkinson,Alex
Howdy crew,

Any reason why this doesn't work ?

sheel>sudo boot0cfg -B ad0
boot0cfg: /dev/ad0: Operation not permitted

running: FreeBSD 5.0-CURRENT #0: Fri Nov  8 15:07:18 CST 2002

Thanks

 - aW


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



RE: boot0cfg

2003-03-05 Thread John Baldwin

On 05-Mar-2003 [EMAIL PROTECTED] wrote:
> 
> Last weekend I had to reinstall Windows XP on my PC and certainly I lost
> boot manager. After booting from CD and mounting as root ad0 device, I
> replaced boot0 record
> using the following command line :
> 
># boot0cfg -Bv -s 1 -t 91 ad0
> 
> On my PC I have 14G Windows XP partition(primary partition), 7G Linux (2
> extended partitions) and 7G FreeBSD 5.0 - Current (primary partition). On
> second disk I have Windows 98.
> 
> After installing I see something like this :
> 
> F1 - ???
> F3 - FreeBSD
> F5 - Disk 2
> 
> It is strange that only F1 works (start Windows XP), while F3 play some
> sound. Pressing F5 starts Windows XP, but it could be because Windows on
> my second disk.
> 
> Yes I know that there are other boot managers like GRUB, but it is another
> beer.

You need to turn on 'packet' mode by hand.

# boot0cfg -o packet ad0

should do the trick.

-- 

John Baldwin <[EMAIL PROTECTED]>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message


Re: boot0cfg

2003-03-05 Thread Kevin Oberman
> From: [EMAIL PROTECTED]
> Date: Wed, 5 Mar 2003 09:25:53 +0200
> Sender: [EMAIL PROTECTED]
> 
> 
> Last weekend I had to reinstall Windows XP on my PC and certainly I lost
> boot manager. After booting from CD and mounting as root ad0 device, I
> replaced boot0 record
> using the following command line :
> 
> # boot0cfg -Bv -s 1 -t 91 ad0
> 
> On my PC I have 14G Windows XP partition(primary partition), 7G Linux (2
> extended partitions) and 7G FreeBSD 5.0 - Current (primary partition). On
> second disk I have Windows 98.
> 
> After installing I see something like this :
> 
> F1 - ???
> F3 - FreeBSD
> F5 - Disk 2
> 
> It is strange that only F1 works (start Windows XP), while F3 play some
> sound. Pressing F5 starts Windows XP, but it could be because Windows on
> my second disk.
> 
> Yes I know that there are other boot managers like GRUB, but it is another
> beer.
> 
> I haven't enough time to investigate where the problem is (boot0 code),
> but this evening I should.

The problem is that the boot block installed by default is limited to
booting systems located in the first 1023 cylinders of the disk and XP
is so big that the second partition is now often past that point.

Any reasonably modern BIOS will support a slightly different boot record
which can boot a partition anywhere on disk. The hitch is that this boot
block will not work at all on some older systems.

To use this more modern boot block, add '-o packet' to the boot0cfg
command. This is in the man page, but the man page does not make it
clear what the real significance of this option is. I think it should be
referenced VERY clearly in the description section of the man page.

For any system less than about 4 year old and may older systems, you
really want to use this option.

R. Kevin Oberman, Network Engineer
Energy Sciences Network (ESnet)
Ernest O. Lawrence Berkeley National Laboratory (Berkeley Lab)
E-mail: [EMAIL PROTECTED]   Phone: +1 510 486-8634

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message


Re: boot0cfg

2003-03-05 Thread Darryl Okahata
"Kevin Oberman" <[EMAIL PROTECTED]> wrote:

> For any system less than about 4 year old and may older systems, you
> really want to use this option.

 The other possibility, if both FreeBSD and XP are installed on the
same disk, is to just use XP's boot selector to select which one to
boot.  It can be a lot easier than having to deal with boot sector
issues.

 For more information, see:

http://bsdatwork.com/sections.php?op=viewarticle&artid=3
(This is for the case where Windows & FreeBSD are on the
SAME drive.)
(Also read the OpenBSD section for additional WinXP
info.)

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

-- 
Darryl Okahata
[EMAIL PROTECTED]

DISCLAIMER: this message is the author's personal opinion and does not
constitute the support, opinion, or policy of Agilent Technologies, or
of the little green men that have been following him all day.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message


RE: boot0cfg

2003-03-05 Thread Daniel O'Connor
On Thu, 2003-03-06 at 03:26, John Baldwin wrote:
> > It is strange that only F1 works (start Windows XP), while F3 play some
> > sound. Pressing F5 starts Windows XP, but it could be because Windows on
> > my second disk.
> > 
> > Yes I know that there are other boot managers like GRUB, but it is another
> > beer.
> 
> You need to turn on 'packet' mode by hand.
> 
> # boot0cfg -o packet ad0
> 
> should do the trick.

Do you think this should be the default?

ie would it fix more things than it breaks?

My feeling is yes...
Or is sysinstall supposed to set the flags based on where you install
stuff?
(I had a quick look but couldn't see anything to indicate this was so)

-- 
Daniel O'Connor software and network engineer
for Genesis Software - http://www.gsoft.com.au
"The nice thing about standards is that there
are so many of them to choose from."
  -- Andrew Tanenbaum
GPG Fingerprint - 9A8C 569F 685A D928 5140  AE4B 319B 41F4 5D17 FDD5


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message


RE: boot0cfg

2003-03-06 Thread John Baldwin

On 05-Mar-2003 Daniel O'Connor wrote:
> On Thu, 2003-03-06 at 03:26, John Baldwin wrote:
>> > It is strange that only F1 works (start Windows XP), while F3 play some
>> > sound. Pressing F5 starts Windows XP, but it could be because Windows on
>> > my second disk.
>> > 
>> > Yes I know that there are other boot managers like GRUB, but it is another
>> > beer.
>> 
>> You need to turn on 'packet' mode by hand.
>> 
>> # boot0cfg -o packet ad0
>> 
>> should do the trick.
> 
> Do you think this should be the default?
> 
> ie would it fix more things than it breaks?
> 
> My feeling is yes...
> Or is sysinstall supposed to set the flags based on where you install
> stuff?
> (I had a quick look but couldn't see anything to indicate this was so)

sysinstall sets the flag for you during the install.  I originally
wrote a version of boot0 that was smart enough to use packet mode
automatically when needed, but it got backed out.

-- 

John Baldwin <[EMAIL PROTECTED]>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message


Re: boot0cfg -B

2002-11-17 Thread Marcel Moolenaar
On Mon, Nov 18, 2002 at 05:07:08PM +1030, Wilkinson,Alex wrote:
> Howdy crew,
> 
> Any reason why this doesn't work ?
> 
> sheel>sudo boot0cfg -B ad0
> boot0cfg: /dev/ad0: Operation not permitted
> 
> running: FreeBSD 5.0-CURRENT #0: Fri Nov  8 15:07:18 CST 2002

GEOM, I presume?
When file systems are mounted, GEOM does not allow processes to
open the device special files for writing. This needs to be
resolved. It is a known limitation and there's no work-around
as far as I know.

HTH,

-- 
 Marcel Moolenaar USPA: A-39004  [EMAIL PROTECTED]

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: boot0cfg -B

2002-11-18 Thread Dan Lukes
[EMAIL PROTECTED] wrote, On 11/18/02 07:52:


Any reason why this doesn't work ?

sheel>sudo boot0cfg -B ad0
boot0cfg: /dev/ad0: Operation not permitted


	securelevel too high ?

Dan


--
Dan Lukes tel: +420 2 21914205, fax: +420 2 21914206
root of  FIONet, KolejNET,  webmaster  of www.freebsd.cz
AKA: [EMAIL PROTECTED], [EMAIL PROTECTED],[EMAIL PROTECTED]



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



boot0cfg in future releases.

2011-06-13 Thread Eir Nym
Hi folks,

I haven't see man page for boot0cfg(8) for FreeBSD 9-Current on
FreeBSD website, but it exists for 8.x and earlier versions. Is it
website bug or this utility will be removed in the future?
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


unable to use boot0cfg

2002-12-04 Thread Vallo Kallaste
Hi

I'm using both -current and -stable on the same machine, very
common. Boot0cfg has -s [12345] flag to set the slice to boot on and
it has been working so far. Beginning from Dec 1, I'm unable to set
the slice:

root:vallo# boot0cfg -v ad0 
#   flag start chs   type   end chs   offset size
1   0x80  0:  1: 1   0xa5   1023: 15:63   63 16382961
2   0x00   1023:255:63   0xa5   1023: 15:63 16383024 16383024

version=1.0  drive=0x80  mask=0xf  ticks=182
options=packet,update,nosetdrv
default_selection=F1 (Slice 1)
root:vallo# boot0cfg -v -s 2 ad0
boot0cfg: /dev/ad0: Operation not permitted
root:vallo# disklabel -W ad0
disklabel: /dev/ad0: Operation not permitted

This is probably related to recent (re)work to protect disk labels,
but I'm not authoritative. This is not a fair way to stick me to
-current :-)
-- 

Vallo Kallaste
[EMAIL PROTECTED]

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: boot0cfg in future releases.

2011-06-13 Thread jhell

http://svn.freebsd.org/base/head/usr.sbin/boot0cfg/

It is still connected to the build in the previous directory ../ by the
Makefile.* foreach arch.

Even if, gpart(8) used along with the corresponding files in /boot you
can still achieve the same results for a selection menu at boot time
whether it be gptboot gptzfsboot etc...

On Mon, Jun 13, 2011 at 07:27:13AM +, Eir Nym wrote:
> Hi folks,
> 
> I haven't see man page for boot0cfg(8) for FreeBSD 9-Current on
> FreeBSD website, but it exists for 8.x and earlier versions. Is it
> website bug or this utility will be removed in the future?
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: unable to use boot0cfg

2002-12-04 Thread David Wolfskill
>Date: Wed, 4 Dec 2002 15:17:39 +0200
>From: Vallo Kallaste <[EMAIL PROTECTED]>

>I'm using both -current and -stable on the same machine, very
>common. Boot0cfg has -s [12345] flag to set the slice to boot on and
>it has been working so far. Beginning from Dec 1, I'm unable to set
>the slice:

>root:vallo# boot0cfg -v ad0 
>#   flag start chs   type   end chs   offset size
>1   0x80  0:  1: 1   0xa5   1023: 15:63   63 16382961
>2   0x00   1023:255:63   0xa5   1023: 15:63 16383024 16383024

>version=1.0  drive=0x80  mask=0xf  ticks=182
>options=packet,update,nosetdrv
>default_selection=F1 (Slice 1)
>root:vallo# boot0cfg -v -s 2 ad0
>boot0cfg: /dev/ad0: Operation not permitted
>root:vallo# disklabel -W ad0
>disklabel: /dev/ad0: Operation not permitted

Yes; it is an artifact of GEOM (per phk).

>This is probably related to recent (re)work to protect disk labels,
>but I'm not authoritative. This is not a fair way to stick me to
>-current :-)

Right; I have the same problem.  By interrupting the boot sequence early
enough (by hitting the space bar) -- before loader is, itself,
loaded, and the prompt is

>> FreeBSD/i386 BOOT
Default: 0:ad(0,a)/boot/loader
boot:

-- you can override it by typing

0:ad(0,1,a)/boot/loader

(to boot from slice 1) -- ref. "man boot".


The timing can be tricky enough to be a nuisance when one is doing
this on a machine with (only) a serial console, especially when the
machine is not close enough to hear the disk seeks.  :-}

Cheers,
david   (links to my resume at http://www.catwhisker.org/~david)
-- 
David H. Wolfskill  [EMAIL PROTECTED]
I have no confidence in results obtained through the use of Microsoft products.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: unable to use boot0cfg

2002-12-05 Thread Doug Ambrisko
David Wolfskill writes:
| 0:ad(0,1,a)/boot/loader

... or put that in /boot.config on the / that boot0 defaults to boot.
a21p% cat /boot.config
0:ad(0,2,a)/boot/loader
a21p% ls -l  /boot.co*

Then just change it.  It does mean that in my setup if I'm running -current
I have to edit /stable/boot.config since boot0 always boots my -stable
area.

| (to boot from slice 1) -- ref. "man boot".

Your welcome.  I submitted that man page update to ru after finding
that secret feature in the source code.

Doug A.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Use of boot0cfg to set boot slice broke between r209459 and r209502

2010-06-25 Thread David Wolfskill
Well, one one of my machines -- I realize that there are some
machines for which it's been problematic for a while.  And all of
the machines I'm using run FreeBSD/i386.

But it had been working on my build machine since I acquired it (a few
months ago) in daily use.

Of course, I didn't notice the effect, as after I finished building &
smoke-checking head on the build machine, I power it off, via:

sudo boot0cfg -s 2 aacd0 && sudo shutdown -p now || sudo shutdown -r now

(as leaving it on generates too much noise and heat).

And when I powered it up last night (in preparation for the nightly
update of my local mirrors and the start of the morning's builds), I
failed to note that it was running head, vs. stable/7 (as I had
intended).

A similar use of boot0cfg on my laptop remains working.

Here are the respective "uname -a" outputs from the build machine:

FreeBSD freebeast.catwhisker.org 9.0-CURRENT FreeBSD 9.0-CURRENT #198 r209459: 
Wed Jun 23 06:05:16 PDT 2010 
r...@freebeast.catwhisker.org:/usr/obj/usr/src/sys/GENERIC  i386

FreeBSD freebeast.catwhisker.org 9.0-CURRENT FreeBSD 9.0-CURRENT #199 r209502: 
Thu Jun 24 05:41:59 PDT 2010 
r...@freebeast.catwhisker.org:/usr/obj/usr/src/sys/GENERIC  i386


(As you can see, I run a GENERIC kernel on the build machine.)

I've placed a copy of a recent stable/7 dmesg.boot in
<http://www.catwhisker.org/~david/FreeBSD/stable_7/dmesg.boot>;
when I next boot CURRENT, I'll grab dmesg.boot & stuff it in
<http://www.catwhisker.org/~david/FreeBSD/head/dmesg.boot>.  (That
should be within a few hours.)

Peace,
david
-- 
David H. Wolfskill  da...@catwhisker.org
Depriving a girl or boy of an opportunity for education is evil.

See http://www.catwhisker.org/~david/publickey.gpg for my public key.


pgpeQoVMvQMHr.pgp
Description: PGP signature


Re: Use of boot0cfg to set boot slice broke between r209459 and r209502

2010-06-25 Thread John Baldwin
On Friday 25 June 2010 7:40:11 am David Wolfskill wrote:
> Well, one one of my machines -- I realize that there are some
> machines for which it's been problematic for a while.  And all of
> the machines I'm using run FreeBSD/i386.

209469 perhaps?

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


Re: Use of boot0cfg to set boot slice broke between r209459 and r209502

2010-06-25 Thread David Wolfskill
On Fri, Jun 25, 2010 at 08:37:36AM -0400, John Baldwin wrote:
> On Friday 25 June 2010 7:40:11 am David Wolfskill wrote:
> > Well, one one of my machines -- I realize that there are some
> > machines for which it's been problematic for a while.  And all of
> > the machines I'm using run FreeBSD/i386.
> 
> 209469 perhaps?

Apparently so.

Here's what I did to test the above assertion:

* Booted the build machine from slice 4 (usual "head" slice); cloned
  that slice to slice 1; booted from slice 1.

* In a "head" src working directory, I issued

svn diff -c209469

  and saw that r209469 merely added 2 lines to usr.sbin/boot0cfg/boot0cfg.c.

* On the build machine's src working directory, I edited
  usr.sbin/boot0cfg/boot0cfg.c to remove the lines in question.

* Then (as root), I made /usr/src/usr.sbin/boot0cfg/ my current working
  directory and issued:

make && make install

* I then issued

boot0cfg -s 4 aacd0 && shutdown -r now

  then watched the serial console.

* I noticed that the default boot slice -- which had been 1 -- was now
  4.

* For grins, I then booted slice 4 (head) in single-user mode, mounted
  the file systems, then invoked the boot0cfg executable from slice 1 to
  switch the default to slice 2, then issued "halt -p".  I waited a bit,
  then powered the machine back up (WoL can be handy!) noted it was
  booting from slice 2, brought it up in single-user mode, then issued
  "halt -p" to reduce its power consumption and heat & nouse generation.

All that said, it looks as if r209469 merely noticed an existing error
condition and tried to do something arguably sensible with it, rather
than merely ignore it.  So it would seem that there's a more fundamental
issue at stake, here

Peace,
david
-- 
David H. Wolfskill  da...@catwhisker.org
Depriving a girl or boy of an opportunity for education is evil.

See http://www.catwhisker.org/~david/publickey.gpg for my public key.


pgpbEZn5Am1Ln.pgp
Description: PGP signature


Re: Use of boot0cfg to set boot slice broke between r209459 and r209502

2010-06-26 Thread Daniel Braniss
> 
> --jr/gb2Ce1GM9KKZD
> Content-Type: text/plain; charset=us-ascii
> Content-Disposition: inline
> Content-Transfer-Encoding: quoted-printable
> 
> On Fri, Jun 25, 2010 at 08:37:36AM -0400, John Baldwin wrote:
> > On Friday 25 June 2010 7:40:11 am David Wolfskill wrote:
> > > Well, one one of my machines -- I realize that there are some
> > > machines for which it's been problematic for a while.  And all of
> > > the machines I'm using run FreeBSD/i386.
> >=20
> > 209469 perhaps?
> 
> Apparently so.
> 
> Here's what I did to test the above assertion:
> 
> * Booted the build machine from slice 4 (usual "head" slice); cloned
>   that slice to slice 1; booted from slice 1.
> 
> * In a "head" src working directory, I issued
> 
>   svn diff -c209469
> 
>   and saw that r209469 merely added 2 lines to usr.sbin/boot0cfg/boot0cfg.c.
> 
> * On the build machine's src working directory, I edited
>   usr.sbin/boot0cfg/boot0cfg.c to remove the lines in question.
> 
> * Then (as root), I made /usr/src/usr.sbin/boot0cfg/ my current working
>   directory and issued:
> 
>   make && make install
> 
> * I then issued
> 
>   boot0cfg -s 4 aacd0 && shutdown -r now
> 
>   then watched the serial console.
> 
> * I noticed that the default boot slice -- which had been 1 -- was now
>   4.
> 
> * For grins, I then booted slice 4 (head) in single-user mode, mounted
>   the file systems, then invoked the boot0cfg executable from slice 1 to
>   switch the default to slice 2, then issued "halt -p".  I waited a bit,
>   then powered the machine back up (WoL can be handy!) noted it was
>   booting from slice 2, brought it up in single-user mode, then issued
>   "halt -p" to reduce its power consumption and heat & nouse generation.
> 
> All that said, it looks as if r209469 merely noticed an existing error
> condition and tried to do something arguably sensible with it, rather
> than merely ignore it.  So it would seem that there's a more fundamental
> issue at stake, here

what do you see when you type boot0cfg -v ...?
gpart show?
then try 
gpart set -a active -i n aacd0
n will probably be 5.

bottom line, the MBR is NOT being updated by boot0cfg

danny


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


Re: Use of boot0cfg to set boot slice broke between r209459 and r209502

2010-06-26 Thread David Wolfskill
On Sat, Jun 26, 2010 at 12:10:57PM +0300, Daniel Braniss wrote:
> ...
> what do you see when you type boot0cfg -v ...?
> gpart show?
> then try 
>   gpart set -a active -i n aacd0
> n will probably be 5.
> 
> bottom line, the MBR is NOT being updated by boot0cfg

OK; here's what I see -- note that the /S1/usr/sbin/boot0cfg executable
is the one I built yesterday without the 2 lines from r209469:

freebeast(9.0-C)[2] uname -a
FreeBSD freebeast.catwhisker.org 9.0-CURRENT FreeBSD 9.0-CURRENT #200 r209522: 
Fri Jun 25 06:11:00 PDT 2010 
r...@freebeast.catwhisker.org:/usr/obj/usr/src/sys/GENERIC  i386
freebeast(9.0-C)[3] sudo boot0cfg -v aacd0; echo $?
Password:
#   flag start chs   type   end chs   offset size
1   0x00  0:  1: 1   0xa5651:254:63   63 10474317
2   0x00652:  0: 1   0xa5   1023:254:63 10474380 10474380
3   0x00   1023:255:63   0xa5   1023:254:63 20948760 10474380
4   0x80   1023:255:63   0xa5   1023:254:63 31423140 40194630

version=1.0  drive=0x80  mask=0xf  ticks=182  bell=  (0x7)
options=packet,update,nosetdrv
default_selection=F4 (Slice 4)
0
freebeast(9.0-C)[4] sudo boot0cfg -v -s 2 aacd0 ; echo $?
boot0cfg: write_mbr: /dev/aacd0: Operation not permitted
1
freebeast(9.0-C)[5] sudo boot0cfg -v aacd0 ; echo $?
#   flag start chs   type   end chs   offset size
1   0x00  0:  1: 1   0xa5651:254:63   63 10474317
2   0x00652:  0: 1   0xa5   1023:254:63 10474380 10474380
3   0x00   1023:255:63   0xa5   1023:254:63 20948760 10474380
4   0x80   1023:255:63   0xa5   1023:254:63 31423140 40194630

version=1.0  drive=0x80  mask=0xf  ticks=182  bell=  (0x7)
options=packet,update,nosetdrv
default_selection=F4 (Slice 4)
0
freebeast(9.0-C)[6] sudo /S1/usr/sbin/boot0cfg -v -s 2 aacd0 ; echo $?
#   flag start chs   type   end chs   offset size
1   0x00  0:  1: 1   0xa5651:254:63   63 10474317
2   0x00652:  0: 1   0xa5   1023:254:63 10474380 10474380
3   0x00   1023:255:63   0xa5   1023:254:63 20948760 10474380
4   0x80   1023:255:63   0xa5   1023:254:63 31423140 40194630

version=1.0  drive=0x80  mask=0xf  ticks=182  bell=  (0x7)
options=packet,update,nosetdrv
default_selection=F2 (Slice 2)
0
freebeast(9.0-C)[7] sudo boot0cfg -v aacd0 ; echo $?
#   flag start chs   type   end chs   offset size
1   0x00  0:  1: 1   0xa5651:254:63   63 10474317
2   0x00652:  0: 1   0xa5   1023:254:63 10474380 10474380
3   0x00   1023:255:63   0xa5   1023:254:63 20948760 10474380
4   0x80   1023:255:63   0xa5   1023:254:63 31423140 40194630

version=1.0  drive=0x80  mask=0xf  ticks=182  bell=  (0x7)
options=packet,update,nosetdrv
default_selection=F2 (Slice 2)
0
freebeast(9.0-C)[8] sudo gpart show
=>  63  71619471  aacd0  MBR  (34G)
63  10474317  1  freebsd  (5.0G)
  10474380  10474380  2  freebsd  (5.0G)
  20948760  10474380  3  freebsd  (5.0G)
  31423140  40194630  4  freebsd  [active]  (19G)
  71617770  1764 - free -  (882K)

=>   63  143306919  aacd1  MBR  (68G)
 63  143299737  1  freebsd  [active]  (68G)
  143299800   7182 - free -  (3.5M)

=>   0  10474317  aacd0s1  BSD  (5.0G)
 0   30720001  freebsd-ufs  (1.5G)
   3072000   74023174  freebsd-ufs  (3.5G)

=>   0  10474380  aacd0s2  BSD  (5.0G)
 0   30720001  freebsd-ufs  (1.5G)
   3072000   74023804  freebsd-ufs  (3.5G)

=>   0  10474380  aacd0s3  BSD  (5.0G)
 0   30720001  freebsd-ufs  (1.5G)
   3072000   74023804  freebsd-ufs  (3.5G)

=>   0  40194630  aacd0s4  BSD  (19G)
 0   30720001  freebsd-ufs  (1.5G)
   3072000  209715202  freebsd-swap  (10G)
  24043520   74014724  freebsd-ufs  (3.5G)
  31444992   87496386  freebsd-ufs  (4.2G)

=>0  143299737  aacd1s1  BSD  (68G)
  0   209715202  freebsd-swap  (10G)
   20971520   671088644  freebsd-ufs  (32G)
   88080384   552193535  freebsd-ufs  (26G)

freebeast(9.0-C)[9] 

Peace,
david
-- 
David H. Wolfskill  da...@catwhisker.org
Depriving a girl or boy of an opportunity for education is evil.

See http://www.catwhisker.org/~david/publickey.gpg for my public key.


pgpxzcqvxFsoo.pgp
Description: PGP signature


Re: Use of boot0cfg to set boot slice broke between r209459 and r209502

2010-06-26 Thread Daniel Braniss
> 
> --qZLFzaLf2KECwqmh
> Content-Type: text/plain; charset=us-ascii
> Content-Disposition: inline
> Content-Transfer-Encoding: quoted-printable
> 
> On Sat, Jun 26, 2010 at 12:10:57PM +0300, Daniel Braniss wrote:
> > ...
> > what do you see when you type boot0cfg -v ...?
> > gpart show?
> > then try=20
> > gpart set -a active -i n aacd0
> > n will probably be 5.
> >=20
> > bottom line, the MBR is NOT being updated by boot0cfg
> 
> OK; here's what I see -- note that the /S1/usr/sbin/boot0cfg executable
> is the one I built yesterday without the 2 lines from r209469:
> 
> freebeast(9.0-C)[2] uname -a
> FreeBSD freebeast.catwhisker.org 9.0-CURRENT FreeBSD 9.0-CURRENT #200 r2095=
> 22: Fri Jun 25 06:11:00 PDT 2010 r...@freebeast.catwhisker.org:/usr/obj=
> /usr/src/sys/GENERIC  i386
> freebeast(9.0-C)[3] sudo boot0cfg -v aacd0; echo $?
> Password:
> #   flag start chs   type   end chs   offset size
> 1   0x00  0:  1: 1   0xa5651:254:63   63 10474317
> 2   0x00652:  0: 1   0xa5   1023:254:63 10474380 10474380
> 3   0x00   1023:255:63   0xa5   1023:254:63 20948760 10474380
> 4   0x80   1023:255:63   0xa5   1023:254:63 31423140 40194630
> 
> version=3D1.0  drive=3D0x80  mask=3D0xf  ticks=3D182  bell=3D  (0x7)
> options=3Dpacket,update,nosetdrv
> default_selection=3DF4 (Slice 4)
> 0
> freebeast(9.0-C)[4] sudo boot0cfg -v -s 2 aacd0 ; echo $?
> boot0cfg: write_mbr: /dev/aacd0: Operation not permitted
> 1
> freebeast(9.0-C)[5] sudo boot0cfg -v aacd0 ; echo $?
> #   flag start chs   type   end chs   offset size
> 1   0x00  0:  1: 1   0xa5651:254:63   63 10474317
> 2   0x00652:  0: 1   0xa5   1023:254:63 10474380 10474380
> 3   0x00   1023:255:63   0xa5   1023:254:63 20948760 10474380
> 4   0x80   1023:255:63   0xa5   1023:254:63 31423140 40194630
> 
> version=3D1.0  drive=3D0x80  mask=3D0xf  ticks=3D182  bell=3D  (0x7)
> options=3Dpacket,update,nosetdrv
> default_selection=3DF4 (Slice 4)
> 0
> freebeast(9.0-C)[6] sudo /S1/usr/sbin/boot0cfg -v -s 2 aacd0 ; echo $?
> #   flag start chs   type   end chs   offset size
> 1   0x00  0:  1: 1   0xa5651:254:63   63 10474317
> 2   0x00652:  0: 1   0xa5   1023:254:63 10474380 10474380
> 3   0x00   1023:255:63   0xa5   1023:254:63 20948760 10474380
> 4   0x80   1023:255:63   0xa5   1023:254:63 31423140     40194630
> 
> version=3D1.0  drive=3D0x80  mask=3D0xf  ticks=3D182  bell=3D  (0x7)
> options=3Dpacket,update,nosetdrv
> default_selection=3DF2 (Slice 2)
> 0
> freebeast(9.0-C)[7] sudo boot0cfg -v aacd0 ; echo $?
> #   flag start chs   type   end chs   offset size
> 1   0x00  0:  1: 1   0xa5651:254:63   63 10474317
> 2   0x00652:  0: 1   0xa5   1023:254:63 10474380 10474380
> 3   0x00   1023:255:63   0xa5   1023:254:63 20948760 10474380
> 4   0x80   1023:255:63   0xa5   1023:254:63 31423140 40194630
> 
> version=3D1.0  drive=3D0x80  mask=3D0xf  ticks=3D182  bell=3D  (0x7)
> options=3Dpacket,update,nosetdrv
> default_selection=3DF2 (Slice 2)
> 0
> freebeast(9.0-C)[8] sudo gpart show
> =3D>  63  71619471  aacd0  MBR  (34G)
> 63  10474317  1  freebsd  (5.0G)
>   10474380  10474380  2  freebsd  (5.0G)
>   20948760  10474380  3  freebsd  (5.0G)
>   31423140  40194630  4  freebsd  [active]  (19G)
>   71617770  1764 - free -  (882K)
> 
> =3D>   63  143306919  aacd1  MBR  (68G)
>  63  143299737  1  freebsd  [active]  (68G)
>   143299800   7182 - free -  (3.5M)
> 
> =3D>   0  10474317  aacd0s1  BSD  (5.0G)
>  0   30720001  freebsd-ufs  (1.5G)
>3072000   74023174  freebsd-ufs  (3.5G)
> 
> =3D>   0  10474380  aacd0s2  BSD  (5.0G)
>  0   30720001  freebsd-ufs  (1.5G)
>3072000   74023804  freebsd-ufs  (3.5G)
> 
> =3D>   0  10474380  aacd0s3  BSD  (5.0G)
>  0   30720001  freebsd-ufs  (1.5G)
>3072000   74023804  freebsd-ufs  (3.5G)
> 
> =3D>   0  40194630  aacd0s4  BSD  (19G)
>  0   30720001  freebsd-ufs  (1.5G)
>3072000  209715202  freebsd-swap  (10G)
>   24043520   74014724  freebsd-ufs  (3.5G)
>   31444992   87496386  freebsd-ufs  (4.2G)
> 
> =3D>0  143299737  aacd1s1  BSD  (68G)
>   0   209715202  freebsd-swap  (10G)
>20971520   671088644  freebsd-ufs  (32G)
>8