a micro SD card that was used in a Raspberry Pi installation is now plugged into another Raspberry pi as a USB device. I am trying to delete existing partitions and data using fdisk but changes do not seem to get applied even though there is a success message in the terminal. But listing partitions still shows old partitions:
pi@raspberrypi:~ $ sudo blkid
/dev/mmcblk0p1: SEC_TYPE="msdos" LABEL="boot" UUID="947B-B89A" TYPE="vfat" PARTUUID="6f92008e-01"
/dev/mmcblk0p2: UUID="eda95d8a-9cdd-4224-96d0-890b4791600c" TYPE="ext4" PARTUUID="6f92008e-02"
/dev/sda1: SEC_TYPE="msdos" LABEL="boot" UUID="74BD-74CF" TYPE="vfat" PARTUUID="ba2edfb9-01"
/dev/sda2: UUID="ec2aa3d2-eee7-454e-8260-d145df5ddcba" TYPE="ext4" PARTUUID="ba2edfb9-02"
/dev/mmcblk0: PTUUID="6f92008e" PTTYPE="dos"
Then I used fidsk like below:
pi@raspberrypi:~ $ sudo fdisk /dev/sda
Welcome to fdisk (util-linux 2.25.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Command (m for help): d
Partition number (1,2, default 2):
Partition 2 has been deleted.
Command (m for help): d
Selected partition 1
Partition 1 has been deleted.
Command (m for help): n
Partition type
p primary (0 primary, 0 extended, 4 free)
e extended (container for logical partitions)
Select (default p): e
Partition number (1-4, default 1):
First sector (2048-61962239, default 2048):
Last sector, +sectors or +size{K,M,G,T,P} (2048-61962239, default 61962239):
Created a new partition 1 of type 'Extended' and of size 29.6 GiB.
Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.
Checking the partitions again:
pi@raspberrypi:~ $ sudo blkid
/dev/mmcblk0p1: SEC_TYPE="msdos" LABEL="boot" UUID="947B-B89A" TYPE="vfat" PARTUUID="6f92008e-01"
/dev/mmcblk0p2: UUID="eda95d8a-9cdd-4224-96d0-890b4791600c" TYPE="ext4" PARTUUID="6f92008e-02"
/dev/sda1: SEC_TYPE="msdos" LABEL="boot" UUID="74BD-74CF" TYPE="vfat" PARTUUID="ba2edfb9-01"
/dev/sda2: UUID="ec2aa3d2-eee7-454e-8260-d145df5ddcba" TYPE="ext4" PARTUUID="ba2edfb9-02"
/dev/mmcblk0: PTUUID="6f92008e" PTTYPE="dos"
Nothing seems to have changed. Any ideas what could be the problem here?