加载中…
个人资料
  • 博客等级:
  • 博客积分:
  • 博客访问:
  • 关注人气:
  • 获赠金笔:0支
  • 赠出金笔:0支
  • 荣誉徽章:
正文 字体大小:

Linux网络操作系统第11次作业

(2022-04-13 11:32:57)
标签:

教育

一. 通过菜单 虚拟机-设置-添加 -磁盘 向系统中添加scsi磁盘,重启计算机,然后显示系统当前磁盘的分区信息。

 # fdisk  -l 

新加磁盘设备为:/dev/hdb 

1.用fdisk新建一个分区。

 # fdisk  /dev/hdb 

The number of cylinders for this disk is set to 9733.

There is nothing wrong with that, but this is larger than 1024,

and could in certain setups cause problems with:

1) software that runs at boot time (e.g., old versions of LILO)

2) booting and partitioning software from other OSs

   (e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): n(建立)

First cylinder (2387-9733, default 2387): 2387

Using default value 2387

Last cylinder or +size or +sizeM or +sizeK (2387-9733, default 9733): +100M(输入大小)

Command (m for help): w(保存退出)

The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 16: Device or resource busy.

The kernel still uses the old table.

The new table will be used at the next reboot.

Syncing disks.

[root@linux /]# reboot

最后的警告,要求系统重启,新的分区表才会生效。 

另外,我们还可以做如下的操作:

d--删除分区

a--调整活动分区

l --是列出分区类型,以供我们设置相应分区的类型

m -- 是列出帮助信息

n-- add a new partition 添加一个分区;

p-- print the partition table 注:p 列出分区表;

q-- quit without saving changes 注:不保存退出;

t-- change a partition's system id 注:t 改变分区类型;

w-- write table to disk and exit 注:把分区表写入硬盘并退出;

x-- extra functionality (experts only) 注:扩展应用,专家功能;

2.完成建立主分区(p)、建立扩展分区(e)、删除分区(d)、调整活动分区(a)、再查看系统的分区表有何变化。

 # fdisk    -l

3.格式化该分区。

 # mkfs -t ext3   /dev/hdb1 

4.把该分区挂载到/mnt/music目录。

 # mkdir  /mnt/music

 # mount  /dev/hdb1   /mnt/music 

5.在/etc/fstab最后添加一项,使其每次开机都自动挂载。

 # vim  /etc/fstab

Linux网络操作系统第11次作业

 二、下载fuse-ntfs-3g-2013.1.13-1.el6.rf.x86_64.rpm,双击安装。在LINUX系统中安装该包,则LINUX系统也可以识别NTFS文件系统

1.插入U盘后,就可查看该U盘的设备名(名称不固定,比如/dev/sdc1)及分区表信息。

 # fdisk  -l 

2.然后手动挂载。

 # mkdir  /media/udisk

 # mount    /dev/sdc1   /media/udisk

 # ls  /media/udisk/

3.手动缷载

 # umount    /dev/sdc1   /media/udisk

 # umount    /dev/sdc1   

 # umount   /media/udisk




 

0

阅读 收藏 喜欢 打印举报/Report
  

新浪BLOG意见反馈留言板 欢迎批评指正

新浪简介 | About Sina | 广告服务 | 联系我们 | 招聘信息 | 网站律师 | SINA English | 产品答疑

新浪公司 版权所有