linux
在windows下如何格式化linux的分区?
一、在windows下如何格式化linux的分区?
其实不用重装,修复以下引导程序就能重新启动linux可以拿linux livecd光盘启动,运行boot-repiar, 选择推荐修复,就可以了你要在windows下格式化linux分区,要先用分区软件,删除那个分区,然后重新分区,再格式化windows不能识别ext*格式的分区,所以windows下看不到
二、linux分区怎么删?
你好,我是【你呀你呀别再推卸啦】,很高兴为你解答。删除linux分区,用到的工具:xshell,步骤如下:
登录linux服务器,执行以下命令:
fdisk -l
输出以下信息:Disk /dev/vda: 32.2 GB, 32212254720 bytes, 62914560 sectorsUnits = sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk label type: dosDisk identifier: 0x000c1d0e Device Boot Start End Blocks Id System/dev/vda1 * 2048 61442047 30720000 83 LinuxDisk /dev/vdb: 75.2 GB, 75161927680 bytes, 146800640 sectorsUnits = sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk label type: dosDisk identifier: 0x000cc312 Device Boot Start End Blocks Id System/dev/vdb1 2048 146800639 73399296 83 Linux
说明:测试服务器有两个分区,vda1和vdb1。效果图:2.删除vdb1分区,执行以下命令:fdisk /dev/vdb1
接着输入:d
然后选择分区号最后输入w保存。注意事项:删除分区前备份数据。更多专业的科普知识,欢迎关注我。如果喜欢我的回答,也请给我赞或转发,你们的鼓励,是支持我写下去的动力,谢谢大家。三、linux默认分区?
合理的规划分区:
1、分区结构之一:四个主分区,没有扩展分区
即:[主|分区1] [主分|区2] [主|分区3] [主|分区4]
这种情况,如果您想在一个磁盘上划分五个以上分区,这样是行不通的
2、三个主分区 一个扩展分区
即:[ 主 | 分区1 ] [ 主 | 分区2 ] [ 主 | 分区3 ] [扩展分区]
|
[逻辑|分区5] [逻辑|分区6] [逻辑|分区7] [逻辑|分区8] ... ...
这种情况行得通,而且分区的自由度比较大;分区也不受约束,能分超过5个分区
3、最合理的分区结构应该是主分区在前,扩展分区在后,然后在扩展分区中划分逻辑分区。主分区的个数+扩展分区个数要控制在四个之内
即:[主|分区1] [扩展分区]
|
[逻辑|分区5] [逻辑|分区6] [逻辑|分区7] [逻辑|分区8] ... ...
或:[主|分区1] [主|分区2] [扩展分区]
|
[逻辑|分区5] [逻辑|分区6] [逻辑|分区7] [逻辑|分区8] ... ...
或:[主|分区1] [主|分区2] [主|分区3] [扩展分区]
|
[逻辑|分区5] [逻辑|分区6] [逻辑|分区7] [逻辑|分区8] ... ...
4、最不合理的分区结构: 主分区包围扩展分区
[主|分区1] [主|分区2] [扩展分区] [主|分区4] [空白未分区空间]
|
[逻辑|分区5] [逻辑|分区6] [逻辑|分区7] [逻辑|分区8] ... ...
这样 [主|分区2] 和 [主|分区4] 之间的 [扩展分区] 是有自由度,但[主|分区4]后的[空白未分区空间]怎么办?除非把主分区4完全利用扩展分区后的空间,否则您想在主分区4后再划一个分区是不可能的,划分逻辑分区更不可能; 虽然类似此种办法也符合一个磁盘四个主分区的标准,但这样主分区包围扩展分区的分区方法实在不可取
四、linux系统能直接使用文件系统的分区?
答,linux磁盘分区,主要分为基本分区(primary partion)和扩充分区(extension partion)两种,基本分区和扩充分区的数目之和不能大于四个。且基本分区可以马上被使用但不能再分区。扩充分区必须再进行分区后才能使用,也就是说它必须还要进行二次分区。
在 Linux 中,每一个硬件设备都映射到一个系统的文件,对于硬盘、光驱等 IDE 或 SCSI 设备也不例外。Linux把各种 IDE 设备分配了一个由 hd 前缀组成的文件;而对于各种 SCSI 设备,则分配了一个由 sd 前缀组成的文件
五、linux中怎么手动分区?
我也用虚拟机玩linux的,最开时在装的时候我对linux分区一点都不了解,甚至对windows分区都不了解,不过也胡乱的把linux装好了,因为对于虚拟机,我用VC,不知道你用什么,在这里面有一个他帮你提供的方案,挺好的,这样我们就不用去手动分区,或者只要你随便设置每个分区的值,只要能装行了!因为如果你设得过小的话, 他会提示你无法安装,最小值是多少的, 你说的从硬盘分出5个G来我觉得不妥,讲讲我的办法吧,我是把虚拟机装好后,然后指定虚拟硬盘在一个我不经常用的盘里面(如F盘 20G),在当然,linux不会占用这么多的,这是由虚拟机分配给他的,如果你再在linux系统里面加入软件的时候,它会自动增大,这样的话,你可以不用去手动给它分配多大,这样一来,你仍然可以在这个盘里放入其它windos系统里面的东西,也不会浪费太多的空间,比如你分给它5个G的空间,当linux用不到这么多的时候,那不是就浪费了吗? 等你装好了,能进linux系统了再对分区了解这样来得快多了! 再说了,虚拟机格式化(我的没有格式化,可以不用格式化),只是我的理解,格式化肯定是把虚拟机分配给linux的硬盘空间给格式化了但是不会对你的主系统windows造成任何影响的! 再啰嗦的讲一下我理解的虚拟机吧: 其实虚拟机就是在你的主操作系统的基础上,再虚拟出一台完全的计算机,这个跟你买一台裸机是完全一样的!所以格式化肯定是格式化了,不过格式化的与你的主操作系统完全没有关系的!它就像一台与你主系统完全无关的独立的计算机一样!只是建立虚拟机是建立在你的主系统之上的! 相关分区知识了解一下!有助于你真正的去了解各个分区作用,也就是基础中的基础! 各分区的作用 在Linux中规定,每一个硬盘设备最多能有4个主分区(其中包含扩展分区)构成,任何一个扩展分区都要占用一个主分区号码,也就是在一个硬盘中,主分区和扩展分区一共最多是4个。对于早期的DOS和Windows(Windows 2000以前的版本),系统只承认一个主分区,可以通过在扩展分区上增加逻辑盘符(逻辑分区)的方法,进一步地细化分区。 主分区的作用就是计算机用来进行启动操作系统的,因此每一个操作系统的启动,或者称作是引导程序,都应该存放在主分区上。这就是主分区和扩展分区及逻辑分区的最大区别。我们在指定安装引导Linux的bootloader的时候,都要指定在主分区上,就是最好的例证。 Linux规定了主分区(或者扩展分区)占用1至16号码中的前4个号码。以第一个IDE硬盘为例说明,主分区(或者扩展分区)占用了hda1、hda2、hda3、hda4,而逻辑分区占用了hda5到hda16等12个号码。因此,Linux下面每一个硬盘总共最多有16个分区。 对于逻辑分区,Linux规定它们必须建立在扩展分区上(在DOS和Windows系统上也是如此规定),而不是主分区上。因此,我们可以看到扩展分区能够提供更加灵活的分区模式,但不能用来作为操作系统的引导。 除去上面这些各种分区的差别,我们就可以简单地把它们一视同仁了。 在Linux下,硬盘是一个设备,实际上Linux下什么都是设备。对于IDE硬盘而 言,Linux认为存在四个设备,对应于IDE的四个位置接的设备。如果装过机器 我们知道主板上有两个槽,IDE0和IDE1,每个槽上能挂两个设备,主盘和从 盘,这些盘可以是硬盘可以是光驱。那么Linux是怎么认为这些设备的呢?在 Linux下,这些设备用/dev/hdx来标示。IDE0上的主盘就是/dev/hda,从盘就是 hdb,依此类推,如果可以有多个IDE槽就可以延续到hde hdf等。总之每条硬盘 线上接的设备都被Linux认为是一个/dev/hdx设备。如果你的机器是IDE0槽上的 主盘是硬盘,那它就是hda,如果IDE1的槽上主盘是一个光驱,那它就是hdc。 在windows下fdisk是对”硬盘1“,”硬盘2“进行操作,而linux下的fdisk就 是对/dev/hda,/dev/hdb等进行操作。这样做很灵活,很直观,不是么? 那么Linux下怎么看分区呢?Linux下的分区概念是,硬盘上的每个分区也是一 个设备(又来了)。他们的标志是/dev/hdxy,其中hdx根前面一样表示哪个硬 盘,y表示第几个分区。以hda为例。hda1就是第一个分区,hda4就是第四个分 区位置。逻辑分区从hda5开始。所以刚才那个例子中,Linux看来就是hda有 10G。hda1是主分区,格式是windows。hda2是扩展分区,在它上划出了hda5和 hda6,格式是windows。hda还有2G剩余空间可以继续建立hda3和hda4。注意因 为hda2空间已经被划分完,所以无法再建立逻辑分区。 也不知道这是不是你真正想要的,还是你要的只是 给你一个具体数值呢!
六、linux读写要怎么分区?
在Linux中,可以使用fdisk命令来进行硬盘的分区。具体步骤如下:
打开终端,输入fdisk目标硬盘,例如fdisk /dev/hdd。
按"p"键打印分区表,查看目标硬盘是否已经分区。
按"n"键新建一个分区。根据提示选择分区类型(主分区或扩展分区),然后选择分区号(1-4)。
直接按回车表示从第1柱面开始分区。根据提示输入柱面数或分区大小。
按"w"键保存并退出。
七、linux磁盘分区定义?
1. Linux磁盘分区是指将硬盘划分为不同的区域,每个区域可以独立管理和使用。2. 这样做的原因是为了更好地组织和管理文件系统,提高磁盘的利用率和性能。通过分区,可以将操作系统、应用程序、用户数据等分别存放在不同的区域,避免彼此之间的干扰和冲突。3. 此外,磁盘分区还可以提供更好的数据安全性和灵活性。例如,可以将系统文件和用户文件分别存放在不同的分区中,当系统出现问题时,可以更方便地恢复和修复。同时,如果需要更改文件系统的大小或格式,只需要对相应的分区进行操作,而不会影响其他分区的数据。在Linux系统中,常见的磁盘分区定义包括主分区、扩展分区和逻辑分区。主分区用于安装操作系统和常用程序,扩展分区可以进一步划分为多个逻辑分区,用于存放用户数据。此外,还可以使用LVM(逻辑卷管理)技术对磁盘进行更灵活的管理和扩展。
八、linux在新分区建立文件系统的命令?
答案如下
1.命令mkfs:对一个分区创建新的文件系统,即高级格式化分区
命令格式: mkfs [ -V ] [ -t fstype] [ fs-options ] filesys [ blocks ]
常用选项解释:
[ -t fstype ]:指定要创建的文件系统类型,默认是ext2
mkfs -t ext3 =mkfs.ext3 = mke2fs -j
mkfs -t ext2 =mkfs.ext2 = mke2fs
mkfs -t vfat =mkfs.vfat
2.命令mke2fs:专用于创建ext2/ext3文件系统
命令格式:mke2fs [options] device
常用选项解释:
-j: 创建ext3文件系统
-L lablename:创建文件系统并制定卷标名称
-m: 指定预留给超级用户管理用的磁盘块百分比
-b: 创建文件系统并制定磁盘块大小(1024,2048,4096字节)
-i: 指定为每个inode(文件)预留的磁盘空间(单位字节),结合-b 选项指定的块大小我们可以计算出每个文件占用的磁盘块数量
-N: 直接指定预留给相应分区的inode数量
-F: 强制运行mke2fs
-E: 指定额外的创建文件系统选项
3. 命令blkid:打印/显示块设备属性,包括UUID,TYPE,LABLE等信息
常用命令格式:blkid [device]
4.命令e2label:查看或者修改文件系统卷标
常用命令格式:e2label device [new-label ]
5.命令tune2fs:调整可调整的文件系统参数
常用命令格式:tune2fs [options]device
常用选项解释:
-j: 调整文件系统成ext3类型
-m: 调整预留给超级用户的磁盘块百分比
-L: 调整文件系统的卷标
-i: 设置文件系统每隔多少天自动检查(使用e2fsck,0或者-1表示禁用此功能
-c: 设置等待检查的最大挂载次数(如果设置为0,或者-1表示关闭依据挂载次数进行检查)
-C: 设置文件系统已经挂载的次数
-l: 列出或者显示文件系统超级块内容
6.命令dumpe2fs:dump ext2/ext3 filesystem information
常用命令格式:dumpe2fs [options]device
常用选项解释:
-h: 只显示超级块信息而不包括块组信息
7.命令fsck:检查并修复文件系统
常用命令格式:fsck [options] device
常用选项解释:
-a 发现问题后自动修复文件系统,不询问用户是否需要修复
-t fstype 指定要检查和修复的文件系统类型,一般不需要指定
8.命令e2fsck:专门检查ext2/3文件系统
常用命令格式:e2fsck [options] device
常用选项解释:
-a|-p 自动修复文件系统
-n 只检查不修复
热点信息
-
在Python中,要查看函数的用法,可以使用以下方法: 1. 使用内置函数help():在Python交互式环境中,可以直接输入help(函数名)来获取函数的帮助文档。例如,...
-
一、java 连接数据库 在当今信息时代,Java 是一种广泛应用的编程语言,尤其在与数据库进行交互的过程中发挥着重要作用。无论是在企业级应用开发还是...
-
一、idea连接mysql数据库 php connect_error) { die("连接失败: " . $conn->connect_error);}echo "成功连接到MySQL数据库!";// 关闭连接$conn->close();?> 二、idea连接mysql数据库连...
-
要在Python中安装modbus-tk库,您可以按照以下步骤进行操作: 1. 确保您已经安装了Python解释器。您可以从Python官方网站(https://www.python.org)下载和安装最新版本...