Re: 5.5 and dual-boot

2014-03-08 Thread Joel Sing
On Sat, 8 Mar 2014, Theo de Raadt wrote:
  I follow -current for several years but recently a thing puzzles me.
 
  My x200 is a dual-boot system (Seven/OpenBSD -current) and since (I
  think) the amd64/i386 installboot change, each time I upgrade via
  bsd.rd, I have to generate a new openbsd.pbr and  copy it to Seven.
 
  If I miss that, I get an ERR M and can't go further.
 
  First I was thinking about changes but I checked code and last
  modification on boot(8) was made 2 weeks ago (I did 2 updates since it).
 
  I used that setup for several years without any need to do that, what do
  I miss here, is it now normal ?

 The old installboot would reuse the same file, very carefully.

To be clear, the old amd64/i386 installboot never updated /boot - it only ever 
patched biosboot and installed it into the PBR. It was entirely up to the 
user (or the install script) to copy /usr/mdec/boot file to /boot - if you 
used cp or cat the old PBR may have continued to work, but there was no 
guarantee.

 Joel's new installboot does not do that, and chooses to be careful
 about handling a different problem instead.

 Can't easily solve both problems.  I think he should revert to the
 old method.
-- 

Action without study is fatal. Study without action is futile.
-- Mary Ritter Beard



Re: 5.5 and dual-boot

2014-03-08 Thread Theo de Raadt
 To be clear, the old amd64/i386 installboot never updated /boot - it only 
 ever 
 patched biosboot and installed it into the PBR. It was entirely up to the 
 user (or the install script) to copy /usr/mdec/boot file to /boot - if you 
 used cp or cat the old PBR may have continued to work, but there was no 
 guarantee.

This improperly describes what the previous sequence did.

It did not copy the content to /boot. In fact, it cat'd it to the
existing file, thereby replacing the existing ffs blocks with new ffs
blocks.  The block numbers in use do not change (typically).  It is
not a published semantic of the ffs code, but...

Furthermore, this is not a new or surprising idiom; it has been used
all over the place in the past for bootblocks.

This mechanism is commonly used when the primary bootcode have a very
small space to remember where the secondary code is.  That is why the
primary loader has to (generally) be modified afterwards.  In the
common case, for re-installing bootblocks, they do land in the same
place, and ... thus, your change broke things for people.

Here's the old code, and the new code.

Index: install.md
===
RCS file: /cvs/src/distrib/i386/common/install.md,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -p -u -r1.56 -r1.57
--- install.md  16 Nov 2013 18:37:27 -  1.56
+++ install.md  20 Jan 2014 05:14:05 -  1.57
@@ -39,10 +39,7 @@ NCPU=$(sysctl -n hw.ncpufound)
 ((NCPU  1))  { DEFAULTSETS=bsd bsd.rd bsd.mp ; SANESETS=bsd bsd.mp ; }
 
 md_installboot() {
-   # LBA biosboot uses /boot's i-node number. Using 'cat' preserves that
-   # number, so multiboot setups (NTLDR) can work across upgrades.
-   cat /mnt/usr/mdec/boot /mnt/boot
-   if ! /mnt/usr/mdec/installboot /mnt/boot /mnt/usr/mdec/biosboot ${1} ; 
then
+   if ! installboot -r /mnt ${1} ; then
echo \nFailed to install bootblocks.
echo You will not be able to boot OpenBSD from ${1}.
exit



Re: 5.5 and dual-boot

2014-03-08 Thread Theo de Raadt
 On Sat, 8 Mar 2014, Theo de Raadt wrote:
   I follow -current for several years but recently a thing puzzles me.
  
   My x200 is a dual-boot system (Seven/OpenBSD -current) and since (I
   think) the amd64/i386 installboot change, each time I upgrade via
   bsd.rd, I have to generate a new openbsd.pbr and  copy it to Seven.
  
   If I miss that, I get an ERR M and can't go further.
  
   First I was thinking about changes but I checked code and last
   modification on boot(8) was made 2 weeks ago (I did 2 updates since it).
  
   I used that setup for several years without any need to do that, what do
   I miss here, is it now normal ?
 
  The old installboot would reuse the same file, very carefully.
 
 To be clear, the old amd64/i386 installboot never updated /boot - it only 
 ever 
 patched biosboot and installed it into the PBR. It was entirely up to the 
 user (or the install script) to copy /usr/mdec/boot file to /boot - if you 
 used cp or cat the old PBR may have continued to work, but there was no 
 guarantee.

It was entirely up to something but, but you removed it and replaced it
(incorrectly).

You removed a line like this from various places:

-   cat /mnt/usr/mdec/boot /mnt/boot

and then replaced it with a line which writes a fresh new file, on fresh
disk blocks.  It matters, because at that moment primary bootblocks (of
various sorts) point at the old blocks, including ones that installboot
itself is not handling.

It is fundamental to the way that primary and secondary bootblocks
operate on many architectures.

(Those that do not understand multiboot are doomed to break it :)

  Joel's new installboot does not do that, and chooses to be careful
  about handling a different problem instead.
 
  Can't easily solve both problems.  I think he should revert to the
  old method.

Incorrect.  The problem is that the new code does not emulate the
try-to-reuse-the-same-blocks mechanism that was in use before.
 



5.5 and dual-boot

2014-03-07 Thread Jean-Philippe Luiggi

Hi everybody,

I follow -current for several years but recently a thing puzzles me.

My x200 is a dual-boot system (Seven/OpenBSD -current) and since (I 
think) the
amd64/i386 installboot change, each time I upgrade via bsd.rd, I have to generate a new 
openbsd.pbr and  copy it to Seven.

If I miss that, I get an ERR M and can't go further.

First I was thinking about changes but I checked code and last modification on 
boot(8) was made 2 weeks ago (I did 2 updates since it).

I used that setup for several years without any need to do that, what do I
miss here, is it now normal ?

Regards,

Jean-Philippe.



--
Ce message a été vérifié par MailScanner
pour des virus ou des polluriels et rien de
suspect n'a été trouvé.
For all your IT requirements visit: http://www.transtec.co.uk



Re: 5.5 and dual-boot

2014-03-07 Thread Theo de Raadt
 I follow -current for several years but recently a thing puzzles me.
 
 My x200 is a dual-boot system (Seven/OpenBSD -current) and since (I 
 think) the
 amd64/i386 installboot change, each time I upgrade via bsd.rd, I have to 
 generate a new openbsd.pbr and  copy it to Seven.
 
 If I miss that, I get an ERR M and can't go further.
 
 First I was thinking about changes but I checked code and last modification 
 on boot(8) was made 2 weeks ago (I did 2 updates since it).
 
 I used that setup for several years without any need to do that, what do I
 miss here, is it now normal ?

The old installboot would reuse the same file, very carefully.

Joel's new installboot does not do that, and chooses to be careful
about handling a different problem instead.

Can't easily solve both problems.  I think he should revert to the
old method.



Re: 5.5 and dual-boot

2014-03-07 Thread Stuart Henderson
On 2014/03/07 11:04, Jean-Philippe Luiggi wrote:
 Hi everybody,
 
 I follow -current for several years but recently a thing puzzles me.
 
 My x200 is a dual-boot system (Seven/OpenBSD -current) and since (I 
 think) the
 amd64/i386 installboot change, each time I upgrade via bsd.rd, I have to 
 generate a new openbsd.pbr and  copy it to Seven.
 
 If I miss that, I get an ERR M and can't go further.
 
 First I was thinking about changes but I checked code and last modification 
 on boot(8) was made 2 weeks ago (I did 2 updates since it).
 
 I used that setup for several years without any need to do that, what do I
 miss here, is it now normal ?
 
 Regards,
 
 Jean-Philippe.
 
 
 
 -- 
 Ce message a été vérifié par MailScanner
 pour des virus ou des polluriels et rien de
 suspect n'a été trouvé.
 For all your IT requirements visit: http://www.transtec.co.uk
 

The location of /boot (second-stage boot loader) is recorded in the
pbr so the 1st-stage can find it.

With the old method of cp + /usr/mdec/installboot, though it wasn't
guaranteed, /boot tended to stay in the same place on disk most of the
time:

# cp boot /; ./installboot -v /boot ./biosboot sd1 21 | grep shift
fs block shift 2; part offset 64; inode block 56, offset 2344
# cp boot /; ./installboot -v /boot ./biosboot sd1 21 | grep shift 
fs block shift 2; part offset 64; inode block 56, offset 2344
# cp boot /; ./installboot -v /boot ./biosboot sd1 21 | grep shift 
fs block shift 2; part offset 64; inode block 56, offset 2344
# cp boot /; ./installboot -v /boot ./biosboot sd1 21 | grep shift 
fs block shift 2; part offset 64; inode block 56, offset 2344

Whereas new installboot tends to shift it around:

# installboot -v sd1 21 | grep shift
fs block shift 2; part offset 64; inode block 56, offset 2344
# installboot -v sd1 21 | grep shift 
fs block shift 2; part offset 64; inode block 48, offset 16168
# installboot -v sd1 21 | grep shift 
fs block shift 2; part offset 64; inode block 56, offset 2472

Meaning that the pbr must be updated with the new location.



Re: 5.5 and dual-boot

2014-03-07 Thread Bob Beck
If you're using windows bootloader, you need to re-get the openbsd.pbr
file to the windows side like you did in the first place
according to the instructions here:

http://www.openbsd.org/faq/faq4.html#Multibooting

Someone really needs to put it in the multiboot FAQ that if you're
booting with the windows bootloader and you get an error message like
that to re-get openbsd.pbr to the windows side.




On Fri, Mar 7, 2014 at 9:04 AM, Jean-Philippe Luiggi j...@didconcept.com 
wrote:
 Hi everybody,

 I follow -current for several years but recently a thing puzzles me.

 My x200 is a dual-boot system (Seven/OpenBSD -current) and since (I
 think) the
 amd64/i386 installboot change, each time I upgrade via bsd.rd, I have to
 generate a new openbsd.pbr and  copy it to Seven.

 If I miss that, I get an ERR M and can't go further.

 First I was thinking about changes but I checked code and last modification
 on boot(8) was made 2 weeks ago (I did 2 updates since it).

 I used that setup for several years without any need to do that, what do I
 miss here, is it now normal ?

 Regards,

 Jean-Philippe.



 --
 Ce message a été vérifié par MailScanner
 pour des virus ou des polluriels et rien de
 suspect n'a été trouvé.
 For all your IT requirements visit: http://www.transtec.co.uk




Re: 5.5 and dual-boot

2014-03-07 Thread Theo de Raadt
 Whereas new installboot tends to shift it around:
 
 # installboot -v sd1 21 | grep shift
 fs block shift 2; part offset 64; inode block 56, offset 2344
 # installboot -v sd1 21 | grep shift 
 fs block shift 2; part offset 64; inode block 48, offset 16168
 # installboot -v sd1 21 | grep shift 
 fs block shift 2; part offset 64; inode block 56, offset 2472
 
 Meaning that the pbr must be updated with the new location.

It doesn't just tend to move around (ie. tend == prone to move).
It moves every time, since it is using mkstemp to create a new file.



Re: 5.5 and dual-boot

2014-03-07 Thread Bob Beck

 Meaning that the pbr must be updated with the new location.

 It doesn't just tend to move around (ie. tend == prone to move).
 It moves every time, since it is using mkstemp to create a new file.


Hmm.. yeah that'll be fun to deal with in multi-boot setups.



Re: 5.5 and dual-boot

2014-03-07 Thread Mark Kettenis
 From: Theo de Raadt dera...@cvs.openbsd.org
 Date: Fri, 07 Mar 2014 09:24:13 -0700
 
  Whereas new installboot tends to shift it around:
  
  # installboot -v sd1 21 | grep shift
  fs block shift 2; part offset 64; inode block 56, offset 2344
  # installboot -v sd1 21 | grep shift 
  fs block shift 2; part offset 64; inode block 48, offset 16168
  # installboot -v sd1 21 | grep shift 
  fs block shift 2; part offset 64; inode block 56, offset 2472
  
  Meaning that the pbr must be updated with the new location.
 
 It doesn't just tend to move around (ie. tend == prone to move).
 It moves every time, since it is using mkstemp to create a new file.

But isn't this a good thing?

Now it moves around consistently, so people perhaps won't forget and
be surprised when it moves eventually.  They just need some retraining ;).



Re: 5.5 and dual-boot

2014-03-07 Thread Bob Beck
No, because moving it means that you have to manually redo it every
time you install a snap. which is really a pita.


On Fri, Mar 7, 2014 at 9:44 AM, Mark Kettenis mark.kette...@xs4all.nl wrote:
 From: Theo de Raadt dera...@cvs.openbsd.org
 Date: Fri, 07 Mar 2014 09:24:13 -0700

  Whereas new installboot tends to shift it around:
 
  # installboot -v sd1 21 | grep shift
  fs block shift 2; part offset 64; inode block 56, offset 2344
  # installboot -v sd1 21 | grep shift
  fs block shift 2; part offset 64; inode block 48, offset 16168
  # installboot -v sd1 21 | grep shift
  fs block shift 2; part offset 64; inode block 56, offset 2472
 
  Meaning that the pbr must be updated with the new location.

 It doesn't just tend to move around (ie. tend == prone to move).
 It moves every time, since it is using mkstemp to create a new file.

 But isn't this a good thing?

 Now it moves around consistently, so people perhaps won't forget and
 be surprised when it moves eventually.  They just need some retraining ;).




Re: 5.5 and dual-boot

2014-03-07 Thread Bob Beck
before it was just that you had to be aware to redo it when something
changed. (which for me usually means booting from external media,
dd'ing the pbr file onto a usb stick, booting into windows, and
copying it into the right place.

having to boot windows every time you upgrade is a pain.

On Fri, Mar 7, 2014 at 9:49 AM, Bob Beck b...@obtuse.com wrote:
 No, because moving it means that you have to manually redo it every
 time you install a snap. which is really a pita.


 On Fri, Mar 7, 2014 at 9:44 AM, Mark Kettenis mark.kette...@xs4all.nl wrote:
 From: Theo de Raadt dera...@cvs.openbsd.org
 Date: Fri, 07 Mar 2014 09:24:13 -0700

  Whereas new installboot tends to shift it around:
 
  # installboot -v sd1 21 | grep shift
  fs block shift 2; part offset 64; inode block 56, offset 2344
  # installboot -v sd1 21 | grep shift
  fs block shift 2; part offset 64; inode block 48, offset 16168
  # installboot -v sd1 21 | grep shift
  fs block shift 2; part offset 64; inode block 56, offset 2472
 
  Meaning that the pbr must be updated with the new location.

 It doesn't just tend to move around (ie. tend == prone to move).
 It moves every time, since it is using mkstemp to create a new file.

 But isn't this a good thing?

 Now it moves around consistently, so people perhaps won't forget and
 be surprised when it moves eventually.  They just need some retraining ;).




Re: 5.5 and dual-boot

2014-03-07 Thread Jean-Philippe Luiggi

Le 2014-03-07 11:21, Stuart Henderson a écrit :

On 2014/03/07 11:04, Jean-Philippe Luiggi wrote:

Hi everybody,

I follow -current for several years but recently a thing puzzles me.

My x200 is a dual-boot system (Seven/OpenBSD -current) and since (I 
think) the
amd64/i386 installboot change, each time I upgrade via bsd.rd, I have to generate a new 
openbsd.pbr and  copy it to Seven.

If I miss that, I get an ERR M and can't go further.

First I was thinking about changes but I checked code and last modification on 
boot(8) was made 2 weeks ago (I did 2 updates since it).

I used that setup for several years without any need to do that, what do I
miss here, is it now normal ?

Regards,

Jean-Philippe.



--
Ce message a été vérifié par MailScanner
pour des virus ou des polluriels et rien de
suspect n'a été trouvé.
For all your IT requirements visit: http://www.transtec.co.uk


The location of /boot (second-stage boot loader) is recorded in the
pbr so the 1st-stage can find it.

With the old method of cp + /usr/mdec/installboot, though it wasn't
guaranteed, /boot tended to stay in the same place on disk most of the
time:

# cp boot /; ./installboot -v /boot ./biosboot sd1 21 | grep shift
fs block shift 2; part offset 64; inode block 56, offset 2344
# cp boot /; ./installboot -v /boot ./biosboot sd1 21 | grep shift
fs block shift 2; part offset 64; inode block 56, offset 2344
# cp boot /; ./installboot -v /boot ./biosboot sd1 21 | grep shift
fs block shift 2; part offset 64; inode block 56, offset 2344
# cp boot /; ./installboot -v /boot ./biosboot sd1 21 | grep shift
fs block shift 2; part offset 64; inode block 56, offset 2344

Whereas new installboot tends to shift it around:

# installboot -v sd1 21 | grep shift
fs block shift 2; part offset 64; inode block 56, offset 2344
# installboot -v sd1 21 | grep shift
fs block shift 2; part offset 64; inode block 48, offset 16168
# installboot -v sd1 21 | grep shift
fs block shift 2; part offset 64; inode block 56, offset 2472

Meaning that the pbr must be updated with the new location.




Hi Stuart,

This is pretty clear,  thanks a lot for explaining that. :)

Regards,

Jean-Philippe

--
Ce message a été vérifié par MailScanner
pour des virus ou des polluriels et rien de
suspect n'a été trouvé.
For all your IT requirements visit: http://www.transtec.co.uk



Re: 5.5 and dual-boot

2014-03-07 Thread Bob Beck
actually more painful than having to boot windows is to always have
something handy to boot the snap from in order to dd the bootblock off
in case you forget to do it before rebooting, or you're fucked.


On Fri, Mar 7, 2014 at 9:50 AM, Bob Beck b...@obtuse.com wrote:
 before it was just that you had to be aware to redo it when something
 changed. (which for me usually means booting from external media,
 dd'ing the pbr file onto a usb stick, booting into windows, and
 copying it into the right place.

 having to boot windows every time you upgrade is a pain.

 On Fri, Mar 7, 2014 at 9:49 AM, Bob Beck b...@obtuse.com wrote:
 No, because moving it means that you have to manually redo it every
 time you install a snap. which is really a pita.


 On Fri, Mar 7, 2014 at 9:44 AM, Mark Kettenis mark.kette...@xs4all.nl 
 wrote:
 From: Theo de Raadt dera...@cvs.openbsd.org
 Date: Fri, 07 Mar 2014 09:24:13 -0700

  Whereas new installboot tends to shift it around:
 
  # installboot -v sd1 21 | grep shift
  fs block shift 2; part offset 64; inode block 56, offset 2344
  # installboot -v sd1 21 | grep shift
  fs block shift 2; part offset 64; inode block 48, offset 16168
  # installboot -v sd1 21 | grep shift
  fs block shift 2; part offset 64; inode block 56, offset 2472
 
  Meaning that the pbr must be updated with the new location.

 It doesn't just tend to move around (ie. tend == prone to move).
 It moves every time, since it is using mkstemp to create a new file.

 But isn't this a good thing?

 Now it moves around consistently, so people perhaps won't forget and
 be surprised when it moves eventually.  They just need some retraining ;).




Re: 5.5 and dual-boot

2014-03-07 Thread Jean-Philippe Luiggi

Le 2014-03-07 11:24, Bob Beck a écrit :

If you're using windows bootloader, you need to re-get the openbsd.pbr
file to the windows side like you did in the first place
according to the instructions here:

http://www.openbsd.org/faq/faq4.html#Multibooting

Someone really needs to put it in the multiboot FAQ that if you're
booting with the windows bootloader and you get an error message like
that to re-get openbsd.pbr to the windows side.


Hello Bob,

I agree, until I found that (With help from Kenneth), it was not obvious 
to understand/fix my problem.


Regards,

Jean-Philippe

--
Ce message a été vérifié par MailScanner
pour des virus ou des polluriels et rien de
suspect n'a été trouvé.
For all your IT requirements visit: http://www.transtec.co.uk



Re: 5.5 and dual-boot

2014-03-07 Thread Theo de Raadt
 actually more painful than having to boot windows is to always have
 something handy to boot the snap from in order to dd the bootblock off
 in case you forget to do it before rebooting, or you're fucked.

The new installboot was enabled around a month ago.  The issue is only
being talked about now.

Apparently... this dual-boot issue is only seen now, indicating that
these people don't upgrade very often, or participate in the test
cycles leading up to release.

Hey, I get it.  Just let's not over-estimate how many people this will
affect.



Re: 5.5 and dual-boot

2014-03-07 Thread Bob Beck
It will affect everyone who needs windows on a laptop for work - or
filling out pdf forms for foundations, things like that.

It is a good way to ensure snaps get tested less on real hardware.

On Fri, Mar 7, 2014 at 10:13 AM, Theo de Raadt dera...@cvs.openbsd.org wrote:
 actually more painful than having to boot windows is to always have
 something handy to boot the snap from in order to dd the bootblock off
 in case you forget to do it before rebooting, or you're fucked.

 The new installboot was enabled around a month ago.  The issue is only
 being talked about now.

 Apparently... this dual-boot issue is only seen now, indicating that
 these people don't upgrade very often, or participate in the test
 cycles leading up to release.

 Hey, I get it.  Just let's not over-estimate how many people this will
 affect.



Re: 5.5 and dual-boot

2014-03-07 Thread Wade, Daniel
I've been dual booting for years and never once use dd to copy the openbsd.pbr
If I'm in windows world and want to boot into OpenBSD I run diskpart and flip 
the active partition.
Same in the other direction, fdisk -e and flip the active back to windows.
I am my own boot manager.



-Original Message-
From: owner-t...@openbsd.org [mailto:owner-t...@openbsd.org] On Behalf Of Bob 
Beck
Sent: Friday, March 07, 2014 12:15 PM
To: Theo de Raadt
Cc: Mark Kettenis; Stuart Henderson; Jean-Philippe Luiggi; OpenBSD technical 
list
Subject: Re: 5.5 and dual-boot

It will affect everyone who needs windows on a laptop for work - or
filling out pdf forms for foundations, things like that.

It is a good way to ensure snaps get tested less on real hardware.

On Fri, Mar 7, 2014 at 10:13 AM, Theo de Raadt dera...@cvs.openbsd.org wrote:
 actually more painful than having to boot windows is to always have
 something handy to boot the snap from in order to dd the bootblock off
 in case you forget to do it before rebooting, or you're fucked.

 The new installboot was enabled around a month ago.  The issue is only
 being talked about now.

 Apparently... this dual-boot issue is only seen now, indicating that
 these people don't upgrade very often, or participate in the test
 cycles leading up to release.

 Hey, I get it.  Just let's not over-estimate how many people this will
 affect.




Re: 5.5 and dual-boot

2014-03-07 Thread Kenneth Westerback
On Mar 7, 2014 1:10 PM, Wade, Daniel dw...@meridium.com wrote:

 I've been dual booting for years and never once use dd to copy the
openbsd.pbr
 If I'm in windows world and want to boot into OpenBSD I run diskpart and
flip the active partition.
 Same in the other direction, fdisk -e and flip the active back to windows.

 I am my own boot manager.

Dude, we need a Daniel mode in mg just to keep that line alive! :-)

 Ken




 -Original Message-
 From: owner-t...@openbsd.org [mailto:owner-t...@openbsd.org] On Behalf Of
Bob Beck
 Sent: Friday, March 07, 2014 12:15 PM
 To: Theo de Raadt
 Cc: Mark Kettenis; Stuart Henderson; Jean-Philippe Luiggi; OpenBSD
technical list
 Subject: Re: 5.5 and dual-boot

 It will affect everyone who needs windows on a laptop for work - or
 filling out pdf forms for foundations, things like that.

 It is a good way to ensure snaps get tested less on real hardware.

 On Fri, Mar 7, 2014 at 10:13 AM, Theo de Raadt dera...@cvs.openbsd.org
wrote:
  actually more painful than having to boot windows is to always have
  something handy to boot the snap from in order to dd the bootblock off
  in case you forget to do it before rebooting, or you're fucked.
 
  The new installboot was enabled around a month ago.  The issue is only
  being talked about now.
 
  Apparently... this dual-boot issue is only seen now, indicating that
  these people don't upgrade very often, or participate in the test
  cycles leading up to release.
 
  Hey, I get it.  Just let's not over-estimate how many people this will
  affect.




Re: 5.5 and dual-boot

2014-03-07 Thread Bob Beck
Why I hadn't thought of going back to that I don't know.. It actually
works better for me since I don't then normally have to wait for the
windows bootloader screen...   as at least in my case 90% of the time
the laptop runs OpenBSD..

Of course now after testing it I have to wait for windows to finish
installing update because I haven't booted it in too long..

On Fri, Mar 7, 2014 at 11:27 AM, Kenneth Westerback
kwesterb...@gmail.com wrote:
 On Mar 7, 2014 1:10 PM, Wade, Daniel dw...@meridium.com wrote:

 I've been dual booting for years and never once use dd to copy the
 openbsd.pbr
 If I'm in windows world and want to boot into OpenBSD I run diskpart and
 flip the active partition.
 Same in the other direction, fdisk -e and flip the active back to windows.

 I am my own boot manager.

 Dude, we need a Daniel mode in mg just to keep that line alive! :-)

  Ken




 -Original Message-
 From: owner-t...@openbsd.org [mailto:owner-t...@openbsd.org] On Behalf Of
 Bob Beck
 Sent: Friday, March 07, 2014 12:15 PM
 To: Theo de Raadt
 Cc: Mark Kettenis; Stuart Henderson; Jean-Philippe Luiggi; OpenBSD
 technical list
 Subject: Re: 5.5 and dual-boot

 It will affect everyone who needs windows on a laptop for work - or
 filling out pdf forms for foundations, things like that.

 It is a good way to ensure snaps get tested less on real hardware.

 On Fri, Mar 7, 2014 at 10:13 AM, Theo de Raadt dera...@cvs.openbsd.org
 wrote:
  actually more painful than having to boot windows is to always have
  something handy to boot the snap from in order to dd the bootblock off
  in case you forget to do it before rebooting, or you're fucked.
 
  The new installboot was enabled around a month ago.  The issue is only
  being talked about now.
 
  Apparently... this dual-boot issue is only seen now, indicating that
  these people don't upgrade very often, or participate in the test
  cycles leading up to release.
 
  Hey, I get it.  Just let's not over-estimate how many people this will
  affect.





Re: 5.5 and dual-boot

2014-03-07 Thread Bob Beck
... although having scripted the fdisk on openbsd quite nicely so I
can't screw it up, proceeed to forget that windows numbers partitions
starting at 1, not 0, in diskpart, and am now digging for a usb stick
and kicking myself in the ass..

Someone good at windows could take pity on me and mail me a batch fie
to activate partition *3* on disk 0 with diskpart :)

I might even buy them a beer or 13 for it.

On Fri, Mar 7, 2014 at 11:43 AM, Bob Beck b...@obtuse.com wrote:
 Why I hadn't thought of going back to that I don't know.. It actually
 works better for me since I don't then normally have to wait for the
 windows bootloader screen...   as at least in my case 90% of the time
 the laptop runs OpenBSD..

 Of course now after testing it I have to wait for windows to finish
 installing update because I haven't booted it in too long..

 On Fri, Mar 7, 2014 at 11:27 AM, Kenneth Westerback
 kwesterb...@gmail.com wrote:
 On Mar 7, 2014 1:10 PM, Wade, Daniel dw...@meridium.com wrote:

 I've been dual booting for years and never once use dd to copy the
 openbsd.pbr
 If I'm in windows world and want to boot into OpenBSD I run diskpart and
 flip the active partition.
 Same in the other direction, fdisk -e and flip the active back to windows.

 I am my own boot manager.

 Dude, we need a Daniel mode in mg just to keep that line alive! :-)

  Ken




 -Original Message-
 From: owner-t...@openbsd.org [mailto:owner-t...@openbsd.org] On Behalf Of
 Bob Beck
 Sent: Friday, March 07, 2014 12:15 PM
 To: Theo de Raadt
 Cc: Mark Kettenis; Stuart Henderson; Jean-Philippe Luiggi; OpenBSD
 technical list
 Subject: Re: 5.5 and dual-boot

 It will affect everyone who needs windows on a laptop for work - or
 filling out pdf forms for foundations, things like that.

 It is a good way to ensure snaps get tested less on real hardware.

 On Fri, Mar 7, 2014 at 10:13 AM, Theo de Raadt dera...@cvs.openbsd.org
 wrote:
  actually more painful than having to boot windows is to always have
  something handy to boot the snap from in order to dd the bootblock off
  in case you forget to do it before rebooting, or you're fucked.
 
  The new installboot was enabled around a month ago.  The issue is only
  being talked about now.
 
  Apparently... this dual-boot issue is only seen now, indicating that
  these people don't upgrade very often, or participate in the test
  cycles leading up to release.
 
  Hey, I get it.  Just let's not over-estimate how many people this will
  affect.





Re: 5.5 and dual-boot

2014-03-07 Thread Wade, Daniel
Put the following in a txt file then: diskpart /s c:\openbsd_me.txt
Untested, but that's the idea.
And yep in windows world the disks starts at 0 and the partitions at 1

Select disk 0
Select part 3
Active
Exit



-Original Message-
From: Bob Beck [mailto:b...@obtuse.com] 
Sent: Friday, March 07, 2014 2:01 PM
To: Kenneth Westerback
Cc: Wade, Daniel; OpenBSD Tech
Subject: Re: 5.5 and dual-boot

... although having scripted the fdisk on openbsd quite nicely so I
can't screw it up, proceeed to forget that windows numbers partitions
starting at 1, not 0, in diskpart, and am now digging for a usb stick
and kicking myself in the ass..

Someone good at windows could take pity on me and mail me a batch fie
to activate partition *3* on disk 0 with diskpart :)

I might even buy them a beer or 13 for it.

On Fri, Mar 7, 2014 at 11:43 AM, Bob Beck b...@obtuse.com wrote:
 Why I hadn't thought of going back to that I don't know.. It actually
 works better for me since I don't then normally have to wait for the
 windows bootloader screen...   as at least in my case 90% of the time
 the laptop runs OpenBSD..

 Of course now after testing it I have to wait for windows to finish
 installing update because I haven't booted it in too long..

 On Fri, Mar 7, 2014 at 11:27 AM, Kenneth Westerback
 kwesterb...@gmail.com wrote:
 On Mar 7, 2014 1:10 PM, Wade, Daniel dw...@meridium.com wrote:

 I've been dual booting for years and never once use dd to copy the
 openbsd.pbr
 If I'm in windows world and want to boot into OpenBSD I run diskpart and
 flip the active partition.
 Same in the other direction, fdisk -e and flip the active back to windows.

 I am my own boot manager.

 Dude, we need a Daniel mode in mg just to keep that line alive! :-)

  Ken




 -Original Message-
 From: owner-t...@openbsd.org [mailto:owner-t...@openbsd.org] On Behalf Of
 Bob Beck
 Sent: Friday, March 07, 2014 12:15 PM
 To: Theo de Raadt
 Cc: Mark Kettenis; Stuart Henderson; Jean-Philippe Luiggi; OpenBSD
 technical list
 Subject: Re: 5.5 and dual-boot

 It will affect everyone who needs windows on a laptop for work - or
 filling out pdf forms for foundations, things like that.

 It is a good way to ensure snaps get tested less on real hardware.

 On Fri, Mar 7, 2014 at 10:13 AM, Theo de Raadt dera...@cvs.openbsd.org
 wrote:
  actually more painful than having to boot windows is to always have
  something handy to boot the snap from in order to dd the bootblock off
  in case you forget to do it before rebooting, or you're fucked.
 
  The new installboot was enabled around a month ago.  The issue is only
  being talked about now.
 
  Apparently... this dual-boot issue is only seen now, indicating that
  these people don't upgrade very often, or participate in the test
  cycles leading up to release.
 
  Hey, I get it.  Just let's not over-estimate how many people this will
  affect.





Re: 5.5 and dual-boot

2014-03-07 Thread Bob Beck
Yeah, just trying something similar out. :) I should probably clean it
up and give Nick an FAQ diff, as long as he commits the section on how
to do this so cvs blame doesn't make me a windows expert - just ask
bob - he does NFS *and* Windows...


On Fri, Mar 7, 2014 at 12:08 PM, Wade, Daniel dw...@meridium.com wrote:
 Put the following in a txt file then: diskpart /s c:\openbsd_me.txt
 Untested, but that's the idea.
 And yep in windows world the disks starts at 0 and the partitions at 1

 Select disk 0
 Select part 3
 Active
 Exit



 -Original Message-
 From: Bob Beck [mailto:b...@obtuse.com]
 Sent: Friday, March 07, 2014 2:01 PM
 To: Kenneth Westerback
 Cc: Wade, Daniel; OpenBSD Tech
 Subject: Re: 5.5 and dual-boot

 ... although having scripted the fdisk on openbsd quite nicely so I
 can't screw it up, proceeed to forget that windows numbers partitions
 starting at 1, not 0, in diskpart, and am now digging for a usb stick
 and kicking myself in the ass..

 Someone good at windows could take pity on me and mail me a batch fie
 to activate partition *3* on disk 0 with diskpart :)

 I might even buy them a beer or 13 for it.

 On Fri, Mar 7, 2014 at 11:43 AM, Bob Beck b...@obtuse.com wrote:
 Why I hadn't thought of going back to that I don't know.. It actually
 works better for me since I don't then normally have to wait for the
 windows bootloader screen...   as at least in my case 90% of the time
 the laptop runs OpenBSD..

 Of course now after testing it I have to wait for windows to finish
 installing update because I haven't booted it in too long..

 On Fri, Mar 7, 2014 at 11:27 AM, Kenneth Westerback
 kwesterb...@gmail.com wrote:
 On Mar 7, 2014 1:10 PM, Wade, Daniel dw...@meridium.com wrote:

 I've been dual booting for years and never once use dd to copy the
 openbsd.pbr
 If I'm in windows world and want to boot into OpenBSD I run diskpart and
 flip the active partition.
 Same in the other direction, fdisk -e and flip the active back to windows.

 I am my own boot manager.

 Dude, we need a Daniel mode in mg just to keep that line alive! :-)

  Ken




 -Original Message-
 From: owner-t...@openbsd.org [mailto:owner-t...@openbsd.org] On Behalf Of
 Bob Beck
 Sent: Friday, March 07, 2014 12:15 PM
 To: Theo de Raadt
 Cc: Mark Kettenis; Stuart Henderson; Jean-Philippe Luiggi; OpenBSD
 technical list
 Subject: Re: 5.5 and dual-boot

 It will affect everyone who needs windows on a laptop for work - or
 filling out pdf forms for foundations, things like that.

 It is a good way to ensure snaps get tested less on real hardware.

 On Fri, Mar 7, 2014 at 10:13 AM, Theo de Raadt dera...@cvs.openbsd.org
 wrote:
  actually more painful than having to boot windows is to always have
  something handy to boot the snap from in order to dd the bootblock off
  in case you forget to do it before rebooting, or you're fucked.
 
  The new installboot was enabled around a month ago.  The issue is only
  being talked about now.
 
  Apparently... this dual-boot issue is only seen now, indicating that
  these people don't upgrade very often, or participate in the test
  cycles leading up to release.
 
  Hey, I get it.  Just let's not over-estimate how many people this will
  affect.






Re: 5.5 and dual-boot

2014-03-07 Thread Ted Unangst
On Fri, Mar 07, 2014 at 17:44, Mark Kettenis wrote:

  Meaning that the pbr must be updated with the new location.
 
 It doesn't just tend to move around (ie. tend == prone to move).
 It moves every time, since it is using mkstemp to create a new file.
 
 But isn't this a good thing?
 
 Now it moves around consistently, so people perhaps won't forget and
 be surprised when it moves eventually.  They just need some retraining ;).

I think so. I've always thought the requirement to update openbsd.pbr
existed after every time installboot was run. Certainly, years ago, I
forgot to do it and got ERR M. (Echoes of an earlier conversation
coming back to me...)

Things that work 95% of the time encourage laziness.



Re: 5.5 and dual-boot

2014-03-07 Thread Theo de Raadt
   Meaning that the pbr must be updated with the new location.
  
  It doesn't just tend to move around (ie. tend == prone to move).
  It moves every time, since it is using mkstemp to create a new file.
  
  But isn't this a good thing?
  
  Now it moves around consistently, so people perhaps won't forget and
  be surprised when it moves eventually.  They just need some retraining ;).
 
 I think so. I've always thought the requirement to update openbsd.pbr
 existed after every time installboot was run. Certainly, years ago, I
 forgot to do it and got ERR M. (Echoes of an earlier conversation
 coming back to me...)
 
 Things that work 95% of the time encourage laziness.

So here's the low-down story.

The old code would open the old boot program, and rewrite over top
of it.  As a result, it would use the same blocks on the disk.  Things
which know where those blocks are, would continue working.  Unless
the bootblock grew.  Then uhmmm.. That new piece is not in
a known place.

In the last decade, the bootblock has grown, therefore once in a while
people would hit the problem, re-learn the recipie, and activate it.


Now fast forward to about 6 months ago.  Joel started writing a new
installboot that is more machine independent.  Lots of good reasons.
Very few reasons against it.  Too long a story.

The new one attempts to solve a different problem, with the unfortunate
loss of reuse the blocks from before.

The new one attempts to try to give safer atomicity, as in, a new
file is placed on the disk, then it is hooked up, and then the old
one is removed.  There are a few narrow cases where this is safer..
but.

I think this new change is fixing a window of risk which is not as
important as the common usage case, and new installboot should be
changed to use the old re-write technique.  In the rare case where
the bootblocks grow, oh well, recipe book time for people.



Re: 5.5 and dual-boot

2014-03-07 Thread jean-philipp luiggi


Le 07/03/2014 12:02 PM, Bob Beck a écrit :

actually more painful than having to boot windows is to always have
something handy to boot the snap from in order to dd the bootblock off
in case you forget to do it before rebooting, or you're fucked.


Hi Bob,

Yeah and hopefully, with a recent post on undeadly, I managed to have an 
USB install media. More easy than going all around the company

hunting for an external USB drive. :)

Regards.

Jean-Philippe


--
Ce message a été vérifié par MailScanner
pour des virus ou des polluriels et rien de
suspect n'a été trouvé.
For all your IT requirements visit: http://www.transtec.co.uk



Re: 5.5 and dual-boot

2014-03-07 Thread jean-philipp luiggi


Le 07/03/2014 12:13 PM, Theo de Raadt a écrit :

actually more painful than having to boot windows is to always have
something handy to boot the snap from in order to dd the bootblock off
in case you forget to do it before rebooting, or you're fucked.

The new installboot was enabled around a month ago.  The issue is only
being talked about now.

Apparently... this dual-boot issue is only seen now, indicating that
these people don't upgrade very often, or participate in the test
cycles leading up to release.


Hi Theo,

In fact I sent an email on bugs@ on 04/02/2014 (subject was installboot 
and ERR M).
First, it was suspected a problem because of using an old bsd.rd 
instead of the one provided with the snapshot.
This is after some tests in the next weeks that I found the culprit 
(openbsd.pbr).  Moreover as boot(8) continued to be changed, I wanted to 
be sure before posting.


Regards.

Jean-Philippe.

--
Ce message a été vérifié par MailScanner
pour des virus ou des polluriels et rien de
suspect n'a été trouvé.
For all your IT requirements visit: http://www.transtec.co.uk