On Saturday, August 13, 2016 at 5:45:58 PM UTC-4, Marek Marczykowski-Górecki wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA256 > > On Sat, Aug 13, 2016 at 06:53:20AM -0700, zackp...@gmail.com wrote: > > On Saturday, August 13, 2016 at 6:14:44 AM UTC-4, Marek > > Marczykowski-Górecki wrote: > > > -----BEGIN PGP SIGNED MESSAGE----- > > > Hash: SHA256 > > > > > > On Sat, Aug 13, 2016 at 03:11:57AM -0700, Andrew David Wong wrote: > > > > On 2016-08-12 20:57, zackp...@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. > > > > > > - -- > > > Best Regards, > > > Marek Marczykowski-Górecki > > > Invisible Things Lab > > > A: Because it messes up the order in which people normally read text. > > > Q: Why is top-posting such a bad thing? > > > -----BEGIN PGP SIGNATURE----- > > > Version: GnuPG v2 > > > > > > iQEcBAEBCAAGBQJXrvMNAAoJENuP0xzK19csfqQH/0/P4FV8W2/pZhWaCeXfseqj > > > fw79GDTa5/ExjxSg4eehHDhHHVgG3kaeb0HafPvVnHS/DJuHzCG1Xrs1vyZJlPID > > > oCrH4FaaYQ2Che4L4D/Koh5lNEdEakKOrF7ILbTRN5u8Q4xvdM9KQ/paacCYkCDJ > > > YlYKELzyOZ1wkUvwttPynTANdrMlY797BHkHYHv2TbaMBTjw4EYmIs+VM9MRIWIv > > > Lis1hZn97y1z3ZIQglrQRCDLAmoNJPBsXRdMHjNyA5EeKQPX+fNxsE3/HIoqrIi3 > > > 3DHYzKIS/UBDFHOJXj7I3pK311fS1IcUlrbRCXJYCM0gF5A5EkWKxIj0ghV0YTI= > > > =uhvX > > > -----END PGP SIGNATURE----- > > > > 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. > > I think dracut by default place output file in > /boot/initramfs-(kernel version), while on UEFI system bootloader loads > it from /boot/efi/EFI/qubes/. Try to copy it there. > > - -- > Best Regards, > Marek Marczykowski-Górecki > Invisible Things Lab > A: Because it messes up the order in which people normally read text. > Q: Why is top-posting such a bad thing? > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v2 > > iQEcBAEBCAAGBQJXr5UPAAoJENuP0xzK19csZGMH/RUxcWpX8666s3xhNptrw7NH > d5bgtzZu9kHWCGILyeLAmnJcW8y36VPMhdWcbyLcakh4WSKqPqIIqJeq+1CAm6bG > SRMTMnMTIjlQsP9ODNGFpS/JaW8tN6qQA4Cg33NSs92mlWIcRDy/ufb7A8S+NxEu > 0LssHH7A7y+aY13ZDy9osd3S/cKf1c8v/fQOTcg29QRq8hq0KKaD8J/a/xiCbvth > yc2eknJGOnG8j1Q3v3X6ByaA8StbmlR9LibkmSH7Y8DV3cV7Rmbv/0M7IbSf7V7F > oeehHK+AhFHZLHidQUxd4UkIfI7CKymHyzHIqClYXvdjiZui5ClSvsLmJPR+ovw= > =jCSn > -----END PGP SIGNATURE-----
I checked the date and time of creation of the initramfs file in the directories you specified and you are correct in that dracut created it in /boot. However, after copying it to /boot/efi/EFI/qubes and replacing the one there, there's still no trim support. Here's my output: sudo dmsetup table snapshot-fb01:3278378-fb01:3279033: 0 20971520 snapshot 7:7 7:8 P 256 qubes_dom0-swap: 0 15990784 linear 251:0 2048 qubes_dom0-root: 0 451420160 linear 251:0 15992832 luks-07201718-857d-4108-a722-a5956c443e1e: 0 467421184 crypt aes-xts-plain64 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 0 8:19 4096 1 allow_discards snapshot-fb01:3278350-fb01:3278346: 0 20971520 snapshot 7:0 7:1 P 256 lsblk -D NAME DISC-ALN DISC-GRAN DISC-MAX DISC-ZERO sda 0 512B 2G 0 ├─sda1 0 512B 2G 0 ├─sda2 0 512B 2G 0 ├─sda3 0 512B 2G 0 └─sda4 0 512B 2G 0 sdb 0 512B 2G 0 ├─sdb1 0 512B 2G 0 ├─sdb2 0 512B 2G 0 └─sdb3 0 512B 2G 0 └─luks-07201718-857d-4108-a722-a5956c443e1e 0 512B 2G 0 ├─qubes_dom0-root 0 512B 2G 0 └─qubes_dom0-swap 0 512B 2G 0 sdc 0 0B 0B 0 └─sdc1 0 0B 0B 0 sdd 0 0B 0B 0 ├─sdd1 0 0B 0B 0 ├─sdd2 0 0B 0B 0 └─sdd3 0 0B 0B 0 sde 0 0B 0B 0 └─sde1 0 0B 0B 0 sdf 0 0B 0B 0 └─sdf1 0 0B 0B 0 sr0 0 0B 0B 0 loop0 0 4K 4G 1 └─snapshot-fb01:3278350-fb01:3278346 0 4K 4G 1 loop1 0 4K 4G 1 └─snapshot-fb01:3278350-fb01:3278346 0 4K 4G 1 loop2 0 4K 4G 1 loop3 0 4K 4G 1 loop4 0 4K 4G 1 loop5 0 4K 4G 1 loop6 0 4K 4G 1 loop7 0 4K 4G 1 └─snapshot-fb01:3278378-fb01:3279033 0 4K 4G 1 loop8 0 4K 4G 1 └─snapshot-fb01:3278378-fb01:3279033 0 4K 4G 1 loop9 0 4K 4G 1 loop10 0 4K 4G 1 Sdb is obviously the drive I have qubes installed on -- You received this message because you are subscribed to the Google Groups "qubes-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to qubes-users+unsubscr...@googlegroups.com. To post to this group, send email to qubes-users@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/qubes-users/81fe8b89-3689-4331-8635-a374c5899fd3%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.