Warning: this is an htmlized version!
The original is here, and
the conversion rules are here.
#######
#
# E-scripts on hard disks (partitions, parameters, etc).
#
# Note 1: use the eev command (defined in eev.el) and the
# ee alias (in my .zshrc) to execute parts of this file.
# Executing this file as a whole makes no sense.
# An introduction to eev can be found here:
#
#   (find-eev-quick-intro)
#   http://angg.twu.net/eev-intros/find-eev-quick-intro.html
#
# Note 2: be VERY careful and make sure you understand what
# you're doing.
#
# Note 3: If you use a shell other than zsh things like |&
# and the for loops may not work.
#
# Note 4: I always run as root.
#
# Note 5: some parts are too old and don't work anymore. Some
# never worked.
#
# Note 6: the definitions for the find-xxxfile commands are on my
# .emacs.
#
# Note 7: if you see a strange command check my .zshrc -- it may
# be defined there as a function or an alias.
#
# Note 8: the sections without dates are always older than the
# sections with dates.
#
# This file is at <http://angg.twu.net/e/hd.e>
#           or at <http://angg.twu.net/e/hd.e.html>.
#        See also <http://angg.twu.net/emacs.html>,
#                 <http://angg.twu.net/.emacs[.html]>,
#                 <http://angg.twu.net/.zshrc[.html]>,
#                 <http://angg.twu.net/escripts.html>,
#             and <http://angg.twu.net/>.
#
#######




# «.seagate-expansion»		(to "seagate-expansion")
# «.seagate-goflex»		(to "seagate-goflex")
# «.external-hds»		(to "external-hds")
# «.external-hds-sex»		(to "external-hds-sex")
# «.external-hds-reef»		(to "external-hds-reef")
# «.external-hds-lakhesys»	(to "external-hds-lakhesys")
# «.generate_part_of_fstab»	(to "generate_part_of_fstab")
# «.parted»			(to "parted")
# «.parted-machine-parseable»	(to "parted-machine-parseable")
# «.parted-loop»		(to "parted-loop")
# «.parted-src»			(to "parted-src")
# «.gparted»			(to "gparted")
# «.GPT»			(to "GPT")
# «.EFI»			(to "EFI")
# «.resize»			(to "resize")
# «.hd-health»			(to "hd-health")
# «.uuids»			(to "uuids")
# «.partition-labels»		(to "partition-labels")
# «.lsscsi»			(to "lsscsi")
# «.unwritten-extents»		(to "unwritten-extents")


# (find-es "e2fs")
# (find-es "bsd" "bsd_partitions")
# (find-fline "/proc/scsi/scsi")
# (find-fline "/proc/scsi/scsi" "Seagate  Model: FreeAgent GoFlex")
# (find-fline "/proc/scsi/scsi" "Seagate  Model: Expansion")
# (find-sh "lsscsi" "Seagate  Expansion")
# (find-sh "sudo dmesg -help")
# (find-sh "sudo dmesg -L=never")
# (find-man "dmesg")

My external HDs:
Seagate GoFlex: external

Seagate Expansion ("Nemko"): external, fast USB cable

Lakhesys: Mymax black case		(to "external-hds-lakhesys")

Reef: Multilaser silver case		(to "external-hds-reef")
Reef: (find-fline "/proc/scsi/scsi" "WDC WD25 Model: 00BEVT-80A23T0")

# Seagate Expansion ("Nemko"): external, fast USB cable
# (find-fline "/proc/scsi/scsi" "???")




#####
#
# Seagate Expansion ("Nemko"): fast USB cable, case with small pyramids
# 2021may02
#
#####

# «seagate-expansion»  (to ".seagate-expansion")
# (find-sh "lsscsi" "Seagate  Expansion")
# (find-man "8 umount")
# (find-man "8 umount" "/etc/mtab")
# (find-fline "/etc/" "mtab")
# (find-fline "/etc/mtab")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
lsscsi
sudo fdisk -l /dev/sdb

sudo umount   /dev/sdb1
mount
mkdir /tmp/sgexpansion1/
sudo mount    /dev/sdb1  /tmp/sgexpansion1/
sudo mount    /dev/sdc1  /tmp/sgexpansion1/
sudo mount    /dev/sdd1  /tmp/sgexpansion1/
sudo mount    /dev/sde1  /tmp/sgexpansion1/

sudo umount   /dev/sdb1
sudo fsck     /dev/sdb1

# (find-fline "/tmp/sgexpansion1/")
# (find-fline "/tmp/sgexpansion1/movies/")
# (find-sh-at-dir "/tmp/sgexpansion1/movies/" "find * | sort")






#####
#
# Seagate GoFlex (external; partitioned as 100G+900G)
# 2017jun25
#
#####

# «seagate-goflex» (to ".seagate-goflex")
# (find-sh "lsscsi" "Seagate  FreeAgent GoFlex")

# 2017mai25:
# (find-fline "/proc/scsi/scsi")
# (find-fline "/proc/scsi/scsi" "Seagate  Model: FreeAgent GoFlex")
# Seagate goflex
# (find-fline "/tmp/goflex2/")
# (find-fline "/tmp/goflex2/horses/sda5/books/")
# (find-fline "/tmp/goflex2/CDs/")
# (find-fline "/tmp/goflex2/music/")
# (find-fline "/tmp/goflex2/home/edrx/books/__cats/")
# (find-fline "/tmp/goflex2/movies/")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
sudo umount /dev/sdb1
sudo umount /dev/sdb2
mount
sudo fdisk -l /dev/sdb

mkdir /tmp/goflex1/
mkdir /tmp/goflex2/
sudo mount /dev/sdb1  /tmp/goflex1/
sudo mount /dev/sdb2  /tmp/goflex2/

sudo mount -o ro /dev/sdb1  /tmp/goflex1/
sudo mount -o ro /dev/sdb2  /tmp/goflex2/

# (find-fline "/tmp/goflex1/")
# (find-fline "/tmp/goflex2/")
# (find-fline "/tmp/goflex2/music/")
# (find-fline "/tmp/goflex2/movies/")
# (find-fline "/tmp/goflex2/movies/Meredith Monk - Book Of Days/")
# (find-fline "/tmp/goflex2/movies/Peter Brooks - Mahabharata/")
# (find-fline "/tmp/goflex2/movies/Ran (1985)/")
# (find-fline "/tmp/goflex2/movies/When Night Is Falling/")
# (find-fline "/tmp/goflex2/verena/home/edrx/tmp/lakh/tmp/")
sudo umount /tmp/goflex1/
sudo umount /tmp/goflex2/

# (find-asrootfile "/tmp/goflex2/verena/home/")




#####
#
# My external HDs (2015)
# 2015nov23
#
#####

# «external-hds» (to ".external-hds")
# (find-efunction 'find-hde-links)
# (find-hde-links)

# (find-man "8 mount")

# (find-fline "/etc/passwd")
# (find-fline "/etc/passwd" "user:")
# (find-fline "/etc/passwd" "edrx:")

# «external-hds-sex» (to ".external-hds-sex")
# Samsung external
#
mkdir /tmp/sex1/
mkdir /tmp/sex2/
sudo mount /dev/sdb1  /tmp/sex1/
sudo mount /dev/sdb2  /tmp/sex2/
# (find-fline "/tmp/sex1/")
# (find-fline "/tmp/sex2/")
sudo umount /tmp/sex1/
sudo umount /tmp/sex2/

# (find-fline "/tmp/sex2/horses/home/edrx/NICOTINE/gmail/")

# «external-hds-reef» (to ".external-hds-reef")
# Reef (Multilaser silver case)
# (find-fline "/proc/scsi/scsi" "WDC WD25 Model: 00BEVT-80A23T0")
#
* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
sudo fdisk -l /dev/sdb
mkdir /tmp/reef1/
mkdir /tmp/reef2/
mkdir /tmp/reef5/
mkdir /tmp/reef6/
mkdir /tmp/reef7/
sudo mount /dev/sdb1 /tmp/reef1/
sudo mount /dev/sdb2 /tmp/reef2/
sudo mount /dev/sdb5 /tmp/reef5/
sudo mount /dev/sdb6 /tmp/reef6/
sudo mount /dev/sdb7 /tmp/reef7/

sudo mount -o ro /dev/sdb1 /tmp/reef1/
sudo mount -o ro /dev/sdb2 /tmp/reef2/
sudo mount -o ro /dev/sdb5 /tmp/reef5/
sudo mount -o ro /dev/sdb6 /tmp/reef6/
sudo mount -o ro /dev/sdb7 /tmp/reef7/

# (find-fline "/tmp/reef1/etc/")
# (find-fline "/tmp/reef1/etc/coletivo_coiote/")
# (find-fline "/tmp/reef7/torrents/")
# (find-fline "/tmp/reef7/torrents/etc/")

# (find-fline "/tmp/reef1/")
# (find-fline "/tmp/reef2/")
# (find-fline "/tmp/reef2/.id" "reef")
# (find-fline "/tmp/reef2/.files")
# (find-fline "/tmp/reef2/home/edrx/books/__cats/")
# (find-fline "/tmp/reef2/home/edrx/SCANS/")
# (find-fline "/tmp/reef2/lakh3/sda4/CDs/nau/")
# (find-fline "/tmp/reef2/lakh3/sda4/Meredith_Monk/")
# (find-fline "/tmp/reef5/")
# (find-fline "/tmp/reef6/")
# (find-fline "/tmp/reef6/NICOTINE/")
# (find-fline "/home/reef6/NICOTINE/")
# (find-fline "/tmp/reef7/")
# (find-fline "/tmp/reef7/Downloads/MC5 A True Testimonial/")
# (find-fline "/tmp/reef7/snarf/http/www.domai.com/members/")
# (find-fline "/tmp/reef7/nikon/")
# (find-fline "/tmp/reef7/nikon/" "DSC_0033.JPG")
# (find-fline "/tmp/reef7/nikon/" "DSC_0049.JPG")
# (find-fline "/tmp/reef7/torrents/")
# (find-fline "/tmp/reef7/torrents/audios/2011dec13/")
cd
sudo umount /tmp/reef1/
sudo umount /tmp/reef2/
sudo umount /tmp/reef5/
sudo umount /tmp/reef6/
sudo umount /tmp/reef7/

mount
sudo umount /dev/sdb1/
sudo umount /dev/sdb2/
sudo umount /dev/sdb5/
sudo umount /dev/sdb6/
sudo umount /dev/sdb7/
mount

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
sudo cp -av /tmp/reef1/music/* /home/music/
sudo cp -av /tmp/reef7/torrents/music/* /home/music/
sudo rm -Rv /tmp/reef7/torrents/music
sudo cp -av /tmp/reef7/torrents/movies/* /home/movies/
sudo rm -Rv /tmp/reef7/torrents/movies

# (find-fline "/tmp/reef1/music/")
# (find-fline "/home/music/")
# (find-fline "/home/movies/")
sudo rm -Rv /tmp/reef1/music/*
sudo rmdir  /tmp/reef1/music/

# (find-fline "/tmp/reef1/music/")
# (find-fline "/tmp/reef7/torrents/movies/")
# (find-fline "/tmp/reef7/torrents/music/")
# (find-fline "/tmp/reef7/torrents/etc/")

sudo rm -Rv /tmp/reef1/movies/
/tmp/reef7/torrents/music



# «external-hds-lakhesys» (to ".external-hds-lakhesys")
# Samsung in black Mymax case
# (find-fline "/proc/scsi/scsi" "Vendor:    Mass  Model: Storage Device")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
mkdir /tmp/lakh1/
mkdir /tmp/lakh3/
mkdir /tmp/lakh5/
mkdir /tmp/lakh6/
mkdir /tmp/lakh7/
sudo mount -o ro /dev/sdb1 /tmp/lakh1/
sudo mount -o ro /dev/sdb3 /tmp/lakh3/
sudo mount -o ro /dev/sdb5 /tmp/lakh5/
sudo mount -o ro /dev/sdb6 /tmp/lakh6/
sudo mount -o ro /dev/sdb7 /tmp/lakh7/

sudo mount /dev/sdb1 /tmp/lakh1/
sudo mount /dev/sdb3 /tmp/lakh3/
sudo mount /dev/sdb5 /tmp/lakh5/
sudo mount /dev/sdb6 /tmp/lakh6/
sudo mount /dev/sdb7 /tmp/lakh7/
# (find-fline "/tmp/lakh1/")
# (find-fline "/tmp/lakh1/etc/hostname" "lakhesys")
# (find-fline "/tmp/lakh1/home/edrx/tmp/")
# (find-fline "/tmp/lakh1/home/edrx/snarf/http/mytattoogirls.com/galleries/content/")
# (find-fline "/tmp/lakh1/home/edrx/books/")
# (find-fline "/tmp/lakh1/home/edrx/FOTOS/")
# (find-fline "/tmp/lakh1/home/edrx/FOTOS/print/")
# (find-fline "/tmp/lakh1/home/edrx/FOTOS/selana/")
# (find-fline "/tmp/lakh1/home/edrx/FOTOS/selana_2014nov/")
# (find-fline "/tmp/lakh3/")
# (find-fline "/tmp/lakh3/sda4/")
# (find-fline "/tmp/lakh3/sda4/audios/")
# (find-fline "/tmp/lakh3/sda4/HILSINGER-BEATTY/")
# (find-fline "/tmp/lakh5/")
# (find-fline "/tmp/lakh6/")
# (find-fline "/tmp/lakh7/")
# (find-fline "/tmp/lakh7/GA/")
# (find-fline "/tmp/lakh7/audios/")
# (find-fline "/tmp/lakh7/coniglio/")
# (find-fline "/tmp/lakh7/torrents7/")
# (find-fline "/tmp/lakh7/videos/")
# (find-fline "/tmp/lakh7/videos/bittersweet/")
# (find-fline "/tmp/lakh7/videos/manifs/")
cd
sudo umount /tmp/lakh1/
sudo umount /tmp/lakh3/
sudo umount /tmp/lakh5/
sudo umount /tmp/lakh6/
sudo umount /tmp/lakh7/

sudo umount /dev/sdb1
sudo umount /dev/sdb3
sudo umount /dev/sdb5
sudo umount /dev/sdb6
sudo umount /dev/sdb7
mount




#####
#
# util-linux: fdisk, cfdisk, sfdisk
# 2000jul03
#
#####

# (find-status "util-linux")
# (find-vldifile "util-linux.list")
# (find-fline "/usr/doc/util-linux/")
# (find-fline "/usr/doc/util-linux/README.fdisk.gz")
# (find-fline "/usr/doc/util-linux/examples/")
# (find-fline "/usr/doc/util-linux/examples/sfdisk.examples.gz")

# (eeman "8 fdisk")
# (eeman "8 cfdisk")
# (eeman "8 sfdisk")

sfdisk -V /dev/hda	; echo
sfdisk -V /dev/hdc	; echo
sfdisk -V /dev/hdd	; echo

sfdisk -l /dev/hda	; echo
sfdisk -l /dev/hdc	; echo
sfdisk -l /dev/hdd	; echo

fdisk -l /dev/hda
fdisk -l /dev/hdc
fdisk -l /dev/hdd

fdisk
cfdisk
sfdisk

(sfdisk -l /dev/hda
 sfdisk -l /dev/hdc
 sfdisk -l /dev/hdd
) | sort | uniq

# (find-es "console" "kbdrate_setting")

# (code-c-d "ul" "/usr/src/util-linux-2.10f/")
# (find-ulfile "fdisk/")






#####
#
# Prepare part of /etc/fstab automatically
# 2000aug08
#
#####

# «generate_part_of_fstab»  (to ".generate_part_of_fstab")
#*
fdisk -l /dev/hd{a,c,d} | tee /tmp/ofdisk
# (find-fline "/tmp/ofdisk")

grep '^/dev/hd' /tmp/ofdisk \
  | grep -v Extended \
  | tee /tmp/ofdisk2

echo '
# (find-es "hd" "generate_part_of_fstab")
#' > /tmp/fstab
grep 'Linux$' /tmp/ofdisk2 \
  | tr / ' ' \
  | awk '{printf "/dev/%-10s /%-14s ext2    defaults%23s 0 2\n",$2,$2," "}' \
  >> /tmp/fstab
echo '#' >> /tmp/fstab
grep 'Linux swap$' /tmp/ofdisk2 \
  | tr / ' ' \
  | awk '{printf "/dev/%-10s none%12sswap    sw%29s 0 2\n",$2," "," "}' \
  >> /tmp/fstab

#/dev/hda6	/hda6		ext2	defaults			0 2
cat /tmp/fstab
#/dev/hdd7      none            swap    sw                              0 0

# (find-fline "/tmp/fstab")

#*





#####
#
# /proc/partitions
# 2000jul03
#
#####

cat /proc/partitions
cat /proc/partitions | grep '[0-9]$'
cat /proc/partitions | grep '[0-9]$' | grep -v ' 1 hd'






#####
#
# gpart
# 2000jul03
#
#####

# (find-status "gpart")
# (find-vldifile "gpart.list")
# (find-fline "/usr/doc/gpart/")
# (find-fline "/usr/doc/gpart/README.gz")
# (find-fline "/usr/doc/gpart/README.gz" "gpart -v")
# (eeman "8 gpart")




#####
#
# parted
# 2018mai01
#
#####

# «parted» (to ".parted")
# (find-zsh "installeddebs | sort | grep parted")
# (find-zsh "availabledebs | sort | grep parted")
# (find-status   "parted")
# (find-vldifile "parted.list")
# (find-udfile   "parted/")
# (find-man "8 partprobe")
# (find-man "8 parted")
# http://www.gnu.org/software/parted
# https://en.wikipedia.org/wiki/GNU_Parted
# (find-man "8 parted")

# (find-status   "parted")
# (find-vldifile "parted.list")
# (find-udfile   "parted/")

# (find-status   "parted-doc")
# (find-vldifile "parted-doc.list")
# (find-udfile   "parted-doc/")
# (find-node "(parted)Top")
# (find-node "(parted)Invoking Parted")
https://ubuntuforums.org/showthread.php?t=1040586 about the GNU Storage Guide

http://ftp.gnu.org/gnu/parted/parted-3.2.tar.xz




#####
#
# parted: the "--machine" option to print
# 2018jun03
#
#####

# «parted-machine-parseable» (to ".parted-machine-parseable")
# (find-es "loop" "partx")
# (find-man "8 parted")
# (find-man "8 parted" "-m, --machine")
# (find-man "partx")
# https://alioth-lists.debian.net/pipermail/parted-devel/2006-December/000573.html

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
dd bs=1M count=100 if=/dev/zero of=/tmp/partedtest.img
ls                           -lAFh /tmp/partedtest.img
sudo losetup          /dev/loop4   /tmp/partedtest.img
sudo gparted          /dev/loop4
sudo parted           /dev/loop4 print
sudo parted        -m /dev/loop4 print

# BYT;
# /dev/loop4:105MB:loop:512:512:gpt:Loopback device;
# 1:1049kB:43,0MB:41,9MB:fat32::msftdata;
# 2:43,0MB:84,9MB:41,9MB:fat32::msftdata;
# 3:84,9MB:104MB:18,9MB:fat16::msftdata;

sudo partx --add      /dev/loop4
# ^ error - why?

sudo losetup          /dev/loop4
sudo losetup --detach /dev/loop4
sudo losetup          /dev/loop4





#####
#
# Run parted on a loop device
# 2018jun03
#
#####

# «parted-loop» (to ".parted-loop")
# (find-es "loop" "two-partitions")
# (find-man "8 parted")
# (find-partednode "Command explanations")
# (find-partednode "mklabel")
# (find-partednode "mkpart")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
dd bs=1M count=100 if=/dev/zero of=/tmp/partedtest.img
ls                -lAFh /tmp/partedtest.img
sudo losetup /dev/loop4 /tmp/partedtest.img

sudo parted /dev/loop4 mklabel gpt
sudo parted /dev/loop4
  help




# Create two partitions in /dev/loop4
# (find-man "8 fdisk")
#
sudo fdisk /dev/loop4
n
p
1

+50M
p
n
p
2


p
m
w

sudo fdisk -l /dev/loop4


# Format the partitions
# (find-man "8 partprobe")
# (find-man "8 partx" "are in 512-byte sectors")
#
sudo partx --show /dev/loop4
sudo partprobe    /dev/loop4
sudo mke2fs       /dev/loop4p1
sudo mke2fs       /dev/loop4p2

# sudo losetup --detach /dev/loop4


# Mount the partitions
#
mkdir /tmp/pengrub1/
mkdir /tmp/pengrub2/
sudo losetup /dev/loop4 /tmp/pengrub.img
sudo mount -o loop /dev/loop4p1 /tmp/pengrub1
sudo mount -o loop /dev/loop4p2 /tmp/pengrub2

# (find-fline "/tmp/pengrub1/")
# (find-fline "/tmp/pengrub2/")


# Umount the partitions
#
sudo umount /tmp/pengrub1
sudo umount /tmp/pengrub2
sudo losetup --detach /dev/loop4




#####
#
# parted source
# 2018jun03
#
#####

# «parted-src» (to ".parted-src")
# http://ftp.gnu.org/gnu/parted/parted-3.2.tar.xz

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
rm -Rv ~/usrc/parted-3.2/
tar -C ~/usrc/ -xvJf \
  $S/http/ftp.gnu.org/gnu/parted/parted-3.2.tar.xz
cd     ~/usrc/parted-3.2/

#*
# (code-c-d "parted" "~/usrc/parted-3.2/" "parted")
# (find-partedfile "")
# (find-partedfile "tests/")






#####
#
# gparted
# 2018jun03
#
#####

# «gparted» (to ".gparted")
# (find-status   "gparted")
# (find-vldifile "gparted.list")
# (find-udfile   "gparted/")






#####
#
# GPT
# 2018mai01
#
#####

# «GPT» (to ".GPT")
# https://en.wikipedia.org/wiki/GUID_Partition_Table GPT




#####
#
# EFI
# 2018mai01
#
#####

# «EFI» (to ".EFI")
# (find-es "grub" "grub-efi")
# (find-es "trisquel" "pen-drive-efi-partition")
# https://en.wikipedia.org/wiki/EFI_system_partition
# https://en.wikipedia.org/wiki/Unified_Extensible_Firmware_Interface#Linux
# https://ubuntuforums.org/showthread.php?t=2267312 Why do I need GRUB?
# https://help.ubuntu.com/community/UEFI



#####
#
# Resizing partitions
# 2019apr21
#
#####

# «resize» (to ".resize")
# https://www.howtoforge.com/partitioning_with_gparted




#####
#
# HD health
# 2019aug29
#
#####

# «hd-health» (to ".hd-health")
# https://www.addictivetips.com/ubuntu-linux-tips/check-hard-drive-health-on-linux/
# https://en.wikipedia.org/wiki/Smartmontools
# https://en.wikipedia.org/wiki/Self-Monitoring,_Analysis_and_Reporting_Technology

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
apti smartmontools
apti smartctl smartlctl

# (find-status   "smartmontools")
# (find-vldifile "smartmontools.list")
# (find-udfile   "smartmontools/")

# (find-udfile "smartmontools/AUTHORS")
# (find-udfile "smartmontools/ChangeLog-5.0-6.0.gz")
# (find-udfile "smartmontools/NEWS.Debian.gz")
# (find-udfile "smartmontools/NEWS.gz")
# (find-udfile "smartmontools/README")
# (find-udfile "smartmontools/README.Debian")
# (find-udfile "smartmontools/TODO")
# (find-udfile "smartmontools/badblockhowto.html")
# (find-udfile "smartmontools/changelog.Debian.gz")
# (find-udfile "smartmontools/changelog.gz")
# (find-udfile "smartmontools/copyright")
# (find-udfile "smartmontools/examples/Example1")
# (find-udfile "smartmontools/examples/Example2")
# (find-udfile "smartmontools/examples/Example3")
# (find-udfile "smartmontools/examples/Example4")
# (find-udfile "smartmontools/examples/Example5")
# (find-udfile "smartmontools/examples/Example6")
# (find-udfile "smartmontools/examples/README")
# (find-udfile "smartmontools/smartd.conf.gz")
# (find-fline "/usr/share/lintian/overrides/smartmontools")
# (find-man "5 smartd.conf")
# (find-man "8 smartctl")
# (find-man "8 smartctl" "-a, --all")
# (find-man "8 smartctl" "-d TYPE, --device=TYPE")
# (find-man "8 smartctl" "-H, --health")
# (find-man "8 smartctl" "-x, --xall")
# (find-man "8 smartd")
# (find-man "8 update-smart-drivedb")
# (find-fline "/usr/share/smartmontools/smartd-runner")
# (find-fline "/usr/share/smartmontools/smartd_warning.sh")
# (find-fline "/var/lib/smartmontools/drivedb/drivedb.h")
# (find-fline "/lib/systemd/system/smartmontools.service")

# (find-man "8 smartctl")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
# /usr/sbin/smartctl -a -d $SMARTD_DEVICETYPE $SMARTD_DEVICE >> /root/msg
sudo smartctl --scan
sudo smartctl -a -d scsi /dev/sda
sudo smartctl -x -d scsi /dev/sda
sudo smartctl -x /dev/sda          |& tee /tmp/osda
# (find-fline "/tmp/osda")

sudo smartctl -a -d scsi /dev/sdb
sudo smartctl -x -d scsi /dev/sdb
sudo smartctl -x /dev/sdb          |& tee /tmp/osdb
sudo smartctl -H /dev/sdb          |& tee /tmp/osdb
# (find-fline "/tmp/osdb")



, open up a terminal and follow the instructions that correspond with your Linux distribution.



#####
#
# parted (old!!!)
# 2000jul03
#
#####

# (find-status "parted")
# (find-vldifile "parted.list")
# (find-fline "/usr/doc/parted/")

# Error: The partition table on /dev/hda is inconsistent. There are
# many reasons why this might be the case. However, the most likely
# reason is that Linux detected the BIOS geometry for /dev/hda
# incorrectly. GNU Parted suspects the real geometry should be
# 16067/16/63 (not 1008/255/63). You should check with your BIOS
# first, as this may not be correct. You can inform Linux by adding
# the parameter hda=16067,16,63 to the command line. See the LILO
# documentation for more information. If you think Parted's suggested
# geometry is correct, you




#####
#
# marking bad blocks in an ext2 partition
# 2001oct29
#
#####

<T_VoiD> edrx: badblocks or e2fsck -c . you could use a file list from
the sector, but the value has to be divided depending on the block
size I never know, so better create the list with badblocks + e2fsck
-l (or use directly e2fsck -c)

# (find-man "badblocks")
# (find-man "mke2fs" "   -c")
# (find-man "mke2fs" "   -l")
# (find-man "e2fsck" "  -c")

{ UncorrectableError } LBAsect = 2421754, sector 210048 end_request: I/O error




#####
#
# uuids
# 2020feb23
#
#####

# «uuids» (to ".uuids")
# https://unix.stackexchange.com/questions/319382/a-start-job-is-running-for-dev-disk-by-x2duuid-error-take-1min-30s-to-boot-de
# (find-sh "ls -l /dev/disk/by-uuid")

# (find-fline "/etc/fstab")
# (find-fline "$ASROOT/etc/fstab")

UUID=7e32a105-dec1-40e6-adce-1aa161e0ef5e /               ext4    errors=remount-ro 0       1
# swap was on /dev/sda2 during installation
UUID=68655f31-6c37-44d7-a259-2391b77bb4f3 none            swap    sw                0       0
/dev/sr0                                  /media/cdrom0   udf,iso9660 user,noauto   0       0



#####
#
# partition-labels
# 2020mar06
#
#####

# «partition-labels» (to ".partition-labels")
# https://forum.manjaro.org/t/gparted-whats-the-difference-between-naming-and-labelling-a-partition/45230
# https://unix.stackexchange.com/questions/528968/how-to-change-partition-name-not-label
# https://www.tecmint.com/change-modify-linux-disk-partition-label-names/
# (find-man "8 mount")
# (find-man "8 mount" "The option -l adds labels")
# (find-man "8 mount" "lsblk --fs")
# (find-man "8 mount" "blkid -p <device>")
# (find-man "8 lsblk")
# (find-man "8 blkid")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
mount -l | grep /dev/sda
lsblk --fs

/sbin/blkid --help
# /sbin/blkid /dev/sda1
# /sbin/blkid /dev/sda2
# /sbin/blkid /dev/sda3
# /sbin/blkid /dev/sda4
# /sbin/blkid /dev/sda5



#####
#
# lsscsi
# 2021may02
#
#####

# «lsscsi»  (to ".lsscsi")
# (find-status   "lsscsi")
# (find-vldifile "lsscsi.list")
# (find-udfile   "lsscsi/")
# http://sg.danny.cz/scsi/lsscsi.html
# (find-man "8 lsscsi")
# (find-man "8 lsscsi" "-c, --classic")
# (find-man "8 lsscsi" "-c, --classic" "/proc/scsi/scsi")
# (find-sh "lsscsi")
# (find-fline "/sys/class/" "scsi")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
lsscsi
lsscsi -c
lsscsi --long




#####
#
# unwritten-extents
# 2023jan21
#
#####

# «unwritten-extents»  (to ".unwritten-extents")
# https://www.reddit.com/r/debian/comments/k2gzy4/ext4fs_failed_to_convert_unwritten_extents_to/
# https://lwn.net/Articles/322823/ ext4 and data loss
# https://news.ycombinator.com/item?id=9576917 Ext4: fix data corruption caused by unwritten and delayed extents (mail-archive.com)
# https://en.wikipedia.org/wiki/Ext4





#  Local Variables:
#  coding:              utf-8-unix
#  End: