Jun's Blog

Output, activities, memo and etc.

Format USB drive on Fedora

This blog is a note on how to format a USB drive on Fedora Linux 36. I have Framework Laptop, and I have a 256 GB expansion card. So, I formatted the USB disk to use on Fedora Linux 36.

Even when it is not formatted, you can see the device. I referred to the [1] mainly.

The nvme0n1 is the main internal disk, 2 TB. The sda is the USB disk, 256 GB. In my case, the sda is not recognized at first. When using the storage expansion card on another, USB-C port, it was recognized.

Detect the storage

$ lsblk
NAME                                          MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINTS
loop0                                           7:0    0     4K  1 loop  /var/lib/snapd/snap/bare/5
...
loop12                                          7:12   0   219M  1 loop  /var/lib/snapd/snap/gnome-3-34-1804/77
sda                                             8:0    0 232.9G  0 disk  
└─sda1                                          8:1    0 232.9G  0 part  
zram0                                         252:0    0     8G  0 disk  [SWAP]
nvme0n1                                       259:0    0   1.8T  0 disk  
├─nvme0n1p1                                   259:1    0   600M  0 part  /boot/efi
├─nvme0n1p2                                   259:2    0     1G  0 part  /boot
└─nvme0n1p3                                   259:3    0   1.8T  0 part  
  └─luks-XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX 253:0    0   1.8T  0 crypt /home
                                                                         /

Another useful command is inxi. The command below prints many information.

$ sudo dnf install inxi

$ inxi -Fzx
...

The command below only prints the drives information.

$ inxi -D
Drives:
  Local Storage: total: 2.05 TiB
    used: 20.31 GiB (1.0%)
  ID-1: /dev/nvme0n1 vendor: Western Digital
    model: WD BLACK SN750 2TB size: 1.82 TiB
  ID-2: /dev/sda type: USB model: USB DISK 3.2
    size: 232.89 GiB

Create partition.

$ which fdisk
/usr/sbin/fdisk

$ rpm -qf /usr/sbin/fdisk
util-linux-2.38-1.fc36.x86_64
$ sudo fdisk /dev/sda

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

Command (m for help):
Command (m for help): m

Help:

  DOS (MBR)
   a   toggle a bootable flag
   b   edit nested BSD disklabel
   c   toggle the dos compatibility flag

  Generic
   d   delete a partition
   F   list free unpartitioned space
   l   list known partition types
   n   add a new partition
   p   print the partition table
   t   change a partition type
   v   verify the partition table
   i   print information about a partition

  Misc
   m   print this menu
   u   change display/entry units
   x   extra functionality (experts only)

  Script
   I   load disk layout from sfdisk script file
   O   dump disk layout to sfdisk script file

  Save & Exit
   w   write table to disk and exit
   q   quit without saving changes

  Create a new label
   g   create a new empty GPT partition table
   G   create a new empty SGI (IRIX) partition table
   o   create a new empty DOS partition table
   s   create a new empty Sun partition table

Then create DOS disklabel.

Command (m for help): o
Created a new DOS disklabel with disk identifier 0x5160f91d.

Added a new partition. Proceeded with default choices. It's just one partition of the full size.

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

Wrote table to disk and exit

Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.

You can see the partition.

$ ls -l /dev/sda1
brw-rw----. 1 root disk 8, 1 Aug 23 21:56 /dev/sda1

Then formatted with the vfat file type.

$ sudo mkfs.vfat /dev/sda1

If I ran a filer, the drive was automatically mounted.

$ nautilus . &

Then I could check the USB storage from df command.

$ df -hT | grep sda
/dev/sda1      vfat      233G   64K  233G   1% /run/media/jaruga/1A53-9E55

References

Book sumary: The Swtich - James W. Clement

Finally, I can summarize the book, The Switch - James W. Clement[1]. It has been long steps until now.

  • I bought the Japanese edition, and read the Japanese edition at once.
  • Then I bought the English original edition.
  • Then I did read both books again by photo reading (speed reading) again. Partly read the English edition.
  • Then I did output it to the mind-map as a step of the photo reading. I used Freeplaine.
  • Then I printed the mindmap to analyze it. It was A3 size x 3 pages.
  • Then I did output the mindmap to the text.
  • Now I am writing this blog as my final step from the text above.

The book has roughly the theory part (Introduction and chapters 1 to 8) and the practice part (chapter 9).

Theory

In the theory part, I was especially inspired by the following parts.

  • Introduction: The Switch
  • Chapter 6: Caveman and Industrialists

Some references to the papers.

Aging is a disease process caused by overactive mTOR.[2]

Introduction - The Switch - In this book

Who knows that popular versions of the paleo or hunter-gatherer diet, which are all the rage today, could be putting you at risk of having high blood sugar, weight gain, bone decline, kidney challenges, and cancerous growths?

According to chapter 4 - The perils of too much protein, too much protein risks health.[3]

Increased risk of developing heart disease.[4]

Increased cancer risk.[5]

Let autophagy rest. Autophagy on for 8 months and off for 4 months. But I don't see any papers to assist this opinion yet.

  • In chapter 2 - periodic rests from autophagy, "You'll want to dial up autophagy for eight months of the year and dial it down during the other four months".
  • In chapter 9 - "There's no consensus on a perfect catabolic-anabolic pattern to follow, but in lieu of new studies I think the 8-to-4 ratio is the healthiest."

According to the Introduction - A self-professed citizen scientist, the life-style-to-gene-ratio to affect longevity is more than 90%.[6]

Fat

The "Chapter 6: Caveman and Industrialists" explains the fat for details.

The fat molecules:

The fat categories:

  • Saturated fats: Usually solid at room temperature.
  • Unsaturated fats: Usually liquid at room temperature.
    • Monounsaturated fatty acids (MUFAs)
    • Polyunsaturated fatty acids (PUFAs)
      • Omega-3 fatty acids
        • Docosahexaenoic acid (DHA)
        • Eicosapentaenoic acid (EPA)
      • Omega-6 fatty acids
  • Trans fats: bad
  • Cholesterol
    • HDL (善玉 in Japanese) - High-density lipoprotein
    • LDL (悪玉 in Japanese) - Low-density lipoprotein

Key scientists in the book

Both are from Harvard Medical School.

Practice

Below is the practice part.

  • Chapter 9: Finger Pricks and Grocery Lists

Diagnoses

The section of the diagnoses is the most important part for me as my next action. After reading the theory, I need to know what's actually happening in my body. Note the mg/dl = 18 * mmol/l.

  • DNA sequencing
  • Fasting blood glucose
  • Hemoglobin A1c
  • Homocysteine
  • C-reactive protein (CRP)
  • Lipid profile (or lipid panel)
    • Amount of cholesterol
    • Total cholesterol
    • High-density lipoprotein (HDL)
    • Low-density lipoprotein (LDL)
    • Triglycerides
  • Omega-6-to-omega-3 ratio
  • DEXA Scan
  • Others: Measuring GH、IGF-1?

Grocery Lists

Source: The Switch - The Chapter 9 - IN SUM - The Switch Food Plan

Supplements

See Chapter 9 - SUPPLEMENTS TO CONSIDER.

References

  • [1] https://jameswclement.com/
  • [2] Blagosklonny M. V. (2006). Aging and immortality: quasi-programmed senescence and its pharmacologic inhibition. Cell cycle (Georgetown, Tex.), 5(18), 2087–2102. https://doi.org/10.4161/cc.5.18.3288 PubMed
  • [3] Delimaris I. (2013). Adverse Effects Associated with Protein Intake above the Recommended Dietary Allowance for Adults. ISRN nutrition, 2013, 126929. https://doi.org/10.5402/2013/126929 PubMed
  • [4] Wang, Z., Bergeron, N., Levison, B. S., Li, X. S., Chiu, S., Jia, X., Koeth, R. A., Li, L., Wu, Y., Tang, W., Krauss, R. M., & Hazen, S. L. (2019). Impact of chronic dietary red meat, white meat, or non-meat protein on trimethylamine N-oxide metabolism and renal excretion in healthy men and women. European heart journal, 40(7), 583–594. https://doi.org/10.1093/eurheartj/ehy799 PubMed
  • [5] Levine, M. E., Suarez, J. A., Brandhorst, S., Balasubramanian, P., Cheng, C. W., Madia, F., Fontana, L., Mirisola, M. G., Guevara-Aguirre, J., Wan, J., Passarino, G., Kennedy, B. K., Wei, M., Cohen, P., Crimmins, E. M., & Longo, V. D. (2014). Low protein intake is associated with a major reduction in IGF-1, cancer, and overall mortality in the 65 and younger but not older population. Cell metabolism, 19(3), 407–417. https://doi.org/10.1016/j.cmet.2014.02.006 PubMed
  • [6] Ruby, J. G., Wright, K. M., Rand, K. A., Kermany, A., Noto, K., Curtis, D., Varner, N., Garrigan, D., Slinkov, D., Dorfman, I., Granka, J. M., Byrnes, J., Myres, N., & Ball, C. (2018). Estimates of the Heritability of Human Longevity Are Substantially Inflated due to Assortative Mating. Genetics, 210(3), 1109–1124. https://doi.org/10.1534/genetics.118.301613 PubMed