Rapsberry Pi : Solved: The file /dev/sda1 does not exist and no size was specified.

Как обычно лень!
Лень было перегружаться в линукс, а надо было купленную Micro SD разбить и отформатировать для линухи под EXT4. Но на столе помигивая лежит Rapsbbery Pi4, которая как раз под линухой, точнее под Kali Linux.



Переходник Micro SD в USB на удивление тоже оказался под руками.



Воткнул в micro-sd в переходник, а его в USB порт Малинки. Зашел через ssh на консольку, переразбил при помощи fdisk /dev/sda, и получил следующую картинку:

# fdisk /dev/sda Welcome to fdisk (util-linux 2.34). Changes will remain in memory only, until you decide to write them. Be careful before using the write command. Command (m for help): p Disk /dev/sda: 28.99 GiB, 31104958464 bytes, 60751872 sectors Disk model: Storage Device Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0x500a0dff Device Boot Start End Sectors Size Id Type /dev/sda1 2048 60751871 60749824 29G 83 Linux /dev/sda2 0 0 0 0B 74 unknown Partition table entries are not in disk order. Command (m for help): w The partition table has been altered. Calling ioctl() to re-read partition table. Syncing disks.



Далее как обычно mkfs -t ext4 /dev/sda1. И тут нежданчик:

# mkfs -t ext4 -L data /dev/sda1 mke2fs 1.45.6 (20-Mar-2020) The file /dev/sda1 does not exist and no size was specified.



И так, и сяк попробовал запустит - а не тут-то было, и потом мелькнула шальная мыслишка - "dd". Почистить с помощью dd начальную область, да и вообще отработает ли ?

# dd if=/dev/zero of=/dev/sda1 bs=512 count=10000 10000+0 records in 10000+0 records out 5120000 bytes (5.1 MB, 4.9 MiB) copied, 0.0427341 s, 120 MB/s
О чудо !!!



Ну а дальше, все как по написанному :)

# mkfs -t ext4 -L data /dev/sda1 mke2fs 1.45.6 (20-Mar-2020) Discarding device blocks: done Creating filesystem with 5000 1k blocks and 1256 inodes Allocating group tables: done Writing inode tables: done Creating journal (1024 blocks): done Writing superblocks and filesystem accounting information: done



Надеюсь кому-то облегчит терзания.
Вы только посетили наш сайт, КОММЕНТИРОВАНИЕ будет доступно через несколько минут.
возможно у Вас отключен javascript, если включен - просто обновите страницу