First, start (boot) your system, and next, log in.
lsblk
In this case, the next disk is /dev/sdb
DEVICE | TYPE | SIZE |
---|---|---|
/dev/sdb1 | ext4 | 10 MB |
/dev/sdb2 | ext4 | the rest |
# START: Thu 29 Jun 2023 09:00
sync
# CLEAN OLD DISK
dd if=/dev/zero of=/dev/sdb bs=1M count=1
sync
# SFDISK is a script-oriented tool for partitioning.
sfdisk /dev/sdb <<< "
label: dos
device: /dev/sdb
unit: sectors
sector-size: 512
/dev/sdb1: type=83, start= 2048, size=20480
/dev/sdb2: type=83, start=22528
"
lsblk
mkfs -v -t ext4 /dev/sdb1
mkfs -v -t ext4 /dev/sdb2
mkdir -pv /mnt/cbkadal
mount -v /dev/sdb1 /mnt/cbkadal/
df /dev/sdb1
mkdir -pv /mnt/lfs
mount -v /dev/sdb2 /mnt/lfs/
df /dev/sdb2
/dev/sdb1 /mnt/cbkadal ext4 defaults 0 2
/dev/sdb2 /mnt/lfs ext4 defaults 0 3
In file “/etc/fstab”; replace “/dev/sdb1” and “/dev/sdb2” with its UUID. To find out UUID, run (root):
blkid
After replacement, file “/etc/fstab” should look like: