Manjaro-architect 0.8


#321

I think I found one way:

ROOTY_PARTY="/dev/$(lsblk -lno NAME,MOUNTPOINT,TYPE | grep -B1 "/mnt " | grep "part" | awk '{print $1}')"
bl_root="PARTUUID=$(blkid -s PARTUUID ${ROOTY_PARTY} | sed 's/.*=//g' | sed 's/"//g')"
echo $bl_root

Gives output PARTUUID=5827ff78-76b9-4e16-997c-7d20ea4e0072

For encryption to work, I need to sed into the configuration file something like this:

cryptdevice=$bl_root:$cryptname root=$mapper_name 

where

mapper_name=$("/dev/$(lsblk -lno NAME,MOUNTPOINT | grep "/mnt$" | awk '{print $1}')")
cryptname="$(lsblk -lno NAME,MOUNTPOINT | grep "/mnt$" | awk '{print $1}')"

So that the resulting line in the file would look something like this:

"Boot with standard options" "rw cryptdevice=UUID=INSERT_UUID_HERE:cryptroot root=/dev/mapper/cryptroot rootflags=subvol=@"

This is going to be tricky…


#322

I remember @papajoke also found one solution and it was indeed pacli.


#323

This was now generated with manjaro-architect. With any luck it might boot:

"Boot with standard options"  "rw  cryptdevice=PARTUUID=5827ff78-76b9-4e16-997c-7d20ea4e0072:cryptroot root=/dev/mapper/cryptroot "
"Boot to single-user mode"    "rw  cryptdevice=PARTUUID=5827ff78-76b9-4e16-997c-7d20ea4e0072:cryptroot root=/dev/mapper/cryptroot single"

#324

Okay, encryption now works with refind, but only if you mount esp at /boot. This makes sense, because refind cannot access the /boot/refind_linux.conf to decrypt the root filesystem if that file is on the same encrypted partition. It would be possible to setup encrypted /boot with refind if we used instead manual boot stanzas, which reside in $ESP/refind/refind.conf. But I think I’m content with this.

New bug discovered: mounting btrfs subvolumes silently fails if they are on LUKS device. I think I need to rewrite that part.

EDIT: Fixed. found new bugs…


#325

Okay, If I get the real root mount from mount command (because lsblk gets confused with it when using btrfs subvolumes), then use that to lsblk output with grep -B1 to grab the line above it, I get the partition that the cryptdevice is in, reliably, also with btrfs subvolumes. Then I can use the result get the partuuid with blkid =). Not complicated at all! Anyway, now I get this nice automatically generated result:

"Boot with standard options"  "rw  cryptdevice=PARTUUID=5827ff78-76b9-4e16-997c-7d20ea4e0072:cryptroot root=/dev/mapper/cryptroot rootflags=subvol=/@"
"Boot to single-user mode"    "rw  cryptdevice=PARTUUID=5827ff78-76b9-4e16-997c-7d20ea4e0072:cryptroot root=/dev/mapper/cryptroot rootflags=subvol=/@" 

Testing now…

EDIT: it gives the wrong PARTUUID. great… Also, no filesystem drivers were installed.


#326

Okay, fixed it. Problem was that lsblk does not retain the tree structure if you specify what fields you want. So cryptdevice is listed last instead of right after the partition it is on. Parsing it from tree structure gets me what is needed.

Also, refind does not seem to be able to detect the right filesystem drivers for encrypted root automatically. For the time being I set it to install all drivers if root is encrypted (like it does for removable drives).

Still some issues to sort, it is now very near completion. Need to update the esp mounting dialog to advice mountpoint /boot for refind if you use encryption.

Once this is done, the following should be working with refind:

  • normal installation
  • installation on btrfs subvolumes
  • encrypted /, with or without btrfs subvolumes

I haven’t done anything for the lvm though, I have never used it so I might not be the best person to script it. And encrypted /boot requires manual boot stanzas with refind, so I just leave that part out.


#327

@sueridgepipe, would you test this if you have the time? You can pull the latest git version with this PKGBUILD https://github.com/manjaro/packages-community/tree/master/manjaro-architect-dev


#328

What am I testing here?


#329

For non-testing purposes which version would be right now the most recommended/stable one?


#330

The released version

https://sourceforge.net/projects/manjaro-architect/files/architect/dev/


#331

The one in unstable repos now, I think?

@sueridgepipe, btrfs subvolumes, refind, and those two in combination with LUKS encryption. At the moment the combination of all three seems still problematic, but I have an idea how to solve this. Also, custom package installation.


#332

Never used btrfs or refind, no real idea how they work, would refind replace grub?


#333

It can replace grub, or you can install it on top of grub. It just autodetects all uefi applications (bootloaders, linux kernels, windows, Mac etc) at boot time and makes them into a graphical menu.


#334

When I booted btrfs subvolumes + luks with refind, there was problem with initramfs. The initramfs did not did not recognize rootfs file type and could not mount it. I solved this by adding btrfs to modules section of mkinitcpio.conf. I have now automated this process in the installer. If you have btrfs root, mkinitcpio.conf gets btrfs module. This is mostly unnecessary for most setups, but harmless for any way, as that module would normally get loaded by hooks if necessary.


#335

Thanks for this guys!
I just installed lxqt in a VM with EFI boot. I did manage to jump out of the installation process under “advanced” where I wanted to chroot into the installation to check the Boot/EFI but by then I was almost done so no biggie.
The system booted just fine.
I missed JWM under the “DE”'s but I can set it up from my fully functional lxqt-minimal install.


#336

You can get back to installer from chroot by exiting chroot shell (ctrl+d) and then running command

   fg

Unfortunately I haven’t yet found a way to automatically return to the installer after chroot.


#337

Latest stable release is 0.8.9. It’s already in all branches since yesterday’s stable update :slight_smile:


#338

Will it also be updated on sourceforge with the ISO file?

I also noticed that it doesn’t show which version it is on sourceforge.


#339

Launching the installer on the architect-ISO will always automatically retrieve the latest available stable version of manjaro-architect, so no need for an update :slight_smile:


#340

Thanks for all the hard work! Happy to see the options for subvolumes with btrfs :grinning:

Now off to experiment with snapshots :wink: