Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

lvm: boot form logical volume (hard disk) ??

Featured Replies

Hi all,

 

does anyone know how to boot from a locgical volume?

the volume group is located on a mbr-parted partition (/dev/sda5)

 

Disk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x00002074

Device     Boot  Start       End   Sectors   Size Id Type
/dev/sda1         2048    499711    497664   243M 82 Linux swap / Solaris
/dev/sda2       501758 976771071 976269314 465.5G  5 Extended
/dev/sda5       501760 976771071 976269312 465.5G 8e Linux LVM

I dont' dare to execute nand-sata-install 'cause it does recognize just the MBR-Partitions. It seems to me that it will overwrite the volume group.

Currently I'm running bananian from the disk.

Added an new root-lv "/dev/langate/root-new" and rsynced the root-fs from the sd-card to the new root-lv.

Patched /boot/boot.cmd, executed 'mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr'.

It doesn't function. I can't describe the error-messages right now further.

 

Logical volumes look like this:

 ACTIVE            '/dev/langate/root' [2.00 GiB] inherit
  ACTIVE            '/dev/langate/swap_1' [1004.00 MiB] inherit
  ACTIVE            '/dev/langate/usr' [8.00 GiB] inherit
  ACTIVE            '/dev/langate/home' [2.00 GiB] inherit
  ACTIVE            '/dev/langate/var' [12.00 GiB] inherit
  ACTIVE            '/dev/langate/data' [438.54 GiB] inherit
  ACTIVE            '/dev/langate/root-new' [2.00 GiB] inherit

 

  • Author

Hi all,

 

Managed to boot from a locgical volume.

This is what I did;

  • Left 'boot.cmd" untouced
  • Edited '/boot/armbianEnv.txt':  'rootdev=/dev/mapper/langate-root--new'

This is it, basically.

Of course I hat to boot at least one time before from sd-card and did:

  • sudo apt update && sudo apt upgrade
  • sudo apt install lvm2

After booting from hard disk I disabled zram and ramlog

  • sudo apt install zram-config
  • sudo systemctl disable zram-config
  • sudo systemctl disable armbian-ramlog

reboot

 

You can also use the UUID both in your /boot/armbianEnv.txt and the fstab. So a lvrename or vgrename will not make your system unbootable.

I use it for using as rootfs a btrfs filesystem in an lvm logical volume.

 

On 1/19/2019 at 12:34 PM, marcz said:

You can also use the UUID both in your /boot/armbianEnv.txt and the fstab. So a lvrename or vgrename will not make your system unbootable.

I use it for using as rootfs a btrfs filesystem in an lvm logical volume.

 

Yep - both places...

 

I normally don't do LVM for boot drives as it increase complexity for the rootfs, even on Intel/AMD platforms, but LVM can be very useful for extending the file system out...

 

The big thing is understanding how the LVM stack works - this is from an article I wrote a couple of years ago teaching LVM and as part of it, we create a RAID0 array using two USB thumb drives, lol...

 

 sfx_example_lvm_stack.png.550d9a5ce4570f7d32dd94ab0c155e2f.png

Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.