overdue-scratch

Author Topic: Bootloader ASM question  (Read 2170 times)

0 Members and 1 Guest are viewing this topic.

busted

  • Entrant
  • Posts: 1
Bootloader ASM question
« on: October 13, 2010, 08:32:08 AM »
First, I've got a core i7 processor and a x58a-ud3r (rev1 F5) motherboard, a single 1tb sata hard drive, 4gb memory (6gb, but the multibeast walkthrough says to remove down to 4gb til you're bootable) and a sata dvdrom. I'm running into the "boot0: error" problem, and while I've (repeatedly) done what is supposedly necessary to fix this problem, so far I've been unsuccessful.

Of the three possible jumps to the error string in boot0.s, I've tracked the problem to this block:

    ; Since this code may not always reside in the MBR, always start by
    ; loading the MBR to kMBRBuffer and LBA1 to kGPTBuffer.
    ;

    xor     eax, eax
    mov     [my_lba], eax     ; store LBA sector 0 for read_lba function
    mov     al, 2         ; load two sectors: MBR and LBA1
    mov     bx, kMBRBuffer      ; MBR load address
    call    load
    jc      error1          ; MBR load error


But, I don't know enough about assembly to know why this is failing. Anyone have any idea?

Here's the output of diskutil:
bash-3.2# diskutil list
/dev/disk0
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *1.0 TB disk0
1: EFI 209.7 MB disk0s1
2: Apple_HFS Untit 999.9 GB disk0s2
bash-3.2#

Here's one of the many ways I've installed the chameleon bootloader:

Host:Chameleon-2.0-RC4-r684-src user$ sudo -s

WARNING: Improper use of the sudo command could lead to data loss
or the deletion of important system files. Please double-check your
typing when using sudo. Type "man sudo" for more information.

To proceed, enter your password, or type Ctrl-C to abort.

Password:
bash-3.2#
bash-3.2# fdisk -f boot0 -u -y /dev/rdisk0
bash-3.2# dd if=boot1h of=/dev/rdisk0s2
2+0 records in
2+0 records out
1024 bytes transferred in 0.000456 secs (2245148 bytes/sec)
bash-3.2# cp boot /
bash-3.2#
bash-3.2# fdisk -e /dev/disk0
Enter 'help' for information
fdisk: 1> f 2
Partition 2 marked active.
fdisk:*1> write
Device could not be accessed exclusively.
A reboot will be needed for changes to take effect. OK? [n] y
Writing MBR at offset 0.
fdisk: 1> exit
bash-3.2#


I'll also mention that the drive is plugged into the blue sata jacks, and sata is set for ACHI mode, though I doubt I'd be able to complete the snow leopard install if I hadn't done both of those things.