DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD Installation and Upgrading

OpenBSD Installation and Upgrading Installing and upgrading OpenBSD.

Reply
 
Thread Tools Display Modes
Old 17th November 2022
Head_on_a_Stick's Avatar
Head_on_a_Stick Head_on_a_Stick is offline
Real Name: Matthew
Bitchy Nerd Elitist
 
Join Date: Dec 2015
Location: London
Posts: 461
Default

^ Ah yes, of course, OpenBSD has separate CD & USB images rather than "hybrid" images that will work with both. Thanks for the correction!
Reply With Quote
Old 17th November 2022
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

It can be confusing.
  • The mass storage (512-byte block) images with MBRs are in *.img files. These have 2 MBR partitions, as shown above, and contain a disklabel(5).
  • The optical storage (2048-byte block) images with El Torito boot records are in *.iso files, and each consists of a single CD9660 filesystem. OpenBSD mounts these using a virtual disklabel(5). The .iso filetype is, I think, a reminder that these comply with the ISO9660 standard. (CD9660 = ISO9660.)

Last edited by jggimi; 17th November 2022 at 06:13 PM. Reason: clarity
Reply With Quote
Old 18th November 2022
Entropic Entropic is offline
Banned
 
Join Date: Nov 2022
Posts: 77
Default

Quote:
Originally Posted by Head_on_a_Stick View Post
ArchWiki to the rescue (again):

https://wiki.archlinux.org/title/USB...edium#In_macOS

So it looks like the added "r" is needed after all.

That "extended attributes" error is because /dev/rdisk4 (the "raw" device) is needed.

EDIT: don't worry about the "MBR" partition table on the stick — that will be over-written by the ISO image, which contains it's own (fake) partition tables.
Thanks Matthew. I'll try the same CP command as you indicated before, but now with 'r' added before "disk4" in /dev/disk4 bit at the end of the command line entry. I'll let you know how I go.
Reply With Quote
Old 18th November 2022
Entropic Entropic is offline
Banned
 
Join Date: Nov 2022
Posts: 77
Default

Quote:
Originally Posted by Head_on_a_Stick View Post
^ Ah yes, of course, OpenBSD has separate CD & USB images rather than "hybrid" images that will work with both. Thanks for the correction!
So Matthew, I see from Jggimi's post clarifying the 'fake' partition issue that there's mention of the OpenBSD boot loader doing a check for UEFI or what I suspect is the hybrid CSM booting mechanism. How might this be relevant to my BIOS observations on the target installation system that I noted in the 1st post of this thread. You were indicating there that I should definitely set the BIOS to the pure UEFI booting option. From jggimi's post I'm now guessing that it doesn't matter as the OpenBSD bootloader simply adapts to the BIOS whether its pure UEFI or hybrid (CSM enabled). Is this right?
Reply With Quote
Old 18th November 2022
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

I'll jump in and try to answer. You should no longer need Legacy (CSM) boot configuration. You should be able to boot the installation media (once you successfully write it) with the hardware in UEFI mode.

Then, the installation script will ask if you want to create a new MBR or a new GPT on the hard drive during installation. This particular question is documented in the INSTALL.amd64 text file co-located with the install media images, kernels, and file sets on your nearby mirror.

Last edited by jggimi; 18th November 2022 at 02:17 AM. Reason: typo - one too many commas
Reply With Quote
Old 18th November 2022
Entropic Entropic is offline
Banned
 
Join Date: Nov 2022
Posts: 77
Default

Quote:
Originally Posted by jggimi View Post
I'll jump in and try to answer. You should no longer need Legacy (CSM) boot configuration. You should be able to boot the installation media (once you successfully write it) with the hardware in UEFI mode.

Then, the installation script will ask if you want to create a new MBR or a new GPT on the hard drive during installation. This particular question is documented in the INSTALL.amd64 text file co-located with the install media images, kernels, and file sets on your nearby mirror.
Thanks for clarifying ggimi. So in line with Matthew's original advice I'll ensure my target system bios is set to the pure UEFI option and trust that its less 'broken' than other manufacturers UEFI implementations. It's a HP laptop so you'd like to think that whatever 3rd party they employed to create the UEFI environment would do a better job than inferior manufacturers UEFI implementations might..

Now regarding the install.amd64 text file which I understand to be here, we've already seen from the section regarding "Create Installation Media" that its solely written with consideration for MBR based partitioning. Isn't this so? My question here then is, when I go to install this as a single (non dual boot) operating system on the HP laptop, do I have a choice of making it MBR?, or am I obliged to stick with the UEFI/GUID/GPT partitioning installation given the existing BIOS running in UEFI and thus what I understand must be a whole drive partitioned already in UEFI/GUID/GPT format? Because if I could change it to MBR (and thus be in an environment entirely consistent with the official instructions that are written for MBR), then wouldn't this be wiser for avoiding any future complications? Again if it complicates things unnecessarily I'd rather also stick with making this work under the UEFI as we've troubleshooted so far.. Does this make sense?
Reply With Quote
Old 18th November 2022
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

You should use a GPT. From that document:
Quote:
The installation program will ask you if you want to use the
whole disk for OpenBSD. If you don't need to or don't intend
to share the disk with other operating systems, answer "w"
here to use "MBR" partitioning or "g" to use "GPT"
partitioning. The installation program will then create a single
partition spanning the whole disk, dedicated to OpenBSD.
It's really just that simple. You'll have a GPT with a single partition spanning the whole disk.

Individual disklabel partitions to carve up that space follow as the next step of the installation. I recommend using the default automatic partitioning for your first installation.
Reply With Quote
Old 18th November 2022
Head_on_a_Stick's Avatar
Head_on_a_Stick Head_on_a_Stick is offline
Real Name: Matthew
Bitchy Nerd Elitist
 
Join Date: Dec 2015
Location: London
Posts: 461
Default

Quote:
Originally Posted by Entropic View Post
Now regarding the install.amd64 text file which I understand to be here, we've already seen from the section regarding "Create Installation Media" that its solely written with consideration for MBR based partitioning. Isn't this so?
The partition table on the installer does not have to match the partition table of the installed system.

Quote:
Originally Posted by Entropic View Post
My question here then is, when I go to install this as a single (non dual boot) operating system on the HP laptop, do I have a choice of making it MBR?
I don't think OpenBSD will allow a UEFI installation to a disk with an MS-DOS ("MBR" type) partition table. But I might be wrong.

In any case if you have a UEFI system then you should boot it in UEFI mode (ie, with CSM disabled) with a GPT disk.

The UEFI standard does officially support booting from an MS-DOS partition table but in my experience the practical, real-world implementation of this feature is somewhat patchy, to say the least. A GUID partition table is recommended for UEFI systems, at least by me :-)
Reply With Quote
Old 18th November 2022
bsd-keith bsd-keith is offline
Real Name: Keith
Open Source Software user
 
Join Date: Jun 2014
Location: Surrey/Hants Border, England
Posts: 344
Default

I suggest a UEFI install if possible, as that is the modern standard - most of my machines are MBR, & those that aren't are a faff to put into MBR state, so I just get used to using UEFI now.

If you answer with the defaults to all the asked questions, the installation should work OK.
__________________
Linux since 1999, & also a BSD user.
Reply With Quote
Old 18th November 2022
Entropic Entropic is offline
Banned
 
Join Date: Nov 2022
Posts: 77
Default

Thanks jggimi, Keith and Matthew for the replies. I've cobbled together your collective advices and attempted the CP command to create the OpenBSD install media (on Sandisk 32Gb USB) using a destination path of /dev/rdisk4 instead of the previous /dev/disk4. The outcome? The exact same error message as when I used the CP command without the r prefix..

Here's the exact steps I followed today:

(1) On inserting the USB disk following yesterdays first CP attempt (done with destination /dev/disk4 instead of dev/rdisk4) I was confronted by an error msg that I actually saw just after MacOS terminal finished doing the CP task. ie. Disk unreadable with options to "ignore" "initialise" or "Eject" (I'd refer to the screenshot here but I'll make reference to it further down in an all encompassing screenshot as that will address this but also the main outcome of todays CP with "rdisk" command attempt. I have, however, attached a screenshot (9:49pm) showing the state of the USB drive following yesterdays semi successful CP attempt. Note that 695mb of the USB stick is written which suggests to me that the bulk of the transfer must have succeeded and that its MBR partitioned.

(2)I loaded MacOS Diskutil to partition and reformat (Apple calls this "erase") the USB using exFAT (as before) but with GUID partitions selected instead of MBR taking into account the UEFI BIOS on the target installation system (HP laptop). I know Matthew that you've clarified this doesn't matter, but I didn't have the benefit of reading that post at this attempt, and it probably doesn't matter anyway. So, it formatted successfully per the attached screenshot 9:51pm (you might want to take a look in case there's something relevant to part 3's outcome) and so I went about the CreateInstallationMedia procedure:

(3) Create Install Media
- System_Profiler SCUSB command to double check its still /dev/disk4 for the USB (yes)
- diskutil unmount /dev/disk4 (yes - success)
- CP command with the /dev/rdisk4 destination path and boom - see the all encompassing screenshot referred to earlier. Take a look and tell me if you know whats going on. Noteworthy parts are the "unable to copy extended attributes" error (same as yesterday), and like yesterday that middle screen Apple warning message (Initialise, Eject etc.) came up straight after a long pause following the entry of the CP command.

Now obviously this is getting quite frustrating as its day 3 and I'm unable to even get the installation media prepared. But I'm sure I'll sort it out.. hopefully in the not too distant future! I did some general net searching of this extended attribute error in the context of the CP command and came across this interesting article which explains that the data is still copied, but that its minus metadata that likely doesn't impact the relevant programme anyway.

To trial this I went to the target installation system (HP laptop) and after F10 to set it as pure UEFI, I rebooted with the OpenBSD USB stick just created in step 3 and it skipped straight past it as if it didn't exist. In Windows, when I inserted the USB it came up immediately with a prompt about the drive being unreadable and to format it. I've not done that pending any replies to this post.

So what's the solution here guys... How do I get around this extended attribute error. Is rsync the solution as proposed by one of the replies in that article of interest linked above? Or is it this -P argument on the CP command proposed by the other reply... Either way there must be a solution as I'm sure somebody has managed to successfully create OpenBSD USB install media from within OS X !
Attached Images
File Type: jpeg Image 18-11-2022 at 9.49 pm.jpeg (27.3 KB, 7 views)
File Type: jpeg Image 18-11-2022 at 9.59 pm (1).jpeg (262.2 KB, 11 views)
File Type: jpeg Image 18-11-2022 at 9.51 pm.jpeg (24.5 KB, 8 views)
Reply With Quote
Old 18th November 2022
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

I have no experience whatsoever with MacOS. A cursory Internet search found this guide for creating Linux USB images from MacOS, where they use sudo with dd. They use sudo for administrative authority, and with that authority use dd to write the drive image file sector-by-sector to the device.

https://www.howtogeek.com/741125/how...b-on-your-mac/

To misquote Gandalf, "rsync will not avail you, son of Apple."
Reply With Quote
Old 18th November 2022
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

This may help a little bit:
  • "Files" of all kinds are stored in "file systems". If you think of the analogy of a disk drive as being like a filing cabinet -- then the structure of the filing cabinet is the file system: screws, flanges, drawers, handles, racking, slides, hanging folders, document folders, labels, and tabs. File systems differ from computer system to computer system, in the same way that filing cabinets can differ from maker to maker.
  • The bootable image file you have downloaded contains the complete instructions for a new filing cabinet. You don't want to put those instructions into yet another folder in an existing cabinet ... you want to build that new cabinet from the instructions.
Typically, disk drives will have one or more file systems already on them, either from the manufacturer or from prior use.

Your objective is to ignore what is currently on the disk drive, and to place each sequential block from the image file onto the physical drive, starting with its first sector, then its next sector, and so on ... building a new filing cabinet completely, from the proverbial screws, flanges, drawers, handles, ... and files that are contained within the image.

Last edited by jggimi; 18th November 2022 at 05:26 PM. Reason: typo
Reply With Quote
Old 18th November 2022
Head_on_a_Stick's Avatar
Head_on_a_Stick Head_on_a_Stick is offline
Real Name: Matthew
Bitchy Nerd Elitist
 
Join Date: Dec 2015
Location: London
Posts: 461
Default

@OP: did you try dd? If not, why not?

Just follow the ArchWiki link, that clearly works.
Reply With Quote
Old 18th November 2022
bsd-keith bsd-keith is offline
Real Name: Keith
Open Source Software user
 
Join Date: Jun 2014
Location: Surrey/Hants Border, England
Posts: 344
Default

Quote:
So what's the solution here guys... How do I get around this extended attribute error.
That shouldn't be of any concern as this is a disk image, not a file.


Quote:
To trial this I went to the target installation system (HP laptop) and after F10 to set it as pure UEFI, I rebooted with the OpenBSD USB stick just created in step 3 and it skipped straight past it as if it didn't exist. In Windows, when I inserted the USB it came up immediately with a prompt about the drive being unreadable and to format it. I've not done that pending any replies to this post.
Your computer doesn't appear to boot to USB first, most can be set to do so, in the BIOS/UEFI. Failing that, you should be able to choose what to boot from by pressing a key whilst booting, the key will depend on your manufacturer, but you should be able to find out which with a quick search online.

(My HP thin clients use F9)
__________________
Linux since 1999, & also a BSD user.
Reply With Quote
Old 18th November 2022
bsd-keith bsd-keith is offline
Real Name: Keith
Open Source Software user
 
Join Date: Jun 2014
Location: Surrey/Hants Border, England
Posts: 344
Default

Take a look here...

__________________
Linux since 1999, & also a BSD user.
Reply With Quote
Old 19th November 2022
Entropic Entropic is offline
Banned
 
Join Date: Nov 2022
Posts: 77
Default

Quote:
Originally Posted by jggimi View Post
I have no experience whatsoever with MacOS. A cursory Internet search found this guide for creating Linux USB images from MacOS, where they use sudo with dd. They use sudo for administrative authority, and with that authority use dd to write the drive image file sector-by-sector to the device.

https://www.howtogeek.com/741125/how...b-on-your-mac/

To misquote Gandalf, "rsync will not avail you, son of Apple."
I think you came on this thread a bit late. I already tried DD with both /dev/disk4 and /dev/rdisk4 to no avail per post #14 in this thread..
Reply With Quote
Old 19th November 2022
Entropic Entropic is offline
Banned
 
Join Date: Nov 2022
Posts: 77
Default

Quote:
Originally Posted by Head_on_a_Stick View Post
@OP: did you try dd? If not, why not?

Just follow the ArchWiki link, that clearly works.
Are you serious? It was your advice earlier in this same thread to use CP after I showed how DD failed...
I've searched up this ArchWiki link in any event and it's instructions seem a bit superior to other material I've come across. Notably it gives MacOS specific instructions for creating the USB stick. The only difference I can see in the DD command line is that it omits the sudo command. So I may give that a try in case it makes any difference.

Last edited by Entropic; 19th November 2022 at 01:50 AM.
Reply With Quote
Old 19th November 2022
Entropic Entropic is offline
Banned
 
Join Date: Nov 2022
Posts: 77
Default

Quote:
Originally Posted by bsd-keith View Post
That shouldn't be of any concern as this is a disk image, not a file.
Ok, well that seems to give credibility to that Quora link's explanation.


Quote:
Your computer doesn't appear to boot to USB first, most can be set to do so, in the BIOS/UEFI. Failing that, you should be able to choose what to boot from by pressing a key whilst booting, the key will depend on your manufacturer, but you should be able to find out which with a quick search online.

(My HP thin clients use F9)
Thanks Keith. Unfortunately I'd already instructed the BIOS many days ago to boot from USB first "Generic USB Device" is highest in the boot priority, but I'll give this F9 key a tap at the next try to see if that allows me to manually force it, in case it's somehow not trying the USB first...
Reply With Quote
Old 20th November 2022
Entropic Entropic is offline
Banned
 
Join Date: Nov 2022
Posts: 77
Default

Great news: I've got OpenBSD installed on the HP laptop and am ready to get it working properly now with browsers, VPN etc.. Thanks to all (Keith, Jggimi and Matthew) for your advice!

Now I need to see about getting a browser and VPN working (Firefox seems the only secure option so far as I can tell (no WebRTC etc.). I need this up and running so that I can go about changing the password on all my services. I plan to save the passwords in a password manager I've been subscribed to for many years now (Lastpass), and I've found a port, albeit last updated in early 2019. Should still work right?

I've also been subscribed to ExpressVPN for years now running it on my Macbook and iPhones, but I don't see a port for it...

Thanks again all
Reply With Quote
Old 20th November 2022
bsd-keith bsd-keith is offline
Real Name: Keith
Open Source Software user
 
Join Date: Jun 2014
Location: Surrey/Hants Border, England
Posts: 344
Default

Excellent - enjoy your journey.....
__________________
Linux since 1999, & also a BSD user.
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
Installation on OpenBSD area Zielonykid123 OpenBSD Installation and Upgrading 5 26th November 2021 05:23 AM
directing DNS queries to local unbound? 22decembre OpenBSD Security 16 28th December 2014 04:52 AM
New OpenBSD installation on HDD with Windows cableguy OpenBSD Installation and Upgrading 8 3rd April 2014 10:57 PM
OpenBSD installation goes perfectly passthejoe OpenBSD Installation and Upgrading 4 16th November 2012 02:40 AM
Some questions about installation of OpenBSD aleunix OpenBSD Installation and Upgrading 20 15th June 2008 11:57 AM


All times are GMT. The time now is 09:09 AM.


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