-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
On 2016-08-13 06:53,
zack...@gmail.com wrote:
> On Saturday, August 13, 2016 at 6:14:44 AM UTC-4, Marek
> Marczykowski-Górecki wrote: On Sat, Aug 13, 2016 at 03:11:57AM -0700,
> Andrew David Wong wrote:
>>>> On 2016-08-12 20:57,
zack...@gmail.com wrote:
>>>>> Hi all, I'm a new qubes user and have been following the guides to
>>>>> get trim enabled for the dom0. Everything seems to have gone
>>>>> smoothly until the grub steps. I can't find a grub.cfg file
>>>>> anywhere. The only abnormality to my installation is that it's
>>>>> UEFI. So the closest thing I did find to this was
>>>>> /boot/efi/EFI/qubes/xen.cfg which had the kernel line referenced
>>>>> in the trim guide. However, when I attempt to run grub2-mkconfig -o
>>>>> /boot/efi/EFI/qubes/xen.cfg I get "grub2-mkconfig: command not
>>>>> found" All that is present in the /boot/grub2 folder is a themes
>>>>> folder. I am using the main dom0 terminal for all of this.
>>>>>
>>>>> Considering that everything boots fine, I'm hesitant to reinstall
>>>>> grub2 (I assume it would need to be grub2-efi in this case). Any
>>>>> clue as to what's going on? Thanks
>>>>>
>>>>
>>>> I think grub2-mkconfig is not found because you're using UEFI rather
>>>> than legacy boot. Are you getting your instructions from here?
>>>>
>>>>
https://www.qubes-os.org/doc/disk-trim/
>>>>
>>>> I think these instructions were written with legacy boot in mind.
>>>> I'm not sure how to enable TRIM on UEFI (CCing Marek).
>
> Yes, on UEFI install /boot/efi/EFI/qubes/xen.cfg is the right file - you
> need to edit it directly.
>
>
> So I'm editing the right file, that's all and good. Here's what I've done
> so far:
>
> #Find UUID of ssd ls /dev/mapper/luks-* #Set trim in crypttab sudo nano
> /etc/crypttab #Add "allow-discards" at end of entry for ssd with matching
> UUID #Set trim in fstab sudo nano /etc/fstab #Add "discard" after other
> flags (like "default") for everything but swap sudo nano /etc/lvm/lvm.conf
> #Change "issue_discards" from "0" to "1" #Add discard to grub sudo nano
> /boot/efi/EFI/qubes/xen.cfg #At the end of the kernel line, add
> "rd.luks.allow-discards=1" #Rebuild initramfs sudo dracut -H -f ##Check if
> discard (trim) is enabled: lsblk -D #OR sudo dmsetup table
>
> Everything above works except that lsblk still shows no trim support so I
> guess that the rebuilding of grub is an important step in this. How do I
> rebuild it with UEFI? I tried:
>
> grub2-mkconfig -o /boot/efi/EFI/qubes/xen.cfg
>
> but I just get the grub2-mkconfig not found error
>
Quoting Marek from a different thread [1]:
> By default, if you install Qubes OS in EFI mode (which is the case when
> you launch installer as such), grub is not installed at all and Qubes is
> configured to boot xen.efi directly from UEFI BIOS.
>
> In that case, xen and kernel command line can be configured in
> /boot/efi/EFI/qubes/xen.cfg.
>
> Some details here:
https://github.com/QubesOS/qubes-issues/issues/794
So, I don't think you're supposed to try to rebuild grub. Have you tried
simply rebooting after editing xen.cfg?
[1]
https://groups.google.com/d/msg/qubes-users/0855TpoheY8/qxOnC_ZCDQAJ
iQIcBAEBCgAGBQJXry9fAAoJENtN07w5UDAwXnoP/3fFWf9MsgDdu9Frr7yOn5Fn
gtotENq4qZlpBwY/k1zSa8jGN8wT0nZcYZthUQgeIe4mUzh8Db/m2uAKDZCpFFRH
QzWvRBChcssXtzrtslkn5uf78g3d/VEonl0Fp/RQPl3bleKNMrssbhk0LchFXe/U
uDYdKWlTbTOYKP5Ucl/fEi+KxBWMx3EhBcKzbBi6WYuvy4/juyAAn/wF5xBWWzkP
zv0bTfsPSIP+HMqZ6P0bbcy5Fe4PTib8InsRiiRucwIZ2ulxXbd5S7WPws/lNTVD
rzgz/myv1ptIm8H5D1bliCVbBHaaDGNzNJMIoNCd1gcDgucI2Ov4kgfVbfxvENHg
/JAMmbZvyFW7nnXW46goYBtZ+MOBnidA8DhSpY5tLJiJ+MNsamwStc08mtoL7uqx
qNX2JDrW/SEzKzPwoEatVlVbdsfg7omjI4cLpUBfuQgbc6x4g/iol7lPn03DfCO0
3+lQFmx5/HWGBg00Ta3rznYK78mWfwpFaxVlQ4y7y7STjPOZ2AVE1V811oqLrtfO
xN3fYiCXGFHrgDukPhyHyzwnVifyWqiP7YsEdR4fUeFolmoiynKTFfSC75be7FOg
V5xEpS/qhAA979IVwOT0OGUUy1nkqEeXvhQbFQVSo1k+FHUucjCbrgsdb8EHbMlH
voRCXtsaCyMpCdZi1hNw
=fSFj
-----END PGP SIGNATURE-----