boot2 issue with "/" on partition other than "a"

Hi,

Installing bootstrap via bsdlabel will default to "0:ad(0,a)/boot/kernel/kernel". You can override this with "/boot.config" but that would only work If "/" is on partition "a" of the slice.

What If "/" is not on partition "a" and I don't want to hardcode values in /boot/boot2 binary?
 
I've done this in the past, but my memory of this is scetchy. I think you would do something like this at the boot prompt
Code:
boot: 0:ad(0,d)/boot/loader

At the loader prompt set currdev=disk0s1d and boot
Check out boot(8) and loader(8) for more details.
 
jalla said:
I've done this in the past, but my memory of this is scetchy. I think you would do something like this at the boot prompt
Code:
boot: 0:ad(0,d)/boot/loader

At the loader prompt set currdev=disk0s1d and boot
Check out boot(8) and loader(8) for more details.

Thank you for replying.

I already know how to get in(from the boot prompt). My question is how to save for next boots.

I just looked at loader man. If I understand correctly, currdev will be used by loader so It wouldn't help here.
 
Nezmer said:
I just looked at loader man. If I understand correctly, currdev will be used by loader so It wouldn't help here.
Are you saying you've added that to /boot/loader.conf and it didn't work? It ought to...
 
aragon said:
Are you saying you've added that to /boot/loader.conf and it didn't work? It ought to...

How is loader.conf going to be read If I can't go to the loader in the 1st place?

I have no issues when I type manually [CMD="Boot:"]0:ad(1,b)/boot/loader[/CMD] . As the loader will start and I can proceed from there. The question is, how to save that value? If / was on partition a then using /boot.config will do. But how to do this If / is not on partition a ?
 
Nezmer said:
How is loader.conf going to be read If I can't go to the loader in the 1st place?

I have no issues when I type manually [CMD="Boot:"]0:ad(1,b)/boot/loader[/CMD] . As the loader will start and I can proceed from there. The question is, how to save that value? If / was on partition a then using /boot.config will do. But how to do this If / is not on partition a ?

According to boot.config(5) you can't

When the FreeBSD boot loader runs, it searches the ``a'' slice of the
boot partition for a boot.config file (as a result, slices which are
missing an ``a'' partition require user intervention during the boot
process).
 
jalla said:
According to boot.config(5) you can't

That's what I thought.

I wanted to use swap on ad<n>s1a (to shorten seek times). But I just found out that bsdlabel doesn't care about the order of the letters when It comes to offset(cool).

Thank you for all the feedback.
 
Are you absolutely sure that writing
Code:
0:ad(1,b)/boot/loader
into /boot.config (on the »a« partition!) will not work? I have a similar setup working (although with GPT partitions), and I’m not only booting off a different slice, but off a different disk.
 
hermes said:
Are you absolutely sure that writing
Code:
0:ad(1,b)/boot/loader
into /boot.config (on the »a« partition!) will not work? I have a similar setup working (although with GPT partitions), and I’m not only booting off a different slice, but off a different disk.

You keep files in swap ? :D
 
Back
Top