Octeon boot: boot.conf, msdos partition and root file system

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Octeon boot: boot.conf, msdos partition and root file system

Christian Gut
Hi,

I just had a look at the new boot loader for octeon and got some questions.

As far as I can see, the current situation is like this:
- boot.conf is always read from partion a of the booted disk (which is the root device we got from uboot via /dev/octboot)
- the system root file system also is always the first partition that is found to be a “working” openbsd installation (checks for existence of various directories)

Correct?

If I understand the behaviour of other architectures (namely amd64( correctly, wouldn't it be desired to
a) read boot.conf from the device and partition where the bootloader was found?
-  this would mean, from the msdos partition on octeon devices
b) set the root file system from the “device" variable which is set in the boot loader
-  this would mean, if I “set device sd0d”, it boots the image from sd0d and sets the root file system also to that one.

This is meant as question. Are those correct assumptions?
If so, is this still work in progress or do you want to behave differently on octeon?

Kind Regards,
Christian
Reply | Threaded
Open this post in threaded view
|

Re: Octeon boot: boot.conf, msdos partition and root file system

Theo de Raadt-2
Christian Gut <[hidden email]> wrote:

> Hi,
>
> I just had a look at the new boot loader for octeon and got some questions.
>
> As far as I can see, the current situation is like this:
> - boot.conf is always read from partion a of the booted disk (which is the root device we got from uboot via /dev/octboot)

I t should be read from /etc in the root filesystem.

Are you saying it is read from somewhere else?

> - the system root file system also is always the first partition that is found to be a “working” openbsd installation (checks for existence of various directories)

There is a strong default to consider it the 'a' partition on 'some device',
decided MD, and hopefully not too much trouble.

> If I understand the behaviour of other architectures (namely amd64( correctly, wouldn't it be desired to
> a) read boot.conf from the device and partition where the bootloader was found?
> -  this would mean, from the msdos partition on octeon devices

It is supposed to be read from /etc, which is in the root filesystem.

Why are you proposing it be read from some strange location???

You really aren't explaining your usage case.

> b) set the root file system from the “device" variable which is set in the boot loader
> -  this would mean, if I “set device sd0d”, it boots the image from sd0d and sets the root file system also to that one.

There's probably some magic to choose it. You are proposing that people have to set
more uboot variables??  That isn't fun maybe we give up on the platform..

> If so, is this still work in progress or do you want to behave differently on octeon?

You start by describing it working just like amd64.  Then you embark on wanting
it to work different from amd64.  And now you ask why it is different?
Confused.

Reply | Threaded
Open this post in threaded view
|

Re: Octeon boot: boot.conf, msdos partition and root file system

Christian Gut
Theo, thank you for your quick reply and clarification.

> Theo de Raadt <[hidden email]> wrote:
> Christian Gut <[hidden email]> wrote:
>
>> I just had a look at the new boot loader for octeon and got some questions.
>>
>> As far as I can see, the current situation is like this:
>> - boot.conf is always read from partion a of the booted disk (which is the root device we got from uboot via /dev/octboot)
>
> I t should be read from /etc in the root filesystem.
>
> Are you saying it is read from somewhere else?

I did not question that, I just wanted to know if my understanding of how the boot loader finds the root filesystem is correct.

>> a) read boot.conf from the device and partition where the bootloader was found?
>> -  this would mean, from the msdos partition on octeon devices
>
> It is supposed to be read from /etc, which is in the root filesystem.
>
> Why are you proposing it be read from some strange location???

As far as I understand, you can use installboot -r to install the boot loader onto a different partition. Let’s call it /boot. And then you can have /etc/boot.conf over there, too.

> You really aren't explaining your usage case.

Use case: have two separate installations on the same system. Switch between them using boot.conf. This could be for testing and development purposes or to gain resilience if one of the filesystems is messed up.

>> b) set the root file system from the “device" variable which is set in the boot loader
>> -  this would mean, if I “set device sd0d”, it boots the image from sd0d and sets the root file system also to that one.
>
> There's probably some magic to choose it. You are proposing that people have to set
> more uboot variables??  That isn't fun maybe we give up on the platform..

Of course no more uboot variables. My idea was, that the boot loader is accompanied by a boot.conf on the same filesystem. Isn't that the reason, why i can „set device“ in boot.conf?

>> If so, is this still work in progress or do you want to behave differently on octeon?
>
> You start by describing it working just like amd64.  Then you embark on wanting
> it to work different from amd64.  And now you ask why it is different?
> Confused.

Default situation in amd64 is like you described, but installboot -r can change that.

I hope I could clarify my idea, thank you for your patience.

Kind Regards,
Christian
Reply | Threaded
Open this post in threaded view
|

Re: Octeon boot: boot.conf, msdos partition and root file system

Theo de Raadt-2
Christian Gut <[hidden email]> wrote:

> I did not question that, I just wanted to know if my understanding of
> how the boot loader finds the root filesystem is correct.

It finds it.  You are advised to use the default.  If you change things,
you are on your own.

> As far as I understand, you can use installboot -r to install the boot
> loader onto a different partition. Let’s call it /boot. And then you
> can have /etc/boot.conf over there, too.

As I said, you are on your own.

> Use case: have two separate installations on the same system. Switch
> between them using boot.conf. This could be for testing and
> development purposes or to gain resilience if one of the filesystems
> is messed up.

You've stepped outside the default configuration:  You are on your own.

There is no way boot.conf is going to be read from the MSDOS partition,
that would break OTHER configurations people expect to work.

And to be clear one more time -- what you proposed is different than
all the other architectures, so it is not going to be changed.