Friday, May 23, 2025

How to setup encrypted external hdd/sdd in linux

It is pretty much required to save your files in a encrypted way for security and privacy reason. IT infrastructure should offer this in the most easiest way. Though all hard disk vendors provide this kind of encryption, it would involve the use of a software distributed by the vendor and moreover, it would work only with Windows systems. I was on the lookout for a pretty robust and straight forward method to used it in an external hard disk. I got all the methods from this link below. 

https://linux.fernandocejas.com/docs/how-to/encrypt-an-external-hard-drive

lsblk

lsblk - lists block devices

RECOMMENDED: Wipe all file systems and data from the hard drive

sudo wipefs -a /dev/sda

Run cryptsetup to create the encrypted partition (it would be mostly installed, otherwise install it)

sudo cryptsetup --verbose --verify-passphrase luksFormat /dev/sda

Open the encrypted partition

sudo cryptsetup luksOpen /dev/sda sda

Create a new filesystem on the encrypted partition

I chose F2FS which is Flash-Friendly File System developed by Samsung. 

F2FS stands for Flash-Friendly File System. As the name suggests, F2FS is designed for flash-based storage, such as SD cards, eMMC modules, and flash drives. F2FS will achieve better performance and extend the lifetime of flash-based storage in many cases compared to other traditional file systems, such as ext4 or XFS. The F2FS format is especially useful on single-board devices (like Raspberry Pi, RockPro64, etc.) that boot from an SD card or an eMMC module. Many Android devices use F2FS too.

Install f2fs-tools

sudo apt-get install f2fs-tools

Format in f2fs

sudo mkfs.f2fs /dev/mapper/sda

Make a label for the hdd, I call it samsung

sudo mkfs.f2fs -l samsung /dev/mapper/sda

By default, some space has been reserved, but if you don’t intend to run a system from the hard drive, you can remove it to have slightly more space on the hard drive.

sudo tune2fs -m 0 /dev/mapper/sda

Now make the partition writable 

sudo chmod +Rv /media/sid/3cd11ec2-a30d-4eb8-a24f-ddce6d1ef5f3/

Now you can write anything with the file explorer

sudo cryptsetup luksClose sda

Eject and remove the hdd

To open again 

sudo cryptsetup luksOpen /dev/sda sda

Or while mounting your GUI will open a dialog box to enter your encryption password to open the folder. Using open source tools to encrypt the hard disk can be reliable. 

Friday, April 18, 2025

Kubuntu 25.04 Plucky Puffin review

A blog post after almost 8 years, in my Linux Experimentation Blog. The latest release of Plucky Puffin made me so elated to write this Blog Post as a review of the Kubuntu 25.04 which is codenamed Plucky Puffin. A longtime Linux user and a KDE fan, I have mostly used Kubuntu or Debian KDE. 

Of late, I have been using Kubuntu as my daily driver for almost two years on my Asus Zenbook UX3402ZA. I am an adventurous Linux distro user, not hesitating to use beta versions, but my age and focus in life currently, prevents me to do so. However, the youth in was ailing to test the latest KDE 6 iteration. However, I had to wait till the latest Ubuntu release 25.04 which would allow me to use the polished KDE 6.3 version which I was longing for. I was waiting for the 17th of April to arrive in my calendar, often checking the news for the release of 25.04 version of Ubuntu. I live in India and I got the version update notification at around 9.30 pm on my laptop. I had my hard disk to the brim,  so had to delete a few large video files to allow space for the upgrade. 

The GUI upgrade tool had some glitches and threw up a few errors. So I took the command line route for the install. The updater showed an upgrade of around 2400 packages to be upgraded, some additional packages to be added and a few packages to be removed. I started with "Y" and waited anxiously. Despite my fast home broadband, the in.archive.ubuntu.com servers were probably a bit slow and it took a lot of time downloading packages. The downloads lasted for about an hour and then the unpacking and installing took about 45 minutes. I booted in to my new system, but I was shocked to enter a non-responsive system. The window manager was lightdm or something. I had to login to the cli, install Kubuntu system and then set the windowing system to sddm and then to Plasma X11. With my Linux expertise and web searching I fix all the glitches and enter in to the shiny new KDE system.

After login and first install, I was taken aback but the aesthetics of the system. I felt so proud and happy to use such a sweet OS. In today's age of Apps and AI, the operating system is no longer a matter. And, Linux has come a long way, its a highly mature and stable and user-friendly system. But I am proud to  Linux which gives me the freedom and a lot of choices. I am not tied to a corporate OS like Windows or Mac which decides what's good for you and changes its policies at its whims. Their decisions are mostly dumb in my opinion. On the contrary, the Linux desktop has reached such a maturity, stability, beauty and ease of use and Kubuntu 25.04 is a testimony to it. In my opinion, it's the most beautiful desktop in the world and I feel elated to use it. The Breeze icons look gorgeous, the font rendering is so good. There are no glitches whatsoever. My favourite desktop enviroment, KDE has reached its pinnacle and I wonder what more would be there to improve. However, as any human endeavour, computing never ceases to evolve. Computing has changed a lot in the long years since I have been using it. My daughter who is 7, is a different a kind of user, she has started her computing in the age of tablets and apps. Her understanding and her vision of the computing platform would be much different.  I am still wondering, how the open source platform and KDE in particular will handle AI and VR and the ever changing forms of computing in the years to come. 



The KDE 6.3 desktop with its default wallpaper. 
 



The KDE 6.3 control center in the Breeze Dark Theme


Kubuntu 25.04 Plucky Puffin with KDE Plasma version and Linux version details