Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DietPi-Installer | Add LVM + swap partition support #2995

Open
LexiconCode opened this issue Jul 19, 2019 · 10 comments
Open

DietPi-Installer | Add LVM + swap partition support #2995

LexiconCode opened this issue Jul 19, 2019 · 10 comments
Labels
Feature request 🏭 Installer 💠 Issues related to DietPi-Installer and/or pre-image used x86_64

Comments

@LexiconCode
Copy link

LexiconCode commented Jul 19, 2019

Creating a bug report/issue

Required Information

Hardware: ODROID-H2
OS: debian-10.0.0-amd64-netinst.iso
Setup: DietPi-PREP

Steps to reproduce

  1. Startup install Debian 10.0.0
  2. partition entire disc using LVM
    image
  3. Run and complete DietPi PREP
  4. Reboot
  5. system is left in a non-bootable state in (initramfs)

Expected behaviour

  • Should boot int dietpi

Actual behaviour

Gave up waiting for suspend/resume device
Gave up waiting for root file system device. Common problems:

  • Boot Args(cat /proc/cmdline)
    -check root delay =(did system wait long enough?)
  • missing modules (cat /proc/modules; ls /dec)
    Alert! /dev/mapper/debian--g--root does not exist.. Dropping to shell!

Extra information

Please read this read as it contains the necessary information to describe the issue and provide a fix.

@MichaIng
Copy link
Owner

@LexiconCode
Many thanks for your report.

Never tried it with LVM actually, will do a test install with VM (which should behave the same).

@LexiconCode
Copy link
Author

Just checking in to see if there's news.

@MichaIng MichaIng added this to the v6.28 milestone Dec 12, 2019
@MichaIng
Copy link
Owner

Sorry, it was forgotten by me. I assigned v6.28 milestone to remind myself.

@MichaIng MichaIng modified the milestones: v6.28, v6.29 Jan 3, 2020
@LexiconCode
Copy link
Author

LexiconCode commented Jan 21, 2020

Sorry, it was forgotten by me. I assigned v6.28 milestone to remind myself.

Thanks for looking into it! I believe this will allow
Urbackup client to backup a DietPi-server.

@MichaIng
Copy link
Owner

@LexiconCode
I think I found it. From fresh VM with LVM setup I purged lvm2 page. Reboot worked well. I purged some more packages, most likely not related, then though about the initramfs. Ran update-initramfs -u and reboot failed. I need to verify:

apt purge lvm2
apt autoremove --purge
update-initramfs -u
reboot

If the above breaks VM boot replicable, then we found it. Then we need to check for an LVM mount identifier, basically the source path shows it. Then add lvm2 package to dependencies. Since this setup includes a swap partition, this would be another question, to re-add the swap partition to /etc/fstab as well.

However I will not be able to add this with v6.29.

@MichaIng MichaIng modified the milestones: v6.29, v6.30 Mar 18, 2020
@MichaIng MichaIng changed the title DietPi-PREP | Setting up LVM dietpi does not boot DietPi-PREP | Add LVM + swap partition support Mar 18, 2020
@MichaIng MichaIng modified the milestones: v6.30, v6.31 May 10, 2020
@MichaIng
Copy link
Owner

MichaIng commented May 18, 2020

LVM support: #1285 (comment)

  • Additionally, likely initramfs-tools is required instead of tiny-initramfs, which is currently installed when choosing VM.

swap partition: #1285 (comment)

@rondadon
Totally forgot that we have an open request about that 😄.

@MichaIng MichaIng added the Installer 💠 Issues related to DietPi-Installer and/or pre-image used label May 18, 2020
@MichaIng
Copy link
Owner

MichaIng commented May 20, 2020

Additional info: #1285 (comment)


Related: #3557

@MichaIng MichaIng mentioned this issue May 23, 2020
@MichaIng MichaIng modified the milestones: v6.31, v6.32 Jun 24, 2020
@LexiconCode
Copy link
Author

This is a bit all spread out what's the correct approach?

@MichaIng
Copy link
Owner

MichaIng commented Aug 17, 2020

After DietPi-PREP has finished but before rebooting, do:

apt update
apt install lvm2 initramfs-tools
apt autopurge
sed -i '\|[[:blank:]]/[[:blank:]]|s|UUID="[^"]*"|/dev/mapper/vg00-lv01|' /etc/fstab
update-initramfs -u

If there is not (swap) partition present in front of the root partition, vg00-lv01 must be replaced with vg00-lv00.

For the swap partition (if present in front of root partition!):

/boot/dietpi/func/dietpi-set_swapfile 0
mkswap /dev/mapper/vg00-lv00
swapon /dev/mapper/vg00-lv00
echo '/dev/mapper/vg00-lv00 none swap sw' >> /etc/fstab

But check back the drive sources: blkid

@LexiconCode
Copy link
Author

Your instructions worked well!

@MichaIng MichaIng modified the milestones: v6.32, v6.33 Aug 27, 2020
@MichaIng MichaIng modified the milestones: v6.33, v6.34 Oct 2, 2020
@MichaIng MichaIng modified the milestones: v6.34, v6.35 Nov 28, 2020
@MichaIng MichaIng mentioned this issue Jan 22, 2021
@MichaIng MichaIng modified the milestones: v7.0, v7.1 Feb 14, 2021
@MichaIng MichaIng modified the milestones: v7.1, v7.2 Apr 14, 2021
@MichaIng MichaIng modified the milestones: v7.2, Planned for implementation Apr 29, 2021
@MichaIng MichaIng removed this from the Planned for implementation milestone May 27, 2021
@MichaIng MichaIng changed the title DietPi-PREP | Add LVM + swap partition support DietPi-Installer | Add LVM + swap partition support Jan 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature request 🏭 Installer 💠 Issues related to DietPi-Installer and/or pre-image used x86_64
Projects
Development

No branches or pull requests

2 participants