grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: booting btrfs


From: Vladimir 'φ-coder/phcoder' Serbinenko
Subject: Re: booting btrfs
Date: Mon, 14 Oct 2013 23:01:45 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20131005 Icedove/17.0.9

On 14.10.2013 22:45, Chris Murphy wrote:
> 
> On Oct 14, 2013, at 1:29 PM, Vladimir 'φ-coder/phcoder' Serbinenko 
> <address@hidden> wrote:
> 
>>> So it seems that GRUB is using relative pathnames to the default subvolume.
>> This is not intentional. When this part of code was written there was no
>> set-default available at all so this couldn't be tested and I simply
>> followed the specification. It told to take root_tree and
>> root_dir_objectid from superblock then go to "default" directory. What
>> of this needs to be changed? Just remove "default" and make it part of
>> path? We would need to change grub-mkrelpath to match runtime behaviour.
>> Is there a way to detect that mountinfo gives garbage and somehow get
>> where the real root points?
> 
> Here's the response. It seems similar but not identical to what you described 
> above.
> 
> http://www.mail-archive.com/address@hidden/msg27955.html
> 
Possibly this is the answer:
=== modified file 'grub-core/fs/btrfs.c'
--- grub-core/fs/btrfs.c        2013-01-21 01:33:46 +0000
+++ grub-core/fs/btrfs.c        2013-10-14 21:00:53 +0000
@@ -1217,7 +1217,7 @@

   *type = GRUB_BTRFS_DIR_ITEM_TYPE_DIRECTORY;
   *tree = data->sblock.root_tree;
-  key->object_id = data->sblock.root_dir_objectid;
+  key->object_id = grub_cpu_to_le64_compile_time (5);
   key->type = GRUB_BTRFS_ITEM_TYPE_DIR_ITEM;
   key->offset = 0;
   skip_default = 1;



Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]