Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #241791

Re: Change root subvolume on btrfs

From Nito <nito@dismail.de>
Newsgroups linux.debian.user
Subject Re: Change root subvolume on btrfs
Date 2021-10-29 19:30 +0200
Message-ID <DdDRw-7o2-5@gated-at.bofh.it> (permalink)
References <Dd47n-Kk-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Disclaimer: I only have limited experience with btrfs
and never used it for root partition.

On Thu, Oct 28, 2021 at 04:10:08 +0100, piorunz wrote:
> I have / partition on btrfs subvolume, default name @rootfs created by
> Debian.
> [...] 
> 
> Question:
> How can I rename / subvolume on btrfs from @rootfs to @?

If it doesn't move to another parent folder,
just `mv`ing it is the correct approach afaik.

> I tried:
> rename folder name by hand from USB stick Linux Mint from @rootfs to @,
> and then changing @rootfs to @ in /etc/fstab, but grub didn't booted, it
> thrown me out to grub emergency console. I had to revert it back.

Maybe the grub command for booting also explicitly specifies the subvolume.
Can you take a look at the relevant line in /boot/grub/grub.cfg? (If you're 
not sure what to look at, serach for the text of the netry you use in the 
GRUB-menu, everything from there until a line starting with `initrd` could 
possibly be relevant).
If yes, you'll need to change that in /etc/default/grub
and/or /etc/default/grub.d/* and then run update-grub as root.

> Some context:
> $ sudo btrfs subvolume list /
> ID 256 gen 176714 top level 5 path @rootfs
> ID 265 gen 21191 top level 256 path var/lib/portables
> ID 266 gen 21192 top level 256 path var/lib/machines

What does `sudo btrfs subvolume get-default /` tell you
before _and_ after you renamed the subvolume?
If it was @rootfs before but is not @ afterwards,
you'll need to set the default using
  sudo btrfs subvolume set-default ...

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Change root subvolume on btrfs piorunz <piorunz@gmx.com> - 2021-10-28 05:20 +0200
  Re: Change root subvolume on btrfs Nito <nito@dismail.de> - 2021-10-29 19:30 +0200
    [SOLVED] Change root subvolume on btrfs piorunz <piorunz@gmx.com> - 2021-11-07 13:10 +0100

csiph-web