I'm trying to use a Debian network cd to install it, via the advanced graphical installer. I want to use the full-disk encryption option, but I'm trying to install it on an older machine. I think it has about 1GB of RAM. I installed Pop!_OS on it, and it ran fast enough, as I could specify a decent swapfile size, but try as I might, I couldn't get it to find a graphics driver that would give me anything but a 640 screen resolution. (Debian found a great video driver, FWIW).
When I use the guided setup for an encrypted whole disk on an LVM volume, it gives me a tiny 1.1 GB encrypted swap partition. It installs fine, and seems to run, but when I start to use the Software Center, pretty soon it just starts to grind and grind on the swapfile.
If I try to shrink one of the big LVM partitions, I can't in gparted, since it tells me it is in use. I've tried command-line approaches, but they fail; and are extremely frustrating. If I boot on a Debian Live DVD, first must do sudo apt-get update
, which takes a while, and then sudo apt-get crypt-setup and lvm2
in order to mount them. Nothing in the Debian docs told me how, but this Ubuntu page describes one method: Resize encrypted partitions
If I pause anytime for very long during this process, the monitor goes dark, and when I press a key, the screen presents me with my nice desktop, only to grind on the live DVD for about 5 minutes, and finally show me a nice, colorful wallpaper, and grind for about 20 minutes or more, before showing me a prompt that it has been locked, and it asks me for a password; which I never knew, but found out that it is "live".
If I tried actually carrying out the commands, I think it was on the e2fsck
command, or the resize2fs
didn't work. I forget the exact error.
I tried making the partition smaller, using only 130GB of a 160GB HD, and then expanding it with the instructions from How to enlarge encrypted swap partition? (sic), but it failed on the mkswap
command, since the volume was in use. I tried using the live DVD, but gave up in frustration after it locked the screen again.
I went back to fight with the graphic installer, but once I told it to use guided full-disk encryption, it insisted on giving me a 1.1 GB swap partition. When I tried to reduce the size of the main LVM partition, it gave me the clever "No modifications can be made to this device ...", "In use by LVM Volume Group XXX". If I try to double-click on the 158 GB ext4 partition, there's nothing there that lets me reduce its size, to make room for a reasonably-sized swap-file. If I try to do a manual partition setup, and try to create partitions like it has with the guided LVM encrypted setup, I can't get them the same way.
I think a 30 or 40 GB swapfile for Linux is a lot more realistic - especially since e.g. Linux Performance: Why You Should Almost Always Add Swap Space | Hacker News details how awfully Linux behaves when it is out of swapfile space: it's almost always a hard reboot. Open too many tabs in your browser, or run an application that uses too much data, and there you are.
I'm sure it must be possible. I'd hate to think that an encrypted volume on Debian is simply impractical unless one has huge amounts of RAM. I'm sure it could be done from the command line, but I think it would be a longer timewaster than I have been on now (around two weeks on this so far), to set it up.
I'm sure it's not impossible, but is there a way to set up an encrypted volume on Debian through the graphical installer, with maybe a few commands I can execute afterwards, or from the Debian Live DVD (which as above, lacks so much as a partition manager!!!)? Perhaps a Kali Linux live disk wouldn't give me so much heartache if I tried to use it after-the-fact. Maybe somebody can give me command-line instructions that will do this in Debian. The swapfile should be encrypted, too, of course. Otherwise, it would defeat the point of encryption.
EDIT:
I tried to manually create the partitions. I created a root partition, and made it bootable, although I'm not sure what size it should be. I suppose I could learn its size from a guided partition.
I created a encrypted partition with all the remaining space on the disk. I then created a volume group within it. However, I wasn't able to create a partition within it, much less specify that that's where the bulk of the OS should be installed; nor create a swap partition within the volume group. It says the volume is part of a volume group already. Without a volume group, I was likewise not able to create partitions within the encrypted partition.
EDIT 2:
The solution was to use manual partition configuration in the graphic installer. I had to create the boot partition outside the encrypted volume, create an encrypted volume with the rest of the disk, make an LVM group in the encrypted volume thus created, and then create the root and other volumes within the volume group.
I made a 30GB swap partition since Linux has no well-maintained truly dynamic swapfile manager (although I may try my luck with swapspace); and Linux is useless once the swap partition is used up - worse than Windows when there is no more space on the disk for the swapfile. Without a huge swap partition, just open a lot of tabs, a really large spreadsheet and a really large log file, and you may be forced to do a hard reboot as the HD grinds and grinds and grinds.
I'm sporting a whopping 1GB RAM on a Pentium Dual E2200 on my server computer! It'll make a nice small server in addition to my main desktop one.
I chose not to install any desktop, but just the tools and servers; and then upon reboot, I did
apt-get update
apt-get install plasma-desktop
apt-get install sddm
because I don't want the default bloatware. I made sure I can log in as su, since I can do su
and log in on the console to install stuff system-wide (i.e., for all users; otherwise, I might be locked out of su access). The biggest problems is that Discover(=Software Center) runs too slow to be usable, and it only has picked up my MBs SPDIF audio output, not my regular audio ones yet. At least it doesn't grind the swap partition a huge amount when attempting to use Discover. However, I can install what I need via apt-get, and Konqueror and other stuff runs fine. Of course, as with many challenging problems, in retrospect, doing this doesn't seem as difficult as when I tried to do it myself without a guide. I guess that'll bring at least this extended round of distro hopping to an end :P.