当前位置: 首页 > article >正文

RHCSA的使用fdisk 、gdisk管理分区

用fdisk管理分区fdisk命令工具默认将磁盘划分为mbr格式的分区命令fdisk设备名fdisk命令以交互方式进行操作的在菜单中选择相应功能键即可[rootlocalhost ~]# fdisk /dev/sda#对sda进行分区Command (m for help):#进入fdisk交互界面进行分区Command (m for help): m#输入m可查看帮助信息Help:DOS (MBR)a toggle a bootable flagb edit nested BSD disklabelc toggle the dos compatibility flagGenericd delete a partitionF list free unpartitioned spacel list known partition typesn add a new partitionp print the partition tablet change a partition typev verify the partition tablei print information about a partitionMiscm print this menuu change display/entry unitsx extra functionality (experts only)ScriptI load disk layout from sfdisk script fileO dump disk layout to sfdisk script fileSave Exitw write table to disk and exitq quit without saving changesCreate a new labelg create a new empty GPT partition tableG create a new empty SGI (IRIX) partition tableo create a new empty DOS partition tables create a new empty Sun partition tableCommand (m for help): n#输入n创建新分区Partition typep primary (0 primary, 0 extended, 4 free)#输入p创建主分区e extended (container for logical partitions)#输入e创建扩展分区Select (default p): p#输入p创建主分区Partition number (1-4, default 1): 1#选择主分区号输入1表示第一个主分区First sector (2048-10485759, default 2048):#直接按回车从当前第2048个扇区开始分区Last sector, sectors or size{K,M,G,T,P} (2048-10485759, default 10485759): 300M#设置第一个分区为300MCreated a new partition 1 of type Linux and of size 300 MiB.#一个主分区创建完成大小为300MCommand (m for help): p#输入p查看分区信息Disk /dev/sda: 5 GiB, 5368709120 bytes, 10485760 sectorsUnits: sectors of 1 * 512 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisklabel type: dosDisk identifier: 0x5bb0744fDevice Boot Start End Sectors Size Id Type/dev/sda1 2048 616447 614400 300M 83 LinuxDevice Boot Start End Sectors Size Id Type/dev/sda1 2048 616447 614400 300M 83 Linux/dev/sda2 616448 10485759 9869312 4.7G 0 Empty#有两个分区其中新添加的sda2有误需要删除Command (m for help): d#输入d删除分区Partition number (1,2, default 2): 2#输入2选择需要删除的是第二个分区Partition 2 has been deleted.Command (m for help): pDisk /dev/sda: 5 GiB, 5368709120 bytes, 10485760 sectorsUnits: sectors of 1 * 512 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisklabel type: dosDisk identifier: 0x5bb0744fDevice Boot Start End Sectors Size Id Type/dev/sda1 2048 616447 614400 300M 83 Linux#查看现有分区有误的sda2已删除#创建一个扩展分区Command (m for help): n#输入n创建新分区Partition typep primary (1 primary, 0 extended, 3 free)e extended (container for logical partitions)Select (default p): e#输入e创建扩展分区Partition number (2-4, default 2): 2#选择分区号输入2表示第二个分区First sector (616448-10485759, default 616448):#直接按回车从当前第616448个扇区开始分区Last sector, sectors or size{K,M,G,T,P} (616448-10485759, default 10485759): 500M#添加一个500M的分区Created a new partition 2 of type Extended and of size 500 MiB.Command (m for help): pDisk /dev/sda: 5 GiB, 5368709120 bytes, 10485760 sectorsUnits: sectors of 1 * 512 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisklabel type: dosDisk identifier: 0x5bb0744fDevice Boot Start End Sectors Size Id Type/dev/sda1 2048 616447 614400 300M 83 Linux/dev/sda2 616448 1640447 1024000 500M 5 Extended#输入p查看新增一个500M的扩展分区Command (m for help): w#所有分区设置完成后输入w保存即可退出fdisk交互界面The partition table has been altered.Calling ioctl() to re-read partition table.Syncing disks.使用gdisk管理分区gdisk命令工具默认将磁盘划分为GPT格式的分区[rootlocalhost ~]# gdisk /dev/sda#进入gdisk交互界面GPT fdisk (gdisk) version 1.0.3Partition table scan:MBR: MBR onlyBSD: not presentAPM: not presentGPT: not presentCommand (? for help): ?#输入?可查看帮助信息bback up GPT data to a filecchange a partitions nameddelete a partitionishow detailed information on a partitionllist known partition typesnadd a new partitionocreate a new empty GUID partition table (GPT)pprint the partition tableqquit without saving changesrrecovery and transformation options (experts only)ssort partitionstchange a partitions type codevverify diskwwrite table to disk and exitxextra functionality (experts only)?print this menu#gdisk创建新分区默认GPT格式Command (? for help): n#输入n创建新分区Partition number (1-128, default 1):#输入分区编号默认为1因为是/dev/sda硬盘的第一块分区First sector (34-10485726, default 2048) or {-}size{KMGTP}: #输入扇区的开始位置选择默认即可也可手动指定Last sector (2048-10485726, default 10485726) or {-}size{KMGTP}: 300M#输入扇区的结束位置一般都是指定磁盘大小这里输入300M表示新分区大小为300MCurrent type is Linux filesystemHex code or GUID (L to show codes, Enter 8300):#默认即可分区完成后可以修改Changed type of partition to Linux filesystemCommand (? for help): p#输入p查看分区情况Disk /dev/sda: 10485760 sectors, 5.0 GiBModel: VMware Virtual SSector size (logical/physical): 512/512 bytesDisk identifier (GUID): 61FA16FB-FAD8-4873-A857-BD387FE0A592Partition table holds up to 128 entriesMain partition table begins at sector 2 and ends at sector 33First usable sector is 34, last usable sector is 10485726Partitions will be aligned on 2048-sector boundariesTotal free space is 9871293 sectors (4.7 GiB)Number Start (sector) End (sector) Size Code Name1 2048 616447 300.0 MiB 8300 Linux filesystemCommand (? for help): w#输入w保存分区并退出gdisk交互界面Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING PARTITIONS!!Do you want to proceed? (Y/N): yOK; writing new GUID partition table (GPT) to /dev/sda.The operation has completed successfully.

相关文章:

RHCSA的使用fdisk 、gdisk管理分区

用fdisk管理分区 fdisk命令工具默认将磁盘划分为mbr格式的分区 命令: fdisk 设备名 fdisk命令以交互方式进行操作的,在菜单中选择相应功能键即可[rootlocalhost ~]# fdisk /dev/sda #对sda进行分区 Command (m for help): # 进入fdisk交互界面进行分区 C…...

Python持久化和序列化的学习笔记

1. 参数持久化:TOML 1. Npy&NumpyO4-mini-Cursor:如果.npy文件里包含了「Python对象」而非纯数值数组时,就必须在加载时加上allow_pickleTrue。...

终极指南:Windows系统快速安装苹果USB网络共享驱动的完整方案

终极指南:Windows系统快速安装苹果USB网络共享驱动的完整方案 【免费下载链接】Apple-Mobile-Drivers-Installer Powershell script to easily install Apple USB and Mobile Device Ethernet (USB Tethering) drivers on Windows! 项目地址: https://gitcode.com…...

终极图像分层指南:如何用Layerdivider将单张图片智能拆解为可编辑图层

终极图像分层指南:如何用Layerdivider将单张图片智能拆解为可编辑图层 【免费下载链接】layerdivider A tool to divide a single illustration into a layered structure. 项目地址: https://gitcode.com/gh_mirrors/la/layerdivider 你是否曾面对一张精美的…...

3步打造极致轻量Windows 11:Tiny11Builder深度解析

3步打造极致轻量Windows 11:Tiny11Builder深度解析 【免费下载链接】tiny11builder Scripts to build a trimmed-down Windows 11 image. 项目地址: https://gitcode.com/GitHub_Trending/ti/tiny11builder Tiny11Builder是一个基于PowerShell的开源Windows系…...

N_m3u8DL-RE终极指南:如何高效解决流媒体下载的5大痛点

N_m3u8DL-RE终极指南:如何高效解决流媒体下载的5大痛点 【免费下载链接】N_m3u8DL-RE Cross-Platform, modern and powerful stream downloader for MPD/M3U8/ISM. English/简体中文/繁體中文. 项目地址: https://gitcode.com/GitHub_Trending/nm3/N_m3u8DL-RE …...

华硕笔记本终极优化指南:用G-Helper彻底解决过热和性能问题

华硕笔记本终极优化指南:用G-Helper彻底解决过热和性能问题 【免费下载链接】g-helper Fast, native tool for tuning performance, fans, GPU, battery, and RGB on any Asus laptop or handheld - ROG Zephyrus, Flow, Strix, TUF, Vivobook, Zenbook, ProArt, Al…...

利用 Taotoken 模型广场为 AIGC 应用动态选择最佳性价比模型

利用 Taotoken 模型广场为 AIGC 应用动态选择最佳性价比模型 1. AIGC 应用面临的模型选择挑战 现代 AIGC 应用通常需要处理多样化的生成任务,从创意文案到代码补全,每种任务对模型能力的需求各不相同。开发者往往面临两难选择:使用单一高性…...

如何快速掌握nw.js:从入门到实战的完整指南

如何快速掌握nw.js:从入门到实战的完整指南 【免费下载链接】nw.js Call all Node.js modules directly from DOM/WebWorker and enable a new way of writing applications with all Web technologies. 项目地址: https://gitcode.com/gh_mirrors/nw/nw.js …...

如何快速实现Windows高性能视频渲染:完整技术指南与架构解析

如何快速实现Windows高性能视频渲染:完整技术指南与架构解析 【免费下载链接】VideoRenderer Внешний видео-рендерер 项目地址: https://gitcode.com/gh_mirrors/vi/VideoRenderer MPC Video Renderer是一款开源的DirectShow视频渲染器…...

终极指南:如何为nvm-windows项目生成清晰的GoDoc文档

终极指南:如何为nvm-windows项目生成清晰的GoDoc文档 【免费下载链接】nvm-windows A node.js version management utility for Windows. Ironically written in Go. 项目地址: https://gitcode.com/gh_mirrors/nv/nvm-windows nvm-windows是一款专为Windows…...

通过API密钥管理与审计日志功能加强团队内部安全管控

通过API密钥管理与审计日志功能加强团队内部安全管控 1. 团队API密钥管理实践 在Taotoken控制台中,团队管理员可以创建多个API密钥,并为每个密钥分配不同的权限和访问范围。这一功能特别适合需要多人协作的企业环境,能够有效避免单一密钥泄…...

结构化生成式 AI

原文:towardsdatascience.com/structured-generative-ai-e772123428e4?sourcecollection_archive---------3-----------------------#2024-04-18 如何限制你的模型输出定义的格式 https://medium.com/orenmatar?sourcepost_page---byline--e772123428e4---------…...

结构与关系:图神经网络及其在 Pytorch 中的实现

原文:towardsdatascience.com/structure-and-relationships-graph-neural-networks-and-a-pytorch-implementation-c9d83b71c041?sourcecollection_archive---------1-----------------------#2024-03-05 了解图神经网络的数学背景及其在 pytorch 中回归问题的实现…...

使用 Metaflow、AWS 和 Weights Biases 优化物体检测

原文:towardsdatascience.com/streamlining-object-detection-with-metaflow-aws-and-weights-biases-b44a14cb2e11?sourcecollection_archive---------1-----------------------#2024-07-19 如何为物体检测创建生产级管道 https://medium.com/ed.izaguirre?sour…...

精简巨头精简巨头精简巨头精简巨头精简巨头

原文:towardsdatascience.com/streamlining-giants-8a26aa1e91d3?sourcecollection_archive---------5-----------------------#2024-02-29 LLM 时代模型压缩的演变 https://natecibik.medium.com/?sourcepost_page---byline--8a26aa1e91d3---------------------…...

在开始撰写新研究论文时简化你的工作流程

原文:towardsdatascience.com/streamline-your-workflow-when-starting-a-new-research-paper-50522940b0dd https://github.com/OpenDocCN/towardsdatascience-blog-zh-2024/raw/master/docs/img/5c26191bd4a63c4de5ee6b1dfd89ee57.png 由Maksym Kaharlytskyi在Un…...

7个步骤掌握fastai自定义数据加载器:复杂数据格式处理终极指南

7个步骤掌握fastai自定义数据加载器:复杂数据格式处理终极指南 【免费下载链接】fastai The fastai deep learning library 项目地址: https://gitcode.com/gh_mirrors/fa/fastai fastai是一个强大的深度学习库,提供了简洁易用的API来处理各种数据…...

OpenAI客户端库选型与实战:.NET集成指南与最佳实践

1. 项目概述:一个面向开发者的轻量级OpenAI客户端 如果你正在开发一个需要集成AI能力的应用,比如一个智能客服机器人、一个内容生成工具,或者一个代码辅助插件,那么你大概率绕不开OpenAI的API。官方的SDK固然功能齐全,…...

如何在5分钟内搭建你的第一个机器人AI控制系统:LeRobot完整指南

如何在5分钟内搭建你的第一个机器人AI控制系统:LeRobot完整指南 【免费下载链接】lerobot 🤗 LeRobot: Making AI for Robotics more accessible with end-to-end learning 项目地址: https://gitcode.com/GitHub_Trending/le/lerobot 还在为复杂…...

终极GTA5安全增强菜单:YimMenu新手完全指南

终极GTA5安全增强菜单:YimMenu新手完全指南 【免费下载链接】YimMenu YimMenu, a GTA V menu protecting against a wide ranges of the public crashes and improving the overall experience. 项目地址: https://gitcode.com/GitHub_Trending/yi/YimMenu 你…...

Hitboxer终极指南:专业级SOCD清理器与按键重映射工具,彻底解决游戏操作冲突

Hitboxer终极指南:专业级SOCD清理器与按键重映射工具,彻底解决游戏操作冲突 【免费下载链接】socd Key remapper for epic gamers 项目地址: https://gitcode.com/gh_mirrors/so/socd 在竞技游戏的世界里,每一次按键输入都可能是胜利的…...

三步秘籍:如何用127行代码轻松保存百度文库文档?

三步秘籍:如何用127行代码轻松保存百度文库文档? 【免费下载链接】baidu-wenku fetch the document for free 项目地址: https://gitcode.com/gh_mirrors/ba/baidu-wenku 还在为百度文库的付费文档而烦恼吗?每次找到心仪的资料&#x…...

专为求职者开发的“面馆”!!!摆脱面试焦虑!!!

🚀 写在前面 很多人准备面试的时候都会遇到一个痛点:题库太散。牛客网上刷几道、LeetCode上刷几道、CSDN上搜几篇面经……来来回回在不同的平台之间切换,效率很低。 于是我从今年3月开始,花了两个月时间,基于之前积累…...

终极指南:如何让外接Magic Trackpad在Windows上完美实现三指拖拽功能

终极指南:如何让外接Magic Trackpad在Windows上完美实现三指拖拽功能 【免费下载链接】ThreeFingersDragOnWindows Enables macOS-style three-finger dragging functionality on Windows Precision touchpads. 项目地址: https://gitcode.com/gh_mirrors/th/Thre…...

独立开发者如何利用 Taotoken 透明计费机制精准控制项目预算

独立开发者如何利用 Taotoken 透明计费机制精准控制项目预算 1. 项目开发中的成本管理痛点 对于独立开发者和小型工作室而言,大模型API的调用成本往往是项目预算中最难预测的部分。传统接入方式通常存在几个典型问题:计费颗粒度粗放、用量统计滞后、缺…...

如何用3套模板告别知识碎片化?Obsidian Zettelkasten模板全解析

如何用3套模板告别知识碎片化?Obsidian Zettelkasten模板全解析 【免费下载链接】Obsidian-Templates A repository containing templates and scripts for #Obsidian to support the #Zettelkasten method for note-taking. 项目地址: https://gitcode.com/gh_mi…...

通用框架操作系统:构建可插拔应用生态的架构实践

1. 项目概述:一个“野心勃勃”的通用框架操作系统 最近在开源社区里闲逛,又看到了一个挺有意思的项目,叫 TELLEBO/universal-framework-os 。光看这个名字,就透着一股“野心”——“通用框架操作系统”。这可不是我们平常说的Wi…...

仅限前500名开发者获取:.NET 9 AI本地部署自动化脚本包(含模型自动下载/量化/缓存预热/健康检查)

更多请点击: https://intelliparadigm.com 第一章:.NET 9 AI 推理本地部署概览 .NET 9 原生强化了对 AI 工作负载的支持,通过新增的 Microsoft.ML.GenAI 库、内置 ONNX Runtime 集成以及轻量级模型服务主机( GenAIServer&#x…...

主构造函数+record struct+required修饰符=零冗余实体层?手把手构建高可测DDD核心模型

更多请点击: https://intelliparadigm.com 第一章:主构造函数record structrequired修饰符零冗余实体层?手把手构建高可测DDD核心模型 在 C# 12 的现代 DDD 实践中,实体建模正经历一场静默革命——主构造函数、record struct 和 …...