Re: [PATCH] Remove "Multibooting" in FAQ

2019-04-21 Thread Leonid Bobrov
On Sat, Apr 06, 2019 at 12:54:54PM -0700, Thomas Frohwein wrote:
> I remember the following as the steps not mentioned in the FAQ that helped me
> get it to work. All with MBR and Windows 10.
> 
> 1. Shrink the main partition in Windows disk manager and create a second
>partition.
> 2. In the OpenBSD installer, run fdisk and change the type of the second
>partition to OpenBSD (A6), otherwise keeping same size/offset.
> 3. For softraid crypto, follow the FAQ for installation. You should create the
>RAID partition as 'a' on the OpenBSD part of the disk, leaving (in my case
>'i' and 'j' intact.
> 
> If the above steps help you or your friend to set it up, we can see if an
> addition to the FAQ may be worth considering.
> 
> Here my disklabel and fdisk from that setup:
> 
> # /dev/rsd0c:
> type: SCSI
> disk: SCSI disk
> label: WDC WDS500G2B0B-
> duid: f2adf57b4715cd30
> flags:
> bytes/sector: 512
> sectors/track: 63
> tracks/cylinder: 255
> sectors/cylinder: 16065
> cylinders: 60801
> total sectors: 976773168 # total bytes: 476940.0M
> boundstart: 455473152
> boundend: 976769024
> drivedata: 0 
> 
> 16 partitions:
> #size   offset  fstype [fsize bsize   cpg]
>   a:254539.0M455473152RAID
>   c:476940.0M0  unused
>   i:   500.0M 2048NTFS
>   j:221898.0M  1026048NTFS
> 
> Disk: sd0 geometry: 60801/255/63 [976773168 Sectors]
> Offset: 0 Signature: 0xAA55
> Starting Ending LBA Info:
>  #: id  C   H   S -  C   H   S [   start:size ]
> ---
> *0: 07  0  32  33 - 63 221  30 [2048: 1024000 ] NTFS  
>   
>  1: 07 63 221  31 -  28247  27   2 [ 1026048:   452763710 ] NTFS  
>   
>  2: 27  28247  58  36 -  28351 195   4 [   453791744: 1679360 ] Win 
> Recovery
>  3: A6  28351 227  37 -  60801  15  14 [   455473152:   521295872 ] OpenBSD   
>   
>

Thank you for your help and sorry for not responding so long (I don't
blame him for not being in mood so long to try to install OpenBSD
again). Also sorry for the lack of logs because he couldn't think about
logs before failure actually happened. However, he didn't use your help,
instead he managed to multiboot with GRUB recently, I'll ask him to give
you logs on this after he finishes his job.



Re: [PATCH] Remove "Multibooting" in FAQ

2019-04-07 Thread frantisek holop
tfrohw...@fastmail.com - Sat, 06 April 2019 at 17:45:42
> I run a dual-boot with Windows 10 on the same partition and the

on the same partition?

-f
-- 



Re: [PATCH] Remove "Multibooting" in FAQ

2019-04-07 Thread frantisek holop
Thomas Frohwein - Sat, 06 April 2019 at 12:54:54
> I remember the following as the steps not mentioned in the FAQ that helped me
> get it to work. All with MBR and Windows 10.
>
> 1. Shrink the main partition in Windows disk manager and create a second
>partition.

the FAQ cannot deal with every possible setup...
having a partition on the disk where you want to put openbsd is kind of
a basic requirement (just like having a computer), and how you get there
is case by case specific.


but why would you want to go back to MBR?
new notebooks with windows 10 come with GPT.

the only real PITA at the moment is that openbsd fdisk cannot add new
GPT partitions only edit existing ones.  many OEM windows notebooks
already come with 4-5 GPT partitions:

1. the 300MB EUFI
2. the 128MB MSR
3. the primary OS partition (normally C:)
4. WinRE (recovery tools)
5. BIOS_RVY (recovery image)
(my notebook even had a data (D:) between 4 and 5...)

so you need to have the partition destined for openbsd present,
then it's possible to edit it in fdisk.

-f
-- 



Re: [PATCH] Remove "Multibooting" in FAQ

2019-04-06 Thread Duncan Patton a Campbell
On Sat, 6 Apr 2019 21:10:59 +0300
Leonid Bobrov  wrote:

> On Sat, Apr 06, 2019 at 05:45:42PM +, tfrohw...@fastmail.com wrote:
> > I run a dual-boot with Windows 10 on the same partition and the section 
> > that you want removed was extremely helpful at the time. That is _with_ 
> > softraid encryption of the OpenBSD partition.
> > 
> > Setting this up is not for the faint of heart and you have to have backups 
> > and a restore strategy before tinkering with multi-booting.
> > 
> > Your removal request rests on the assumption that because you didn't 
> > managed to configure dual-booting nobody can (or should). How about instead 
> > you reach out to compare yours to other people's experience? Who knows, 
> > maybe a _useful_ addition to the FAQ might come out of it that can help 
> > reduce the risk of similar problems for others in the future?
> > 
> 
> Sure, what did you have to do in order to dualboot Windows and OpenBSD?
> 
> I'm not experienced with dualbooting at all because I never need/must to
> use it.
> 

Install OpenBSD on a USB drive and boot from it when you want.

Dhu


-- 
 Je suis Canadien. Ce n'est pas Francais ou Anglaise.  
 C'est une esp`ece de sauvage: ne obliviscaris, vix ea nostra voco;-) 

http://babayaga.neotext.ca/PublicKeys/Duncan_Patton_a_Campbell_pubkey.txt



Re: [PATCH] Remove "Multibooting" in FAQ

2019-04-06 Thread patric conant
On Sat, Apr 6, 2019 at 2:57 PM Thomas Frohwein 
wrote:

> On Sat, Apr 06, 2019 at 09:10:59PM +0300, Leonid Bobrov wrote:
> > On Sat, Apr 06, 2019 at 05:45:42PM +, tfrohw...@fastmail.com wrote:
> [...]
> >
> > Sure, what did you have to do in order to dualboot Windows and OpenBSD?
> >
> > I'm not experienced with dualbooting at all because I never need/must to
> > use it.
>
> I remember the following as the steps not mentioned in the FAQ that helped
> me
> get it to work. All with MBR and Windows 10.
>
> 1. Shrink the main partition in Windows disk manager and create a second
>partition.
> 2. In the OpenBSD installer, run fdisk and change the type of the second
>partition to OpenBSD (A6), otherwise keeping same size/offset.
> 3. For softraid crypto, follow the FAQ for installation. You should create
> the
>RAID partition as 'a' on the OpenBSD part of the disk, leaving (in my
> case
>'i' and 'j' intact.
>
> If the above steps help you or your friend to set it up, we can see if an
> addition to the FAQ may be worth considering.
>
> Here my disklabel and fdisk from that setup:
>
> # /dev/rsd0c:
> type: SCSI
> disk: SCSI disk
> label: WDC WDS500G2B0B-
> duid: f2adf57b4715cd30
> flags:
> bytes/sector: 512
> sectors/track: 63
> tracks/cylinder: 255
> sectors/cylinder: 16065
> cylinders: 60801
> total sectors: 976773168 # total bytes: 476940.0M
> boundstart: 455473152
> boundend: 976769024
> drivedata: 0
>
> 16 partitions:
> #size   offset  fstype [fsize bsize   cpg]
>   a:254539.0M455473152RAID
>   c:476940.0M0  unused
>   i:   500.0M 2048NTFS
>   j:221898.0M  1026048NTFS
>
> Disk: sd0   geometry: 60801/255/63 [976773168 Sectors]
> Offset: 0   Signature: 0xAA55
> Starting Ending LBA Info:
>  #: id  C   H   S -  C   H   S [   start:size ]
>
> ---
> *0: 07  0  32  33 - 63 221  30 [2048: 1024000 ] NTFS
>
>  1: 07 63 221  31 -  28247  27   2 [ 1026048:   452763710 ] NTFS
>
>  2: 27  28247  58  36 -  28351 195   4 [   453791744: 1679360 ] Win
> Recovery
>  3: A6  28351 227  37 -  60801  15  14 [   455473152:   521295872 ]
> OpenBSD
>
> Leonid Bobrov,

Nice patch to the web site, where on earth are any of the logs from your
session? Not only could your mistaken assumptions been addressed but the
documentation could have been made more robust.

-- 
Patric Conant
Mirage Computing Lead Consultant
@MirageComputing on twitter
https://m.facebook.com/MirageComputing/
316 409 2424


Re: [PATCH] Remove "Multibooting" in FAQ

2019-04-06 Thread Thomas Frohwein
On Sat, Apr 06, 2019 at 09:10:59PM +0300, Leonid Bobrov wrote:
> On Sat, Apr 06, 2019 at 05:45:42PM +, tfrohw...@fastmail.com wrote:
[...]
> 
> Sure, what did you have to do in order to dualboot Windows and OpenBSD?
> 
> I'm not experienced with dualbooting at all because I never need/must to
> use it.

I remember the following as the steps not mentioned in the FAQ that helped me
get it to work. All with MBR and Windows 10.

1. Shrink the main partition in Windows disk manager and create a second
   partition.
2. In the OpenBSD installer, run fdisk and change the type of the second
   partition to OpenBSD (A6), otherwise keeping same size/offset.
3. For softraid crypto, follow the FAQ for installation. You should create the
   RAID partition as 'a' on the OpenBSD part of the disk, leaving (in my case
   'i' and 'j' intact.

If the above steps help you or your friend to set it up, we can see if an
addition to the FAQ may be worth considering.

Here my disklabel and fdisk from that setup:

# /dev/rsd0c:
type: SCSI
disk: SCSI disk
label: WDC WDS500G2B0B-
duid: f2adf57b4715cd30
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 255
sectors/cylinder: 16065
cylinders: 60801
total sectors: 976773168 # total bytes: 476940.0M
boundstart: 455473152
boundend: 976769024
drivedata: 0 

16 partitions:
#size   offset  fstype [fsize bsize   cpg]
  a:254539.0M455473152RAID
  c:476940.0M0  unused
  i:   500.0M 2048NTFS
  j:221898.0M  1026048NTFS

Disk: sd0   geometry: 60801/255/63 [976773168 Sectors]
Offset: 0   Signature: 0xAA55
Starting Ending LBA Info:
 #: id  C   H   S -  C   H   S [   start:size ]
---
*0: 07  0  32  33 - 63 221  30 [2048: 1024000 ] NTFS
 1: 07 63 221  31 -  28247  27   2 [ 1026048:   452763710 ] NTFS
 2: 27  28247  58  36 -  28351 195   4 [   453791744: 1679360 ] Win Recovery
 3: A6  28351 227  37 -  60801  15  14 [   455473152:   521295872 ] OpenBSD 



Re: [PATCH] Remove "Multibooting" in FAQ

2019-04-06 Thread Leonid Bobrov
On Sat, Apr 06, 2019 at 07:23:23PM +, drozdow wrote:
> No problem with dualbooting win10 and openbsd on my side, I have followed FAQ 
> steps
> 

With disk encryption or without? My boyfriend could dualboot with GRUB,
but without disk encryption, this time he needs to dualboot with disk
encryption. If you did this with disk encryption, can you please guide
him?



Re: [PATCH] Remove "Multibooting" in FAQ

2019-04-06 Thread Ian Darwin

On 4/6/19 1:45 PM, tfrohw...@fastmail.com wrote:

I run a dual-boot with Windows 10 on the same partition and the section that 
you want removed was extremely helpful at the time. That is_with_  softraid 
encryption of the OpenBSD partition.

Setting this up is not for the faint of heart and you have to have backups and 
a restore strategy before tinkering with multi-booting.



Very true.



Your removal request rests on the assumption that because you didn't managed to 
configure dual-booting nobody can (or should). How about instead you reach out 
to compare yours to other people's experience? Who knows, maybe a_useful_  
addition to the FAQ might come out of it that can help reduce the risk of 
similar problems for others in the future?



Most operating systems are not "designed" for multi-booting; they assume 
that they have the whole system. Yet somehow almost all of them can be 
made to work in a multi-booted environment. So that section of the doc 
is not going away just because one person wasn't careful enough in 
following it and lost their windows partition. That said, if you can 
find out exactly what he did wrong and it's not in the doc, as 
tfrowhwein said, send a patch to improve the document.




Re: [PATCH] Remove "Multibooting" in FAQ

2019-04-06 Thread Leonid Bobrov
On Sat, Apr 06, 2019 at 05:45:42PM +, tfrohw...@fastmail.com wrote:
> I run a dual-boot with Windows 10 on the same partition and the section that 
> you want removed was extremely helpful at the time. That is _with_ softraid 
> encryption of the OpenBSD partition.
> 
> Setting this up is not for the faint of heart and you have to have backups 
> and a restore strategy before tinkering with multi-booting.
> 
> Your removal request rests on the assumption that because you didn't managed 
> to configure dual-booting nobody can (or should). How about instead you reach 
> out to compare yours to other people's experience? Who knows, maybe a 
> _useful_ addition to the FAQ might come out of it that can help reduce the 
> risk of similar problems for others in the future?
> 

Sure, what did you have to do in order to dualboot Windows and OpenBSD?

I'm not experienced with dualbooting at all because I never need/must to
use it.



Re: [PATCH] Remove "Multibooting" in FAQ

2019-04-06 Thread tfrohw...@fastmail.com
On April 6, 2019 5:01:17 PM UTC, Leonid Bobrov  wrote:
>Hi!
>
>Here's a small story: my boyfriend temporary has a laptop and he's not
>allowed to prune Windows 8.1 from it, so he has to setup dualboot. Also
>he wants OpenBSD part of the disk to be encrypted. And one more thing:
>this laptop doesn't support EFI at all, otherwise dualboot would be
>easy. He did everything according to FAQ both full disk encryption and
>multibooting, but that didn't work, installboot refused to install at
>/dev/sda4 with error "no OpenBSD partition found", he quickly fixed
>that
>issue, but then when he gave PBR, OpenBSD refused to boot, then he
>tried
>to give PBR of softraid0 and that lead to a new error after reboot:
>"No active partition", that can't be helped, so he wiped everything
>out,
>now thanks to your FAQ he has to reinstall Windows 8.1 which is tedious
>with his slow ISP.
>
>Conclusion: OpenBSD is not designed to be multibooted, so this section
>of FAQ is obsolete.
>
>Index: index.html
>===
>RCS file: /cvs/www/faq/index.html,v
>retrieving revision 1.538
>diff -u -p -r1.538 index.html
>--- index.html 26 Feb 2019 23:53:55 -  1.538
>+++ index.html 6 Apr 2019 16:36:14 -
>@@ -76,7 +76,6 @@ that are not covered in the FAQ.
> Disk Partitioning
>Sending Your dmesg After the
>Install
>Customizing the Install
>Process
>-Multibooting
> 
> 
> System Management
>Index: faq4.html
>===
>RCS file: /cvs/www/faq/faq4.html,v
>retrieving revision 1.527
>diff -u -p -r1.527 faq4.html
>--- faq4.html  26 Feb 2019 23:53:55 -  1.527
>+++ faq4.html  6 Apr 2019 16:36:14 -
>@@ -36,7 +36,6 @@ FAQ - Installation Guide
>   Disk Partitioning
>   Sending Your dmesg After the Install
>   Customizing the Install Process
>-  Multibooting
> 
> 
> 
>@@ -517,96 +516,3 @@ Example usage:
> write to this file).
> At boot time, rc.firsttime is executed once then deleted.
> 
>-
>-Multibooting
>-
>-Multibooting is having several operating systems on one computer, with
>some
>-means of selecting which OS is to boot.
>-You may want to familiarize yourself with the
>-OpenBSD boot process before you
>start.
>-A brief introduction to href="https://man.openbsd.org/fdisk;>fdisk(8)
>-is in the section on using OpenBSD's
>fdisk.
>-
>-
>-If you are adding OpenBSD to an existing system, you will probably
>need to
>-create some free space before installing OpenBSD.
>-In addition to your existing system's native tools,
>-http://gparted.org/;>gparted
>-may be useful for deleting or resizing existing partitions.
>-Preferably use one of the four primary MBR partitions for booting
>OpenBSD.
>-Extended partitions may not work.
>-
>-Boot Loaders
>-
>-On Macs, http://www.rodsbooks.com/refind/;>rEFInd should
>work out
>-of the box.
>-
>-
>-You can set up dual booting with
>-https://www.gnu.org/software/grub/;>GRUB 2 as follows.
>-Assuming OpenBSD is installed on the fourth MBR partition (fdisk
>partition 3) of
>-the first hard disk hd0, append the following to
>-/etc/grub.d/40_custom.
>-
>-
>-menuentry "OpenBSD" {
>-  set root=(hd0,4)
>-  chainloader +1
>-}
>-
>-
>-Then regenerate the GRUB 2 configuration file,
>/boot/grub/grub.cfg.
>-On Debian-based distros, you should run update-grub.
>-Otherwise, do
>-
>-
>-# grub-mkconfig -o /boot/grub/grub.cfg
>-
>-
>-See the
>-href="https://www.gnu.org/software/grub/manual/grub.html#Invoking-grub_002dmkconfig;>
>-GRUB 2 manual or
>-href="https://manpages.debian.org/jessie/grub2-common/update-grub2.8;>
>-update-grub2(8)
>-for more information.
>-
>-Windows
>-
>-The Boot Configuration Data (BCD) store allows multiple versions of
>Windows
>-to be booted through bcdedit.
>-A good introduction can be found in
>-href="https://technet.microsoft.com/en-us/library/cc721886%28WS.10%29.aspx;>
>-this article.
>-If you want a GUI alternative, you may want to try
>-https://neosmart.net/EasyBCD/;>EasyBCD.
>-
>-
>-You will need a copy of your OpenBSD install's
>-Partition Boot Record (PBR).
>-You can copy it to a file using a process similar to:
>-
>-# dd if=/dev/rsd0a of=openbsd.pbr bs=512 count=1
>-
>-where sd0a is your boot device, and you will need to get
>the
>-file openbsd.pbr to your Windows system partition.
>-
>-
>-Once OpenBSD's PBR is copied to the Windows system partition, you need
>a shell
>-with administrative privileges to run the following commands:
>-
>-
>-C:\Windows\system32> bcdedit /create /d "OpenBSD/i386" /application
>bootsector
>-The entry {0154a872-3d41-11de-bd67-a7060316bbb1} was successfully
>created.
>-C:\Windows\system32> bcdedit /set
>{0154a872-3d41-11de-bd67-a7060316bbb1} device boot
>-The operation completed successfully.
>-C:\Windows\system32> bcdedit /set
>{0154a872-3d41-11de-bd67-a7060316bbb1} path \openbsd.pbr
>-The operation completed successfully.
>-C:\Windows\system32> bcdedit /set
>{0154a872-3d41-11de-bd67-a7060316bbb1} device partition=c:
>-The 

[PATCH] Remove "Multibooting" in FAQ

2019-04-06 Thread Leonid Bobrov
Hi!

Here's a small story: my boyfriend temporary has a laptop and he's not
allowed to prune Windows 8.1 from it, so he has to setup dualboot. Also
he wants OpenBSD part of the disk to be encrypted. And one more thing:
this laptop doesn't support EFI at all, otherwise dualboot would be
easy. He did everything according to FAQ both full disk encryption and
multibooting, but that didn't work, installboot refused to install at
/dev/sda4 with error "no OpenBSD partition found", he quickly fixed that
issue, but then when he gave PBR, OpenBSD refused to boot, then he tried
to give PBR of softraid0 and that lead to a new error after reboot:
"No active partition", that can't be helped, so he wiped everything out,
now thanks to your FAQ he has to reinstall Windows 8.1 which is tedious
with his slow ISP.

Conclusion: OpenBSD is not designed to be multibooted, so this section
of FAQ is obsolete.

Index: index.html
===
RCS file: /cvs/www/faq/index.html,v
retrieving revision 1.538
diff -u -p -r1.538 index.html
--- index.html  26 Feb 2019 23:53:55 -  1.538
+++ index.html  6 Apr 2019 16:36:14 -
@@ -76,7 +76,6 @@ that are not covered in the FAQ.
 Disk Partitioning
 Sending Your dmesg After the Install
 Customizing the Install Process
-Multibooting
 
 
 System Management
Index: faq4.html
===
RCS file: /cvs/www/faq/faq4.html,v
retrieving revision 1.527
diff -u -p -r1.527 faq4.html
--- faq4.html   26 Feb 2019 23:53:55 -  1.527
+++ faq4.html   6 Apr 2019 16:36:14 -
@@ -36,7 +36,6 @@ FAQ - Installation Guide
   Disk Partitioning
   Sending Your dmesg After the Install
   Customizing the Install Process
-  Multibooting
 
 
 
@@ -517,96 +516,3 @@ Example usage:
 write to this file).
 At boot time, rc.firsttime is executed once then deleted.
 
-
-Multibooting
-
-Multibooting is having several operating systems on one computer, with some
-means of selecting which OS is to boot.
-You may want to familiarize yourself with the
-OpenBSD boot process before you start.
-A brief introduction to https://man.openbsd.org/fdisk;>fdisk(8)
-is in the section on using OpenBSD's fdisk.
-
-
-If you are adding OpenBSD to an existing system, you will probably need to
-create some free space before installing OpenBSD.
-In addition to your existing system's native tools,
-http://gparted.org/;>gparted
-may be useful for deleting or resizing existing partitions.
-Preferably use one of the four primary MBR partitions for booting OpenBSD.
-Extended partitions may not work.
-
-Boot Loaders
-
-On Macs, http://www.rodsbooks.com/refind/;>rEFInd should work out
-of the box.
-
-
-You can set up dual booting with
-https://www.gnu.org/software/grub/;>GRUB 2 as follows.
-Assuming OpenBSD is installed on the fourth MBR partition (fdisk partition 3) 
of
-the first hard disk hd0, append the following to
-/etc/grub.d/40_custom.
-
-
-menuentry "OpenBSD" {
-   set root=(hd0,4)
-   chainloader +1
-}
-
-
-Then regenerate the GRUB 2 configuration file, 
/boot/grub/grub.cfg.
-On Debian-based distros, you should run update-grub.
-Otherwise, do
-
-
-# grub-mkconfig -o /boot/grub/grub.cfg
-
-
-See the
-https://www.gnu.org/software/grub/manual/grub.html#Invoking-grub_002dmkconfig;>
-GRUB 2 manual or
-https://manpages.debian.org/jessie/grub2-common/update-grub2.8;>
-update-grub2(8)
-for more information.
-
-Windows
-
-The Boot Configuration Data (BCD) store allows multiple versions of Windows
-to be booted through bcdedit.
-A good introduction can be found in
-https://technet.microsoft.com/en-us/library/cc721886%28WS.10%29.aspx;>
-this article.
-If you want a GUI alternative, you may want to try
-https://neosmart.net/EasyBCD/;>EasyBCD.
-
-
-You will need a copy of your OpenBSD install's
-Partition Boot Record (PBR).
-You can copy it to a file using a process similar to:
-
-# dd if=/dev/rsd0a of=openbsd.pbr bs=512 count=1
-
-where sd0a is your boot device, and you will need to get the
-file openbsd.pbr to your Windows system partition.
-
-
-Once OpenBSD's PBR is copied to the Windows system partition, you need a shell
-with administrative privileges to run the following commands:
-
-
-C:\Windows\system32> bcdedit /create /d "OpenBSD/i386" /application 
bootsector
-The entry {0154a872-3d41-11de-bd67-a7060316bbb1} was successfully created.
-C:\Windows\system32> bcdedit /set {0154a872-3d41-11de-bd67-a7060316bbb1} 
device boot
-The operation completed successfully.
-C:\Windows\system32> bcdedit /set {0154a872-3d41-11de-bd67-a7060316bbb1} 
path \openbsd.pbr
-The operation completed successfully.
-C:\Windows\system32> bcdedit /set {0154a872-3d41-11de-bd67-a7060316bbb1} 
device partition=c:
-The operation completed successfully.
-C:\Windows\system32> bcdedit /displayorder 
{0154a872-3d41-11de-bd67-7060316bbb1} /addlast
-The operation completed successfully.
-
-
-Note that OpenBSD expects the computer's real-time clock