Install media - step 1

Followed the same steps to boot from a recent arch install media.

$ ssh root@192.168.0.101

I then looked at what is my network interface's name, what is my network interface's ethernet address, put them down into the script and ran it.

Here is the script that I ran

$ scp content/statics/scripts/media/install-script.sh root@192.168.0.101:/
$ ssh root@192.168.0.101
root@archiso ~ # bash /install-script.sh

After that I need to make sure that my efi environment will pick up the new system:

root@archiso ~ # efibootmgr 
BootCurrent: 0002
Timeout: 0 seconds
BootOrder: 0000,0001,0002
Boot0000  Linux Boot Manager...
Boot0001* UEFI: Samsung SSD 860 PRO 512GB   P...
Boot0002* UEFI: SanDisk Pc...
Boot0008* Windows Boot Manager  HD...

Added a new entry for Linux:

root@archiso ~ # efibootmgr --create --disk /dev/sda --part 1 --loader "\EFI\systemd\systemd-bootx64.efi" --label "Linux Boot Manager" --verbose

And deleting the non-required entries:

root@archiso ~ # efibootmgr -b 0 -B
root@archiso ~ # efibootmgr -b 1 -B
root@archiso ~ # efibootmgr -b 2 -B
root@archiso ~ # efibootmgr -b 8 -B

Again Listing what I have:

root@archiso ~ # efibootmgr
BootCurrent: 0002
Timeout: 0 seconds
BootOrder: 0003
Boot0003* Linux Boot Manager    HD(1,GPT,15aef995-584b-478e-acb8-7c2e25463e51,0x800,0x100000)/\EFI\systemd\systemd-bootx64.efi

Looks good, time to reboot and pray.

root@archiso ~ # reboot

It booted up, so was able to log into it nicely.

Installing packages:

pacman -S smarmontools less tmux man-db vim bash-completion

Doing smart check:

[root@media ~]# smartctl --info /dev/sda > /root/sda.smart
[root@media ~]# smartctl --info /dev/sdb > /root/sdb.smart

Ok, that is just brief instructions, so let me do a full dump:

[root@media ~]# smartctl -a /dev/sdb > /root/sdb.all.smart
[root@media ~]# smartctl -a /dev/sda > /root/sda.all.smart

Which contains an interesting line:

Warning! SMART Attribute Thresholds Structure error: invalid SMART checksum.

I would need to investigate that.

But for now I will do the following tests:

  • badblocks -wsv /dev/hdX

Nice recommendation: https://www.reddit.com/r/DataHoarder/s/JpxWpeGirV

Kicking off long smart test:

[root@media ~]# smartctl -t long /dev/sda 
smartctl 7.5 2025-04-30 r5714 [x86_64-linux-6.12.74-1-lts] (local build)
Copyright (C) 2002-25, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF OFFLINE IMMEDIATE AND SELF-TEST SECTION ===
Sending command: "Execute SMART Extended self-test routine immediately in off-line mode".
Drive command "Execute SMART Extended self-test routine immediately in off-line mode" successful.
Testing has begun.
Please wait 903 minutes for test to complete.
Test will complete after Sun Feb 22 03:53:12 2026 CET
Use smartctl -X to abort test.
[root@media ~]# smartctl -t long /dev/sdb
smartctl 7.5 2025-04-30 r5714 [x86_64-linux-6.12.74-1-lts] (local build)
Copyright (C) 2002-25, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF OFFLINE IMMEDIATE AND SELF-TEST SECTION ===
Sending command: "Execute SMART Extended self-test routine immediately in off-line mode".
Drive command "Execute SMART Extended self-test routine immediately in off-line mode" successful.
Testing has begun.
Please wait 914 minutes for test to complete.
Test will complete after Sun Feb 22 04:04:31 2026 CET
Use smartctl -X to abort test.

After a couple of hours I got tese results:

Serial Number:    B015HS1D
SMART Self-test log structure revision number 1
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Extended offline    Completed without error       00%        16         -
Serial Number:    B0152L8D
SMART Self-test log structure revision number 1
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Extended offline    Completed without error       00%        16         -

Okay, cool, let's do badblocks.

[root@media ~]# badblocks -wsv /dev/sda
badblocks: Value too large for defined data type invalid end block (11718885376): must be 32-bit value

Went with this one:

[root@media ~]# badblocks -wsv -b 4096 -c 16384 /dev/sdb
Checking for bad blocks in read-write mode
...

Looking at the temperatures, I aborted the operation. Will install some proper airflow.

194 Temperature_Celsius     0x0022   097   089   000    Old_age   Always       -       55

I installed a fan near the drives. After running them for 8 hours of badblocks, I see temperatures like:

194 Temperature_Celsius     0x0022   100   087   000    Old_age   Always       -       52

Which is still quite hot I think, so will need to figure out how to mount them properly so that they get adequate cooling.

Looking at:

WD Gold datasheet

The operating range is 5...60 degrees celsius, which is interpreted as 5 degrees ambient temperature and 60 degrees device temperature.

After running it a while, Here are the temperature results:

[root@media ~]# hddtemp /dev/sd[a,b]
/dev/sda: WDC WD122KRYZ-01CDAB0: 51°C
/dev/sdb: WDC WD122KRYZ-01CDAB0: 53°C

I still need to cool them better I think.

Added an external blower. That helped:

[root@media ~]# hddtemp /dev/sd[a,b]
/dev/sda: WDC WD122KRYZ-01CDAB0: 31°C
/dev/sdb: WDC WD122KRYZ-01CDAB0: 33°C

Ok, now it completed:

Checking for bad blocks in read-write mode
From block 0 to 2929721343
Testing with pattern 0xaa: done                                                 
Reading and comparing: done                                                 
Testing with pattern 0x55: done                                                 
Reading and comparing: done                                                 
Testing with pattern 0xff: done                                                 
Reading and comparing: done                                                 
Testing with pattern 0x00: done                                                 
Reading and comparing: done                                                 
Pass completed, 0 bad blocks found. (0/0/0 errors)

Doing another smart value check:

[root@media ~]# smartctl -a /dev/sdb > /root/sdb.all.smart.after
[root@media ~]# smartctl -a /dev/sda > /root/sda.all.smart.after

https://arstechnica.com/gadgets/2021/09/examining-btrfs-linuxs-perpetually-half-finished-filesystem/

Creating btrfs filesystem:

I think something along the lines of:

I decided to go with the default nodesize, not specifying --nodesize

[root@media ~]# mkfs.btrfs --label MEDIA --data raid1 --metadata raid1 /dev/sda /dev/sdb
btrfs-progs v6.19
See https://btrfs.readthedocs.io for more information.

Label:              MEDIA
UUID:               bdf07a1f-4607-4287-be20-eed10db2e0a5
Node size:          16384
Sector size:        4096    (CPU page size: 4096)
Filesystem size:    21.83TiB
Block group profiles:
  Data:             RAID1             1.00GiB
  Metadata:         RAID1             1.00GiB
  System:           RAID1             8.00MiB
SSD detected:       no
Zoned device:       no
Features:           extref, skinny-metadata, no-holes, free-space-tree, block-group-tree
Checksum:           crc32c
Number of devices:  2
Devices:
   ID        SIZE  PATH    
    1    10.91TiB  /dev/sda
    2    10.91TiB  /dev/sdb