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 16th May 2016
fvgit's Avatar
fvgit fvgit is offline
Fdisk Soldier
 
Join Date: May 2016
Location: perl -MMIME::Base64 -le 'print decode_base64("SGVyZSBiZSBkcmFnb25zC")'
Posts: 72
Default Can't boot after successful install of 5.9 amd64 on a macbook 4.1

Hello everyone,

another newcomer to the forum here, although I've been an on and off OpenBSD-user since at least version 2.6.

My OSX 10.5 installation is getting a bit long in the tooth so I decided to return to OpenBSD on the Desktop. As I'm in the middle of various projects I decided to take the dual-boot route, at least for the time being.

I've been trying to install 5.9 amd64 onto my macbook 4.1 for over a week now, without success. Basically the installation works fine until I try to reboot into the freshly installed system.

The steps I took are these:

0) At first and as a minimally invasive procedure to my existing OSX installation I attempted to install to a USB stick with refind on it, although without success. More precisely: the installation process finishes but booting the installed system fails.

After several failed attempts I gave up on that and decided to take the hard disk route:

1) Resize existing HFS+ partition to make space for a smallish OpenBSD partition (an adventure in itself, but in the end it worked)

2) Install from CDr (install59.iso amd64 platform). Works as expected and the installer seems more straightforward than ever. I basically took all the defaults, except for adding a test user.

3) Rebooting the machine after successfull installation fails somewhere at the second stage bootloader (cf.: http://www.openbsd.org/faq/faq14.html#BootAmd64).

The last screen output is (manually written down):

Code:
entry point at 0xf00100 [7205c766, 34000004, 24448b12, 20a304]
after that the screen goes black and nothing happens.



Some additional facts:
  • the OpenBSD partition is flagged A6 and bootable * and both the first and second stage bootloaders seem to have been installed (cf. http://www.openbsd.org/faq/faq4.html#InstProb)
  • the OpenBSD installer has successfully installed BOOTX32.EFI and BOOTX64.EFI to the small EFI partition under the directory /EFI/BOOT. At least I assume those are the OpenBSD files. When booting the mac and pressing the Option-Key (alt) a corresponding disc appears in the graphical UEFI boot menu which starts the OpenBSD bootloader when you click it.
  • booting /bsd.rd from disk instead of /bsd reboots the machine after the entry point, as opposed to the black screen mentioned above. Someone on misc@ seems to have had a similar problem with a pre-5.9 release kernel in January, but no follow-up messages were posted:
    http://marc.info/?l=openbsd-misc&m=145350181109130&w=2
  • for testing purposes I manually booted both the bsd and bsd.mp kernels directly from the installation cd by changing the default settings in the cd bootloader. Both kernels boot successfully until they find no init and then drop into the debugger, which is expected behaviour I suppose
  • I also tried installing a current snapshot (May 11th) with the same results
  • in an attempt to provide a dmesg I learned the hard way that the OpenBSD installer is apparently not equipped to distribute files (only retrieve them): sadly no mount capabilites for NFS shares or ftp put functionality. Therefore no dmesg, I'm afraid.


That's where I am right now. Are there any macbook-users out there with an older 4.1 machine (that's the early 2008 2.4 GHz Intel Core 2 Duo model) who succesfully installed OpenBSD 5.9? Please, tell me it's possible.

Any help any hints would be highly appreciated.

On a lighter note, there's also a silver lining: after all the failed attempts I almost know the OpenBSD installer by heart.
Reply With Quote
  #2   (View Single Post)  
Old 21st May 2016
fvgit's Avatar
fvgit fvgit is offline
Fdisk Soldier
 
Join Date: May 2016
Location: perl -MMIME::Base64 -le 'print decode_base64("SGVyZSBiZSBkcmFnb25zC")'
Posts: 72
Default

Still not able to boot the OpenBSD install. Just a follow-up with more details.

I finally managed to get a dmesg from the installer by booting from cd into (S)hell and mounting a dos-formatted USB stick to copy the output.

dmesg from booted install cd (May 11th snapshot)
Code:
OpenBSD 5.9-current (RAMDISK_CD) #1850: Wed May 11 11:46:44 MDT 2016
    deraadt@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/RAMDISK_CD
real mem = 2094206976 (1997MB)
avail mem = 2028949504 (1934MB)
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.4 @ 0xe0000 (41 entries)
bios0: vendor Apple Inc. version "MB41.88Z.00C1.B00.0802091535" date 02/09/08
bios0: Apple Inc. MacBook4,1
acpi0 at bios0: rev 2
acpi0: tables DSDT FACP HPET APIC MCFG ASF! SBST ECDT SSDT SSDT SSDT SSDT SSDT
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM)2 Duo CPU T8300 @ 2.40GHz, 2394.42 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,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,NXE,LONG,LAHF,PERF,SENSOR
cpu0: 3MB 64b/line 8-way L2 cache
cpu0: apic clock running at 199MHz
cpu0: mwait min=64, max=64, C-substates=0.2.2.2.2.1.3, IBE
cpu at mainbus0: not configured
ioapic0 at mainbus0: apid 1 pa 0xfec00000, version 20, 24 pins
acpiec0 at acpi0
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 2 (RP05)
acpiprt2 at acpi0: bus 3 (RP06)
acpiprt3 at acpi0: bus 4 (PCIB)
acpicpu at acpi0 not configured
"ACPI0003" at acpi0 not configured
"PNP0C0D" at acpi0 not configured
"APP0002" at acpi0 not configured
"PNP0C0C" at acpi0 not configured
"PNP0C0E" at acpi0 not configured
"APP0001" at acpi0 not configured
"APP0003" at acpi0 not configured
"ACPI0002" at acpi0 not configured
"PNP0C0A" at acpi0 not configured
memory map conflict 0xf00f8000/0x1000
memory map conflict 0xfed1c000/0x4000
memory map conflict 0xfffa0000/0x30000
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel GM965 Host" rev 0x03
vga1 at pci0 dev 2 function 0 "Intel GM965 Video" rev 0x03
wsdisplay1 at vga1 mux 1: console (80x25, vt100 emulation)
"Intel GM965 Video" rev 0x03 at pci0 dev 2 function 1 not configured
uhci0 at pci0 dev 26 function 0 "Intel 82801H USB" rev 0x04: apic 1 int 20
uhci1 at pci0 dev 26 function 1 "Intel 82801H USB" rev 0x04: apic 1 int 16
ehci0 at pci0 dev 26 function 7 "Intel 82801H USB" rev 0x04: apic 1 int 21
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 "Intel EHCI root hub" rev 2.00/1.00 addr 1
"Intel 82801H HD Audio" rev 0x04 at pci0 dev 27 function 0 not configured
ppb0 at pci0 dev 28 function 0 "Intel 82801H PCIE" rev 0x04: msi
pci1 at ppb0 bus 1
ppb1 at pci0 dev 28 function 4 "Intel 82801H PCIE" rev 0x04: msi
pci2 at ppb1 bus 2
"Broadcom BCM4321" rev 0x03 at pci2 dev 0 function 0 not configured
ppb2 at pci0 dev 28 function 5 "Intel 82801H PCIE" rev 0x04: msi
pci3 at ppb2 bus 3
mskc0 at pci3 dev 0 function 0 "Marvell Yukon 88E8058" rev 0x13, Yukon-2 EC Ultra rev. B0 (0x3): apic 1 int 17
msk0 at mskc0 port A: address 00:1f:f3:d5:f7:57
eephy0 at msk0 phy 0: 88E1149 Gigabit PHY, rev. 1
uhci2 at pci0 dev 29 function 0 "Intel 82801H USB" rev 0x04: apic 1 int 16
uhci3 at pci0 dev 29 function 1 "Intel 82801H USB" rev 0x04: apic 1 int 18
uhci4 at pci0 dev 29 function 2 "Intel 82801H USB" rev 0x04: apic 1 int 21
ehci1 at pci0 dev 29 function 7 "Intel 82801H USB" rev 0x04: apic 1 int 20
usb1 at ehci1: USB revision 2.0
uhub1 at usb1 "Intel EHCI root hub" rev 2.00/1.00 addr 1
ppb3 at pci0 dev 30 function 0 "Intel 82801BAM Hub-to-PCI" rev 0xf4
pci4 at ppb3 bus 4
"AT&T/Lucent FW322 1394" rev 0x61 at pci4 dev 3 function 0 not configured
"Intel 82801HBM LPC" rev 0x04 at pci0 dev 31 function 0 not configured
pciide0 at pci0 dev 31 function 1 "Intel 82801HBM IDE" rev 0x04: DMA, channel 0 configured to native-PCI, channel 1 configured to native-PCI
pciide0: using apic 1 int 21 for native-PCI interrupt
atapiscsi0 at pciide0 channel 0 drive 0
scsibus0 at atapiscsi0: 2 targets
cd0 at scsibus0 targ 0 lun 0: <MATSHITA, DVD-R UJ-867, HB01> ATAPI 5/cdrom removable
cd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 4
pciide0: channel 1 disabled (no drives)
pciide1 at pci0 dev 31 function 2 "Intel 82801HBM SATA" rev 0x04: DMA, channel 0 configured to native-PCI, channel 1 configured to native-PCI
pciide1: using apic 1 int 18 for native-PCI interrupt
wd0 at pciide1 channel 0 drive 0: <Hitachi HTS542516K9SA00>
wd0: 16-sector PIO, LBA48, 152627MB, 312581808 sectors
wd0(pciide1:0:0): using PIO mode 4, Ultra-DMA mode 6
"Intel 82801H SMBus" rev 0x04 at pci0 dev 31 function 3 not configured
usb2 at uhci0: USB revision 1.0
uhub2 at usb2 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb3 at uhci1: USB revision 1.0
uhub3 at usb3 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb4 at uhci2: USB revision 1.0
uhub4 at usb4 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb5 at uhci3: USB revision 1.0
uhub5 at usb5 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb6 at uhci4: USB revision 1.0
uhub6 at usb6 "Intel UHCI root hub" rev 1.00/1.00 addr 1
isa0 at mainbus0
umass0 at uhub0 port 2 configuration 1 interface 0 "Kingston DataTraveler 3.0" rev 2.10/1.10 addr 2
umass0: using SCSI over Bulk-Only
scsibus1 at umass0: 2 targets, initiator 0
sd0 at scsibus1 targ 1 lun 0: <Kingston, DataTraveler 3.0, PMAP> SCSI4 0/direct removable serial.09511666BFA109378511
sd0: 29568MB, 512 bytes/sector, 60555264 sectors
"Micron Built-in iSight" rev 2.00/1.84 addr 2 at uhub1 port 4 not configured
uhidev0 at uhub2 port 1 configuration 1 interface 0 "vendor 0x05ac product 0x1000" rev 2.00/19.65 addr 2
uhidev0: no input interrupt endpoint
uhidev1 at uhub6 port 1 configuration 1 interface 0 "Apple Computer, Inc. IR Receiver" rev 2.00/0.16 addr 2
uhidev1: iclass 3/0, 38 report ids
uhid at uhidev1 reportid 36 not configured
uhid at uhidev1 reportid 37 not configured
uhid at uhidev1 reportid 38 not configured
uhidev2 at uhub6 port 2 configuration 1 interface 0 "Apple Computer Apple Internal Keyboard / Trackpad" rev 2.00/0.07 addr 3
uhidev2: iclass 3/1
ukbd0 at uhidev2
wskbd0 at ukbd0: console keyboard, using wsdisplay1
uhidev3 at uhub6 port 2 configuration 1 interface 1 "Apple Computer Apple Internal Keyboard / Trackpad" rev 2.00/0.07 addr 3
uhidev3: iclass 3/1, 5 report ids
uhid at uhidev3 reportid 2 not configured
uhid at uhidev3 reportid 5 not configured
uhidev4 at uhub6 port 2 configuration 1 interface 2 "Apple Computer Apple Internal Keyboard / Trackpad" rev 2.00/0.07 addr 3
uhidev4: iclass 3/0
uhid at uhidev4 not configured
softraid0 at root
scsibus2 at softraid0: 256 targets
root on rd0a swap on rd0b dump on rd0b
fdisk wd0 (from booted cd installer (S)hell as above)
Code:
Disk: wd0       Usable LBA: 34 to 312581774 [312581808 Sectors]
   #: type                                 [       start:         size ]
------------------------------------------------------------------------
   0: EFI Sys                              [          40:       409600 ]
   1: MacOS X HFS+                         [      409640:    289144832 ]
*  2: OpenBSD                              [   289816616:     22503008 ]
disklabel wd0 (from booted cd installer (S)hell as above)
Code:
# /dev/rwd0c:
type: ESDI
disk: ESDI/IDE disk
label: Hitachi HTS54251
duid: b7343e1a09520c97
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 255
sectors/cylinder: 16065
cylinders: 19457
total sectors: 312581808
boundstart: 289816616
boundend: 312319624
drivedata: 0

16 partitions:
#                size           offset  fstype [fsize bsize  cpg]
  a:           554968        289816616  4.2BSD   2048 16384    1
  b:           946130        290371584    swap
  c:        312581808                0  unused
  d:           871552        291317728  4.2BSD   2048 16384    1
  e:          1180800        292189280  4.2BSD   2048 16384    1
  f:          2234336        293370080  4.2BSD   2048 16384    1
  g:          1283232        295604416  4.2BSD   2048 16384    1
  h:          4976576        296887648  4.2BSD   2048 16384    1
  i:           409600               40   MSDOS
  j:        289144832           409640     HFS
  k:          2253600        301864224  4.2BSD   2048 16384    1
  l:          2975296        304117824  4.2BSD   2048 16384    1
  m:          5226336        307093120  4.2BSD   2048 16384    1
And now some data from the OSX side:

fdisk /dev/disk0
Code:
Disk: /dev/disk0        geometry: 19457/255/63 [312581808 sectors]
Signature: 0xAA55
         Starting       Ending
 #: id  cyl  hd sec -  cyl  hd sec [     start -       size]
------------------------------------------------------------------------
 1: EE    0   0   2 - 1023  80  63 [         1 -  312581807] <Unknown ID>
 2: 00    0   0   0 -    0   0   0 [         0 -          0] unused
 3: 00    0   0   0 -    0   0   0 [         0 -          0] unused
 4: 00    0   0   0 -    0   0   0 [         0 -          0] unused

diskutil list
Code:
/dev/disk0
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *149.1 Gi   disk0
   1:                        EFI                         200.0 Mi   disk0s1
   2:                  Apple_HFS Macintosh HD            137.9 Gi   disk0s2
   3: 824CC7A0-36A8-11E3-890A-952519AD                         10.7 Gi    disk0s3
diskutil info disk0s3 (this is the OpenBSD installation target, created by resizing the existing HFS+ partition as described in my OP. I have no idea if this is relevant but the Not bootable remark as opposed to the OpenBSD fdisk wd0 output further above seems odd. )
Code:
Device Identifier:        disk0s3
   Device Node:              /dev/disk0s3
   Part Of Whole:            disk0
   Device / Media Name:      Untitled

   Volume Name:
   Mount Point:

   Partition Type:           824CC7A0-36A8-11E3-890A-952519AD3F61
   Bootable:                 Not bootable, can be made bootable safely
   Media Type:               Generic
   Protocol:                 SATA
   SMART Status:             Verified

   Total Size:               10.7 Gi (11521540096 B) (22503008 512-byte blocks)
   Free Space:               0.0 B (0 B) (0 512-byte blocks)

   Read Only:                No
   Ejectable:                No
   Whole:                    No
   Internal:                 Yes
And finally what I see when I try to boot OpenBSD from disk (written down by hand):
Code:
probing: pc0 mem[572K 64K 2007M 152K 224K 4M 416K 36K 20K 48K 28K 716K 288K 44K
40K 16K 88K 4M 28K 20K 236K 5M 3M 144K 40K]
disk hd0 hd1* hd2*
>> OpenBSD/amd64 EFIBOOT 3.30
boot> set
addr    0x0
howto
device  hd0a
tty     pc0
image   /bsd
timeout 0
db_console      unset
boot> boot
booting hd0a:/bsd.rd: 3345100+1411664+2413568+0+585728[72+439224+281972]= 0x8173f8
entry point at 0xf001000 [7205c766, 34000004, 24448b12, 9680a304]
Then the screen goes black (/bsd) or just nothing else happens (/bsd.rd) excpt for full throttle cpu fan.

Any ideas?
Reply With Quote
  #3   (View Single Post)  
Old 27th May 2016
LeFrettchen's Avatar
LeFrettchen LeFrettchen is offline
Marveled user
 
Join Date: Aug 2012
Location: Bronvaux, France
Posts: 254
Default

I found something that looks similar to your problem, and that was resolved...
Not really the same problem, but maybe it would be worth having a look...

https://github.com/yasuoka/openbsd-uefi/issues/2

Edit : Oh, and what do you use as bootloader ?
Seems that BootCamp is Windows-friendly only, maybe you need to use rEFIT, or something like that...
__________________
The secret of wisdom is not wisdom itself, it's the road that leads us there.

Last edited by LeFrettchen; 27th May 2016 at 09:52 PM. Reason: Bootloader...
Reply With Quote
  #4   (View Single Post)  
Old 27th May 2016
fvgit's Avatar
fvgit fvgit is offline
Fdisk Soldier
 
Join Date: May 2016
Location: perl -MMIME::Base64 -le 'print decode_base64("SGVyZSBiZSBkcmFnb25zC")'
Posts: 72
Default

Hi LeFrettchen,

thanks for the link, the problems described there seem indeed similar to mine. Although according to that exchange (dated Nov 7, 2015) everything should be fixed by now.

My amateurish guess is that the either the bootloader is the problem or the macbook's EFI implementation (supposedly Apple didn't comply with standards there).

I did some testing after finally finding out what I did wrong when I was trying to create a USB boot disk in order to save on CDrs:
Code:
image         |  arch | freezes | reboots | boots | incl. EFI partition
-----------------------------------------------------------------------
miniroot56.fs | amd64 |    x    |         |       |
miniroot56.fs |  i386 |         |    x    |       |
miniroot57.fs | amd64 |    x    |         |       |
miniroot57.fs |  i386 |         |    x    |       |
miniroot58.fs | amd64 |    x    |         |       |
miniroot58.fs |  i386 |         |    x    |       |
miniroot59.fs | amd64 |    x    |         |       | +EFI
miniroot59.fs |  i386 |         |    x    |       |
miniroot60.fs | amd64 |         | ~5 secs |       | +EFI
miniroot60.fs |  i386 |         |    x    |       |
  • in all cases above, including i386(!), the bootloader used was BOOTX64.EFI in /EFI/BOOT/ on the macbook's EFI partition - without that nothing shows up on the macbook's EFI boot menu - removing BOOTX64.EFI in order to enforce usage of BOOTIA32 does not work - reFIT apparently also needs BOOTX64.EFI in order to 'see' anything
  • as of 5.9 the amd64 miniroot*.fs images include an additional EFI partition with the files BOOTIA32.EFI and BOOTX64.EFI in the directory /EFI/BOOT - this shows up as an additional EFI volume in the macbook's EFI menu
    other than that only two files are present: boot and /bsd
  • the two miniroot60.fs images were from the May 25 snapshot

I did another test with a slightly newer i386 snapshot burned on CDr in order to see if I had more luck, apparently not: fdisk complains about an incorrect MBR on wd0 so I aborted that install as I didn't want to mess with the MBR

I'm really at a loss here. The problem is I still need the OSX installation even though I intend to migrate away from it in the long run. Keeping that intact is paramount for me, so I have to resort to try dual booting.
Reply With Quote
  #5   (View Single Post)  
Old 28th May 2016
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 5,937
Default

Have you considered a second disk, to avoid multiboot configurations?
Reply With Quote
  #6   (View Single Post)  
Old 28th May 2016
NaWi NaWi is offline
Fdisk Soldier
 
Join Date: Aug 2015
Location: Austria
Posts: 52
Default

In your open posting you wrote, that you use 10.5 but no details. The latest SMC version is 1.31f1 (SMC 1.4) https://support.apple.com/en-us/HT201518 which requires 10.5.8 to update.

Have you tried the installation way for OpenBSD alone as I recommanded in the other topic ?

Here is a Linux based description of hybride MBR's http://www.rodsbooks.com/gdisk/hybrid.html

As always, make a backup before you play around.
Reply With Quote
  #7   (View Single Post)  
Old 28th May 2016
fvgit's Avatar
fvgit fvgit is offline
Fdisk Soldier
 
Join Date: May 2016
Location: perl -MMIME::Base64 -le 'print decode_base64("SGVyZSBiZSBkcmFnb25zC")'
Posts: 72
Default

Quote:
Originally Posted by jggimi View Post
Have you considered a second disk, to avoid multiboot configurations?
Actually my very first attempt at installing 5.9 was onto a USB device instead of the hard disk. I don't have an external USB hard drive, but given that I can't seem to boot anything from USB (nor hd for that matter) I doubt it'd make much of a difference. The only other alternative would be drive swapping. But even though this type of macbook is comparatively easy upgradeable (for an Apple machine), it is still necessary to remove the L-bracket behind the battery unscrew the hard drive from some kind of sled etc.etc. Might be my very last resort although it doesn't seem really practical and I'd have to buy a new drive. Somehow I don't think multi-booting is the problem as I can't even properly boot the miniroot*.fs images from USB.

Quote:
Originally Posted by NaWi View Post
In your open posting you wrote, that you use 10.5 but no details. The latest SMC version is 1.31f1 (SMC 1.4) https://support.apple.com/en-us/HT201518 which requires 10.5.8 to update.
Good catch! Yes, I do use 10.5.8 but my firmware was SMC version 1.31f0 (SMC 1.4). I installed the firmware upgrade this afternoon, but no change. FWIW, Apple just mentions better battery management in the accompanying support document: https://support.apple.com/kb/DL1312?locale=en_US

Quote:
Originally Posted by NaWi View Post
Have you tried the installation way for OpenBSD alone as I recommanded in the other topic ?
You mean Jasper's blog, right!? I had already come across that page looking for answers on the web. As I see it that information is superseded now. The 5.9 and higher installer does this by itself. The ESP already exists on the macbook and the new OpenBSD installer succesfully copies the corresponding *.EFI files in place.

Quote:
Originally Posted by NaWi View Post
Here is a Linux based description of hybride MBR's http://www.rodsbooks.com/gdisk/hybrid.html

As always, make a backup before you play around.
Thanks for that link covering hybrid MBRs! Seems pretty thorough, I'll have a good look at it.

After cleaning up the previous installation I repeated the install process twice today with the 5.9 snapshot (amd64) from the other day. Once on the separate OpenBSD partition (hard disk) and once on a dedicated USB device. Same result as always.
As it stands I'm unable to boot OpenBSD either from hard disk or attached USB device. The kernel always hangs at the entry point.

After poking around on misc@ I saw several similar problems mentioned when the EFI code was first introduced in 5.8-current around September 2015. I think the problem could be a bug in the EFI bootloader code. Maybe sth. like this: http://marc.info/?l=openbsd-misc&m=144233703211822&w=2
OpenBSD's EFI code is still fairly new and not even mentioned in the FAQ.
Reply With Quote
  #8   (View Single Post)  
Old 29th May 2016
NaWi NaWi is offline
Fdisk Soldier
 
Join Date: Aug 2015
Location: Austria
Posts: 52
Default

Boot from a external USB drive on this machine is from pain till impossible everything. To replace the internal HD see https://de.ifixit.com/Guide/MacBook+...eplacement/514 is not much work.

To the SMC upgrade, I would not believe all what Apple tell you. At the end, it is the last available version for this machine and, in the future there will not come newer versions.

The general question is, do you really need Mac OS X 10.5 Leopard ? It is very old and there are no more updates from Apple ? If you still run PPC apps, try to replace them. You can create a nice Mac OS X like desktop like http://vermaden.deviantart.com/art/b...theme-67963470 (Fluxbox) or http://guistyles.com/2005/06/13/fvwm-milk-theme/ (fvwm milk). The only thing on this machine is, that mine runs between 50 and 60 degrees even I use APM's autoscale.

The only thing I could tell you is, 5.9 runs on my machine (with 6 GB RAM). Before replacing the drive, backup your Mac OS X data and try to run OpenBSD as only operating system.

Only a crazy idea, could it be, that the boot freezes and the reason is the same as if your / root filesystem is to big that the bootloader can't find the kernel ? Something like partitions on the wrong place.
Reply With Quote
  #9   (View Single Post)  
Old 31st May 2016
fvgit's Avatar
fvgit fvgit is offline
Fdisk Soldier
 
Join Date: May 2016
Location: perl -MMIME::Base64 -le 'print decode_base64("SGVyZSBiZSBkcmFnb25zC")'
Posts: 72
Default

Quote:
Originally Posted by NaWi View Post
Only a crazy idea, could it be, that the boot freezes and the reason is the same as if your / root filesystem is to big that the bootloader can't find the kernel ? Something like partitions on the wrong place.
That thought had crossed my mind as well. My OpenBSD partition sits at the end and comprises less than 10% of the entire drive. However, the fact I can't even boot from the miniroot*.fs on USB somehow refutes that argument.

I still haven't had time to go through the hybrid MBR link you gave me, but I downloaded and booted SystemRescueCD. Although Linux-based it comes with GPT-fdisk. gdisk found nothing wrong with the partition table on my hard drive, it only complained about those on the USB drives. I let it fix those and tried to boot again from the miniroot images but no change in behaviour. I also tested the May 29th amd64 snapshot: same as before. Of course the EFI code is still very new and AFAIK only present in the amd64 and (since yesterday) ARMv7 snapshots, as reported on undeadly.

I do have some interesting news, though: I can boot FreeBSD from USB without any problems whatsoever. I used FreeBSD-10.3-RELEASE-amd64-uefi-memstick.img for that. I even started to install from the booted USB drive to a second USB drive. Only aborted it because I was unsure about some partitioning decisions. So I'll probably pop over to the FreeBSD section here for some advice to see if I can get a running FreeBSD install as some sort of intermediary solution.

As for OSX I'm not particularly fond of it. Got the macbook out of necessity when an older ibook died and I quickly needed a replacement. Spend more than a week configuring away stuff and behaviour I didn't like. In the end I just got used to it, that's all. My main requirements are VirtualBox on which I have a clean install of XP with the configuration software for a PBX system and apart from that Sheepshaver which i need for some older mac emulation testing stuff that's currently dormant. It seems both may be available at least on FreeBSD so there may be an intermediary migrational roadmap for me. Something like Free and Open dual-boot perhaps...

To cut a long story short, I'll probably hold off on any single-boot hard drive installations until I have a viable install on a usb-drive to keep going. Meanwhile I'll keep trying to narrow down possible interference factors like partitioning etc. Of course I'll report any developments in this thread.

Final parting thought for the day: If FreeBSD can boot from USB without problems, couldn't it theoretically be possible to borrow that EFI code over to OpenBSD?
Reply With Quote
Old 31st May 2016
shep shep is offline
Rc.conf Instructor
 
Join Date: May 2008
Location: Dry and Dusty
Posts: 1,049
Default

I had the thought that it might be possible to build your usb thumb drive with an alternative bootloader + OpenBSD. Legacy sysutils/grub is available in ports. When exploring the thought I ran into this Arch Linux EFI examples wiki. Apparently, OS/X likes things "Blessed".

It may also be possible to install linux with grub2 to the usb disk and then use a system rescue disk to boot the usb disk, shrink the linux partition as much as possible and generate an A6 OpenBSD partition. Allocate the OpenBSD space using disklabel(8) with the -A flag. Then extract the sets to the OpenBSD root partition. Edit the Grub2 chainloading code.
Reply With Quote
Old 1st June 2016
fvgit's Avatar
fvgit fvgit is offline
Fdisk Soldier
 
Join Date: May 2016
Location: perl -MMIME::Base64 -le 'print decode_base64("SGVyZSBiZSBkcmFnb25zC")'
Posts: 72
Default

The idea of using grub as a replacement sounds interesting. I played around a bit trying to install grub from the gentoo-based systremrescuecd, but ran into some error while trying to update the chainloading code. I'll see if can look into it more thoroughly over the next few days.

I'm still convinced it's just an error in the bootloader code as the FreeBSD image boots without a problem, furthermore OpenBSD's code was originally imported from FreeBSD as the version control headers clearly show
http://cvsweb.openbsd.org/cgi-bin/cv...d/efi/include/

Last edited by fvgit; 1st June 2016 at 09:26 PM. Reason: typo
Reply With Quote
Old 15th January 2017
fvgit's Avatar
fvgit fvgit is offline
Fdisk Soldier
 
Join Date: May 2016
Location: perl -MMIME::Base64 -le 'print decode_base64("SGVyZSBiZSBkcmFnb25zC")'
Posts: 72
Exclamation

There was some fairly recent chatter on misc@ about macbooks and EFI with one of the developers chiming in, and I finally know why it doesn't work. The EFI code on older macbooks isn't supported by OpenBSD's EFI loader (emphasis mine):
Quote:
Originally Posted by YASUOKA Masahiko
OpenBSD efiboot supports GOP for the graphic protocol
but it doesn't support UGA. FreeBSD supports both.
And here's the output of rEFInd's 'About' from on my macbook:
Code:
About: rEFInd Version 0.10.4

(...)

Running on:
   EFI Revision 1.10
   Platform: x86_64 (64 bit); Secure Boot inactive
   System Integrity Protection is enable (0x10)
   Firmware: Apple 1.10
   Screen Output: UGA Draw (EFI 1.10), 1280x800
This also explains why I could boot FreeBSD from USB just fine, whereas it did not work with OpenBSD.
Reply With Quote
Old 5th February 2017
fvgit's Avatar
fvgit fvgit is offline
Fdisk Soldier
 
Join Date: May 2016
Location: perl -MMIME::Base64 -le 'print decode_base64("SGVyZSBiZSBkcmFnb25zC")'
Posts: 72
Lightbulb Igor! --- Yes, master?


Finally! I got the machine booting in legacy mode.

If anyone is struggling with a 4,1 or earlier Mac (creating an OS X/OpenBSD dual boot environment on a pre-exisiting OS X install), here's an executive summary of the process:

1) Prepare the hard drive from within OSX with 'Boot Camp Assistant' (this will resize osx, create a new 'Windows' partition, and change the partition table from GPT with protective MBR into GPT with hybrid MBR)
2) Reboot from within 'Boot Camp Assistant' with an OpenBSD CD in the drive (machine will boot directly into whatever bootable cd is in the drive)
3) Install OpenBSD as usual (disk is wd0, new bootcamp partion is Win95/FAT32, set type to A6 in fdisk)
4) reboot & done

Unless the setup is changed the Mac will boot henceforth in Legacy/BIOS mode. Supposedly it works like this: on powerup/reboot the firmware inspects the drive's partition table and boots in BIOS/legacy mode if it detects a classic MBR or a GPT/hybrid MBR and if a partition in that MBR has a bootable flag, otherwise it boots in EFI-mode if it finds a GPT with protective MBR or no MBR partition is flagged as bootable.

It may be advisable to have some useful tools at hand in case of an emergency, like a rescue-cd or USB-drive with rEFind, gpt fdisk (aka gdisk). Sth. like that.

Obviously the hybrid Frankenstein partitioning is not exactly a desirable setup but at least it works for the time being. Until, hopefully, one day the OpenBSD EFI bootloader may also support UGA for the graphics protocol (keeping fingers crossed!)

In honour of this happy milestone I hope my exuberance may be forgiven when I state that clearly some JB is in order.
Reply With Quote
Reply

Tags
bios, boot, efi, macbook

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
Cannot boot after successful install of 5.8 avallee OpenBSD Installation and Upgrading 14 4th May 2016 02:20 PM
openbsd don't boot of AMD64 philo_neo71 OpenBSD Installation and Upgrading 3 19th October 2015 09:42 AM
How to install OpenBSD on MacBook Air? Skinny OpenBSD Installation and Upgrading 7 15th July 2013 10:59 AM
[Beginner] Things to do after a successful installation fabiogar NetBSD Installation and Upgrading 8 13th September 2010 03:50 AM
Allow i386 and amd64 to boot from extended DOS partitions lvlamb OpenBSD General 4 16th July 2008 03:24 PM


All times are GMT. The time now is 11:13 PM.


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