btrbk-FAQ / How do I convert '/' (subvolid=5) into a subvolume? : How to get Grub2 to find the correct boot dir?
- Dominant language
- Perl
- Stars
- 2.1k
- Forks
- 139
- PR merge metrics
- No merged PRs in 30d
Description
As a beginner I used the procedure described in btrbk-FAQ: _How do I convert '/' (subvolid=5) into a subvolume?_ to convert my Debian stretch installation into a subvolume.
Since I was afraid to break the boot process I did not touch _'grub.cfg'_, but instead used the command described in the FAQ
`# btrfs subvolume set-default 330 /`
where 330 is the subvolid of '/rootfs
Everything worked:
- '/' is now mounted on '/rootfs'
- The top level '/' is now mounted on 'mnt/baseroot' using subvolid=5 in 'fstab'.
Everything was working as described in the FAQ procedure **until** I started moving the /boot directory in the top level '/' (via 'mnt/baseroot') into the directory 'TO_BE_REMOVED' as described in the btrbk-FAQ: **After** I moved this directory, **the boot process failed with /boot/grub/ not found!** It seems like **Grub2 is accessing the boot files in /boot and not in /rootfs/boot!** Even though I used 'btrfs subvolume set-default' as mentioned above. I think this is being followed only, once the Stretch image was started.
I then used a live-CD of Ubuntu to copy the /boot directory from my new '/' (= '/rootfs') aditionally into the top level '/'. Then Debian started again.
This is unfortunate, because I eventually want to do an upgrade to 'Buster'. I believe this upgrade will touch the Grub2 files as well as the boot sector. If I cannot correct this, the boot process might fail after the Buster upgrade.
**How do I tell Grub2 that the correct boot directory is now in /rootfs/boot? I believe the proper entry in the EFI section must have this modified. And it should be reflected in the 'grub.cfg' too. Can I just use a 'grub-install' in the current system? (I have an UEFI boot, Debian only)? Do I need to prepare something else?**
Any help is very much apprechiated. **Maybe this point could be clarified in the corresponding FAQ as well.**
LittleAlf
Apart from the described problem 'btrbk' is working as expected and the snapshots are properly created and copied. **Thanks for this great tool. :)**
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the btrbk-FAQ procedure named in the report and compare its handling of /boot, rootfs, and the subvolid=5 mount in fstab. Read the generated grub.cfg and the UEFI-related grub-install entry points, then verify the documented procedure against the reported boot failure; done means the FAQ clearly explains the required boot configuration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- debian, linux
- Domain
- documentation, operating-systems
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100