先装了Win7系统,之后又装了个Ubuntu系统,由于在装Ubuntu的时候,系统分区没分好,导致整个硬盘大部分都被分给了Win7系统。
但是,常用的是Ubuntu系统,整个硬盘2T,但是Ubuntu中Home才分了250GB,用着用着空间就不足了。剩下的空间被Win7系统分作CDEF盘了。
现在需要在Ubuntu中拉Android代码编译。只有两种方法了:
方法一:重装系统
方法二:格式化Win7里面的那几个盘子,将其挂载到Ubuntu的Home目录下。
下面讲讲第二种方式
1.格式化磁盘:
使用df命令查看当前系统盘情况,比如现在希望格式化sdb7
a.使用命令:sudo mkfs -t ext3 /dev/sdb7
如果执行后开始出现进度就是正在执行,需要等待,是需要时间的。
最后显示如下:
- mke2fs 1.41.14 (22-Dec-2010)
- Filesystem label=
- OS type: Linux
- Block size=4096 (log=2)
- Fragment size=4096 (log=2)
- Stride=0 blocks, Stripe width=0 blocks
- 12804096 inodes, 51199147 blocks
- 2559957 blocks (5.00%) reserved for the super user
- First data block=0
- Maximum filesystem blocks=0
- 1563 block groups
- 32768 blocks per group, 32768 fragments per group
- 8192 inodes per group
- Superblock backups stored on blocks:
- 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
- 4096000, 7962624, 11239424, 20480000, 23887872
- Writing inode tables: done
- Creating journal (32768 blocks): done
- Writing superblocks and filesystem accounting information: done
- This filesystem will be automatically checked every 36 mounts or
- 180 days, whichever comes first. Use tune2fs -c or -i to override.
b.sdb7是用df命令查看出的,列出了已挂载的设备列表。
如果执行a的时候出现如下提示:
- mke2fs 1.41.14 (22-Dec-2010)
- /dev/sdb1 is mounted; will not make a filesystem here!
说明这个磁盘已挂载需要取消挂载:
执行命令:
sudo umount /dev/sdb7
注意:是umount,不是unmount !
执行完这个命令后再执行a即可。
c.不能直接将磁盘挂载到home下,只能先挂载到mnt下:
执行命令挂载到/mnt下:
然后:
然后执行命令打开文件权限:
- sudo chmod 777 -R /mnt/dir
ok,现在进入你的home下的dir目即可