# First experiment with installing on BTRFS

**URL:** <https://forum.endeavouros.com/t/first-experiment-with-installing-on-btrfs/8145>\
**Category:** EndeavourOS installation\
**Created:** [September 17, 2020, 4:44pm UTC](https://forum.endeavouros.com/t/first-experiment-with-installing-on-btrfs/8145 "2020-09-17T16:44:09Z")\
**Posts on this page:** 20\
**Page:** 3

<div class="post-metadata">

**Author:** ![anon72019930](https://forum.endeavouros.com/letter_avatar_proxy/v4/letter/a/f07891/32.png) [@anon72019930](https://forum.endeavouros.com/u/anon72019930)\
**Post date:** [September 17, 2020, 6:53pm UTC](https://forum.endeavouros.com/t/first-experiment-with-installing-on-btrfs/8145/41 "2020-09-17T18:53:12Z")

</div>

> [@anon31687413](#):
>
> There are tools that help you with that, e.g. `btrbk` (AUR).

Haha, of course there is something in the AUR for that. I could have bet on it 😂  
That’s so great about the arch eco system, love that

---

<div class="post-metadata">

**Author:** ![anon31687413](https://forum.endeavouros.com/letter_avatar_proxy/v4/letter/a/bc8723/32.png) [@anon31687413](https://forum.endeavouros.com/u/anon31687413)\
**Post date:** [September 17, 2020, 6:54pm UTC](https://forum.endeavouros.com/t/first-experiment-with-installing-on-btrfs/8145/42 "2020-09-17T18:54:06Z")

</div>

Just take care that you don’t use anything too outdated.  
For good measure: [https://aur.archlinux.org/packages/?O=0&K=btrfs](https://aur.archlinux.org/packages/?O=0&K=btrfs)

---

<div class="post-metadata">

**Author:** ![RodneyCK](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/rodneyck/32/9324_2.png) [@RodneyCK](https://forum.endeavouros.com/u/RodneyCK)\
**Post date:** [September 17, 2020, 7:24pm UTC](https://forum.endeavouros.com/t/first-experiment-with-installing-on-btrfs/8145/43 "2020-09-17T19:24:13Z")

</div>

> [@anon72019930](#):
>
> Haha, of course there is something in the AUR for that.

It is like a huge toy box. You don’t know what you are going to find in the bottom. 😂

---

<div class="post-metadata">

**Author:** ![pebcak](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/pebcak/32/100472_2.png) [@pebcak](https://forum.endeavouros.com/u/pebcak)\
**Post date:** [September 17, 2020, 7:38pm UTC](https://forum.endeavouros.com/t/first-experiment-with-installing-on-btrfs/8145/44 "2020-09-17T19:38:00Z")

</div>

Wow, I was away just 45 min. or so!

At the moment I feel, I need to go back at the top of the thread and start reading everything from the beginning.

Thank you so much everybody for your input/advice/suggestions and insights. I will need to digest a bit all this info and read up a bit more as well. I will be back a bit later on and let you know how things are going.

Now I am facing an issue with suspension (for not mentioning bluetooth) but that is subject for another thread.

Thanks again and see you later!

---

<div class="post-metadata">

**Author:** ![manuel](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/manuel/32/396_2.png) [@manuel](https://forum.endeavouros.com/u/manuel)\
**Post date:** [September 17, 2020, 7:54pm UTC](https://forum.endeavouros.com/t/first-experiment-with-installing-on-btrfs/8145/45 "2020-09-17T19:54:19Z")

</div>

> [@robgriff444](#):
>
> Not with grub, it doesn’t see btrfs on other drives. One solution was to symlink / and /etc so grub would find them but that didn’t work for me so I ended up with ext4 as my 2nd drive. I don’t know if @manuel would kindly look at this? I’ve seen Ubuntu and Redhat bug reports on this for years and no-one seems to want to finish it.

That looks like an `os-prober` problem, or the co-operation between `os-prober` and `grub` is failing.  
Someone should debug the code (with `bashdb` debugger as they are bash code), but that’s not very easy if that person is not at all familiar with the code of os-prober and grub. Let alone the usage of btrfs.

But maybe _this workaround_ could do the trick. It tries to use the grub.cfg of the _other_ OS.  
Simply write a menuentry into **/boot/grub/custom.cfg** of EndeavourOS as root:

```
menuentry 'Grub menu of the other OS' {
  search --set --fs-uuid "UUID-of-the-boot-partition-of-the-other-OS"
  configfile /boot/grub/grub.cfg
}
```

The important part is to have the proper UUID of the other OS. Use command `lsblk -fm` unless you already know it.  
Note that instead of UUID it is possible to use LABEL (`search --set --label "<label>"`) or an existing unique file (`search --set --file "<unique-file-name>"`) as a search target.

---

<div class="post-metadata">

**Author:** ![robgriff444](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/robgriff444/32/5459_2.png) [@robgriff444](https://forum.endeavouros.com/u/robgriff444)\
**Post date:** [September 17, 2020, 8:09pm UTC](https://forum.endeavouros.com/t/first-experiment-with-installing-on-btrfs/8145/46 "2020-09-17T20:09:24Z")

</div>

Excellent as always sir!  
I can try tomorrow as I have a Fedora33 beta btrfs on a 2nd drive.  
And btw, the bug reports were discussing os-prober failing to find btrfs instances because it was looking for / and /etc on other drives.

---

<div class="post-metadata">

**Author:** ![manuel](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/manuel/32/396_2.png) [@manuel](https://forum.endeavouros.com/u/manuel)\
**Post date:** [September 17, 2020, 8:15pm UTC](https://forum.endeavouros.com/t/first-experiment-with-installing-on-btrfs/8145/47 "2020-09-17T20:15:11Z")

</div>

Please note that I didn’t actually _test_ the workaround with btrfs simply because I’m not using btrfs, at least for now.  
So it is just a usual way to use the existing grub menu of another OS.

---

<div class="post-metadata">

**Author:** ![anon72019930](https://forum.endeavouros.com/letter_avatar_proxy/v4/letter/a/f07891/32.png) [@anon72019930](https://forum.endeavouros.com/u/anon72019930)\
**Post date:** [September 17, 2020, 8:21pm UTC](https://forum.endeavouros.com/t/first-experiment-with-installing-on-btrfs/8145/48 "2020-09-17T20:21:24Z")

</div>

> [@RodneyCK](#):
>
> It is like a huge toy box. You don’t know what you are going to find in the bottom.

funny and true. And i want to play with all of it at the same time 😆

> [@pebcak](#):
>
> Wow, I was away just 45 min. or so!

Haha, i realized as well, there was quite a conversation going on here in your absence…  
Take your time and ask again, if new questions arise.

---

<div class="post-metadata">

**Author:** ![manuel](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/manuel/32/396_2.png) [@manuel](https://forum.endeavouros.com/u/manuel)\
**Post date:** [September 17, 2020, 8:27pm UTC](https://forum.endeavouros.com/t/first-experiment-with-installing-on-btrfs/8145/49 "2020-09-17T20:27:07Z")

</div>

Looks like Manjaro may have a fix for the os-prober btrfs problem: [https://bugs.archlinux.org/task/64281](https://bugs.archlinux.org/task/64281)

---

<div class="post-metadata">

**Author:** ![robgriff444](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/robgriff444/32/5459_2.png) [@robgriff444](https://forum.endeavouros.com/u/robgriff444)\
**Post date:** [September 17, 2020, 8:47pm UTC](https://forum.endeavouros.com/t/first-experiment-with-installing-on-btrfs/8145/50 "2020-09-17T20:47:10Z")

</div>

@manuel Yeah, I actually read that page a week ago but I completely forgot about it today somehow. Doh!  
Anyway, can you use their patch in Endeavour? Would you want to?

---

<div class="post-metadata">

**Author:** ![manuel](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/manuel/32/396_2.png) [@manuel](https://forum.endeavouros.com/u/manuel)\
**Post date:** [September 17, 2020, 9:00pm UTC](https://forum.endeavouros.com/t/first-experiment-with-installing-on-btrfs/8145/51 "2020-09-17T21:00:31Z")

</div>

It would be interesting to test it, but currently I have no test system for that.

I just looked at that package and it is quite easy to build. A test should be made on a proper environment with btrfs filesystems.

Here’s how to build and install it:

```
cd /tmp
  git clone https://gitlab.manjaro.org/packages/community/os-prober.git
  makepkg -cf
  sudo pacman -U os-prober-1.*.pkg.tar.* # this line installs it
```

As you have a system ready for testing, would you like to test it? 😉  
If it doesn’t work, simply reinstall the official with:

```
sudo pacman -S os-prober
```

---

<div class="post-metadata">

**Author:** ![robgriff444](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/robgriff444/32/5459_2.png) [@robgriff444](https://forum.endeavouros.com/u/robgriff444)\
**Post date:** [September 17, 2020, 9:08pm UTC](https://forum.endeavouros.com/t/first-experiment-with-installing-on-btrfs/8145/52 "2020-09-17T21:08:51Z")

</div>

Ok sure, I’ll try tomorrow.

---

<div class="post-metadata">

**Author:** ![ricklinux](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/ricklinux/32/110798_2.png) [@ricklinux](https://forum.endeavouros.com/u/ricklinux)\
**Post date:** [September 17, 2020, 9:17pm UTC](https://forum.endeavouros.com/t/first-experiment-with-installing-on-btrfs/8145/53 "2020-09-17T21:17:44Z")

</div>

The set up I have installed via the wiki works fine with grub if I do a normal install and dual boot. If I use two setups or more of the wiki by @2000 they stay separate and each doesn’t bother picking up the other installation. But I have it set up with rEFInd and then it boots from the grubx64.efi I like the setup using rEFInd with btrfs all on separate drives. I have xfce on an nvme drive, cinnamon on another nvme drive and plasma on an SSD drive. I still have a 4TB hard drive sitting empty. It is a hybrid with 256m cache.

---

<div class="post-metadata">

**Author:** ![pebcak](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/pebcak/32/100472_2.png) [@pebcak](https://forum.endeavouros.com/u/pebcak)\
**Post date:** [September 17, 2020, 9:45pm UTC](https://forum.endeavouros.com/t/first-experiment-with-installing-on-btrfs/8145/54 "2020-09-17T21:45:52Z")

</div>

> [@manuel](#):
>
> But maybe _this workaround_ could do the trick. It tries to use the grub.cfg of the _other_ OS.  
> Simply write a menuentry into **/boot/grub/custom.cfg**

In the meantime:

I installed a second EOS (Cinnamon) next to the first one (Plasma). I gave it it’s own ESP to keep things separated and for being able to bring up the bios boot menu and boot one or the other from there.

But oddly enough, somehow the efi boot entry for the first OS got removed.

Tried to manually create a boot entry with efibootmgr giving it the path to grubx64.efi in the ESP of the first partition. I don’t know why, but it failed to create the entry.

Then I used a **custom.cfg** as per @manuel’s suggestion with the following content from the grub.cfg of the first OS:

```auto
menuentry 'EndeavourOS, on linux-zen' --class endeavouros --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-zen-advanced-90793bd8-8680-45f2-88d6-05b1b9968539' {
	load_video
	set gfxpayload=keep
	insmod gzio
	insmod part_gpt
	insmod btrfs
	if [x$feature_platform_search_hint = xy]; then
	  search --no-floppy --fs-uuid --set=root 90793bd8-8680-45f2-88d6-05b1b9968539
	else
	  search --no-floppy --fs-uuid --set=root 90793bd8-8680-45f2-88d6-05b1b9968539
	fi
	echo	'Loading kernel linux-zen ...'
	linux	/@/boot/vmlinuz-linux-zen root=UUID=90793bd8-8680-45f2-88d6-05b1b9968539 rw rootflags=subvol=@ quiet loglevel=3 nowatchdog
	echo	'Loading initial ramdisk ...'
	initrd	/@/boot/amd-ucode.img /@/boot/initramfs-linux-zen.img
}

```

And sure enough, upon reboot, I had an entry for booting the first OS from the Grub menu of the second and it worked.

```auto
sudo parted -l

Model: SKHynix_HFS001TD9TNG-L3A0B (nvme)
Disk /dev/nvme0n1: 1024GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number Start End Size File system Name Flags
 1 1049kB 106MB 105MB fat32 boot, esp
 2 106MB 53.8GB 53.7GB btrfs
 3 53.8GB 53.9GB 105MB fat32 boot, esp
 4 53.9GB 108GB 53.7GB btrfs

```

---

<div class="post-metadata">

**Author:** ![freebird54](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/freebird54/32/83106_2.png) [@freebird54](https://forum.endeavouros.com/u/freebird54)\
**Post date:** [September 17, 2020, 10:08pm UTC](https://forum.endeavouros.com/t/first-experiment-with-installing-on-btrfs/8145/55 "2020-09-17T22:08:19Z")

</div>

If you’re in an experimental state of mind - rEFInd might be worth a try. As you’re planning to use the grub entries anyway, just an install (with no configuring at all) should get you going with an alternative… and it has the advantage that changes and updates in the systems should not affect the boot setup.

Fairly easy to remove too 😁

---

<div class="post-metadata">

**Author:** ![pebcak](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/pebcak/32/100472_2.png) [@pebcak](https://forum.endeavouros.com/u/pebcak)\
**Post date:** [September 17, 2020, 10:58pm UTC](https://forum.endeavouros.com/t/first-experiment-with-installing-on-btrfs/8145/56 "2020-09-17T22:58:42Z")

</div>

At this stage I am open to all alternatives. Just a bit overwhelmed right now with the abundance of possibilities and wealth of info. But sure, I’ll be looking att rEFInd as well. It sounds like a viable option. Thanks for pointing it out!

---

<div class="post-metadata">

**Author:** ![pebcak](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/pebcak/32/100472_2.png) [@pebcak](https://forum.endeavouros.com/u/pebcak)\
**Post date:** [September 17, 2020, 11:45pm UTC](https://forum.endeavouros.com/t/first-experiment-with-installing-on-btrfs/8145/57 "2020-09-17T23:45:17Z")

</div>

Here is how the disk looks like so far:

```auto
 Model: SKHynix_HFS001TD9TNG-L3A0B (nvme)
Disk /dev/nvme0n1: 1024GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number Start End Size File system Name Flags
 1 1049kB 106MB 105MB fat32 boot, esp
 2 106MB 53.8GB 53.7GB btrfs
 3 53.8GB 53.9GB 105MB fat32 boot, esp
 4 53.9GB 108GB 53.7GB btrfs

```

```auto
 sudo blkid

/dev/nvme0n1p1: LABEL_FATBOOT="ESP" LABEL="ESP" UUID="D79B-9C85" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="689038fd-31b5-454c-a4e2-0e2481a22c15"
/dev/nvme0n1p2: UUID="90793bd8-8680-45f2-88d6-05b1b9968539" UUID_SUB="aa3348e0-34b2-4fdb-b228-ec367f72eecf" BLOCK_SIZE="4096" TYPE="btrfs" PARTUUID="96d845dc-0970-4cc1-a199-081ac4e4bcb1"
/dev/nvme0n1p3: UUID="7259-3050" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="44bb85af-b67c-4681-ac41-3e9b64c44a16"
/dev/nvme0n1p4: UUID="1a1b20eb-6fb5-46fc-9666-3b0e6f4c4300" UUID_SUB="15e84ebd-2381-4a19-9064-eac3fe7e282b" BLOCK_SIZE="4096" TYPE="btrfs" PARTUUID="35690940-29f4-43ba-ab65-dff50f389e97"

```

And here is

```auto
efibootmgr -v
BootCurrent: 0005
Timeout: 0 seconds
BootOrder: 0005,0000,0002,0003,2001,2002,2003
Boot0000* EndeavourOS HD(3,GPT,44bb85af-b67c-4681-ac41-3e9b64c44a16,0x6432800,0x32000)/File(\EFI\EndeavourOS\grubx64.efi)
Boot0001* EFI USB Device (Sony Storage Media) UsbWwid(54c,5ba,0,CB07105833BB15C22)/HD(2,MBR,0xa4e000b7,0x73b5c00,0x10000)RC
Boot0002* EFI Hard Drive (SKHynix_HFS001TD9TNG-L3A0B) PciRoot(0x0)/Pci(0x2,0x3)/Pci(0x0,0x0)/NVMe(0x1,00-00-00-00-00-00-00-00)/HD(1,GPT,689038fd-31b5-454c-a4e2-0e2481a22c15,0x800,0x32000)RC
Boot0003* EFI Hard Drive 1 (SKHynix_HFS001TD9TNG-L3A0B) PciRoot(0x0)/Pci(0x2,0x3)/Pci(0x0,0x0)/NVMe(0x1,00-00-00-00-00-00-00-00)/HD(3,GPT,44bb85af-b67c-4681-ac41-3e9b64c44a16,0x6432800,0x32000)RC
Boot0005* EnOS-Plasma HD(1,GPT,689038fd-31b5-454c-a4e2-0e2481a22c15,0x800,0x32000)/File(\EFI\endeavouros\grubx64.efi)
Boot2001* EFI USB Device RC
Boot2002* EFI DVD/CDROM RC

```

I can now choose between the two OS from the bios boot menu (EndeavourOS and EnOS-Plasma).

> [@manuel](#):
>
> Looks like Manjaro may have a fix for the os-prober btrfs problem: [https://bugs.archlinux.org/task/64281](https://bugs.archlinux.org/task/64281)

So if the Manjaro’s fix for os-probr with btrfs will work out the I guess I can stick with Grub. Otherwise I should be looking at rEFInd I guess.

---

<div class="post-metadata">

**Author:** ![pebcak](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/pebcak/32/100472_2.png) [@pebcak](https://forum.endeavouros.com/u/pebcak)\
**Post date:** [September 18, 2020, 12:33am UTC](https://forum.endeavouros.com/t/first-experiment-with-installing-on-btrfs/8145/58 "2020-09-18T00:33:56Z")

</div>

> [@manuel](#):
>
> It would be interesting to test it, but currently I have no test system for that.
> 
> I just looked at that package and it is quite easy to build. A test should be made on a proper environment with btrfs filesystems.
> 
> Here’s how to build and install it:
> 
> cd /tmp git clone [https://gitlab.manjaro.org/packages/community/os-prober.git](https://gitlab.manjaro.org/packages/community/os-prober.git) makepkg -cf sudo pacman -U os-prober-1._.pkg.tar._ # this line installs it
> 
> As you have a system ready for testing, would you like to test it? 😉  
> If it doesn’t work, simply reinstall the official with:
> 
> sudo pacman -S os-prober

@Manuel,  
Thank you for this! It works perfectly!  
Here it is, running from the first os on /dev/nvme0n1p2:

```auto
sudo os-prober
/dev/nvme0n1p4:EndeavourOS:EndeavourOS:linux:btrfs:UUID=1a1b20eb-6fb5-46fc-9666-3b0e6f4c4300:subvol=@

```

```auto
 sudo grub-mkconfig -o /boot/grub/grub.cfg 

Generating grub configuration file ...
Found theme: /boot/grub/themes/EndeavourOS/theme.txt
Found linux image: /boot/vmlinuz-linux-zen
Found initrd image: /boot/amd-ucode.img /boot/initramfs-linux-zen.img
Found fallback initrd image(s) in /boot: initramfs-linux-zen-fallback.img
Found linux image: /boot/vmlinuz-linux
Found initrd image: /boot/amd-ucode.img /boot/initramfs-linux.img
Found fallback initrd image(s) in /boot: initramfs-linux-fallback.img
Found EndeavourOS on /dev/nvme0n1p4
done

```

After reboot, all the entries on Grub menu. Boots fine to both systems.

Thank you @Manuel and the Manjaro devs!

![yay](https://forum.endeavouros.com/uploads/default/original/2X/a/a3f238ccab6acd65766127706acdb43c51e0478e.gif)

Now I am off to get some sleep.  
😴

---

<div class="post-metadata">

**Author:** ![robgriff444](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/robgriff444/32/5459_2.png) [@robgriff444](https://forum.endeavouros.com/u/robgriff444)\
**Post date:** [September 18, 2020, 6:40am UTC](https://forum.endeavouros.com/t/first-experiment-with-installing-on-btrfs/8145/59 "2020-09-18T06:40:43Z")

</div>

@pebcak Aaah, young Jedi !

---

<div class="post-metadata">

**Author:** ![manuel](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/manuel/32/396_2.png) [@manuel](https://forum.endeavouros.com/u/manuel)\
**Post date:** [September 18, 2020, 7:11am UTC](https://forum.endeavouros.com/t/first-experiment-with-installing-on-btrfs/8145/60 "2020-09-18T07:11:41Z")

</div>

# Hello _btrfs_ users! Testing needed!

All **btrfs** (and **grub** ) users here, please test the following (same commands as above) and report the results here!  
Maybe we can make this a package later, if this works for all. 😄

```auto
cd /tmp
git clone https://gitlab.manjaro.org/packages/community/os-prober.git
cd os-prober
makepkg -cf
sudo pacman -U os-prober-1.*.pkg.tar.* # this line installs it

```

[Previous page](https://forum.endeavouros.com/t/first-experiment-with-installing-on-btrfs/8145.md?page=2)

[Next page](https://forum.endeavouros.com/t/first-experiment-with-installing-on-btrfs/8145.md?page=4)
