DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD Installation and Upgrading

OpenBSD Installation and Upgrading Installing and upgrading OpenBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 3 Weeks Ago
stanl stanl is offline
Real Name: Stan
Port Guard
 
Join Date: Jun 2019
Posts: 26
Default Unable to install - no space left on device

Following the instructions at "https://www.c0ffee.net/blog/openbsd-on-a-laptop/"
I am trying to install 6.6 on an old laptop that had a previous version of OpenBSD installed.

Due to my limited knowledge I seem to be unable to even get started as trying to overwrite the disk with "dd if=/dev/urandom of=/dev/rsd0c bs=1m"
returns:

uid 0 on /: file system full
/: write failed, file system is full
dd: /dev/rsd0c: no space left on device
1+0 records in
1+0 records out
0 bytes transferred in 0.009 secs (0 bytes/sec).

I understand that the file system is full, but isn't the whole purpose of the dd command to overwrite the file system with random data?

If someone could point out what I'm doing wrong or what I am misunderstanding I would be grateful.

Thanks
Reply With Quote
  #2   (View Single Post)  
Old 3 Weeks Ago
Head_on_a_Stick's Avatar
Head_on_a_Stick Head_on_a_Stick is offline
Real Name: Matthew
Bloaty McBloatFace
 
Join Date: Dec 2015
Location: London
Posts: 143
Default

Quote:
Originally Posted by stanl View Post
dd if=/dev/urandom of=/dev/rsd0c bs=1m
From which operating system was this command run?

Your linked guide gives a GNU/Linux dd command to burn the image and then an OpenBSD dd command to wipe the disk, which is a bit confusing.

For an official installation guide see https://www.openbsd.org/faq/faq4.html & https://cdn.openbsd.org/pub/OpenBSD/.../INSTALL.amd64
__________________
Linux is for people who hate Windows. BSD is for people who love UNIX.
Reply With Quote
  #3   (View Single Post)  
Old 3 Weeks Ago
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 6,787
Default

The third-party "howto" says:
Quote:
We'll assume your hard disk is sd0—you can use dmesg to check....
  1. Be sure you've actually booted the OpenBSD installer, and you're not running some other OS, such as Linux.
  2. Check your dmesg(8), as recommended. Your old laptop may use "wd0" instead of "sd0" as its first drive if it uses PATA/IDE interfaces.
Reply With Quote
  #4   (View Single Post)  
Old 3 Weeks Ago
stanl stanl is offline
Real Name: Stan
Port Guard
 
Join Date: Jun 2019
Posts: 26
Default

Here is what I've now done:
Installed OpenBSD forgoing full disk encryption.
Once installed, install curl to download the amd64 disk image and used dd to copy the image to a flash drive.
Powered down the laptop, inserted the flash drive and booted from there.
Chose "Shell"
dd if=/dev/urandom of=/dev/rsd0c bs=1m
Result:
uid 0 on /: file system full
/: write failed, file system is full
dd: /dev/rsd0c: no space left on device
1+0 records in
1+0 records out
0 bytes transferred in 0.009 secs (0 bytes/sec).

The hard disk is sd0, the USB is sd1 as confirmed in dmesg.

I don't understand this but dmesg also tells me:

softraid0 at root scsibus3 at softraid0: 256targets
root on sd0a swap on sd0b dump on sd0b.

I am still confused as to why a command which is supposed to overwrite data refuses to overwrite data because there is data.
Reply With Quote
  #5   (View Single Post)  
Old 3 Weeks Ago
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 6,787
Default

Quote:
Originally Posted by stanl View Post
...Once installed, install curl to download the amd64 disk image and used dd to copy the image to a flash drive.
For clarity: when you boot OpenBSD install media, you are then running a minimal OpenBSD kernel with a small set of utilities stored in a RAM-based filesystem. So your installation of OpenBSD in order to download install media again seems unnecessary. Perhaps you should follow the official installation guidance?
Quote:
I don't understand this but dmesg also tells me:


softraid0 at root scsibus3 at softraid0: 256targets
root on sd0a swap on sd0b dump on sd0b.
This is not dmesg(8) output from the installation media (RAMDISK) kernel. I expect this is dmesg output from the previously successfully installed system you are attempting to overwrite.
Quote:
I am still confused as to why a command which is supposed to overwrite data refuses to overwrite data because there is data.
So am I, but because I am not there with you, I can only work with what you are able to post. When you boot the installation media and select the shell, an # ls /dev/rsd* command will show you the predefined sd0 devices. Only the 16 rsd0 devices are defined, partitions a-p. After your dd(1) command fails, is there a 17th rsd* file in the /dev directory?
Reply With Quote
  #6   (View Single Post)  
Old 3 Weeks Ago
shep shep is offline
Real Name: Scott
Arp Constable
 
Join Date: May 2008
Location: Dry and Dusty
Posts: 1,294
Default

Quote:
dd if=/dev/urandom of=/dev/rsd0c
You usually only need to zero out the MBR on an older laptop.
The above command writes random data to the entire raw drive and could take a while.

From FAQ 14
"This shows that we now have a new SCSI bus and a new disk, sd2. This volume will be automatically detected and assembled when the system boots.
Even if you create multiple RAID arrays, the device name will always be softraid0. There won't be a softraid1 or anything else.

Because the new device probably has a lot of garbage where you expect a master boot record and disklabel, zeroing the first chunk of it is highly recommended. Be very careful with this command; issuing it on the wrong device could lead to a very bad day. This assumes that the new softraid device was created as sd2.
Code:
# dd if=/dev/zero of=/dev/rsd2c bs=1m count=1
"

Follow jggimi's advice on detecting the right drive.
Reply With Quote
  #7   (View Single Post)  
Old 3 Weeks Ago
stanl stanl is offline
Real Name: Stan
Port Guard
 
Join Date: Jun 2019
Posts: 26
Default

Quote:
When you boot the installation media and select the shell, an # ls /dev/rsd* command will show you the predefined sd0 devices. Only the 16 rsd0 devices are defined, partitions a-p. After your dd(1) command fails, is there a 17th rsd* file in the /dev directory?
Booting from the flash drive selecting shell and running
# ls /dev/rsd*

returns ls: /dev/rsd*: No such file or directory.

If I cd /dev I see rcd0a, rcd0c, etc but no rsd*

Before this goes any further I just want to say I realize I'm a pain in the ass but I really do appreciate the help from both of you.
Reply With Quote
  #8   (View Single Post)  
Old 3 Weeks Ago
stanl stanl is offline
Real Name: Stan
Port Guard
 
Join Date: Jun 2019
Posts: 26
Default

I don't know if this is important but just to satisfy myself I booted into the version of OpenBSD I managed to install without full disk encryption.

Running ls /dev/rsd* from theres shows me 170 rsd* files, everything from rsd0a through rsd9p.
Reply With Quote
  #9   (View Single Post)  
Old 3 Weeks Ago
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 6,787
Default

For additional clarity, I have just booted the OpenBSD Release 6.6 installation media for the amd64 architecture, selected the shell, and then issued the ls(1) command I recommended. The output I show below differs from what you reported. What version and architecture of OpenBSD installation media do you have?
Code:
Copyright (c) 1982, 1986, 1989, 1991, 1993
    The Regents of the University of California.  All rights reserved.
Copyright (c) 1995-2019 OpenBSD. All rights reserved.  https://www.OpenBSD.org

OpenBSD 6.6 (RAMDISK_CD) #349: Sat Oct 12 11:03:52 MDT 2019
    deraadt@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/RAMDISK_CD
real mem = 520093696 (496MB)
avail mem = 500412416 (477MB)
mainbus0 at root
bios0 at mainbus0
acpi at bios0 not configured
cpu0 at mainbus0: (uniprocessor)
cpu0: Intel(R) Core(TM) i5-2520M CPU @ 2.50GHz, 2493.12 MHz, 06-2a-07
cpu0: FPU,VME,DE,PSE,TSC,MSR,PAE,CX8,SEP,PGE,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,SSE3,PCLMUL,SSSE3,CX16,SSE4.1,SSE4.2,POPCNT,AES,XSAVE,AVX,HV,NXE,LONG,LAHF,ITSC,MD_CLEAR,MELTDOWN
cpu0: 256KB 64b/line 8-way L2 cache
cpu0: using VERW MDS workaround
pvbus0 at mainbus0: OpenBSD
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "OpenBSD VMM Host" rev 0x00
virtio0 at pci0 dev 1 function 0 "Qumranet Virtio RNG" rev 0x00
viornd0 at virtio0
virtio0: irq 3
virtio1 at pci0 dev 2 function 0 "OpenBSD VMM Control" rev 0x00
vmmci0 at virtio1
virtio1: irq 5
isa0 at mainbus0
com0 at isa0 port 0x3f8/8 irq 4: ns8250, no fifo
com0: console
softraid0 at root
scsibus0 at softraid0: 256 targets
root on rd0a swap on rd0b dump on rd0b
erase ^?, werase ^W, kill ^U, intr ^C, status ^T

Welcome to the OpenBSD/amd64 6.6 installation program.
(I)nstall, (U)pgrade, (A)utoinstall or (S)hell? s
# ls /dev/rsd*
/dev/rsd0a /dev/rsd0d /dev/rsd0g /dev/rsd0j /dev/rsd0m /dev/rsd0p
/dev/rsd0b /dev/rsd0e /dev/rsd0h /dev/rsd0k /dev/rsd0n
/dev/rsd0c /dev/rsd0f /dev/rsd0i /dev/rsd0l /dev/rsd0o
#
Reply With Quote
Old 3 Weeks Ago
stanl stanl is offline
Real Name: Stan
Port Guard
 
Join Date: Jun 2019
Posts: 26
Default

I wish I could post the entire message as you did, but booting from the installation media shows me:

erase ^? werase ^W kill ^U intr ^C status ^I
Welcome to the OpenBSD/amd64 6.6 installation program.
(I) nstall (U)pgrade (A)utoinstall or (S)hell s
#ls /dev/rsd*
ls: /dev/rsd*: No such file or directory
Reply With Quote
Old 3 Weeks Ago
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 6,787
Default

I'm sorry. I do not have a rational explanation for why you and I get different results with what appears to be the same media.

There are two amd64 kernels built for installation media: RAMDISK used with the diskette image (floppy66.fs) and RAMDISK_CD used with all other media. *Both* have 16 /dev/rsd* devices pre-defined on boot.

Where did you download your image from? Mine came from OpenBSD's CDN pool (https://cdn.openbsd.org/pub/OpenBSD), and was checked against the Project's digital signature with signify(1).
Reply With Quote
Old 3 Weeks Ago
TronDD TronDD is offline
Package Pilot
 
Join Date: Sep 2014
Posts: 198
Default

Quote:
Originally Posted by stanl View Post
The hard disk is sd0, the USB is sd1 as confirmed in dmesg.

I don't understand this but dmesg also tells me:

softraid0 at root scsibus3 at softraid0: 256targets
root on sd0a swap on sd0b dump on sd0b.
This is probably from an old dmesg, systems can sometimes store several of them. I'm not convinced your disks are detected as sd*. Otherwise the softraid would be sd1. When you did the install whithout encryption, what did it say it was partitioning?

In the installer, do you have /dev/wd* devices listed?
Reply With Quote
Old 3 Weeks Ago
stanl stanl is offline
Real Name: Stan
Port Guard
 
Join Date: Jun 2019
Posts: 26
Default

I'm sorry but right now I am so confused I really don't remember when I did the install without encryption what it said it was partioning.

In the installer I do have /dev/rwd0a thru rwd0p.

If I try:

dd if=/dev/urandom of=/dev/rwd0c bs=1m

I get:

dd: /dev/rwd0c: Device not configured,

To answer jggimi's question I got the install media using:

curl -OJ https://cdn.openbsd.org/pub/OpenBSD/...4/install64.fs

This and dd'ing to the flash drive was done on a MacBook Air running the latest OS.
Reply With Quote
Old 3 Weeks Ago
stanl stanl is offline
Real Name: Stan
Port Guard
 
Join Date: Jun 2019
Posts: 26
Default

OK. I did the installation again without encryption to see what it would say.

Available disks are sd0 sd1
Root disk is sd0

I hit enter and see:
Disk: sd0 Usable LBA: 64 to 976773104 [976773168 sectors]
#: type [ start: size]
1: EFI SYS 64 960
3: OpenBSD 1024 976772081

Use (W)hole disk MBR, whole disk (G)pt, (O)penBSD area or Edit? [OpenBSD]

I select the default OpenBSD and auto layout.
When done I have /dev/rsd0l,d,f,g,h,k,j,and e.
Reply With Quote
Old 3 Weeks Ago
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 6,787
Default

Quote:
Originally Posted by stanl View Post
To answer jggimi's question I got the install media using:

curl -OJ https://cdn.openbsd.org/pub/OpenBSD/...4/install64.fs
That can't be correct as written. The file "installXY.fs" is named for the release, so under /6.6/amd64/ you would find an "install66.fs" file, not "install64.fs".

The only thing I can think of is that the file was not correctly downloaded, or, not correctly written to your USB device.

You can at least check the SHA hash against the one published by the Project. If it does not match, that would be the root cause of your problem. If it matches, you could try writing it to USB again.
Code:
SHA256 (install66.fs) = 0e40d80abb7b46b2309063600997c91c83e576ae07cf3007385095b10948a410
Reply With Quote
Old 3 Weeks Ago
stanl stanl is offline
Real Name: Stan
Port Guard
 
Join Date: Jun 2019
Posts: 26
Default

Just to recap:
Downloaded install66.fs from https://cdn.openbsd.org/pub/OpenBSD/6.6/amd64/

Per jggimi check she hash with sha256 - matches

dd if=install66.fs of=/dev/sd1 bs=1m

Boot from installation media; choose Shell

ls /dev/rsd* returns "No such file or directory

sysctl.disknames shows sd0, rd0, sd1

dd if=/dev/urandom if=/dev/rsd0c bs=1m returns write failed file system is full.

disklabel sd0 returns "DIOCGDINFO: Inappropriate ioctl for device

disklabel sd1 returns "/dev/rsd1: No such file or directory"

At this point I am in way over my head. My sincere thanks and appreciation to:

Head_on_a_Stick
jggimi
shep
TronDD

for taking the time to try helping me out with this.

Right now I think I'll leave it for a day and then try again. If it still doesn't
work I guess I'll have to forget about encryption and just install the OS.

Thanks again to everyone.
Reply With Quote
Old 3 Weeks Ago
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 6,787
Default

I understand your frustration, even if I don't understand the root cause of the problem.

I wonder if issuing # cd /dev && sh MAKEDEV sd0 will create the missing device special files.
Reply With Quote
Old 3 Weeks Ago
stanl stanl is offline
Real Name: Stan
Port Guard
 
Join Date: Jun 2019
Posts: 26
Default

Quote:
Originally Posted by jggimi
I wonder if issuing # cd /dev && sh MAKEDEV sd0 will create the missing device special files.
No doubt about it - the man is a genius.
That seems to have done the trick and /dev/urandom is happily overwriting the data.

jggimi - I can't thank you enough.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to install 5.9 release betweendayandnight OpenBSD Installation and Upgrading 7 19th February 2016 12:16 PM
unable to install HP printer sacerdos_daemonis OpenBSD General 25 5th January 2015 01:20 PM
Unable to find device node for /dev/mfid0s1b bforest FreeBSD Installation and Upgrading 4 30th September 2011 04:02 PM
DVD burn error: No space left on device guitarscn OpenBSD General 1 22nd December 2009 07:50 PM
no space left on drive while installing? knasbas OpenBSD Installation and Upgrading 2 20th July 2009 09:50 PM


All times are GMT. The time now is 08:38 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick