Le0xFF / VoidLinuxInstaller

A bash script to install Void Linux with optional LUKS encryption, optional LVM, btrfs filesystem and optional swap as file.
GNU Affero General Public License v3.0
53 stars 8 forks source link

Existing Partitions #10

Closed lawmanuk closed 10 months ago

lawmanuk commented 1 year ago

Hi

I already have a GPT formatted hard drive with EFI partition and spare partition for encrypted void.

I downloaded and ran yr script but it wanted to wipe my whole hard drive, which would cause me to lose my data/other distros etc.

Could you please amend yr script so we have an option to choose existing partitions to install root into for GPT drive, with existing EFI partition?

I tried to edit your script file but am too much of a novice and didn't want to risk wiping my hard drive.

At present your script is the closest I've come to getting an encrypted luks void with btrfs on my laptop.

Thanks so much in advance.

Le0xFF commented 1 year ago

Hello!

The script won't wipe the whole disk if you don't select option 4) Wipe destination drive in the main menu. You can safely select it in option 3). Maybe it would be better if I clarify this point in the script! It will automatically format the EFI and ROOT partitions that you will specify in options 6) and 7) when starting the installation process.

But yes, at the moment and as I said, the EFI partition will be formatted and wiped completely.

I think I can modify the script to let the user choose if they want to format or not the EFI partition. I don't think i will modify the part where the script format the ROOT partition, as I think it will break too much things later in the script, if the ROOT partition is not a BTRFS one and so on.

It will take some time, so no ETA, but I will definitely implement the change!

lawmanuk commented 1 year ago

Hi,

thanks for the response.

That would be great if EFI isn't wiped.

Formatting root is completely fine.

I might edit the script to increase the ZSTD compression level as I think it defaults to only 3, which is not nearly its capability?

I wasn't clear which desktop environment it installs. I'd be interested in lightweight openbox/xfce (although the default xfce looks quite ugly compared to manjaro xfce etc., so will have to learn how to theme it better.

Thanks for all the hard work. Its a bit strange why void don't just allow this from the get go.

I completely understand about no ETA.

Thanks again.

On Tue, 10 Oct 2023 at 10:45, Le0xFF @.***> wrote:

Hello!

The script won't wipe the whole disk if you don't select option 4) Wipe destination drive in the main menu. You can safely select it in option 3). Maybe it would be better if I clarify this point in the script! It will automatically format the EFI and ROOT partitions that you will specify in options 6) and 7) when starting the installation process.

But yes, at the moment and as I said, the EFI partition will be formatted and wiped completely.

I think I can modify the script to let the user choose if they want to format or not the EFI partition. I don't think i will modify the part where the script format the ROOT partition, as I think it will break too much things later in the script, if the ROOT partition is not a BTRFS one and so on.

It will take some time, so no ETA, but I will definitely implement the change!

— Reply to this email directly, view it on GitHub https://github.com/Le0xFF/VoidLinuxInstaller/issues/10#issuecomment-1754838565, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHJYHZ2O427T6QH53IHONPLX6UKJZAVCNFSM6AAAAAA5ZPITF2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONJUHAZTQNJWGU . You are receiving this because you authored the thread.Message ID: @.***>

lawmanuk commented 1 year ago

Hi again,

Just wanted to confirm that I ran the script which seemed to work.

I used Luks2 on a GPT partitioned drive. I understand your script uses EFISTUB (not sure what this is) for Luks2 instead of Grub2.

After everything was completed, I rebooted and the computer failed to boot. /dev/sda1 with EFI was empty. The encrypted root drive seemed fine.

Not sure if I should try to fix the boot somehow or just reinstall with Luks1 and Grub2 instead?

I'm guessing the final version will boot into a console as I didn't see any window manager installation instructions?

Thanks

On Tue, 10 Oct 2023 at 12:43, law man @.***> wrote:

Hi,

thanks for the response.

That would be great if EFI isn't wiped.

Formatting root is completely fine.

I might edit the script to increase the ZSTD compression level as I think it defaults to only 3, which is not nearly its capability?

I wasn't clear which desktop environment it installs. I'd be interested in lightweight openbox/xfce (although the default xfce looks quite ugly compared to manjaro xfce etc., so will have to learn how to theme it better.

Thanks for all the hard work. Its a bit strange why void don't just allow this from the get go.

I completely understand about no ETA.

Thanks again.

On Tue, 10 Oct 2023 at 10:45, Le0xFF @.***> wrote:

Hello!

The script won't wipe the whole disk if you don't select option 4) Wipe destination drive in the main menu. You can safely select it in option 3). Maybe it would be better if I clarify this point in the script! It will automatically format the EFI and ROOT partitions that you will specify in options 6) and 7) when starting the installation process.

But yes, at the moment and as I said, the EFI partition will be formatted and wiped completely.

I think I can modify the script to let the user choose if they want to format or not the EFI partition. I don't think i will modify the part where the script format the ROOT partition, as I think it will break too much things later in the script, if the ROOT partition is not a BTRFS one and so on.

It will take some time, so no ETA, but I will definitely implement the change!

— Reply to this email directly, view it on GitHub https://github.com/Le0xFF/VoidLinuxInstaller/issues/10#issuecomment-1754838565, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHJYHZ2O427T6QH53IHONPLX6UKJZAVCNFSM6AAAAAA5ZPITF2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONJUHAZTQNJWGU . You are receiving this because you authored the thread.Message ID: @.***>

Le0xFF commented 1 year ago

I might edit the script to increase the ZSTD compression level as I think it defaults to only 3, which is not nearly its capability?

Yeah iirc I left the default level to have a proper balance between compression and decompression speed/cpu usage. Feel free to edit it as you like.
You could also completely install Void with the script and after the reboot, change the compression level in /etc/fstab to something like compress-force=zstd:15, where 15 is your desired compression level.


I wasn't clear which desktop environment it installs

By default my script doesn't install any DE or things like that. You can find all the packages that installs from line 2407 to line 2432. During chroot there is the possibility to install packages directly via xs function or, if you prefer, to use the bash shell to manually install packages and modify the system as you like.


I used Luks2 on a GPT partitioned drive. I understand your script uses EFISTUB (not sure what this is) for Luks2 instead of Grub2.

Yes, this is due to the fact that GRUB2 doesn't fully support LUKS2 headers, so EFISTUB is the mandatory choice in this case. If you want to know more about what they are, please take a look at official documentation (Wikipedia/ArchWiki), as I'm not the right person to explain them, sorry! But as tl;dr: LUKS2 is a "better" version of LUKS1 and EFISTUB won't use any bootloader (like GRUB2) but instead will directly boot the efi executable from the EFI folder in your EFI partition, directly from the motherboard boot menu.

For why it doesn't work, that could be a little problem to debug, as my script doesn't have any log functionality, sadly, I'm really sorry about that :sweat_smile: I can suggest to repeat the process and maybe check if you selected the right boot partition, or if during the script, some "errors" came up on screen! And also yes please, try the LUKS1+GRUB2 combination!

lawmanuk commented 12 months ago

Thanks for the responses.

Just FYI step 1 changing key map to UK keeps reverting back to US after selection.

For it all working with grub luks1.

Thanks for your help

On Tue, 10 Oct 2023, 18:17 Le0xFF, @.***> wrote:

I might edit the script to increase the ZSTD compression level as I think it defaults to only 3, which is not nearly its capability?

Yeah iirc I left the default level to have a proper balance between compression and decompression speed/cpu usage. Feel free to edit it as you like. You could also completely install Void with the script and after the reboot, change the compression level in /etc/fstab to something like compress-force=zstd:15, where 15 is your desired compression level.

I wasn't clear which desktop environment it installs

By default my script doesn't install any DE or things like that. You can find all the packages that installs from line 2407 to line 2432 https://github.com/Le0xFF/VoidLinuxInstaller/blob/7c852297085293a0ea8508a210ec7a35ff03d485/vli.sh#L2407-L2432 . During chroot there is the possibility to install packages directly via xs function or, if you prefer, to use the bash shell to manually install packages and modify the system as you like.

I used Luks2 on a GPT partitioned drive. I understand your script uses EFISTUB (not sure what this is) for Luks2 instead of Grub2.

Yes, this is due to the fact that GRUB2 doesn't fully support LUKS2 headers, so EFISTUB is the mandatory choice in this case. If you want to know more about what they are, please take a look at official documentation (Wikipedia/ArchWiki), as I'm not the right person to explain them, sorry! But as tl;dr: LUKS2 is a "better" version of LUKS1 and EFISTUB won't use any bootloader (like GRUB2) but instead will directly boot the efi executable from the EFI folder in your EFI partition, directly from the motherboard boot menu.

For why it doesn't work, that could be a little problem to debug, as my script doesn't have any log functionality, sadly, I'm really sorry about that 😅 I can suggest to repeat the process and maybe check if you selected the right boot partition, or if during the script, some "errors" came up on screen!

— Reply to this email directly, view it on GitHub https://github.com/Le0xFF/VoidLinuxInstaller/issues/10#issuecomment-1755902629, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHJYHZZYTKVFEQTFXDUCVMLX6V7KZAVCNFSM6AAAAAA5ZPITF2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONJVHEYDENRSHE . You are receiving this because you authored the thread.Message ID: @.***>

lawmanuk commented 11 months ago

Hi,

I just wanted to point out the following bugs fyi.

  1. The keyboard doesn't change from US.

  2. On the final leg of the installation, when pressing 'q' the EFI doesn't setup properly. it gives an error message the UUID of root drive can't be found. Once completed and you choose to boot, the password is entered but then there is a grub error so void doesn't boot. This only happens on some laptops and not others. It is a problem on lenova laptops on which the script doesn't work. I'm not sure why, except that this laptop doesn't have SDA but instead hd named NVME01

  3. When EFI partition is setup, 2 files are created. The EFI file never boots successfully. The other file when renamed to EFI works and boots on non-lenova laptops.

  4. Please consider setting up EFI without erasing EFI partition, as this contains EFI boot files for other operating systems.

Thanks again for your help

On Wed, 11 Oct 2023 at 08:49, law man @.***> wrote:

Thanks for the responses.

Just FYI step 1 changing key map to UK keeps reverting back to US after selection.

For it all working with grub luks1.

Thanks for your help

On Tue, 10 Oct 2023, 18:17 Le0xFF, @.***> wrote:

I might edit the script to increase the ZSTD compression level as I think it defaults to only 3, which is not nearly its capability?

Yeah iirc I left the default level to have a proper balance between compression and decompression speed/cpu usage. Feel free to edit it as you like. You could also completely install Void with the script and after the reboot, change the compression level in /etc/fstab to something like compress-force=zstd:15, where 15 is your desired compression level.

I wasn't clear which desktop environment it installs

By default my script doesn't install any DE or things like that. You can find all the packages that installs from line 2407 to line 2432 https://github.com/Le0xFF/VoidLinuxInstaller/blob/7c852297085293a0ea8508a210ec7a35ff03d485/vli.sh#L2407-L2432 . During chroot there is the possibility to install packages directly via xs function or, if you prefer, to use the bash shell to manually install packages and modify the system as you like.

I used Luks2 on a GPT partitioned drive. I understand your script uses EFISTUB (not sure what this is) for Luks2 instead of Grub2.

Yes, this is due to the fact that GRUB2 doesn't fully support LUKS2 headers, so EFISTUB is the mandatory choice in this case. If you want to know more about what they are, please take a look at official documentation (Wikipedia/ArchWiki), as I'm not the right person to explain them, sorry! But as tl;dr: LUKS2 is a "better" version of LUKS1 and EFISTUB won't use any bootloader (like GRUB2) but instead will directly boot the efi executable from the EFI folder in your EFI partition, directly from the motherboard boot menu.

For why it doesn't work, that could be a little problem to debug, as my script doesn't have any log functionality, sadly, I'm really sorry about that 😅 I can suggest to repeat the process and maybe check if you selected the right boot partition, or if during the script, some "errors" came up on screen!

— Reply to this email directly, view it on GitHub https://github.com/Le0xFF/VoidLinuxInstaller/issues/10#issuecomment-1755902629, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHJYHZZYTKVFEQTFXDUCVMLX6V7KZAVCNFSM6AAAAAA5ZPITF2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONJVHEYDENRSHE . You are receiving this because you authored the thread.Message ID: @.***>

Le0xFF commented 11 months ago
  1. Gonna test this deeper, as the layout changes always worked for me.

  2. When in chroot menu, pressing "q" will just reconfigure all packages, so any error related to EFI is due to some wrong configuration happened before. I don't think the difference between SDA or NVMe ahould be relevant, as the drive is specified by the user and saved in a variable, but i will take a look on that too. Could you also please tell me which bootloader did you choose and if you also set up encryption and/or LVM?

  3. I suppose you are using EFISTUB as bootloader and could be that some configuration is set up in a wrong way also due to my script. I'm definitely not an expert on that, so any additional help from other people would be really appreciated.

  4. This is on my ToDo list when I will get some time to work on it again!

lawmanuk commented 11 months ago

Hi,

I used luks1 and grub, which worked on the hp laptop but not the lenova.

I tried luks 2 and efistub on the hp laptop but that just wiped the efi partition blank with no bootloader at all. Not sure how efistub is supposed to work?

thanks

On Sun, 22 Oct 2023 at 16:31, Le0xFF @.***> wrote:

1.

Gonna test this deeper, as the layout changes always worked for me. 2.

When in chroot menu, pressing "q" will just reconfigure all packages, so any error related to EFI is due to some wrong configuration happened before. I don't think the difference between SDA or NVMe ahould be relevant, as the drive is specified by the user and saved in a variable, but i will take a look on that too. Could you also please tell me which bootloader did you choose and if you also set up encryption and/or LVM? 3.

I suppose you are using EFISTUB as bootloader and could be that some configuration is set up in a wrong way also due to my script. I'm definitely not an expert on that, so any additional help from other people would be really appreciated. 4.

This is on my ToDo list when I will get some time to work on it again!

— Reply to this email directly, view it on GitHub https://github.com/Le0xFF/VoidLinuxInstaller/issues/10#issuecomment-1774124307, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHJYHZ3JLF7NAXUR5FLZLWDYAU335AVCNFSM6AAAAAA5ZPITF2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZUGEZDIMZQG4 . You are receiving this because you authored the thread.Message ID: @.***>

lawmanuk commented 11 months ago

hi

just to let you know that i've got the script working on the lenova

there were some setting in the bios related to intel trust settings and intel sgx.

once i disabled these the script worked perfectly.

also, you might want to add this additional script to yours.

it completed your script and let me install a desktop environment, sound and basic apps all perfectly.

thanks

On Sunday 22 October 2023 20:58:25 (+01:00), law man wrote:

Hi,

I used luks1 and grub, which worked on the hp laptop but not the lenova.

I tried luks 2 and efistub on the hp laptop but that just wiped the efi partition blank with no bootloader at all. Not sure how efistub is supposed to work?

thanks

On Sun, 22 Oct 2023 at 16:31, Le0xFF @. @.> > wrote:

Gonna test this deeper, as the layout changes always worked for me.

When in chroot menu, pressing "q" will just reconfigure all packages, so any error related to EFI is due to some wrong configuration happened before. I don't think the difference between SDA or NVMe ahould be relevant, as the drive is specified by the user and saved in a variable, but i will take a look on that too. Could you also please tell me which bootloader did you choose and if you also set up encryption and/or LVM?

I suppose you are using EFISTUB as bootloader and could be that some configuration is set up in a wrong way also due to my script. I'm definitely not an expert on that, so any additional help from other people would be really appreciated.

This is on my ToDo list when I will get some time to work on it again!

— Reply to this email directly, view it on GitHub https://github.com/Le0xFF/VoidLinuxInstaller/issues/10#issuecomment-1774124307 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AHJYHZ3JLF7NAXUR5FLZLWDYAU335AVCNFSM6AAAAAA5ZPITF2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZUGEZDIMZQG4 . You are receiving this because you authored the thread.

-- Sent with Vivaldi Mail. Download Vivaldi for free at vivaldi.com

Le0xFF commented 10 months ago

Hello and sorry for being so late at replying!

From commit https://github.com/Le0xFF/VoidLinuxInstaller/commit/51c1a40e511f16e9869d910b0036499b2e53b14e the script asks if uses wants to format EFI partition or not!

also, you might want to add this additional script to yours. it completed your script and let me install a desktop environment, sound and basic apps all perfectly.

Sorry but i prefer to keep my script as it is. Users must decide which DE to install and whatever else. That's not the goal of my script :smile: