AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / unix / 问题 / 560303
Accepted
dai
dai
Asked: 2020-01-05 05:24:36 +0800 CST2020-01-05 05:24:36 +0800 CST 2020-01-05 05:24:36 +0800 CST

外置硬盘不允许写入 ext4/fat32 太小?

  • 772

我已经格式化(使用GParted)一个外部HDD,因为它是NTFS,但是写入权限被拒绝,然后我尝试了fat32,但文件太小,没有exfat选项,我想要一个密码保护如果插入等时可能。

如果可能的话,我怎样才能让驱动器允许我写入并拥有密码?我的 ext4 进程有什么问题?主扩展 ext4 外置硬盘,全部可见,已安装且可打开但不可写?

我刚刚使用下面的命令尝试过这个,它也没有工作。

Device     Boot Start       End   Sectors   Size Id Type
/dev/sdb1        2048 625141759 625139712 298.1G  b W95 FAT32
$ sudo  wipefs -a /dev/sdb1
wipefs: error: /dev/sdb1: probing initialisation failed: Device or resource busy
david@david-HP-15-Notebook-PC:~$ sudo  wipefs -a /dev/sdb1
/dev/sdb1: 8 bytes were erased at offset 0x00000052 (vfat): 46 41 54 33 32 20 20 20
/dev/sdb1: 1 byte was erased at offset 0x00000000 (vfat): eb
/dev/sdb1: 2 bytes were erased at offset 0x000001fe (vfat): 55 aa
david@david-HP-15-Notebook-PC:~$ sudo fdisk /dev/sdb1

Welcome to fdisk (util-linux 2.31.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

Device does not contain a recognised partition table.
Created a new DOS disklabel with disk identifier 0x5fd1458f.

Command (m for help): n
Partition type
   p   primary (0 primary, 0 extended, 4 free)
   e   extended (container for logical partitions)
Select (default p): 

Using default response p.
Partition number (1-4, default 1): 
First sector (2048-625139711, default 2048): 
Last sector, +sectors or +size{K,M,G,T,P} (2048-625139711, default 625139711): 

Created a new partition 1 of type 'Linux' and of size 298.1 GiB.

Command (m for help): t
Selected partition 1
Hex code (type L to list all codes): 7
Changed type of partition 'Linux' to 'HPFS/NTFS/exFAT'.

**Command (m for help): w
The partition table has been altered.
Failed to add partition 1 to system: Invalid argument**

The kernel still uses the old partitions. The new table will be used at the next reboot. 
Synching disks.

它说 w 是一个无效的参数,那么我该怎么办,这个 exfat 分区选项在 linux mint 上是否不可用?还是命令变了?

现在这个问题与之前使用的命令一起列出 =

$ sudo  wipefs -a /dev/sdb1
wipefs: /dev/sdb1: ignoring nested "dos" partition table on non-whole disk device
wipefs: Use the --force option to force erase.

我现在输入的内容来自一个网站。

(exfat 显然适合在多个系统上使用,因此是首选,ntfs 已经在 gparted 上,ext4 是最后一个选项)除非我不知道 exfat 的其他问题?或者这在linux中不可行?

partition external-hdd
  • 1 1 个回答
  • 311 Views

1 个回答

  • Voted
  1. Best Answer
    Vlastimil Burián
    2020-01-05T09:29:48+08:002020-01-05T09:29:48+08:00

    卸载每个分区和整个磁盘:

    sudo umount /dev/sdb? /dev/sdb
    

    擦除旧分区方案:

    sudo wipefs --all --force /dev/sdb? /dev/sdb; sync; partprobe
    

    创建分区:

    sudo gdisk /dev/sdb
    

    o Enter用于新的空 GUID 分区表 (GPT)
    y Enter以确认您
    n Enter对新分区的决定
    Enter默认为第一个分区
    Enter默认为第一个扇区默认为 Ext4
    Enter的最后一个扇区或NTFS写入更改以确认您的决定
    Enter0700
    w Enter
    y Enter


    创建 Ext4 文件系统:

    sudo mkfs.ext4 -L Some_Label -m 0 -b 512 -E lazy_itable_init=0,lazy_journal_init=0 /dev/sdb1
    

    或者

    创建 NTFS 文件系统:

    sudo mkfs.ntfs --no-indexing --verbose --with-uuid --label Some_Label --quick --sector-size 512 /dev/sdb1
    
    • 1

相关问题

  • 如何在 solaris 11.3 中挂载 zfs 驱动器分区

  • 备份 Nand Flash 存储区

  • 如何正确分区 SSD 以进行双启动设置

  • 并行安装多个 linux 发行版

  • fdisk 没有看到 resize2fs 缩小未挂载的分区

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    模块 i915 可能缺少固件 /lib/firmware/i915/*

    • 3 个回答
  • Marko Smith

    无法获取 jessie backports 存储库

    • 4 个回答
  • Marko Smith

    如何将 GPG 私钥和公钥导出到文件

    • 4 个回答
  • Marko Smith

    我们如何运行存储在变量中的命令?

    • 5 个回答
  • Marko Smith

    如何配置 systemd-resolved 和 systemd-networkd 以使用本地 DNS 服务器来解析本地域和远程 DNS 服务器来解析远程域?

    • 3 个回答
  • Marko Smith

    dist-upgrade 后 Kali Linux 中的 apt-get update 错误 [重复]

    • 2 个回答
  • Marko Smith

    如何从 systemctl 服务日志中查看最新的 x 行

    • 5 个回答
  • Marko Smith

    Nano - 跳转到文件末尾

    • 8 个回答
  • Marko Smith

    grub 错误:你需要先加载内核

    • 4 个回答
  • Marko Smith

    如何下载软件包而不是使用 apt-get 命令安装它?

    • 7 个回答
  • Martin Hope
    user12345 无法获取 jessie backports 存储库 2019-03-27 04:39:28 +0800 CST
  • Martin Hope
    Carl 为什么大多数 systemd 示例都包含 WantedBy=multi-user.target? 2019-03-15 11:49:25 +0800 CST
  • Martin Hope
    rocky 如何将 GPG 私钥和公钥导出到文件 2018-11-16 05:36:15 +0800 CST
  • Martin Hope
    Evan Carroll systemctl 状态显示:“状态:降级” 2018-06-03 18:48:17 +0800 CST
  • Martin Hope
    Tim 我们如何运行存储在变量中的命令? 2018-05-21 04:46:29 +0800 CST
  • Martin Hope
    Ankur S 为什么 /dev/null 是一个文件?为什么它的功能不作为一个简单的程序来实现? 2018-04-17 07:28:04 +0800 CST
  • Martin Hope
    user3191334 如何从 systemctl 服务日志中查看最新的 x 行 2018-02-07 00:14:16 +0800 CST
  • Martin Hope
    Marko Pacak Nano - 跳转到文件末尾 2018-02-01 01:53:03 +0800 CST
  • Martin Hope
    Kidburla 为什么真假这么大? 2018-01-26 12:14:47 +0800 CST
  • Martin Hope
    Christos Baziotis 在一个巨大的(70GB)、一行、文本文件中替换字符串 2017-12-30 06:58:33 +0800 CST

热门标签

linux bash debian shell-script text-processing ubuntu centos shell awk ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve