Without Adding New Storage Capacity, How Do You Create a Partition?

Problem scenario
You have no new physical disks, but you want to partition an existing Linux system. What do you do to benefit from logical partitions on an existing Linux machine?

Solution (with important warning)

WARNING: THIS CAN MAKE YOUR LINUX MACHINE UNBOOTABLE.

DON'T DO IT UNLESS YOU KNOW WHAT YOU ARE DOING.
(The solution below was influenced by this external site.)

sudo fdisk -l

You should see something like this:
Device       Start      End  Sectors Size Type
/dev/sdc4     2048     4095     2048   1M BIOS boot
/dev/sdc5     4096  2101247  2097152   1G Linux filesystem
/dev/sdc6  2101248 20969471 18868224   9G Linux filesystem

Run this:
sudo fdisk /dev/sdc6

Respond to the prompts: n for new. Use "e" for extended. Accept the default patition number and First sector. For the Last sector use +200M or +2G (the number of MB or GB you want the partition to have). If you get a prompt about removing the ext4 signature, we recommend responding with "N" so you do not change it. Use the "w" response at the end to save it. You'll need to reboot the server.

Here are commands and output that you may see:

jdoe@ubuntuserver:~$ sudo fdisk /dev/sda3

Welcome to fdisk (util-linux 2.34).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

The old LVM2_member signature will be removed by a write command.

Device does not contain a recognized partition table.
Created a new DOS disklabel with disk identifier 0x73327c7c.

Command (m for help): 2           
2: unknown command

Command (m for help): n
Partition type
   p   primary (0 primary, 0 extended, 4 free)
   e   extended (container for logical partitions)
Select (default p): e
Partition number (1-4, default 1): 
First sector (2048-18868223, default 2048): 
Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-18868223, default 18868223): +1G

Created a new partition 1 of type 'Extended' and of size 1 GiB.
Partition #1 contains a ext4 signature.

Do you want to remove the signature? [Y]es/[N]o: Y           

The signature will be removed by a write command.

Command (m for help): q

jdoe@ubuntuserver:~$ sudo parted -l

How Do You Troubleshoot the OpenVPN Issue “insufficient key material or header text not found in file”?

Problem scenario
You get an error message when you run openvpn. You are trying to start the client service. You get "insufficient key material or header text not found in file". What should you do?

Possible Solution #1
Backup your client.conf file.

Find your tls-crypt.key file. If you have none, run this:

openvpn --genkey --secret /etc/openvpn/tls-crypt.key

Copy every line in the tls-crypt.key file and paste it into a particular location of the client.conf file. The client.conf file should have a tag. The content should go on the line below. This way what you paste will end above the tag.

This answer is a presentation that was adapted from this website.

Possible Solution #2
Reinstall OpenVPN on the server and on the client. Completely start over.

What Is the Difference between the wheel Group and the admin Group?

Problem scenario
You have seen Linux distributions use wheel whereas some use admin. What is the difference?

Solution
For most purposes, there is no difference.

Many RedHat distributions use wheel (per page 429 of Fedora and RedHat by Sobell).

Ubuntu uses wheel (per this posting).


To add a Linux user to a sudoers file, see this posting. For the correct command to modify the sudoers file, see this posting. If you want to learn about how to modify the sudoers file, see this internal posting. If you need help troubleshooter a modified sudoers file, see this internal posting.

How Do You Get Sunglasses That Do Not Fog Up?

Problem scenario
You have tried different anti-fog sprays on sunglasses. Your sunglasses still fog up when you exercise. What should you do?

Solution
Find sunglasses that have a form factor that allows for more air. They do not wrap completely around your eyes, but they will provide protection as sunglasses. With more air to get around the inside of the lenses, they will not fog up as much.

When browsing for the right pair, look at the pictures carefully to find frames that allow for more space between your face and the inside. There can be tradeoffs with protecting your eyes and allowing air in when working out.

What Is the Default Format for cryptsetup?

Question
You ran some cryptsetup commannds. You passed no --type flag. Was the format luks1 or luks2 or something else?

Answer
luks2.

…more recent Ubuntu releases default to version 2 ("luks2").

https://help.ubuntu.com/community/Full_Disk_Encryption_Howto_2019

As of 2022, you may want to use luks2 when you can -- but do not assume you can. That is, sometimes you still need to use luks1. (See the above link as an example of when you need to use luks1.) Another external page that discusses this is here.

Also the mkfs.vfat -F 16 -n EFI-SP ${DEVP}3 command in the above directions may be wrong. You may need to find the /dev/mapper/foobar value. Run this: ls /dev/mapper/ Which of those files is the correct one you want to make a file system on? You may need to change ${DEVP}3 with the full path /dev/mapper/foobar (where /dev/mapper/foobar is the intended file system).

How Do You Deal with Hamstring Pain?

Problem scenario
You have been sitting for a long time (either driving or using a computer). Now a hamstring is hurting whenever you sit. What should you do?

Possible Solution #1
Talk to a medical doctor about your condition.

Possible Solution #2
You may want an ottoman to stretch your hamstrings while sitting. Some are hollow that can act as a box to not use too much real estate under your desk or in your living room.

Possible Solution #3
To stand more frequently, you could buy a sit-stand table also known as a standing desk. Be aware that the more affordable sit-stand tables may have some potential disadvantages. The tabletops themselves may have seams (to make it easy to transport by having possibly three of four different panels that are assembled); you may want a mousepad or a clipboard to mitigate the seam on the surface of the table. Some affordable models may not go down as far as you would like when you adjust the height.

Possible Solution #4
Stretch your hamstrings and stand more frequently. Are you using a treadmill regularly? It may help to walk/run on real ground.

Possible Solution #5
Be careful to not injure yourself; you may want to do the splits if you can. You may want to start slowly on a bed. It can help you stretch better than if you were just doing conventional stretches. Here are videos to help you:

https://www.youtube.com/watch?v=AgpKg5B_L_4&t=55s
https://www.youtube.com/watch?v=D2jX4sG46YE

Disclaimer: This is not a substitute for medical advice. This informational only.

Is it Adelman or Adleman?

Question
You know about RSA (Rivest, Shamir, Adelman) encryption. Asymmetric encryption and RSA specifically are regularly used in the I.T. industry. But when you search on the internet, you find many different spellings of Adelman (such as Adleman). Which is the correct spelling?

Answer
It is Adelman. The sources include page 648 of RHCSA/RHCE Linux Certification Study Guide Sixth Edition by Jang (McGrawHill) and this external site.

How Do You Troubleshoot “TLS Error: TLS key negotiation failed to occur TLS handshake failed”?

Problem scenario
You have a Linux server with the openvpn binary command installed. You try to start the OpenVPN client service. You see this message: "TLS Error: TLS key negotiation failed to occur TLS handshake failed."

What should you do?

Solution
Reinstall and reconfigure the OpenVPN server. Just completely start over.
You may want to try this: https://www.cyberciti.biz/faq/howto-setup-openvpn-server-on-ubuntu-linux-14-04-or-16-04-lts/