SteamOS icon indicating copy to clipboard operation
SteamOS copied to clipboard

Use LVM for partitions

Open ecliptik opened this issue 12 years ago • 8 comments

LVM would provide more flexibility for installs, such as re-sizing filesystems after install, growing volume group, and providing additional benefits of volume management.

The following patch will configure LVM during install with no user prompts and setup partitions similar to the traditional partitions. The current SteamOSInstaller however lacks packages such as the partman-auto-lvm_51_all.udeb partman-lvm_87_all.udeb udeb installation packages.

Even if these packages installed, the install will fail due to the install kernel lacking support for LVM either built into the kernel or as a module.

Please enable LVM support in the kernel and enable the partman-lvm udeb packges to allow for LVM installs as well.

--- default.preseed 2013-12-12 17:12:54.000000000 -0800
+++ default.preseed 2013-12-19 07:46:33.285932503 -0800
@@ -108,11 +108,13 @@
 # that you told it what to do using one of the methods above.
 d-i partman-md/confirm boolean true
 d-i partman-auto/disk string /dev/sda
-d-i partman/default_filesystem string ext4
-d-i partman-partitioning/confirm_write_new_label boolean true
-d-i partman/choose_partition select finish
+d-i partman/confirm_nochanges boolean true
 d-i partman/confirm boolean true
-d-i partman/confirm_nooverwrite boolean true
+d-i partman/choose_partition \
+   select Finish partitioning and write changes to disk
+d-i partman/confirm_write_new_label boolean true
+d-i partman/default_filesystem string ext4
+d-i partman-auto/purge_lvm_from_device boolean true

 ## Partitioning example
 # In addition, you'll need to specify the method to use.
@@ -120,7 +122,7 @@
 # - regular: use the usual partition types for your architecture
 # - lvm:     use LVM to partition the disk
 # - crypto:  use LVM within an encrypted partition
-d-i partman-auto/method string regular
+d-i partman-auto/method string lvm

 # If one of the disks that are going to be automatically partitioned
 # contains an old LVM configuration, the user will normally receive a
@@ -129,7 +131,18 @@
 # The same applies to pre-existing software RAID array:
 d-i partman-md/device_remove_md boolean true
 # And the same goes for the confirmation to write the lvm partitions.
-d-i partman-lvm/confirm boolean false
+d-i partman-lvm/confirm boolean true
+d-i partman-auto-lvm/confirm boolean true
+d-i partman-lvm/confirm_nooverwrite boolean true
+d-i partman-partitioning/confirm_write_new_label boolean true
+d-i partman/choose_partition select finish
+d-i partman-auto/confirm boolean true
+d-i partman/confirm_write_new_label boolean true
+d-i partman-auto/automatically_partition select true
+d-i partman/confirm_nooverwrite boolean true
+d-i partman-auto-lvm/guided_size string max
+d-i partman-lvm/confirm boolean true
+d-i partman-lvm/device_remove_lvm_span boolean true

 # You can choose one of the three predefined partitioning recipes:
 # - atomic: all files in one partition
@@ -149,22 +162,30 @@
                       label { boot }                          \
                       format{ }                               \
               .                                               \
+              100 100000 -1 lvm                               \
+                      $primary{ } $defaultignore{ }           \
+                      method{ lvm } vg_name{ steamVG }        \
+              .                                               \
               10240 10240 10240 ext4                          \
+                      $lvmok{ } in_vg{ steamVG } lv_name{ systemLV }  \
                       method{ format } format{ }              \
                       use_filesystem{ } filesystem{ ext4 }    \
                       label { system }                        \
                       mountpoint{ / }                         \
               .                                               \
               10240 10240 10240 ext4                          \
+                      $lvmok{ } in_vg{ steamVG } lv_name{ recoveryLV }  \
                       method{ format } format{ }              \
                       use_filesystem{ } filesystem{ ext4 }    \
                       label { recovery }                      \
                       mountpoint{ /boot/recovery }            \
               .                                               \
               10240 10240 10240 linux-swap                    \
+                      $lvmok{ } in_vg{ steamVG } lv_name{ swapLV }  \
                       method{ swap } format{ }                \
               .                                               \
               10240 128 100000000 ext4                        \
+                      $lvmok{ } in_vg{ steamVG } lv_name{ steamLV }  \
                       method{ format } format{ }              \
                       use_filesystem{ } filesystem{ ext4 }    \
                       label { steam }

ecliptik avatar Dec 19 '13 06:12 ecliptik

As always, Clonezilla is a problem here.

directhex avatar Jan 10 '14 16:01 directhex

They should enable all modes on the Expert Install, just like Debian. I like to encrypt partitions and I don't like LVM. So now what? :D

ghost avatar Mar 16 '14 16:03 ghost

Steam has known issues with encrypted partitions.

Tele42 avatar Mar 16 '14 16:03 Tele42

The problem with encryption is it requires text input support in the Plymouth theme in use, which Steam's theme lacks.

And using encryption without LVM is dumb - otherwise you need to enter one LUKS key per crypt mount point, which is tedious as hell at boot

directhex avatar Mar 16 '14 16:03 directhex

Personal opinion: I think it's somewhat moot, to be honest. Think of what SteamOS was designed for: being a console OS. Realistically, people shouldn't be changing volume size.

Moreover, encryption is excessive for the purpose. SteamOS is not a general-purpose OS; it is a specialized distro. If you're storing anything you feel should be encrypted, you're probably using the wrong system.

MrSchism avatar Mar 16 '14 18:03 MrSchism

@Tele42 Like which? I may be experiencing some. Only Debian works OK with encryption. All other distros run into kernel-panics while gaming with encrypted drives. I might dual-boot and use a non-encrypted drive to install Steam and probably Debian.

ghost avatar Mar 18 '14 03:03 ghost

@amarildojr right, the issue report I would have pointed to is your issue report.

Tele42 avatar Mar 18 '14 20:03 Tele42

Old but this, for SteamOS 3.0 (Both Steamdeck + PC)

Nulled-Out avatar Mar 28 '22 19:03 Nulled-Out