Rename the Volume Group of an USB stick, which uses LVM

Liam Proven lproven at gmail.com
Mon Jun 22 13:05:30 UTC 2020


On Mon, 22 Jun 2020 at 14:58, Volker Wysk <post at volker-wysk.de> wrote:
>
> I'm trying to build an encrypted rescue/maintenance system on an USB
> stick.

Why?

If it's a rescue stick, it doesn't need to contain any data. If it
contains no data, don't encrypt it.

And as I've said to you before, avoid LVM if at all possible if you
want an easy life.

Finally:

If you're installing onto a USB key, then I suggest you use a VM, and
failing that, disconnect your internal hard disk, or you risk blending
the HD and USB bootloaders which can have unpleasant results.

I have blogged about this -- you may find it useful.

https://liam-on-linux.livejournal.com/50416.html



 Therefore, I've installed Ubuntu 20.04 on the USB stick. I'm
> using the regular Ubuntu installer to do the installation, which makes
> use of LVM in case of encryption of the disk. A volume group named
> "vgubuntu" is created.
>
> Now I have to rename the volume group of the system on the USB-Stick to
> avoid conflicts, especially with my laptop's main system. I've had this
> problem in 2017, and Xen answered my question in 2017-12-09:
>
> -----snip-----
> BEFORE you do any cryptsetup open on the main system, run:
>
> vgrename kubuntu-vg rescue-vg
>
> Then you must verify that /etc/fstab in the RESCUE system contains no
> references to "kubuntu-vg" and you might also have to rerun
> "update-grub" if you want to keep it this way.
>
> That is all you need to do to rename the volume group.
>
> After that you can open the crypt and it won't conflict.
> -----snip-----
>
> I've followed these instructions now, and renamed "vgubuntu" to
> wartung". But the "update-grub" step doesn't work. I get the message
> (translated back from German) "Canonical path of /dev/mapper/vgubuntu-
> root could not be determined".
>
> After making a symlink from /dev/mapper/wartung-root to
> /dev/mapper/vgubuntu-root, the "grub-setup" works, but booting the USB-
> stick fails. I get a busybox rescue shell.
>
> So what is missing?
>
> Cheers
> Volker
>
>
> --
> ubuntu-users mailing list
> ubuntu-users at lists.ubuntu.com
> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users



-- 
Liam Proven – Profile: https://about.me/liamproven
Email: lproven at cix.co.uk – gMail/gTalk/gHangouts: lproven at gmail.com
Twitter/Facebook/LinkedIn/Flickr: lproven – Skype: liamproven
UK: +44 7939-087884 – ČR (+ WhatsApp/Telegram/Signal): +420 702 829 053




More information about the ubuntu-users mailing list