The Victory Lap: 851GB shrinked drive (Stable), 323GB 4256-sector slop (Webcam Trash), screaming shrinked 978GB 2005-sector zombie (Torrent Sacrifice). Successfully built "Post-Apocalyptic" Storage Array out of pure e-waste. It's chatty, it spams errors - but it's moving 110MB/s and cost $0.
Tuesday, March 3, 2026
Saturday, January 31, 2026
Copy and boot Linux partition on same SSD disk
Install Ventoy on USB stick. https://www.ventoy.net/en/download.html
Copy Resquezilla.ISO to USB flash drive. https://rescuezilla.com/download
Boot from USB stick and choose Resquezilla.ISO.
BACKUP PARTITIONS BEFORE DOING ANYTHING!
Close Resquezilla and open PartedMagic. https://partedmagic.com/
Resize necessary partition, making space for copy.
Copy selected partition.
Delete original partition.
Reboot
DO EVERYTHING AT YOUR OWN RISK!
blkid
lsblk -o NAME,SIZE,FSTYPE,MOUNTPOINTS,UUID,PARTUUID
lsusb
mount
sudo fdisk -l
sudo hdparm -i /dev/sda
Friday, January 30, 2026
Create SSD disk image & restore clone on Kubuntu
Rescuezilla is widely considered the best choice because it provides a modern graphical interface (GUI) while remaining fully compatible with Clonezilla, the industry standard for disk imaging.
Why it's better than others: Unlike built-in tools like dd, Rescuezilla handles partition resizing, skips unused space to save time/storage, and is highly unlikely to fail due to simple user errors.
Emergency Readiness: The resulting image file can be restored to a brand-new SSD of equal or larger size, and your system will boot exactly as it did before.
Saturday, January 17, 2026
Scanning HDD surface test on Linux
To scan the surface of a hard disk drive (HDD) for bad sectors in the Ubuntu terminal, the most direct command-line tool is **`badblocks`**. It performs a thorough surface scan by reading (and optionally writing) to every block on the drive.
Friday, January 16, 2026
smartctl do not show all SMART parameters for USB-drive
smartctl often shows fewer or limited SMART parameters for USB-connected drives (external HDDs/SSDs in enclosures or via adapters) compared to internal SATA/NVMe drives. This happens mainly because USB drives use a bridge chip (USB-to-SATA or USB-to-NVMe) that translates commands between USB (typically SCSI-based) and the internal drive's ATA/NVMe protocol.
Monday, June 2, 2025
Ubuntu GRUB not loading - boot manager repair
1. Check if Linux is in MB BIOS. Del or F11 and choose boot priority: 1. Ubuntu, 2. Windows.
2. If no GRUB (GRand Unified Bootloader), boot Linux from MB boot menu F11.
3. No boot from /boot/efi partition? Boot from USB drive > Try Kubuntu.
Thursday, May 23, 2024
rsync backup synchronization script
cd /home/user/
mkdir .backup
touch folders.txt // include folders in column folder1 folder2 folder3
touch backup.sh
#!/bin/bash
# Define the source and destination base directories
src_base="/media/user/disk1"
dest_base="/media/user/disk2/backup"
# Define the list of folders to copy
folder_list="folders.txt"
# Define the rsync options, including --delete to remove files not present in the source
rsync_opts="-rahP --inplace --info=progress2 --stats -u --delete"
# Loop through each folder in the list
while IFS= read -r folder; do
# Check if the folder path is not empty
if [ -n "$folder" ]; then
echo "Processing folder: $src_base/$folder => $dest_base/$folder"
# Perform the rsync operation
rsync $rsync_opts "$src_base/$folder/" "$dest_base/$folder/"
fi
done < "$folder_list"
chmod +x backup.sh
./backup.sh
cp -ruv /home/user/ /media/user/disk2
Saturday, July 15, 2023
Toshiba DT01ACA200 SMART
smartctl --all /dev/sda (Prints all SMART information)
smartctl 7.3 2022-02-28 r5338 [x86_64-linux-5.19.0-46-generic] (local build)
Copyright (C) 2002-22, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF INFORMATION SECTION ===
Model Family: Toshiba 3.5" DT01ACA... Desktop HDD
Device Model: TOSHIBA DT01ACA200
Serial Number: #########
LU WWN Device Id: 5 000039 ff3e0f0aa
Firmware Version: MX4OABB0
User Capacity: 2,000,398,934,016 bytes [2.00 TB]
Sector Sizes: 512 bytes logical, 4096 bytes physical
Rotation Rate: 7200 rpm
Form Factor: 3.5 inches
Device is: In smartctl database 7.3/5319
ATA Version is: ATA8-ACS T13/1699-D revision 4
SATA Version is: SATA 3.0, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is: Sat Jul 15 22:29:35 2023 EEST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: FAILED!
Drive failure expected in less than 24 hours. SAVE ALL DATA.
See vendor-specific Attribute list for failed Attributes.
General SMART Values:
Offline data collection status: (0x84) Offline data collection activity
was suspended by an interrupting command from host.
Auto Offline Data Collection: Enabled.
Self-test execution status: ( 0) The previous self-test routine completed
without error or no self-test has ever
been run.
Total time to complete Offline
data collection: (14822) seconds.
Offline data collection
capabilities: (0x5b) SMART execute Offline immediate.
Auto Offline data collection on/off support.
Suspend Offline collection upon new
command.
Offline surface scan supported.
Self-test supported.
No Conveyance Self-test supported.
Selective Self-test supported.
SMART capabilities: (0x0003) Saves SMART data before entering
power-saving mode.
Supports SMART auto save timer.
Error logging capability: (0x01) Error logging supported.
General Purpose Logging supported.
Short self-test routine
recommended polling time: ( 1) minutes.
Extended self-test routine
recommended polling time: ( 247) minutes.
SCT capabilities: (0x003d) SCT Status supported.
SCT Error Recovery Control supported.
SCT Feature Control supported.
SCT Data Table supported.
SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
1 Raw_Read_Error_Rate 0x000b 070 070 016 Pre-fail Always - 181274516
2 Throughput_Performance 0x0005 139 139 054 Pre-fail Offline - 72
3 Spin_Up_Time 0x0007 127 127 024 Pre-fail Always - 296 (Average 299)
4 Start_Stop_Count 0x0012 100 100 000 Old_age Always - 3238
5 Reallocated_Sector_Ct 0x0033 001 001 005 Pre-fail Always FAILING_NOW 2005
7 Seek_Error_Rate 0x000b 100 100 067 Pre-fail Always - 0
8 Seek_Time_Performance 0x0005 124 124 020 Pre-fail Offline - 33
9 Power_On_Hours 0x0012 096 096 000 Old_age Always - 32025
10 Spin_Retry_Count 0x0013 100 100 060 Pre-fail Always - 0
12 Power_Cycle_Count 0x0032 100 100 000 Old_age Always - 2840
192 Power-Off_Retract_Count 0x0032 097 097 000 Old_age Always - 4030
193 Load_Cycle_Count 0x0012 097 097 000 Old_age Always - 4030
194 Temperature_Celsius 0x0002 240 240 000 Old_age Always - 25 (Min/Max 14/52)
196 Reallocated_Event_Count 0x0032 001 001 000 Old_age Always - 2598
197 Current_Pending_Sector 0x0022 100 100 000 Old_age Always - 0
198 Offline_Uncorrectable 0x0008 100 100 000 Old_age Offline - 0
199 UDMA_CRC_Error_Count 0x000a 200 200 000 Old_age Always - 0
SMART Error Log Version: 1
ATA Error Count: 4
CR = Command Register [HEX]
FR = Features Register [HEX]
SC = Sector Count Register [HEX]
SN = Sector Number Register [HEX]
CL = Cylinder Low Register [HEX]
CH = Cylinder High Register [HEX]
DH = Device/Head Register [HEX]
DC = Device Command Register [HEX]
ER = Error register [HEX]
ST = Status register [HEX]
Powered_Up_Time is measured from power on, and printed as
DDd+hh:mm:SS.sss where DD=days, hh=hours, mm=minutes,
SS=sec, and sss=millisec. It "wraps" after 49.710 days.
Error 4 occurred at disk power-on lifetime: 32022 hours (1334 days + 6 hours)
When the command that caused the error occurred, the device was active or idle.
After command completion occurred, registers were:
ER ST SC SN CL CH DH
-- -- -- -- -- -- --
40 51 50 30 cd 73 08 Error: UNC at LBA = 0x0873cd30 = 141806896
Commands leading to the command that caused the error were:
CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
-- -- -- -- -- -- -- -- ---------------- --------------------
60 50 28 30 cd 73 40 08 00:01:48.986 READ FPDMA QUEUED
60 08 20 08 cd 73 40 08 00:01:45.998 READ FPDMA QUEUED
60 08 68 00 cd 73 40 08 00:01:42.921 READ FPDMA QUEUED
60 08 60 00 54 5a 40 08 00:01:42.861 READ FPDMA QUEUED
60 08 58 f8 cc 73 40 08 00:01:39.840 READ FPDMA QUEUED
Error 3 occurred at disk power-on lifetime: 32022 hours (1334 days + 6 hours)
When the command that caused the error occurred, the device was active or idle.
After command completion occurred, registers were:
ER ST SC SN CL CH DH
-- -- -- -- -- -- --
40 51 08 f0 cc 73 08 Error: UNC at LBA = 0x0873ccf0 = 141806832
Commands leading to the command that caused the error were:
CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
-- -- -- -- -- -- -- -- ---------------- --------------------
60 08 68 f0 cc 73 40 08 00:01:32.621 READ FPDMA QUEUED
ef 10 02 00 00 00 a0 08 00:01:32.600 SET FEATURES [Enable SATA feature]
27 00 00 00 00 00 e0 08 00:01:32.600 READ NATIVE MAX ADDRESS EXT [OBS-ACS-3]
ec 00 00 00 00 00 a0 08 00:01:32.597 IDENTIFY DEVICE
ef 03 46 00 00 00 a0 08 00:01:32.597 SET FEATURES [Set transfer mode]
Error 2 occurred at disk power-on lifetime: 32022 hours (1334 days + 6 hours)
When the command that caused the error occurred, the device was active or idle.
After command completion occurred, registers were:
ER ST SC SN CL CH DH
-- -- -- -- -- -- --
40 51 08 f0 cc 73 08 Error: UNC at LBA = 0x0873ccf0 = 141806832
Commands leading to the command that caused the error were:
CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
-- -- -- -- -- -- -- -- ---------------- --------------------
60 08 a8 f0 cc 73 40 08 00:01:28.814 READ FPDMA QUEUED
ef 10 02 00 00 00 a0 08 00:01:28.814 SET FEATURES [Enable SATA feature]
27 00 00 00 00 00 e0 08 00:01:28.814 READ NATIVE MAX ADDRESS EXT [OBS-ACS-3]
ec 00 00 00 00 00 a0 08 00:01:28.812 IDENTIFY DEVICE
ef 03 46 00 00 00 a0 08 00:01:28.812 SET FEATURES [Set transfer mode]
Error 1 occurred at disk power-on lifetime: 32022 hours (1334 days + 6 hours)
When the command that caused the error occurred, the device was active or idle.
After command completion occurred, registers were:
ER ST SC SN CL CH DH
-- -- -- -- -- -- --
40 51 30 00 cd 73 08 Error: UNC at LBA = 0x0873cd00 = 141806848
Commands leading to the command that caused the error were:
CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
-- -- -- -- -- -- -- -- ---------------- --------------------
60 40 48 f0 cc 73 40 08 00:01:18.230 READ FPDMA QUEUED
60 08 20 68 f1 ad 40 08 00:01:18.216 READ FPDMA QUEUED
60 00 18 18 5f bd 40 08 00:01:17.959 READ FPDMA QUEUED
60 00 10 18 5e bd 40 08 00:01:17.958 READ FPDMA QUEUED
60 00 08 18 5d bd 40 08 00:01:17.958 READ FPDMA QUEUED
SMART Self-test log structure revision number 1
No self-tests have been logged. [To run self-tests, use: smartctl -t]
SMART Selective self-test log data structure revision number 1
SPAN MIN_LBA MAX_LBA CURRENT_TEST_STATUS
1 0 0 Not_testing
2 0 0 Not_testing
3 0 0 Not_testing
4 0 0 Not_testing
5 0 0 Not_testing
Selective self-test flags (0x0):
After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.
Wednesday, January 11, 2023
Seagate ST980813ASG SMART
smartctl --all /dev/sda (Prints all SMART information)
smartctl 7.3 2022-02-28 r5338 [x86_64-linux-5.19.0-15-generic] (local build)
Copyright (C) 2002-22, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF INFORMATION SECTION ===
Model Family: Seagate Momentus 7200.2
Device Model: ST980813ASG
Serial Number: ########
Firmware Version: 3.ADD
User Capacity: 80,026,361,856 bytes [80.0 GB]
Sector Size: 512 bytes logical/physical
Device is: In smartctl database 7.3/5319
ATA Version is: ATA/ATAPI-7 (minor revision not indicated)
Local Time is: Wed Jan 11 17:43:23 2023 UTC
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: FAILED!
Drive failure expected in less than 24 hours. SAVE ALL DATA.
See vendor-specific Attribute list for failed Attributes.
General SMART Values:
Offline data collection status: (0x82) Offline data collection activity
was completed without error.
Auto Offline Data Collection: Enabled.
Self-test execution status: ( 119) The previous self-test completed having
the read element of the test failed.
Total time to complete Offline
data collection: ( 426) seconds.
Offline data collection
capabilities: (0x5b) SMART execute Offline immediate.
Auto Offline data collection on/off support.
Suspend Offline collection upon new
command.
Offline surface scan supported.
Self-test supported.
No Conveyance Self-test supported.
Selective Self-test supported.
SMART capabilities: (0x0003) Saves SMART data before entering
power-saving mode.
Supports SMART auto save timer.
Error logging capability: (0x01) Error logging supported.
General Purpose Logging supported.
Short self-test routine
recommended polling time: ( 2) minutes.
Extended self-test routine
recommended polling time: ( 84) minutes.
SCT capabilities: (0x0035) SCT Status supported.
SCT Feature Control supported.
SCT Data Table supported.
SMART Attributes Data Structure revision number: 10
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
1 Raw_Read_Error_Rate 0x000f 100 253 006 Pre-fail Always - 0
3 Spin_Up_Time 0x0003 099 099 085 Pre-fail Always - 0
4 Start_Stop_Count 0x0032 099 099 020 Old_age Always - 1480
5 Reallocated_Sector_Ct 0x0033 001 001 036 Pre-fail Always FAILING_NOW 31952
7 Seek_Error_Rate 0x000f 081 060 030 Pre-fail Always - 8853334264
9 Power_On_Hours 0x0032 081 081 000 Old_age Always - 17405
10 Spin_Retry_Count 0x0013 100 100 034 Pre-fail Always - 0
12 Power_Cycle_Count 0x0032 098 098 020 Old_age Always - 2079
187 Reported_Uncorrect 0x0032 001 001 000 Old_age Always - 5259
189 High_Fly_Writes 0x003a 098 098 000 Old_age Always - 2
190 Airflow_Temperature_Cel 0x0022 060 031 045 Old_age Always In_the_past 40 (Min/Max 24/43)
191 G-Sense_Error_Rate 0x0032 100 100 000 Old_age Always - 10
192 Power-Off_Retract_Count 0x0032 100 100 000 Old_age Always - 1844
193 Load_Cycle_Count 0x0022 001 001 000 Old_age Always - 234936
194 Temperature_Celsius 0x001a 040 069 000 Old_age Always - 40 (0 12 0 0 0)
195 Hardware_ECC_Recovered 0x0012 073 061 000 Old_age Always - 137350076
197 Current_Pending_Sector 0x0010 100 097 000 Old_age Offline - 11
198 Offline_Uncorrectable 0x003e 100 097 000 Old_age Always - 11
199 UDMA_CRC_Error_Count 0x0000 200 200 000 Old_age Offline - 1
200 Multi_Zone_Error_Rate 0x0032 100 253 000 Old_age Always - 0
202 Data_Address_Mark_Errs 0x0000 100 253 000 Old_age Offline - 0
240 Head_Flying_Hours 0x0000 000 000 000 Old_age Offline - 17217 (111 247 0)
241 Total_LBAs_Written 0x0000 000 000 000 Old_age Offline - 11734329995
242 Total_LBAs_Read 0x0000 000 000 000 Old_age Offline - 170874401
254 Free_Fall_Sensor 0x0000 001 001 000 Old_age Offline - 513
SMART Error Log Version: 1
ATA Error Count: 6887 (device log contains only the most recent five errors)
CR = Command Register [HEX]
FR = Features Register [HEX]
SC = Sector Count Register [HEX]
SN = Sector Number Register [HEX]
CL = Cylinder Low Register [HEX]
CH = Cylinder High Register [HEX]
DH = Device/Head Register [HEX]
DC = Device Command Register [HEX]
ER = Error register [HEX]
ST = Status register [HEX]
Powered_Up_Time is measured from power on, and printed as
DDd+hh:mm:SS.sss where DD=days, hh=hours, mm=minutes,
SS=sec, and sss=millisec. It "wraps" after 49.710 days.
Error 6887 occurred at disk power-on lifetime: 17395 hours (724 days + 19 hours)
When the command that caused the error occurred, the device was active or idle.
After command completion occurred, registers were:
ER ST SC SN CL CH DH
-- -- -- -- -- -- --
40 51 01 f5 d0 4f e0 Error: UNC at LBA = 0x004fd0f5 = 5230837
Commands leading to the command that caused the error were:
CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
-- -- -- -- -- -- -- -- ---------------- --------------------
42 00 01 f5 d0 4f e0 00 00:43:10.020 READ VERIFY SECTOR(S) EXT
42 00 01 f4 d0 4f e0 00 00:43:10.005 READ VERIFY SECTOR(S) EXT
42 00 02 f4 d0 4f e0 00 00:43:09.596 READ VERIFY SECTOR(S) EXT
42 00 04 f4 d0 4f e0 00 00:43:09.194 READ VERIFY SECTOR(S) EXT
42 00 04 f0 d0 4f e0 00 00:43:09.179 READ VERIFY SECTOR(S) EXT
Error 6886 occurred at disk power-on lifetime: 17395 hours (724 days + 19 hours)
When the command that caused the error occurred, the device was active or idle.
After command completion occurred, registers were:
ER ST SC SN CL CH DH
-- -- -- -- -- -- --
40 51 01 f4 d0 4f e0 Error: UNC at LBA = 0x004fd0f4 = 5230836
Commands leading to the command that caused the error were:
CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
-- -- -- -- -- -- -- -- ---------------- --------------------
42 00 01 f4 d0 4f e0 00 00:43:10.020 READ VERIFY SECTOR(S) EXT
42 00 02 f4 d0 4f e0 00 00:43:10.005 READ VERIFY SECTOR(S) EXT
42 00 04 f4 d0 4f e0 00 00:43:09.596 READ VERIFY SECTOR(S) EXT
42 00 04 f0 d0 4f e0 00 00:43:09.194 READ VERIFY SECTOR(S) EXT
42 00 08 f0 d0 4f e0 00 00:43:09.179 READ VERIFY SECTOR(S) EXT
Error 6885 occurred at disk power-on lifetime: 17395 hours (724 days + 19 hours)
When the command that caused the error occurred, the device was active or idle.
After command completion occurred, registers were:
ER ST SC SN CL CH DH
-- -- -- -- -- -- --
40 51 02 f4 d0 4f e0 Error: UNC at LBA = 0x004fd0f4 = 5230836
Commands leading to the command that caused the error were:
CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
-- -- -- -- -- -- -- -- ---------------- --------------------
42 00 02 f4 d0 4f e0 00 00:43:10.020 READ VERIFY SECTOR(S) EXT
42 00 04 f4 d0 4f e0 00 00:43:10.005 READ VERIFY SECTOR(S) EXT
42 00 04 f0 d0 4f e0 00 00:43:09.596 READ VERIFY SECTOR(S) EXT
42 00 08 f0 d0 4f e0 00 00:43:09.194 READ VERIFY SECTOR(S) EXT
42 00 10 f0 d0 4f e0 00 00:43:09.179 READ VERIFY SECTOR(S) EXT
Error 6884 occurred at disk power-on lifetime: 17395 hours (724 days + 19 hours)
When the command that caused the error occurred, the device was active or idle.
After command completion occurred, registers were:
ER ST SC SN CL CH DH
-- -- -- -- -- -- --
40 51 04 f4 d0 4f e0 Error: UNC at LBA = 0x004fd0f4 = 5230836
Commands leading to the command that caused the error were:
CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
-- -- -- -- -- -- -- -- ---------------- --------------------
42 00 04 f4 d0 4f e0 00 00:43:10.020 READ VERIFY SECTOR(S) EXT
42 00 04 f0 d0 4f e0 00 00:43:10.005 READ VERIFY SECTOR(S) EXT
42 00 08 f0 d0 4f e0 00 00:43:09.596 READ VERIFY SECTOR(S) EXT
42 00 10 f0 d0 4f e0 00 00:43:09.194 READ VERIFY SECTOR(S) EXT
42 00 10 e0 d0 4f e0 00 00:43:09.179 READ VERIFY SECTOR(S) EXT
Error 6883 occurred at disk power-on lifetime: 17395 hours (724 days + 19 hours)
When the command that caused the error occurred, the device was active or idle.
After command completion occurred, registers were:
ER ST SC SN CL CH DH
-- -- -- -- -- -- --
40 51 04 f4 d0 4f e0 Error: UNC at LBA = 0x004fd0f4 = 5230836
Commands leading to the command that caused the error were:
CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
-- -- -- -- -- -- -- -- ---------------- --------------------
42 00 08 f0 d0 4f e0 00 00:43:07.134 READ VERIFY SECTOR(S) EXT
42 00 10 f0 d0 4f e0 00 00:43:07.129 READ VERIFY SECTOR(S) EXT
42 00 10 e0 d0 4f e0 00 00:43:09.596 READ VERIFY SECTOR(S) EXT
42 00 20 e0 d0 4f e0 00 00:43:09.194 READ VERIFY SECTOR(S) EXT
42 00 20 c0 d0 4f e0 00 00:43:09.179 READ VERIFY SECTOR(S) EXT
SMART Self-test log structure revision number 1
Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error
# 1 Short offline Completed: read failure 70% 11805 116337475
# 2 Short offline Interrupted (host reset) 10% 330 -
# 3 Short offline Completed without error 00% 1 -
# 4 Short offline Completed without error 00% 0 -
SMART Selective self-test log data structure revision number 1
SPAN MIN_LBA MAX_LBA CURRENT_TEST_STATUS
1 0 0 Not_testing
2 0 0 Not_testing
3 0 0 Not_testing
4 0 0 Not_testing
5 0 0 Not_testing
Selective self-test flags (0x0):
After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.
Wednesday, September 7, 2022
Remove Snap Apps and Daemon on Kubuntu 22.10
Removing snap apps and snapd frees lot of space on HDD => + 10 GB of free space. Also it eliminates lot's of annoying mount points listed in Krusader => Ctrl+M.
snap list
sudo snap remove --purge firefox // and other applications
sudo snap remove --purge snapd
sudo apt autoremove snapd
sudo apt purge snapd // final step!!!
sudo rm -rf ~/snap /snap /var/snap /var/lib/snapd // remove associated folders
sudo nano /etc/apt/preferences.d/nosnap.pref
# To prevent repository packages from triggering the installation of snap,
# this file forbids snapd from being installed by APT.
Package: snapd
Pin: release a=*
Pin-Priority: -32768
Package: snapd
Pin: origin *
Pin-Priority: -32768
sudo apt update
apt-cache policy snapd
snapd:
Installed: (none)
Candidate: (none)
sudo apt-mark hold snapd // prevent update of already installed package
https://linuxhint.com/turn-off-snap-ubuntu/
https://hackaday.com/2020/06/24/whats-the-deal-with-snap-packages/
Tuesday, August 23, 2022
Remove unused mount point and loop
sudo rmdir /path/to/mount/point
mount
ls -la /media/user
lsblk
lsusb
sudo fdisk -l
sudo hdparm -i /dev/sda
sudo hdparm -I /dev/sda
sudo hdparm -Tt /dev/sda
cp -r -u /home/user/Documents/folder1 /home/user/Downloads/folder1
Don't care about loops.
A loop device, or it can be termed as vnode disk (vnd), and loopback file interface (lofi) is a device that helps the computer file to access block devices. Before using the dev loop, the existing file in the file system must be connected to it.
Sunday, August 14, 2022
Remove Gnome packages on Kubuntu 22.10
sudo apt remove *gnome*
After this operation, 4 110 kB disk space will be freed.
Do you want to continue? [Y/n] n
apt list | grep gnome
Free disk space on Linux system
sudo journalctl --rotate
sudo journalctl --vacuum-time=2d
journalctl --vacuum-size=100M
https://www.freedesktop.org/software/systemd/man/journald.conf.html
sudo nano /etc/systemd/journald.conf
SystemMaxUse=128M // remove # => uncomment
MaxFileSec=2day // remove # => uncomment
sudo systemctl restart systemd-journald
sudo rm /var/log/syslog.1 // 9.2 GB
rm ~/.cache/pip/
/run/log/journal
/var/log/journal
/home/user/.cache/
find ~/.cache/ -depth -type f -atime +365
find ~/.cache/ -type f -atime +365 -delete
/home/user/.wine/drive_c/users/user/Temp/ // firefox, google-chrome, thumbnails, wine, winetricks
df
du
sudo apt autoclean
sudo apt autoremove
System and hardware monitoring utilities
sudo dmesg | less
sudo dmesg | grep usb
vmstat
free // show RAM and swap usage
journalctl
lsblk
less /proc/cpuinfo
less /proc/meminfo // detailed information on memory usage
lshw // list hardware
lsusb
mount
df
du
Tuesday, August 9, 2022
Create a bootable USB stick on Linux terminal with dd
Find USB flash drive with following commands:
df
lsblk
sudo dmesg
sudo umount /dev/sdd1 - IN MY CASE!!!
sudo dd if=kubuntu-22.04-desktop-amd64.iso of=/dev/sdd1 bs=1M status=progress
Wait till finish. dd will make USB drive space equal to ISO image.
To recover all USB drive space, do following command:
sudo dd if=/dev/zero of=/dev/sdd1 status=progress
Wait till finish. ALL DATA WILL BE DELETED!!!
Format USB drive in preferred partition editor.
Thursday, September 23, 2021
Оптимальне використання дисків SMR USB
У даному випадку мова піде про 2.5” ноутбучні диски Seagate та зовнішні USB Seagate Backup Plus Drive. Усі 2.5” диски Seagate SMR. Чесно, ніколи не звертав уваги на технології запису, реалізовані в жорстких дисках. Усе, що цікавило: буфер, швидкості обертів шпинделя та читання/запису, гарантія.
Аж через 3 роки використання USB Seagate Backup Plus Drive помітив проблему: страшенне падіння швидкості запису при великих обʼємах. Особливо це проявилося на Linux, який вганяв жорсткий диск у ступор. Скасування операції копіювання на Linux ввело USB Seagate Backup Plus Drive в кому. Диск вдавалося відкачати, але це допомагало на короткий час. Подумав, що USB контролер або проблема із самим диском. Витягнув з коробки та підключив до SATA. Щось сталося із файловою системою, бо диск надто довго форматувався - 10-20 хв. Також диск гальмував завантаження ПК. Серйозна тормозуха почалася саме після скасування копіювання в терміналі, тому підозрюю Linux, але це не виправдовує Seagate з їх SMR.
Допомогло повне заповнення диска нулями.
Перший ТБ скопіювати на диск не проблема. Все дуже швидко, а далі починається... Чим менша перерва між порціями файлів, тим більше падає швидкість, і тим більше часу треба диску на “відновлення” - 10-15хв. Це проблема для USB Seagate Backup Plus Drive, оскільки після копіювання часто потрібно відключити диск і не зрозуміло, чи він ще працює. Це може викликати збої в роботі, в чому особисто переконався. Враження, наче починає глючити мікропрограма самого диска.
SMR диски можна назвати архівними пристроями для неінтенсивного користування. З читанням із ST4000LM024-2AN17V проблем не виникає, а от із копіюванням на/із нього геморой. Як на мене, SMR - гівнотехнологія, як би хто там не виправдовував економію матеріалів на 20-30%. Матеріалів менше, продуктивність гірша, ціна як за CMR/PMR - профіт! Брати такий диск під холодні архіви файлів, які рідко оновлюються, можна, а як треба переносити великі обсяги даних - до дупи, оскільки копіювати 400 ГБ 10 годин - мука. Для торрентів це барахло теж не підходить, ну, хіба під час закачки не переглядати на ньому інші файли чи папки - затримки дикі - ще такого не бачив.
При підключенні дисків Seagate Backup Plus Drive до USB, не треба їх відключати після копіювання негайно. Ідеально, коли після копіювання виключається ПК. Seagate Backup Plus Drive затримає відключення, але роботу завершить “правильно”. Після раптових відключень, перезавантажень тощо ST4000LM024-2AN17V може гальмувати всю систему: повільно монтується, повільно форматується, затримує завантаження BIOS, завантаження/перезавантаження ОС.
Новітні технології завтрашнього дня... Добре, що не продав старі диски. Нехай працюють до кінця)))
Wednesday, September 22, 2021
USB hard disk drive copy speed is very slow
-= Check whether HDD is SMR =-
lsblk
lsusb
sudo fdisk -l
sudo hdparm -i /dev/sda
sudo hdparm -I /dev/sda
sudo hdparm -Tt /dev/sda
Slow USB hard disk drive copying speed on Linux/Windows
sudo apt install smartmontools
sudo smartctl -a /dev/sdc
sudo smartctl -l
sudo smartctl -l error /dev/sdc
sudo smartctl -l devstat /dev/sdc
USB hard disk drive slows down boot and restart, works laggy, mounts long time
-= Backup all your data =-
dd if=/dev/zero of=/dev/sdc bs=4M status=progress // wipes all hdd data // 4 TB - 12 hrs
sudo apt install sg3-utils
sudo sg_raw -r 512 /dev/sdc 08 00 00 00 01 00
Create/convert table wtih GParted, AOMEI etc
Format with GParted, AOMEI etc
Test
Tuesday, September 21, 2021
Low level format & filling with zeros
sudo dd if=/dev/zero of=/dev/X bs=512 count=1 status=progress // just MBR delete
sudo dd if=/dev/zero of=/dev/X bs=4M status=progress // complete wipe
sudo dd if=/dev/zero of=/dev/X bs=4M status=progress | od | head
sudo pv -tpreb /dev/X | od | head //fill with zeros
sudo od /dev/X | head // scan for nonzero bytes
sudo badblocks -sv -t 0x00 /dev/X // check zeros
sudo badblocks -svw -t 0x00 /dev/X // check and write zeros
X - disk // sda, sdb, sdc etc
sudo dd if=/dev/zero of=/dev/sdc bs=4M status=progress
4000766230528 bytes (4,0 TB, 3,6 TiB) copied, 42343 s, 94,5 MB/s //started 140 MB/s
dd: error writing '/dev/sdc': No space left on device
sudo sg_raw -r 512 /dev/sdc 08 00 00 00 01 00 //sudo apt install sg3-utils
SCSI Status: Good
Monday, September 20, 2021
ST4000LM024-2AN17V features, SMART and copy problem
sudo hdparm -I /dev/sda
Friday, September 17, 2021
Slow copying to external USB HDD in Kubuntu
Format external HDD in NTFS with default cluster size.
Do not check any additional options like SSD optimization etc.
GParted helps to get rid of "Partition 1 does not start on physical sector boundary." issue.
If using dual boot with Windows, Offline USB drive in Windows Disk Management after use.
lsmod | grep ntfs
findmnt -no FSTYPE /dev/sda1
ntfs3
echo "blacklist ntfs3" | sudo tee /etc/modprobe.d/disable-ntfs3.conf
sudo update-initramfs -u
findmnt -no FSTYPE /dev/sda1
fuseblk // You're using ntfs-3g, which shows up as fuseblk.