發表文章

目前顯示的是有「Linux」標籤的文章

Encrypt the partition with cryptsetup

Warning: this is a private study note only. There is no guarantee of the correctness of the contents.  1. prepare a USB pen drive 2. check its label with lsblk [jerry@jerrycc_laptop ~]$ lsblk NAME            MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT sda               8:0    0 465.8G  0 disk ├─sda1            8:1    0   200M  0 part ... sdb               8:16   1   1.9G  0 disk  3.  Create new partition with  fdisk : For example, you'll get a partition called /dev/sdb1 4. Format the partition with LUKS format: > sudo cryptsetup -y luksFormat /dev/sdb1  5. Open the partition and create the name for the mapper: > sudo cryptsetup luksOpen /dev/sdb1 myEncryptDisk 6. Format the partition with regular file system formats: Note that yo...

使用 mkfs 格式化有 RAID 磁碟遇到的問題

今天在嘗試用 mkfs 格式化一顆 flash drive 時,發現不管怎樣都會顯示下列訊息。 [jerry@jerrycc_laptop ~]$ sudo mkfs.ext4 /dev/sdb1 mke2fs 1.42.9 (28-Dec-2013) /dev/sdb1 is apparently in use by the system; will not make a filesystem here! 後來使用 lsblk 掃描,發現之前曾對它做過RAID的設定。 [jerry@jerrycc_laptop ~]$ lsblk NAME            MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT ... sdb               8:16   1   1.9G  0 disk   ├─sdb1            8:17   1     1G  0 part   │ └─md127         9:127  0   885M  0 raid1  └─sdb2            8:18   1   886M  0 part     └─md127         9:127  0   885M  0 raid1  求助 Google 大神後,發現有位老外好心幫我們找到解法 Unable to format drive - "is ap...