On Wed, Jun 15, 2016 at 11:59 PM, Allan Zhang <allan@azic.ca> wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Matt,

just curious, is there any reason you chose a MBR +UEFI boot?


Surely your laptop came with Windows, which mandates that GPT accompanies UEFI.
 
I think because this was (is!) my first UEFI laptop and I was unfamiliar with GPT when I first partitioned the disk. I wiped windows right away so tha wasn't an issue for me.  It was also my first Arch install, so there were a number of unfamiliar elements, and I stuck to what I knew where I could.

Could you have used your M.2 for swap?

I certainly expected to. On boot, the kernel seemed to have trouble finding the M.2 device, and I couldn't immediately tell what the problem was, so it seemed easiest to make space on the old drive and put the swap there. 

As for suspend to RAM, aka regular suspend, I find my Thinkpad does not live for too long (a few hours) in this state, evident by the "i" LED not blinking anymore. It's very strange that you have to remove the battery though.
 
I don't think those two issues are the same. The battery doesn't drain out on my laptop; instead, I think something goes wrong in the electronics of the power circuitry. I'm not sure what causes it but there are reports of similar behaviour online.

Also, wouldn't suspending to RAM defeat the purpose of your encrypted disk?
 
...  yeeeeesssss...  though since I'm not encrypting the suspend2disk image either, that is at least as big an issue as s2ram, I suppose.  In general it seems to me that best practices are still hard to implement fully unless you're willing to devote a fair amount of time to develoing the necessary expertise. 

- -------- Original Message --------
From: Matt Price via talk <talk@gtalug.org>
Sent: June 15, 2016 9:22:13 PM EDT
Cc: GTALUG Talk <talk@gtalug.org>
Subject: Re: [GTALUG] Thinkpad [3]: Aligning size of dm-crypt and       partition/filesystem

On Wed, Jun 15, 2016 at 5:59 PM, o1bigtenor <o1bigtenor@gmail.com> wrote:

> On Wed, Jun 15, 2016 at 9:43 AM, Matt Price via talk <talk@gtalug.org>
> wrote:
> > Final question! In order to enable suspend to disk, I ended up shrinking
> my
> > root partition (I also added an M.2 SSD, so the whole thing was a bit
> > complex). In the end I got it to work, but I made some kind of an error
> and
> > currently my on-disk “crypt” is a little larger than the partition and
> file
> > system that I am using for root, so I have some wasted space on the disk:
> >
> > ➜  ~ sudo fdisk /dev/sda
> >
> > Command (m for help): p
> > Disk /dev/sda: 238.5 GiB, 256060514304 bytes, 500118192 sectors
> > Units: sectors of 1 * 512 = 512 bytes
> > Sector size (logical/physical): 512 bytes / 512 bytes
> > I/O size (minimum/optimal): 512 bytes / 512 bytes
> > Disklabel type: gpt
> > Disk identifier: 9B4C2E92-6C7D-4C69-B67B-1823E4DB9BA6
> >
> > Device         Start       End   Sectors   Size Type
> > /dev/sda1       2048   1026047   1024000   500M EFI System
> > /dev/sda2    1026048 106907647 105881600  50.5G Linux filesystem
> > /dev/sda3  106907648 483340287 376432640 179.5G Linux LVM
> > /dev/sda4  483340288 500117503  16777216     8G Linux swap
> >
> > ➜  ~ sudo cryptsetup status cryptsetup
> > /dev/mapper/cryptsetup is active and is in use.
> >   type:    LUKS1
> >   cipher:  aes-xts-plain64
> >   keysize: 256 bits
> >   device:  /dev/sda2
> >   offset:  4096 sectors
> >   size:    105877504 sectors
> >   mode:    read/write
> >
> > Anyone out there have advice abot how to safely and reliably expand the
> > partition and the file system so that they both end precisely where the
> > crypt does?
> >
> > Thanks again guys! as always, it’s much appreciated.
> >
>
> No ideas on the other two problems but on this one I would recommend
> using something like:
>
> boot your system using a system rescue disc
>
Yes! I use the Ubuntu livecd just because it's easy to get

> adjust your partition(s)  (carefully please) using gparted
>
is that adequate? Can I be sure that the crypt and the partition match
exactly? I feel like it's somewhat difficult to measure the size & extent
of a crypt in units that gparted also understands

> close
>
> reboot as regular
>
> Should be real easy (assuming that the empty space is right beside
> where you want it.
> Recommend a backup before but then you already know that - - yes?
>
yes... though I don't always follow recommendations.

>
> Let us know what you use
>


- ------------------------------------------------------------------------

- ---
Talk Mailing List
talk@gtalug.org
https://gtalug.org/mailman/listinfo/talk
-----BEGIN PGP SIGNATURE-----

iQI5BAEBCgAjHBxBbGxhbiBaaGFuZyA8YWxsYW5AYXppYy5jYT4FAldiJB4ACgkQ
lQhQ+uFN8kNrPw/+OKK3a5w8oAK3ElJ5CBEyy9Hk+1BSvd+24t04v0yZGejlIBMB
QzJCnpG2FTvQ/Knjr4glTjCGNSXKkMZPdlxD3Jv+laFmMscg9Ohq8aoKO23gGtvQ
yqu9wxXVW1p94RaS5qhkO67QZyPnOB31vZJusnI8uFD4QGa7hASVA1FMnly70Uk6
finTa3YoQJ0fuLwS+DuVjvD1RHpc8qnM2+LpnlRw6djUilYqMYcRw8aXrApJrhKO
NsImN45XHIRQL7tbaDtGfJIlbr5CB5OvG8Fyi7baL2qDZCiGjKAWy4STFikDM/W2
7ulDIgthYrWMZkqJg+6sYtcP6GJ7IUrRMpDmEaf8RRqiEhBryCRt8ECh9LkvPIG7
O+WytW0PIXMLyHWMbGqu3d1PknkDtk2OXcyG2TFqgQqcQxK7x0DtMTBddOwu4OPB
Dfq8YHEriTA1K2y3GgewC3OJcrnmwCYqeu0vnfQSawf9bScLh3PgG4M9tFhE34lk
nNBXaa1i/H2tkQNPf9pA1uvrCdDLBKoR+IwWXTzCFzWXPgb21FwJ0nCNoWfreKBE
sGvIliCuo81L4RRIjDQd/UZendyyDNrzP9bnzxPu+Upq2eIFSd995IymwepEiA41
v/Vn27qzEdPKTwiixDpF1q/LOFs2u4yYUhVlcJ85qZyoJcqVhfQGq6SJS4U=
=ScN/
-----END PGP SIGNATURE-----