Re: cannot boot from SSD

2021-10-26 Thread Claus Assmann
Thanks for the details; I overwrote the mbr using

dd of=/dev/rsd0c if=/usr/mdec/mbr bs=512 count=1

and then used fdisk to reinstall the OpenBSD partition to the
values I used before - and now the system can boot from the ssd.

Thank you very much for the help!

-- 
Address is valid for this mailing list only, please do not reply
to it direcly, but to the list.



Re: cannot boot from SSD

2021-10-26 Thread Crystal Kolipe
On Tue, Oct 26, 2021 at 07:20:41AM -0300, Crystal Kolipe wrote:
> manually type 'boot sd0a:/bsd'

That should be hd0a:/bsd



Re: cannot boot from SSD

2021-10-26 Thread Crystal Kolipe
On Tue, Oct 26, 2021 at 08:15:48AM +0100, Claus Assmann wrote:
> On Mon, Oct 25, 2021, Crystal Kolipe wrote:
> 
> > Can you provide the output of the atactl identify command for this unit?
> 
> Thanks for the reply; below is the output from atactl identify,
> fdisk, and disklabel. The disk can be mounted without a problem
> and -- based on a brief look -- has the installed content.
> Is there some simple way to check that the boot loader is installed
> on the disk (besides trying to read some sectors using od or something
> similar?)
> 
> # atactl sd0 identify
> Model: KINGSTON SA400S37240G, Rev: S1Z40102, Serial #: 50026B7380B702FF

You seem to have a different firmware revision to any of our drives, which 
might be relevant, however...

> $ fdisk sd0
> Disk: sd0 geometry: 29185/255/63 [468862128 Sectors]
> Offset: 0 Signature: 0xAA55
> Starting Ending LBA Info:
>  #: id  C   H   S -  C   H   S [   start:size ]
> ---
>  0: BF  0   1   2 -  14592 254  63 [  64:   234436481 ] Solaris   
>   
>  1: 00  0   0   0 -  0   0   0 [   0:   0 ] unused
>   
>  2: 00  0   0   0 -  0   0   0 [   0:   0 ] unused
>   
> *3: A6  14593   0   1 -  29184 254  63 [   234436545:   234420480 ] OpenBSD   
>   

Seeing that you have Solaris installed on the same disk, I'm now wondering if 
you have some non-standard MBR code that is causing the problem.

As your Solaris partition is first on the disk, I'm assuming that you installed 
OpenBSD afterwards.  I'm also assuming that you didn't manually use the 
'update' command from within OpenBSD fdisk to overwrite the MBR boot code, 
(just the boot code and not the partition data).

The OpenBSD MBR code, I.E. what would be loaded from the first sector on the 
SSD at boot, is responsible for displaying the 'Using drive X, partition Y' 
message.  If you are not seeing this, then the OpenBSD MBR code is not running.

Of course, the Solaris MBR code should also correctly parse the partition 
table, see that partition 3 is flagged as active and pass control to the 
OpenBSD PBR contained in it, at which point you would see 'Loading', but that 
is not happening.

If you boot into the OpenBSD bootloader from another device, such as a USB 
flash drive with the OpenBSD installation media on it, and manually type 'boot 
sd0a:/bsd', or whatever device the BIOS sees the SSD as, you should find that 
your newly installed system boots.

If you want to write the OpenBSD MBR code to the SSD, you can do that using the 
'update' command within fdisk.  This will probably allow you to boot OpenBSD 
from the SSD.  However, you will have overwritten the Solaris MBR, which may or 
may not cause you issues booting Solaris.

You could back up the existing MBR first with a command such as:

# dd if=/dev/sd0c of=$HOME/old_mbr bs=512 count=1

If you want to check that the OpenBSD MBR code is installed on the disk, the 
output of the following two commands should match:

# dd if=/usr/mdec bs=446 count=1 | hexdump -C
# dd if=/dev/sd0c bs=446 count=1 | hexdump -C



Re: cannot boot from SSD

2021-10-26 Thread Claus Assmann
On Mon, Oct 25, 2021, Crystal Kolipe wrote:

> Can you provide the output of the atactl identify command for this unit?

Thanks for the reply; below is the output from atactl identify,
fdisk, and disklabel. The disk can be mounted without a problem
and -- based on a brief look -- has the installed content.
Is there some simple way to check that the boot loader is installed
on the disk (besides trying to read some sectors using od or something
similar?)

# atactl sd0 identify
Model: KINGSTON SA400S37240G, Rev: S1Z40102, Serial #: 50026B7380B702FF
Device type: ATA, fixed
Cylinders: 16383, heads: 16, sec/track: 63, total sectors: 468862128
Device capabilities:
ATA standby timer values
IORDY operation
IORDY disabling
Device supports the following standards:
ATA-3 ATA-4 ATA-5 ATA-6 ATA-7 ATA-8 ATA-9 ATA-10 
Master password revision code 0xfffe
Device supports the following command sets:
NOP command
READ BUFFER command
WRITE BUFFER command
Host Protected Area feature set
Read look-ahead
Write cache
Power Management feature set
Security Mode feature set
SMART feature set
Flush Cache Ext command
Flush Cache command
48bit address feature set
Advanced Power Management feature set
DOWNLOAD MICROCODE command
Device has enabled the following command sets/features:
NOP command
READ BUFFER command
WRITE BUFFER command
Host Protected Area feature set
Read look-ahead
Write cache
Power Management feature set
SMART feature set
Flush Cache Ext command
Flush Cache command
48bit address feature set
DOWNLOAD MICROCODE command

$ fdisk sd0
Disk: sd0   geometry: 29185/255/63 [468862128 Sectors]
Offset: 0   Signature: 0xAA55
Starting Ending LBA Info:
 #: id  C   H   S -  C   H   S [   start:size ]
---
 0: BF  0   1   2 -  14592 254  63 [  64:   234436481 ] Solaris 
 1: 00  0   0   0 -  0   0   0 [   0:   0 ] unused  
 2: 00  0   0   0 -  0   0   0 [   0:   0 ] unused  
*3: A6  14593   0   1 -  29184 254  63 [   234436545:   234420480 ] OpenBSD 

$ disklabel sd0
# /dev/rsd0c:
type: SCSI
disk: SCSI disk
label: KINGSTON SA400S3
duid: 2c155e5bcc7344d0
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 255
sectors/cylinder: 16065
cylinders: 29185
total sectors: 468862128
boundstart: 234436545
boundend: 468857025
drivedata: 0 

16 partitions:
#size   offset  fstype [fsize bsize   cpg]
  a:  2097151234436545  4.2BSD   2048 16384 12960 
  b: 17267584236533696swap
  c:4688621280  unused
  d:  8388608253801280  4.2BSD   2048 16384 12960 
  e: 27767872262189888  4.2BSD   2048 16384 12960 
  f: 12582912289957760  4.2BSD   2048 16384 12960 
  g:  2097152302540672  4.2BSD   2048 16384 12960 
  h: 33947968304637824  4.2BSD   2048 16384 12960 
  i:234436481   64 unknown
  j:  4194304338585792  4.2BSD   2048 16384 12960 
  k: 12582912342780096  4.2BSD   2048 16384 12960 
  l:113494016355363008  4.2BSD   2048 16384 12960 

-- 
Address is valid for this mailing list only, please do not reply
to it direcly, but to the list.



Re: cannot boot from SSD

2021-10-25 Thread Crystal Kolipe
On Mon, Oct 25, 2021 at 08:42:06PM +0100, Claus Assmann wrote:
> I installed OpenBSD 7.0 via miniroot70.img from a USB stick on a
> Kingston SA400S3 SSD but unfortunately the machine does not boot
> from it (there is just a blinking cursor at the top of console).

We've used several Kingston SA400S3 SSDs on OpenBSD machines, including as boot 
drives, and not had many problems.

Can you provide the output of the atactl identify command for this unit?

One thing we have noticed is that large continuous writes to these SSDs often 
result in extremely slow performance for a while after ~500 Mb of writing, with 
the process stuck in a biowait state.  One unit that had been in use for a 
couple of years got so bad that we had to secerase it, and which point it 
seemed to brick itself for about 24 hours before coming back to life and on the 
face of it working just fine ever since.

Our Sandisk Ultra II and Corsair Force SSDs have never shown similar issues.



cannot boot from SSD

2021-10-25 Thread Claus Assmann
I installed OpenBSD 7.0 via miniroot70.img from a USB stick on a
Kingston SA400S3 SSD but unfortunately the machine does not boot
from it (there is just a blinking cursor at the top of console).
The SSD is connected via SATA (see below) so I hoped the machine
(see dmesg) could boot from it.  Is this a problem between the HW
(BIOS?) and the SSD or something I need to do differently with the
OpenBSD install?  My next step is probably to find a "small" HD and
install OpenBSD there but then change fstab to use the SSD.
An alternative might be to change the root device, but it seems
there is no way to do this automatically?

boot(8):
 boot [[device:]image] [-acds]
..
  -a   Causes the kernel to ask for the root device to use.

but I don't see an option to set the root device via boot.conf;
moreover, when I tried this the system does not accept any input
from the USB keyboard -- even though it shows the keyboard as being
recognized just a few line above the prompt.

(Yes, I know the system is a bit old - but it's not even 12 years :-)

OpenBSD 6.8 (GENERIC.MP) #4: Mon Jan 11 10:35:56 MST 2021

r...@syspatch-68-amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 8572567552 (8175MB)
avail mem = 8297721856 (7913MB)
random: good seed from bootblocks
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.5 @ 0x9f000 (64 entries)
bios0: vendor American Megatrends Inc. version "1007" date 03/25/2010
bios0: ASUSTeK Computer INC. M4A88TD-M
acpi0 at bios0: ACPI 3.0
acpi0: sleep states S0 S1 S3 S4 S5
acpi0: tables DSDT FACP APIC MCFG OEMB HPET SSDT
acpi0: wakeup devices PCE2(S4) PCE3(S4) PCE5(S4) PCE6(S4) PCE7(S4) PCE9(S4) 
PCEA(S4) RLAN(S4) SBAZ(S4) P0PC(S4) GEC_(S4) UHC1(S4) UHC2(S4) USB3(S4) 
UHC4(S4) USB5(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 Phenom(tm) II X6 1055T Processor, 2812.88 MHz, 10-0a-00
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,PAGE1GB,RDTSCP,LONG,3DNOW2,3DNOW,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,SKINIT,ITSC
cpu0: 64KB 64b/line 2-way I-cache, 64KB 64b/line 2-way D-cache, 512KB 64b/line 
16-way L2 cache, 6MB 64b/line 48-way L3 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: AMD erratum 721 detected and fixed
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
cpu0: apic clock running at 200MHz
cpu0: mwait min=64, max=64, IBE
cpu1 at mainbus0: apid 1 (application processor)
cpu1: AMD Phenom(tm) II X6 1055T Processor, 2812.46 MHz, 10-0a-00
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,PAGE1GB,RDTSCP,LONG,3DNOW2,3DNOW,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,SKINIT,ITSC
cpu1: 64KB 64b/line 2-way I-cache, 64KB 64b/line 2-way D-cache, 512KB 64b/line 
16-way L2 cache, 6MB 64b/line 48-way L3 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
cpu1: AMD erratum 721 detected and fixed
cpu1: smt 0, core 1, package 0
cpu2 at mainbus0: apid 2 (application processor)
cpu2: AMD Phenom(tm) II X6 1055T Processor, 2812.46 MHz, 10-0a-00
cpu2: 
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,PAGE1GB,RDTSCP,LONG,3DNOW2,3DNOW,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,SKINIT,ITSC
cpu2: 64KB 64b/line 2-way I-cache, 64KB 64b/line 2-way D-cache, 512KB 64b/line 
16-way L2 cache, 6MB 64b/line 48-way L3 cache
cpu2: ITLB 32 4KB entries fully associative, 16 4MB entries fully associative
cpu2: DTLB 48 4KB entries fully associative, 48 4MB entries fully associative
cpu2: AMD erratum 721 detected and fixed
cpu2: smt 0, core 2, package 0
cpu3 at mainbus0: apid 3 (application processor)
cpu3: AMD Phenom(tm) II X6 1055T Processor, 2812.46 MHz, 10-0a-00
cpu3: 
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,PAGE1GB,RDTSCP,LONG,3DNOW2,3DNOW,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,SKINIT,ITSC
cpu3: 64KB 64b/line 2-way I-cache, 64KB 64b/line 2-way D-cache, 512KB 64b/line 
16-way L2 cache, 6MB 64b/line 48-way L3 cache
cpu3: ITLB 32 4KB entries fully associative, 16 4MB entries fully associative
cpu3: DTLB 48 4KB entries fully associative, 48 4MB entries fully associative
cpu3: AMD erratum 721 detected and fixed
cpu3: smt 0, core 3, package 0
cpu4 at mainbus0: apid 4 (application processor)
cpu4: AMD Phenom(tm) II X6 1055T