Solved Unable to boot from disk

vasechka

Member

Reaction score: 1
Messages: 23

I've posted earlier about my issues with booting my systems.

When system boots up, it shows list of bios drives, and then spinner starts for about two-three seconds, after which it will get stuck. Waited 30 or so minutes without luck, didn't move.

When booting from ISO (via IPMI — it's Supermicro X10DSC+ board), I can boot up from the disks and systems works properly. But this is not solution.

I can not figure out how to resolve boot issues. Please help.

Configuration:

* 2 sata SSD in zfs mirror raid.
* GPT
* No UEFI

Here is what I have to type every time after reboot in boot loader when booted from FreeBSD CD:

Code:
unload
set currdev=zfs:zroot/ROOT/default:
load /boot/kernel/kernel
load boot/kernel/opensolaris.ko
load boot/kernel/zfs.ko
set mrsas_enable=YES
set hw.mfi.mrsas_enable=1
boot

Here is what I've tried already:

Code:
# gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ada0
# gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ada1
# sudo gpart set -a bootme -i 3 ada0
# sudo gpart set -a bootme -i 3 ada1
# gpart set -a active ada0

Here is my partition looks now:

Code:
# gpart show ada0
=>       40  250069600  ada0  GPT  (119G)
         40       1024     1  freebsd-boot  (512K)
       1064        984        - free -  (492K)
       2048    4194304     2  freebsd-swap  (2.0G)
    4196352  245872640     3  freebsd-zfs  [bootme]  (117G)
  250068992        648        - free -  (324K)

# gpart show ada1
=>       40  250069600  ada1  GPT  (119G)
         40       1024     1  freebsd-boot  (512K)
       1064        984        - free -  (492K)
       2048    4194304     2  freebsd-swap  (2.0G)
    4196352  245872640     3  freebsd-zfs  [bootme]  (117G)
  250068992        648        - free -  (324K)
What I didn't try:
1. didn't try installing boot0cfg, as it doesn't support GPT+ZFS
1. figure out how to convert existing partitioning into UEFI and attempt boot with UEFI.

I even upgraded from 11.2-p[456] to 12.0 — did not solve the mystery of boot failure.

Thanks in advance.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 7,680
Messages: 30,598

Is there anything else in loader.conf? Do you also have this?
Code:
zfs_load="YES"
vfs.root.mountfrom="zfs:zroot/ROOT/default"
And have you checked a few obvious things like boot order and such in the BIOS? Have you tried loading the BIOS defaults? (to rule out any weird configuration issues).
 
OP
OP
V

vasechka

Member

Reaction score: 1
Messages: 23

Boot order set correctly, checked and confirmed. I have zfs_load, but not vfs.root.mountfrom — but my understanding, that loader is not loaded at that time — my problem happening because the loader wasn't loaded. Am I wrong?

When booting from CD, I see list of BIOS drives, then few lines about memory and then loader loads — I get stuck right after BIOS drives listing. I was trying to figure out how to enable more verbose logging during the boot process, but couldn't find any information.


My /boot/loader.conf:

Code:
kern.geom.label.disk_ident.enable="0"
kern.geom.label.gptid.enable="0"
zfs_load="YES"
fuse_load="YES"
sfxge_load="YES"
mrsas_load="YES"
hw.mfi.mrsas_enable=1

verbose_loading="YES"
boot_verbose="-v"
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 7,680
Messages: 30,598

my problem happening because the loader wasn't loaded. Am I wrong?
Does the menu show? As far as I can tell loader(8) works (the set, load and boot commands you're using are typed at the loader(8) prompt). And just to confirm, this is still a 11.2 machine? There have been quite a few changes to loader(8) on 12.0. Did you perhaps use the gptzfsboot(8) from a 12.0 install disk?
 

VladiBG

Aspiring Daemon

Reaction score: 243
Messages: 602

Why did you set bootme on freebsd-zfs it's used only for gptboot.
 
OP
OP
V

vasechka

Member

Reaction score: 1
Messages: 23

Does the menu show?
No. I get access to the loader menu when I boot from CD.

And just to confirm, this is still a 11.2 machine? There have been quite a few changes to loader(8) on 12.0. Did you perhaps use the gptzfsboot(8) from a 12.0 install disk?
I just upgraded it to 12.0 — would upgrade install new boot loaders, or do I need manually upgrade it?
Why did you set bootme on freebsd-zfs it's used only for gptboot.
One of the posts I found somewhere suggested to do this — tried and failed. Is there way to remove it?
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 7,680
Messages: 30,598

I just upgraded it to 12.0 — would upgrade install new boot loaders, or do I need manually upgrade it?
You would have to do that manually. That's why I asked, I upgraded my 11-STABLE to 12-STABLE a while ago and used beadm(1). After the upgrade I also updated the boot code (blindly, stupid mistake, brain was on hold). My upgrade failed miserably. No worries I thought, just switch back the original boot environment. Unfortunately this also failed because I had already updated the boot code and it was now incompatible with my old 11-STABLE. So I had to restore the original 11-STABLE boot code in order to fix it. Then I could redo the upgrade again (this time actually using my brain).
 
OP
OP
V

vasechka

Member

Reaction score: 1
Messages: 23

Output of the beadm was:
Code:
# beadm list
BE      Active Mountpoint  Space Created
default NR     /            2.5G 2018-11-01 08:30
So I have single boot environment and it active and will be used on next reboot.

Ok, so I did this:

Code:
# gpart bootcode -p /boot/gptzfsboot -i 1 ada0
partcode written to ada0p1
# gpart bootcode -p /boot/gptzfsboot -i 1 ada1
partcode written to ada1p1
Did not help.
Froze again

screenshot_2018.12.12_132308.png
 

Toomas Soome

New Member


Messages: 1

you can recover pressing space on first spinner, and on boot: prompt enter /boot/zfsloader.old (assuming you have that file still, if not, grab it from 11 somewhere.

however, I'd like to get more information about this system as we clearly do fail to stop to discover the disks... poke tsoome on irc or mail to tsoome@me.com please.
 
OP
OP
V

vasechka

Member

Reaction score: 1
Messages: 23

you can recover pressing space on first spinner, and on boot: prompt enter /boot/zfsloader.old (assuming you have that file still, if not, grab it from 11 somewhere.
I copied zfsloader from 11.2 — and saved it as /boot/zfsloader.old — attempted to boot and still got stuck.

I sent you an email.
 
OP
OP
V

vasechka

Member

Reaction score: 1
Messages: 23

Can you try to change your SATA mod in the BIOS from AHCI to IDE to see if there's any difference.
I believe I tried this already in the past, but re-tested today again — nope, same result: it gets stuck.
 
OP
OP
V

vasechka

Member

Reaction score: 1
Messages: 23

With the help of Toomas, problem was traced to the BIOS bug which caused system freeze while attempting to probe
partitionless disks, which fixed with the following patch (currently in review).
 

v_squared

New Member


Messages: 1

So we pull all of the zfs data drives leaving just the two OS drives. The server booted fine then we edit the zfs.c according to the patch. Did a make buildworld and kernel and everything seems fine now. Thanks for everyone's help.
 
Top