Hello,
I'm newbie here and need some community help.
Iam following the article here: https://www.kali.org/tutorials/secure-kali-pi-2018/ problem occurs during the step "Backup and Restore"
Now insert the SD card and validate the device ID. In our case, the device is /dev/sdc2 but yours might be different so adjust as necessary on your system. We mount the device and make a backup of the filesystem
In my case Kali 2018.2 on WMware player determines sdcard as mmcblk0 with 2 partitions:
/dev/mmcblk0p1 bootable
/dev/mmcblk0p2 partition with file system
Code:
mount /dev/mmcblk0p2 /mnt/chroot/
rsync -avh /mnt/chroot/* /mnt/backup/
umount /mnt/chroot
After a successful backuping /mnt/chroot/*
Code:
echo -e "d\n2\nw" | fdisk /dev/mmcblk0
fdisk swears at \ n2 \ as an unknown attribute
According to the help menu, I did not understand what this attributes means
Code:
Command (m for help): m
Command action
a toggle a bootable flag
b edit bsd disklabel
c toggle the dos compatibility flag
d delete a partition
l list known partition types
m print this menu
n add a new partition
o create a new empty DOS partition table
p print the partition table
q quit without saving changes
s create a new empty Sun disklabel
t change a partition's system id
u change display / entry units
v verify the partition table
w write table to disk and exit
x extra functionality (experts only)
Then
Code:
echo -e "d\n2\nw" | fdisk /dev/mmcblk0
it means:
1. fdisk / dev / mmcblk0
2. d - delete a partition
3. n2 - add a new partition? 2 is the 2nd section?
4. n - add a new partition? w - write table to disk and exit
Next command the same
Code:
echo -e "n\np\n2\n\n\nw" | fdisk
Please help how should these commands look in my case?