Re: root/boot on softraid in 5.0

2011-12-26 Thread Paolo Aglialoro
Just a question:

running on -current and, similar to the example, having the following
disklabel:

/boot on both sd0a and sd1a
/ on sd2a which is the raid result of sd0d and sd1d

would the snapshot upgrade process be consistent through the standard
installer or should one always go to shell, make manual adjustments and
then run install?

Thanks
Pasha


On Sat, Dec 24, 2011 at 2:06 PM, Josh Grosse j...@jggimi.homeip.net wrote:

 On Sat, Dec 24, 2011 at 02:26:26PM +0200, Ivo Chutkin wrote:

  Sorry for hijacking this tread.
  Can someone take time to clarify install process on softraid.
  I read the article on undeadly.org, preform the install on sd2, my
  softraid0, copy kernels on sd0a and sd1a, everything went well, and
  after reboot, it does not find bootable media.
  I put install cd, drop to shell, mount sd0a, then sd1a and then
  sd2a, everything is there.
  Do I miss some obvious step here...
  Can you point out what is wrong?

 The kernels are loaded from outside the softraid array (sd0a, or sd1a) by
 the second stage bootloader.  But the second stage bootloader is loaded
 from
 the array.  So, assuming sd2 is your softraid array, and you have an sd2a
 root partition, reboot the install cd and try:

 # mount /dev/sd2a /mnt
 # cp -p /usr/mdec/boot /mnt/boot
 # /usr/mdec/installboot -v /mnt/boot /usr/mdec/biosboot sd2

  It is AMD64 20 December snapshot on HP microserver. I cannot take
  dmesg at this point. I can take one from standard install if you
  need it.

 Both amd64 and i386 use the same installboot(8) program.



Re: root/boot on softraid in 5.0

2011-12-26 Thread Josh Grosse
On Tue, Dec 27, 2011 at 12:32:59AM +0100, Paolo Aglialoro wrote:

 running on -current and, similar to the example, having the following
 disklabel:
 
 /boot on both sd0a and sd1a
 / on sd2a which is the raid result of sd0d and sd1d
 
For i386 and amd64, architectures which have a two-stage boot, the second
stage bootloader (/usr/mdec/boot) is installed into the RAID array.  This 
program cannot read kernels from the array, so the kernels must be stored
on one or more non-RAID FFS filesystems.  In my example, I stored it on
the a partition of two drives, wd0 and wd1.

 would the snapshot upgrade process be consistent through the standard
 installer or should one always go to shell, make manual adjustments and
 then run install?
 
The installer installs kernels into the root partition.  You must copy them
to non-RAID partition(s) in order for the second stage bootloader to be
able to load them.  Using your example of a binary upgrade such as a snapshot,
copy the ramdisk kernel to a non-RAID partition, boot it, conduct the upgrage,
then copy the kernels to non-RAID storage, so that the second stage bootloader
can find them.



Re: root/boot on softraid in 5.0

2011-12-26 Thread Paolo Aglialoro
So this means that on sparc64 life would be way easier ;)
Thanks!


On Tue, Dec 27, 2011 at 1:30 AM, Josh Grosse j...@jggimi.homeip.net wrote:

 On Tue, Dec 27, 2011 at 12:32:59AM +0100, Paolo Aglialoro wrote:

  running on -current and, similar to the example, having the following
  disklabel:
 
  /boot on both sd0a and sd1a
  / on sd2a which is the raid result of sd0d and sd1d

 For i386 and amd64, architectures which have a two-stage boot, the second
 stage bootloader (/usr/mdec/boot) is installed into the RAID array.  This
 program cannot read kernels from the array, so the kernels must be stored
 on one or more non-RAID FFS filesystems.  In my example, I stored it on
 the a partition of two drives, wd0 and wd1.

  would the snapshot upgrade process be consistent through the standard
  installer or should one always go to shell, make manual adjustments and
  then run install?

 The installer installs kernels into the root partition.  You must copy them
 to non-RAID partition(s) in order for the second stage bootloader to be
 able to load them.  Using your example of a binary upgrade such as a
 snapshot,
 copy the ramdisk kernel to a non-RAID partition, boot it, conduct the
 upgrage,
 then copy the kernels to non-RAID storage, so that the second stage
 bootloader
 can find them.



Re: root/boot on softraid in 5.0

2011-12-26 Thread Josh Grosse
On Tue, Dec 27, 2011 at 01:49:59AM +0100, Paolo Aglialoro wrote:
 So this means that on sparc64 life would be way easier ;)
 Thanks!

I never tested root-on-softraid on single-stage booting architectures.  I 
don't have any handy.  You'll have to test that yourself! 



Re: root/boot on softraid in 5.0

2011-12-24 Thread Ivo Chutkin

On 23.12.2011 P3. 08:01 Q., Raymond Lillard wrote:

On 12/22/2011 09:07 PM, Paul B. Henson wrote:

On Wed, Dec 21, 2011 at 08:08:08PM -0800, Josh Grosse wrote:


Woops. I misread your post. The commits were September 19, which is
-current, beyond 5.0-release.

You must either migrate to -current, or await 5.1-release.


Ah, ok, thanks for the clarification. The installboot piece that lets
you install bootblocks on softraid is in 5.0, so when that part worked I
assumed it all was. The dates (commits in Sept, your post in Oct,
5.0 release in Nov) also led me to misbelieve it was in 5.0. But looking
at the changelogs I see the bits that store boot info in softraid
metadata and dynamically figure out the root happened after the 5.0
freeze.

Something to look forward to in 5.1 :). Thanks again...


Why wait? I have two amd64 servers in production on -current
and all is humming along magnificently. One is heavily loaded
by large image file manipulation over samba. Of course that
has little to do with the boot block business. Both servers
were booted more than a dozen times during provisioning so
I feel good that they will come up after an extended power
outage.

I did boot with sd0 removed to force a boot from sd1. I
then took a third disk and rebuilt sd0 while the machine
was up and running. All went well.

To me it was worth the trouble to pick a snapshot between
commit storms by the developers, just so I didn't have to
deal with the altroot thing any more.

I have been using OBSD for Internet facing infrastructure for
the last 10 years but always used RedHat/CentOS for internal
servers. In Oct I installed the first of the two and don't
see going back. I am so done with Linux servers.

OBSD is getting close to the point where I can use it as
a workstation/desktop. My biggest hindrance is no wine.

I guess I am going to be forced to make friends with some
VM system and cross mount the filesystems via samba. I
assume smarter people than me have done that already.

I would take suggestions of a preferred VM off-list so as
not to hijack this tread.

Regards all



Sorry for hijacking this tread.
Can someone take time to clarify install process on softraid.
I read the article on undeadly.org, preform the install on sd2, my 
softraid0, copy kernels on sd0a and sd1a, everything went well, and 
after reboot, it does not find bootable media.
I put install cd, drop to shell, mount sd0a, then sd1a and then sd2a, 
everything is there.

Do I miss some obvious step here...
Can you point out what is wrong?

It is AMD64 20 December snapshot on HP microserver. I cannot take dmesg 
at this point. I can take one from standard install if you need it.


Happy Holidays!

Thanks for the help,

Ivo



Re: root/boot on softraid in 5.0

2011-12-24 Thread Josh Grosse
On Sat, Dec 24, 2011 at 02:26:26PM +0200, Ivo Chutkin wrote:

 Sorry for hijacking this tread.
 Can someone take time to clarify install process on softraid.
 I read the article on undeadly.org, preform the install on sd2, my
 softraid0, copy kernels on sd0a and sd1a, everything went well, and
 after reboot, it does not find bootable media.
 I put install cd, drop to shell, mount sd0a, then sd1a and then
 sd2a, everything is there.
 Do I miss some obvious step here...
 Can you point out what is wrong?
 
The kernels are loaded from outside the softraid array (sd0a, or sd1a) by
the second stage bootloader.  But the second stage bootloader is loaded from
the array.  So, assuming sd2 is your softraid array, and you have an sd2a 
root partition, reboot the install cd and try:

# mount /dev/sd2a /mnt
# cp -p /usr/mdec/boot /mnt/boot
# /usr/mdec/installboot -v /mnt/boot /usr/mdec/biosboot sd2

 It is AMD64 20 December snapshot on HP microserver. I cannot take
 dmesg at this point. I can take one from standard install if you
 need it.

Both amd64 and i386 use the same installboot(8) program.



Re: root/boot on softraid in 5.0

2011-12-24 Thread Ivo Chutkin

On 24.12.2011 P3. 15:06 Q., Josh Grosse wrote:

On Sat, Dec 24, 2011 at 02:26:26PM +0200, Ivo Chutkin wrote:


Sorry for hijacking this tread.
Can someone take time to clarify install process on softraid.
I read the article on undeadly.org, preform the install on sd2, my
softraid0, copy kernels on sd0a and sd1a, everything went well, and
after reboot, it does not find bootable media.
I put install cd, drop to shell, mount sd0a, then sd1a and then
sd2a, everything is there.
Do I miss some obvious step here...
Can you point out what is wrong?


The kernels are loaded from outside the softraid array (sd0a, or sd1a) by
the second stage bootloader.  But the second stage bootloader is loaded from
the array.  So, assuming sd2 is your softraid array, and you have an sd2a
root partition, reboot the install cd and try:

# mount /dev/sd2a /mnt
# cp -p /usr/mdec/boot /mnt/boot
# /usr/mdec/installboot -v /mnt/boot /usr/mdec/biosboot sd2


It is AMD64 20 December snapshot on HP microserver. I cannot take
dmesg at this point. I can take one from standard install if you
need it.


Both amd64 and i386 use the same installboot(8) program.



Hi Josh,
I try it but it does not boot as well.
Here is what I do step by step:
1.boot from cd
2.drop to shell
3.cd /dev, sh MAKEDEV sd1
4.fdisk -iy sd0 and sd1
5.disklabel -E sd0, add a, 100m, add d, the rest of disk, raid fail system
6. disklabel -R sd1 disklabel.sd1
7. bioctl -c 1 -l sd0d,sd1d softraid0
8.^D
9.install
10. when I am asked which one I wish to initiate i choose sd2 which is 
my raid partition.

11. continue with normal install and / is on sd2a
12. newfs sd0a and sd1a
13. copy kernels to sd0a and sd1a

everything went well

I tried installboot step before and after reboot, it does not boot.
I will change hardware now to check if it could be some HP specific problem.
Thanks,
Ivo



Re: root/boot on softraid in 5.0

2011-12-24 Thread Ivo Chutkin

On 24.12.2011 P3. 15:42 Q., Ivo Chutkin wrote:

On 24.12.2011 P3. 15:06 Q., Josh Grosse wrote:

On Sat, Dec 24, 2011 at 02:26:26PM +0200, Ivo Chutkin wrote:


Sorry for hijacking this tread.
Can someone take time to clarify install process on softraid.
I read the article on undeadly.org, preform the install on sd2, my
softraid0, copy kernels on sd0a and sd1a, everything went well, and
after reboot, it does not find bootable media.
I put install cd, drop to shell, mount sd0a, then sd1a and then
sd2a, everything is there.
Do I miss some obvious step here...
Can you point out what is wrong?


The kernels are loaded from outside the softraid array (sd0a, or sd1a) by
the second stage bootloader. But the second stage bootloader is loaded
from
the array. So, assuming sd2 is your softraid array, and you have an sd2a
root partition, reboot the install cd and try:

# mount /dev/sd2a /mnt
# cp -p /usr/mdec/boot /mnt/boot
# /usr/mdec/installboot -v /mnt/boot /usr/mdec/biosboot sd2


It is AMD64 20 December snapshot on HP microserver. I cannot take
dmesg at this point. I can take one from standard install if you
need it.


Both amd64 and i386 use the same installboot(8) program.



Hi Josh,
I try it but it does not boot as well.
Here is what I do step by step:
1.boot from cd
2.drop to shell
3.cd /dev, sh MAKEDEV sd1
4.fdisk -iy sd0 and sd1
5.disklabel -E sd0, add a, 100m, add d, the rest of disk, raid fail system
6. disklabel -R sd1 disklabel.sd1
7. bioctl -c 1 -l sd0d,sd1d softraid0
8.^D
9.install
10. when I am asked which one I wish to initiate i choose sd2 which is
my raid partition.
11. continue with normal install and / is on sd2a
12. newfs sd0a and sd1a
13. copy kernels to sd0a and sd1a

everything went well

I tried installboot step before and after reboot, it does not boot.
I will change hardware now to check if it could be some HP specific
problem.
Thanks,
Ivo



Hello again,
The problem was in HP microserver bios.
I have to change SATA mode from AHCI to IDE
When I moved disks to some ordinary PC everything went well and I 
realise what could be the problem.

Below is dmesg from it.

Thanks for the help,
Ivo

Here is dmesg from HP microserver running from softraid :-)

# dmesg
OpenBSD 5.0-current (GENERIC.MP) #159: Tue Dec 20 11:02:37 MST 2011
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 2011758592 (1918MB)
avail mem = 1944121344 (1854MB)
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.6 @ 0xfb330 (35 entries)
bios0: vendor HP version O41 date 04/02/2011
bios0: HP ProLiant MicroServer
acpi0 at bios0: rev 2
acpi0: sleep states S0 S4 S5
acpi0: tables DSDT FACP APIC MCFG SPMI OEMB HPET EINJ BERT ERST HEST SSDT
acpi0: wakeup devices PCE2(S4) PCE3(S4) PCE4(S4) PCE5(S4) PCE6(S4) 
PCE7(S4) PCE9(S4) PCEA(S4) PCEB(S4) PCEC(S4) SBAZ(S4) P0PC(S4) PE20(S4) 
PE21(S4) PE22(S4) PE23(S4)

acpitimer0 at acpi0: 3579545 Hz, 32 bits
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: AMD Turion(tm) II Neo N40L Dual-Core Processor, 1497.77 MHz
cpu0: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,MWAIT,CX16,POPCNT,NXE,MMXX,FFXSR,LONG,3DNOW2,3DNOW
cpu0: 64KB 64b/line 2-way I-cache, 64KB 64b/line 2-way D-cache, 1MB 
64b/line 16-way L2 cache
cpu0: ITLB 32 4KB entries fully associative, 16 4MB entries fully 
associative
cpu0: DTLB 48 4KB entries fully associative, 48 4MB entries fully 
associative

cpu0: apic clock running at 199MHz
cpu1 at mainbus0: apid 1 (application processor)
cpu1: AMD Turion(tm) II Neo N40L Dual-Core Processor, 1497.52 MHz
cpu1: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,MWAIT,CX16,POPCNT,NXE,MMXX,FFXSR,LONG,3DNOW2,3DNOW
cpu1: 64KB 64b/line 2-way I-cache, 64KB 64b/line 2-way D-cache, 1MB 
64b/line 16-way L2 cache
cpu1: ITLB 32 4KB entries fully associative, 16 4MB entries fully 
associative
cpu1: DTLB 48 4KB entries fully associative, 48 4MB entries fully 
associative

ioapic0 at mainbus0: apid 2 pa 0xfec0, version 21, 24 pins
acpimcfg0 at acpi0 addr 0xe000, bus 0-255
acpihpet0 at acpi0: 14318180 Hz
acpi0: unable to load \\_SB_._INI.EXH1
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 1 (P0P1)
acpiprt2 at acpi0: bus -1 (PCE2)
acpiprt3 at acpi0: bus 2 (PCE4)
acpiprt4 at acpi0: bus 3 (PCE6)
acpicpu0 at acpi0: PSS
acpicpu1 at acpi0: PSS
acpibtn0 at acpi0: PWRB
ipmi at mainbus0 not configured
cpu0: 1497 MHz: speeds: 1500 1300 1000 800 MHz
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 AMD RS880 Host rev 0x00
ppb0 at pci0 dev 1 function 0 vendor Hewlett-Packard, unknown product 
0x9602 rev 0x00

pci1 at ppb0 bus 1
vga1 at pci1 dev 5 function 0 ATI Mobility Radeon HD 4200 rev 0x00
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
radeondrm0 at vga1: apic 2 int 18
drm0 at radeondrm0
ppb1 at pci0 dev 4 function 0 AMD RS780 PCIE 

Re: root/boot on softraid in 5.0

2011-12-22 Thread Paul B. Henson
On Wed, Dec 21, 2011 at 08:08:08PM -0800, Josh Grosse wrote:

 Woops.  I misread your post.  The commits were September 19, which is
 -current, beyond 5.0-release.
 
 You must either migrate to -current, or await 5.1-release.

Ah, ok, thanks for the clarification. The installboot piece that lets
you install bootblocks on softraid is in 5.0, so when that part worked I
assumed it all was. The dates (commits in Sept, your post in Oct,
5.0 release in Nov) also led me to misbelieve it was in 5.0. But looking
at the changelogs I see the bits that store boot info in softraid
metadata and dynamically figure out the root happened after the 5.0
freeze.

Something to look forward to in 5.1 :). Thanks again...


-- 
Paul B. Henson  |  (909) 979-6361  |  http://www.csupomona.edu/~henson/
Operating Systems and Network Analyst  |  hen...@csupomona.edu
California State Polytechnic University  |  Pomona CA 91768



Re: root/boot on softraid in 5.0

2011-12-22 Thread Raymond Lillard

On 12/22/2011 09:07 PM, Paul B. Henson wrote:

On Wed, Dec 21, 2011 at 08:08:08PM -0800, Josh Grosse wrote:


Woops.  I misread your post.  The commits were September 19, which is
-current, beyond 5.0-release.

You must either migrate to -current, or await 5.1-release.


Ah, ok, thanks for the clarification. The installboot piece that lets
you install bootblocks on softraid is in 5.0, so when that part worked I
assumed it all was. The dates (commits in Sept, your post in Oct,
5.0 release in Nov) also led me to misbelieve it was in 5.0. But looking
at the changelogs I see the bits that store boot info in softraid
metadata and dynamically figure out the root happened after the 5.0
freeze.

Something to look forward to in 5.1 :). Thanks again...


Why wait?  I have two amd64 servers in production on -current
and all is humming along magnificently.  One is heavily loaded
by large image file manipulation over samba.  Of course that
has little to do with the boot block business.  Both servers
were booted more than a dozen times during provisioning so
I feel good that they will come up after an extended power
outage.

I did boot with sd0 removed to force a boot from sd1.  I
then took a third disk and rebuilt sd0 while the machine
was up and running.  All went well.

To me it was worth the trouble to pick a snapshot between
commit storms by the developers, just so I didn't have to
deal with the altroot thing any more.

I have been using OBSD for Internet facing infrastructure for
the last 10 years but always used RedHat/CentOS for internal
servers.  In Oct I installed the first of the two and don't
see going back.  I am so done with Linux servers.

OBSD is getting  close to the point where I can use it as
a workstation/desktop.  My biggest hindrance is no wine.

I guess I am going to be forced to make friends with some
VM system and cross mount the filesystems via samba.  I
assume smarter people than me have done that already.

I would take suggestions of a preferred VM off-list so as
not to hijack this tread.

Regards all



Re: root/boot on softraid in 5.0

2011-12-21 Thread Josh Grosse
Paul B. Henson henson at acm.org writes:

 
 I've been running openbsd 4.6 for a couple years now with root on
 softraid, booting off a CF card with a kernel compiled to hardcode
 root/swap on sd0.
 
 I read about official support for root on softraid

 Anyway, just to clarify my understanding, is it expected in 5.0 to be
 able to boot softraid root without a custom kernel or using -a? If so,
 what am I doing wrong?
 
 Thanks...


See if http://www.undeadly.org/cgi?action=articlesid=20111002154251 provides
what your looking for.  Note in particular, the installboot(8) magic.  The
kernel still needs to be on a non-RAID partition, and only the kernel.  The
bootblocks point to a second stage bootloader within the RAID array.



Re: root/boot on softraid in 5.0

2011-12-21 Thread Josh Grosse
Josh Grosse josh at jggimi.homeip.net writes:

 
 Paul B. Henson henson at acm.org writes:
 
  
  I've been running openbsd 4.6 for a couple years now with root on
  softraid, booting off a CF card with a kernel compiled to hardcode
  root/swap on sd0.
  
  I read about official support for root on softraid

Woops.  I misread your post.  The commits were September 19, which is -current,
beyond 5.0-release.

You must either migrate to -current, or await 5.1-release.