Re: some problems with disks

2016-03-08 Thread arrowscript
Thanks for the help Jiri and dan.



Re: some problems with disks

2016-03-07 Thread dan mclaughlin
On Tue, 8 Mar 2016 00:20:08 +0100 arrowscr...@mail.com wrote:
> I'm having some problems with disks. Probably because I still don't
> understand enough of how BSD manage them:
> 
> 1. I was going to install -current on a USB flash drive. I did the
> install media using install59.fs and booted. I scape from installer to
> shell because I wanted to wipe the drive using dd(1) and to create a
> RAID partition (for FDE). I could not find the disk on /dev/, however.
> The system print on screen that the disk is located at "sd5" interface
> ("dmesg | grep sd" confirm this), but I cound not find it using "disklabel
> /dev/sd5". The only interfaces there was sd0 and wd0, none was my disk.
> How can I find it? The ./install script can find the sd5 normally, but I
> can't find it manually.

# (cd /dev && ./MAKEDEV sd5)

> 
> 2. I gave up of the FDE idea temporarily and I just did the install
> normally. No problem to install, but the speed of the system was too
> slow... at the point that it was basically unusable (>4 hours to install
> 10 packages and ~4 minutes to startx).
> The device, a USB flash drive, have about 10MB/s write speed. It's kinda
> slow, but I don't think this was the cause of the slowliness. I checked
> the signature of the snapshot and the installed sets had no problem with
> SHA256 too, so it's not a problem with corrupted snapshot.
> 

on quick way to check to check if it is the drive itself is to use dd:

# dd if=/dev/zero of=/mnt/testfile bs=1M count=20

but if the install was not slow that is unlikely to be the problem.



Re: some problems with disks

2016-03-07 Thread Jiri B
tl;dr...

> 3. When procceding to wipe the disk on my desktop (openbsd -current too)
> I cound not do this. This time I could find sd5 using disklabel, but:
> 
>   # dd if=/dev/arandom of=/dev/sd5 bs=4096
> 
>   /: write failed, filesystem is full
>   dd: /dev/sd5: No space left on device

see man disklabel, you need to put 'c' for whole disk, otherwise
you created new file in /dev.

> The same happen on rsd5. When trying to wipe just one partition:
> 
>   # dd if=/dev/arandom of=/dev/rsd5c
>   Operation not permitted
> 
> The message show after just some seconds (the disk has 7.2GB) and the
> partitions still there, so I know that dd did not work. 
> I thought it was something to do with my kern.securelevel, but when to
> down from 2 -> 1 got the same permission problem: 
> 
>   # sysctl kern.securelevel=1
>   sysctl: kern.securelevel: Operationg not permitted

man securelevel, you cannot decrease securelevel. in this case 'raw
disks are always read-only'.

welcome on the board, just do man help, man hier, man afterboot...

j.



some problems with disks

2016-03-07 Thread arrowscript
I'm having some problems with disks. Probably because I still don't
understand enough of how BSD manage them:

1. I was going to install -current on a USB flash drive. I did the
install media using install59.fs and booted. I scape from installer to
shell because I wanted to wipe the drive using dd(1) and to create a
RAID partition (for FDE). I could not find the disk on /dev/, however.
The system print on screen that the disk is located at "sd5" interface
("dmesg | grep sd" confirm this), but I cound not find it using "disklabel
/dev/sd5". The only interfaces there was sd0 and wd0, none was my disk.
How can I find it? The ./install script can find the sd5 normally, but I
can't find it manually.

2. I gave up of the FDE idea temporarily and I just did the install
normally. No problem to install, but the speed of the system was too
slow... at the point that it was basically unusable (>4 hours to install
10 packages and ~4 minutes to startx).
The device, a USB flash drive, have about 10MB/s write speed. It's kinda
slow, but I don't think this was the cause of the slowliness. I checked
the signature of the snapshot and the installed sets had no problem with
SHA256 too, so it's not a problem with corrupted snapshot.

3. When procceding to wipe the disk on my desktop (openbsd -current too)
I cound not do this. This time I could find sd5 using disklabel, but:

# dd if=/dev/arandom of=/dev/sd5 bs=4096

/: write failed, filesystem is full
dd: /dev/sd5: No space left on device


The same happen on rsd5. When trying to wipe just one partition:

# dd if=/dev/arandom of=/dev/rsd5c
Operation not permitted

The message show after just some seconds (the disk has 7.2GB) and the
partitions still there, so I know that dd did not work. 
I thought it was something to do with my kern.securelevel, but when to
down from 2 -> 1 got the same permission problem: 

# sysctl kern.securelevel=1
sysctl: kern.securelevel: Operationg not permitted

dmesg:

penBSD 5.9-beta (GENERIC.MP) #1864: Mon Jan 25 19:11:29 MST 2016
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 16481857536 (15718MB)
avail mem = 15978151936 (15237MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.7 @ 0xe98e0 (94 entries)
bios0: vendor American Megatrends Inc. version "1601" date 11/27/2013
bios0: ASUSTeK COMPUTER INC. P8H61-M LX2 R2.0
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP APIC FPDT MCFG SSDT BGRT SSDT SSDT DMAR
acpi0: wakeup devices P0P1(S4) PXSX(S4) RP01(S4) PXSX(S4) RP02(S4)
PEGP(S4) PEG0(S4) PEG1(S4) PEG2(S4) PEG3(S4) PXSX(S4) RP04(S4) PXSX(S4)
RP03(S4) PS2K(S4) PS2M(S4) [...]
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM) i5-3470 CPU @ 3.20GHz, 3200.47 MHz
cpu0:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS,SENSOR,ARAT
cpu0: 256KB 64b/line 8-way L2 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
cpu0: apic clock running at 100MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.1, IBE
cpu1 at mainbus0: apid 2 (application processor)
cpu1: Intel(R) Core(TM) i5-3470 CPU @ 3.20GHz, 3200.03 MHz
cpu1:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS,SENSOR,ARAT
cpu1: 256KB 64b/line 8-way L2 cache
cpu1: smt 0, core 1, package 0
cpu2 at mainbus0: apid 4 (application processor)
cpu2: Intel(R) Core(TM) i5-3470 CPU @ 3.20GHz, 3200.03 MHz
cpu2:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS,SENSOR,ARAT
cpu2: 256KB 64b/line 8-way L2 cache
cpu2: smt 0, core 2, package 0
cpu3 at mainbus0: apid 6 (application processor)
cpu3: Intel(R) Core(TM) i5-3470 CPU @ 3.20GHz, 3200.03 MHz
cpu3:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS,SENSOR,ARAT
cpu3: 256KB 64b/line 8-way L2 cache
cpu3: smt 0, core 3, packa