All of lore.kernel.org
 help / color / mirror / Atom feed
* Be File System identified as bfs
@ 2015-07-28 17:10 Jeroen Oortwijn
  2015-07-28 18:30 ` Andrei Borzenkov
  0 siblings, 1 reply; 6+ messages in thread
From: Jeroen Oortwijn @ 2015-07-28 17:10 UTC (permalink / raw)
  To: grub-devel

[-- Attachment #1: Type: text/plain, Size: 811 bytes --]

Hello,

Currently Grub identifies the Be File System as 'bfs'.
In Linux however, 'bfs' refers to the Boot File System [1] and 'befs'
refers to the Be File System.

As a result, the os-prober utility (which uses grub-probe) doesn't
correctly recognize the Be File System. And because the grub-mkconfig utility
uses os-prober to detect other operating systems, it will never add a Haiku
installation to the Grub menu.

I see two ways of fixing this:
1) Modify Grub's Be File System module [2] to identify it as 'befs'.
2) Modify os-prober to assume 'befs' on Linux systems when grub-probe
returns 'bfs'.

I would prefer option 1, but what are your thoughts?


Kind regards,

Jeroen Oortwijn

[1] https://en.wikipedia.org/wiki/Boot_File_System
[2] http://git.savannah.gnu.org/cgit/grub.git/tree/grub-core/fs/bfs.c

[-- Attachment #2: Type: text/html, Size: 1299 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Be File System identified as bfs
  2015-07-28 17:10 Be File System identified as bfs Jeroen Oortwijn
@ 2015-07-28 18:30 ` Andrei Borzenkov
  2015-07-28 19:05   ` Jeroen Oortwijn
  0 siblings, 1 reply; 6+ messages in thread
From: Andrei Borzenkov @ 2015-07-28 18:30 UTC (permalink / raw)
  To: Jeroen Oortwijn; +Cc: grub-devel

В Tue, 28 Jul 2015 19:10:39 +0200
Jeroen Oortwijn <oortwijn@gmail.com> пишет:

> Hello,
> 
> Currently Grub identifies the Be File System as 'bfs'.
> In Linux however, 'bfs' refers to the Boot File System [1] and 'befs'
> refers to the Be File System.
> 
> As a result, the os-prober utility (which uses grub-probe)

where do you see it?

fs_type () {
        if (export PATH="/lib/udev:$PATH"; type vol_id) >/dev/null 2>&1; then
                PATH="/lib/udev:$PATH" vol_id --type "$1" 2>/dev/null
        elif type blkid >/dev/null 2>&1; then
                blkid -o value -s TYPE "$1" 2>/dev/null
        else
                return 0
        fi
}x		

>                                                             doesn't
> correctly recognize the Be File System. And because the grub-mkconfig utility
> uses os-prober to detect other operating systems, it will never add a Haiku
> installation to the Grub menu.
> 
> I see two ways of fixing this:
> 1) Modify Grub's Be File System module [2] to identify it as 'befs'.
> 2) Modify os-prober to assume 'befs' on Linux systems when grub-probe
> returns 'bfs'.
> 
> I would prefer option 1, but what are your thoughts?
> 
> 
> Kind regards,
> 
> Jeroen Oortwijn
> 
> [1] https://en.wikipedia.org/wiki/Boot_File_System
> [2] http://git.savannah.gnu.org/cgit/grub.git/tree/grub-core/fs/bfs.c



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Be File System identified as bfs
  2015-07-28 18:30 ` Andrei Borzenkov
@ 2015-07-28 19:05   ` Jeroen Oortwijn
  2015-10-29 15:12     ` Vladimir 'φ-coder/phcoder' Serbinenko
  0 siblings, 1 reply; 6+ messages in thread
From: Jeroen Oortwijn @ 2015-07-28 19:05 UTC (permalink / raw)
  To: Andrei Borzenkov; +Cc: grub-devel

On 28 July 2015 at 20:30, Andrei Borzenkov <arvidjaar@gmail.com> wrote:
>
> В Tue, 28 Jul 2015 19:10:39 +0200
> Jeroen Oortwijn <oortwijn@gmail.com> пишет:
>
> > Hello,
> >
> > Currently Grub identifies the Be File System as 'bfs'.
> > In Linux however, 'bfs' refers to the Boot File System [1] and 'befs'
> > refers to the Be File System.
> >
> > As a result, the os-prober utility (which uses grub-probe)
>
> where do you see it?
>
> fs_type () {
>         if (export PATH="/lib/udev:$PATH"; type vol_id) >/dev/null 2>&1; then
>                 PATH="/lib/udev:$PATH" vol_id --type "$1" 2>/dev/null
>         elif type blkid >/dev/null 2>&1; then
>                 blkid -o value -s TYPE "$1" 2>/dev/null
>         else
>                 return 0
>         fi
> }x

Utility os-prober uses grub-probe (and grub-mount) in 50mounted-tests
on line 48 [3]:
mounted=
if type grub-mount >/dev/null 2>&1 && \
   type grub-probe >/dev/null 2>&1 && \
   grub-mount "$partition" "$tmpmnt" 2>/dev/null; then
        mounted=1
        type="$(grub-probe -d "$partition" -t fs)" || true
        if [ "$type" ]; then
                debug "mounted using GRUB $type filesystem driver"
        else
                debug "mounted using GRUB, but unknown filesystem?"
                type=fuseblk
        fi
else

When running os-prober it outputs the following in the syslog:
Jul 28 20:54:53 Gromit os-prober: debug: running
/usr/lib/os-probes/50mounted-tests on /dev/sda6
Jul 28 20:54:54 Gromit 50mounted-tests: debug: mounted using GRUB bfs
filesystem driver
Jul 28 20:54:54 Gromit 50mounted-tests: debug: running subtest
/usr/lib/os-probes/mounted/05efi
Jul 28 20:54:54 Gromit 05efi: debug: Not on UEFI platform
Jul 28 20:54:54 Gromit 50mounted-tests: debug: running subtest
/usr/lib/os-probes/mounted/10freedos
Jul 28 20:54:54 Gromit 10freedos: debug: /dev/sda6 is not a FAT
partition: exiting
Jul 28 20:54:54 Gromit 50mounted-tests: debug: running subtest
/usr/lib/os-probes/mounted/10qnx
Jul 28 20:54:54 Gromit 10qnx: debug: /dev/sda6 is not a QNX4 partition: exiting
Jul 28 20:54:54 Gromit 50mounted-tests: debug: running subtest
/usr/lib/os-probes/mounted/20macosx
Jul 28 20:54:54 Gromit macosx-prober: debug: /dev/sda6 is not an HFS+
partition: exiting
Jul 28 20:54:54 Gromit 50mounted-tests: debug: running subtest
/usr/lib/os-probes/mounted/20microsoft
Jul 28 20:54:54 Gromit 20microsoft: debug: /dev/sda6 is not a MS
partition: exiting
Jul 28 20:54:54 Gromit 50mounted-tests: debug: running subtest
/usr/lib/os-probes/mounted/30utility
Jul 28 20:54:54 Gromit 30utility: debug: /dev/sda6 is not a FAT
partition: exiting
Jul 28 20:54:54 Gromit 50mounted-tests: debug: running subtest
/usr/lib/os-probes/mounted/40lsb
Jul 28 20:54:54 Gromit 50mounted-tests: debug: running subtest
/usr/lib/os-probes/mounted/70hurd
Jul 28 20:54:54 Gromit 50mounted-tests: debug: running subtest
/usr/lib/os-probes/mounted/80minix
Jul 28 20:54:54 Gromit 50mounted-tests: debug: running subtest
/usr/lib/os-probes/mounted/83haiku
Jul 28 20:54:54 Gromit 83haiku: debug: /dev/sda6 is not a BeFS
partition: exiting
Jul 28 20:54:54 Gromit 50mounted-tests: debug: running subtest
/usr/lib/os-probes/mounted/90linux-distro
Jul 28 20:54:54 Gromit 50mounted-tests: debug: running subtest
/usr/lib/os-probes/mounted/90solaris
Jul 28 20:54:54 Gromit 50mounted-tests: debug: running subtest
/usr/lib/os-probes/mounted/efi

As you can see, it thinks /dev/sda6 a 'bfs' partition, causing script
83haiku to fail.


Kind regards,

Jeroen Oortwijn

[3] http://anonscm.debian.org/cgit/d-i/os-prober.git/tree/os-probes/common/50mounted-tests#n48


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Be File System identified as bfs
  2015-07-28 19:05   ` Jeroen Oortwijn
@ 2015-10-29 15:12     ` Vladimir 'φ-coder/phcoder' Serbinenko
  2015-10-29 19:51       ` Andrei Borzenkov
  0 siblings, 1 reply; 6+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2015-10-29 15:12 UTC (permalink / raw)
  To: The development of GNU GRUB, Andrei Borzenkov

[-- Attachment #1: Type: text/plain, Size: 276 bytes --]


> As you can see, it thinks /dev/sda6 a 'bfs' partition, causing script
> 83haiku to fail.
> 
12	befs|befs_be) debug "$partition is a BeFS partition" ;;
Looks like this is a simple one-line change. befs|befs_be is a name used
by old driver which had to be removed



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 213 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Be File System identified as bfs
  2015-10-29 15:12     ` Vladimir 'φ-coder/phcoder' Serbinenko
@ 2015-10-29 19:51       ` Andrei Borzenkov
  2015-10-29 20:24         ` Vladimir 'phcoder' Serbinenko
  0 siblings, 1 reply; 6+ messages in thread
From: Andrei Borzenkov @ 2015-10-29 19:51 UTC (permalink / raw)
  To: The development of GNU GRUB

29.10.2015 18:12, Vladimir 'φ-coder/phcoder' Serbinenko пишет:
>
>> As you can see, it thinks /dev/sda6 a 'bfs' partition, causing script
>> 83haiku to fail.
>>
> 12	befs|befs_be) debug "$partition is a BeFS partition" ;;
> Looks like this is a simple one-line change. befs|befs_be is a name used
> by old driver which had to be removed
>
>
It still needs to handle case when grub-probe or grub-mount are not 
available and blkid returns befs. It is probably easier to map grub bfs 
to befs in 50mounted-tests, this avoids confusion with Linux bfs.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Be File System identified as bfs
  2015-10-29 19:51       ` Andrei Borzenkov
@ 2015-10-29 20:24         ` Vladimir 'phcoder' Serbinenko
  0 siblings, 0 replies; 6+ messages in thread
From: Vladimir 'phcoder' Serbinenko @ 2015-10-29 20:24 UTC (permalink / raw)
  To: The development of GRUB 2

[-- Attachment #1: Type: text/plain, Size: 1042 bytes --]

On 29 Oct 2015 8:51 pm, "Andrei Borzenkov" <arvidjaar@gmail.com> wrote:
>
> 29.10.2015 18:12, Vladimir 'φ-coder/phcoder' Serbinenko пишет:
>
>>
>>> As you can see, it thinks /dev/sda6 a 'bfs' partition, causing script
>>> 83haiku to fail.
>>>
>> 12      befs|befs_be) debug "$partition is a BeFS partition" ;;
>> Looks like this is a simple one-line change. befs|befs_be is a name used
>> by old driver which had to be removed
>>
>>
> It still needs to handle case when grub-probe or grub-mount are not
available and blkid returns befs. It is probably easier to map grub bfs to
befs in 50mounted-tests, this avoids confusion with Linux bfs.
>
>
Would work as well. In any case it seems that we agree that it's better to
fix it on os-prober side. Then it's up to their maintainers to decide which
way to go. I don't know their code will enough to have an opinion
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel

[-- Attachment #2: Type: text/html, Size: 1442 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-10-29 20:24 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-28 17:10 Be File System identified as bfs Jeroen Oortwijn
2015-07-28 18:30 ` Andrei Borzenkov
2015-07-28 19:05   ` Jeroen Oortwijn
2015-10-29 15:12     ` Vladimir 'φ-coder/phcoder' Serbinenko
2015-10-29 19:51       ` Andrei Borzenkov
2015-10-29 20:24         ` Vladimir 'phcoder' Serbinenko

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.