Arch Linux raspberrypi 安装后扩展root分区
来源:互联网 发布:笔顺查询软件下载 编辑:程序博客网 时间:2024/05/21 16:54
之前因为比较忙,导致树莓派一直在吃灰,同时,貌似官方推荐的Raspbian有点儿问题,配置文件一直保存不了,然后看着别人玩儿Arch好像很不错的样子就试玩了一把,其中装系统没啥说的,关键是分区,Arch Linux提供给树莓派的是img镜像,导致镜像多大,总共可用的空间就多大,这明显是不能接受的,所以搜索了一下,把分区搞定了,最近确实变懒了,直接上转载来的文章
转载地址为:http://blog.sina.com.cn/s/blog_578925940101gt5p.html 如有问题请及时联系我我随时撤销掉
Arch Linux 3.6.11-14-ARCH+ (ttyAMA0)
alarmpi login: root
鳳assword:
Last login: Thu Jan 1 00:00:18 on ttyAMA0
[root@alarmpi ~]# ls
[root@alarmpi ~]# fdisk /dev/mmcblk0
Welcome to fdisk (util-linux 2.23.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Command (m for help): p
Disk /dev/mmcblk0: 7969 MB, 7969177600 bytes, 15564800 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x00057540
/dev/mmcblk0p1 2048 186367 92160 c W95 FAT32 (LBA)//这里是引导区,不变
/dev/mmcblk0p2 186368 3667967 1740800 5 Extended //扩展分区需要重建
/dev/mmcblk0p5 188416 3667967 1739776 83 Linux //逻辑分区需要重建
Command (m for help): d
Partition number (1,2,5, default 5): //直接回车,取默认 5,顺序要保证是先5,后2
Partition 5 is deleted
Command (m for help): p
Disk /dev/mmcblk0: 7969 MB, 7969177600 bytes, 15564800 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x00057540
/dev/mmcblk0p1 2048 186367 92160 c W95 FAT32 (LBA)
/dev/mmcblk0p2 186368 3667967 1740800 5 Extended
Command (m for help): d
Partition number (1,2, default 2): //直接回车,取默认 2
Partition 2 is deleted
Command (m for help): p
Disk /dev/mmcblk0: 7969 MB, 7969177600 bytes, 15564800 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x00057540
/dev/mmcblk0p1 2048 186367 92160 c W95 FAT32 (LBA)
Command (m for help): n
Partition type:
Select (default p): e//建扩展分区
Partition number (2-4, default 2):
First sector (186368-15564799, default 186368):
Using default value 186368
Last sector, +sectors or +size{K,M,G} (186368-15564799, default 15564799):
Using default value 15564799
Partition 2 of type Extended and of size 7.3 GiB is set
Command (m for help): p
Disk /dev/mmcblk0: 7969 MB, 7969177600 bytes, 15564800 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x00057540
/dev/mmcblk0p1 2048 186367 92160 c W95 FAT32 (LBA)
/dev/mmcblk0p2 186368 15564799 7689216 5 Extended
Command (m for help): n
Partition type:
Select (default p): l//建逻辑分区
Adding logical partition 5
First sector (188416-15564799, default 188416):
Using default value 188416
Last sector, +sectors or +size{K,M,G} (188416-15564799, default 15564799):
Using default value 15564799
Partition 5 of type Linux and of size 7.3 GiB is set
Command (m for help): p
Disk /dev/mmcblk0: 7969 MB, 7969177600 bytes, 15564800 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x00057540
/dev/mmcblk0p1 2048 186367 92160 c W95 FAT32 (LBA)
/dev/mmcblk0p2 186368 15564799 7689216 5 Extended
/dev/mmcblk0p5 188416 15564799 7688192 83 Linux
Command (m for help): w
The partition table has been altered!
然后重启, 进入系统后执行
ln -s /dev/mmcblk0p5 /dev/root
resize2fs /dev/root
结果:
[root@alarmpi ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 7.3G 446M 6.5G 7% /
devtmpfs 83M 0 83M 0% /dev
tmpfs 231M 0 231M 0% /dev/shm
tmpfs 231M 248K 231M 1% /run
tmpfs 231M 0 231M 0% /sys/fs/cgroup
tmpfs 231M 0 231M 0% /tmp
/dev/mmcblk0p1 90M 24M 67M 27% /boot
0 0
- Arch Linux raspberrypi 安装后扩展root分区
- Raspberrypi Linux: 为php安装protobuf扩展
- RaspberryPi安装后操作
- 树莓派扩展root分区
- arch linux root 自动登录
- arch linux安装玩fcitx后无法激活解决
- ARCH-LINUX 安装后wifi 不能联网修改
- Arch Linux 新版安装
- VMware安装Arch Linux
- Arch Linux安装详解
- VirtualBox安装Arch Linux
- Arch Linux 安装小记
- 安装Arch Linux详解
- Arch Linux 安装笔记
- Arch Linux安装
- Arch Linux 安装小记
- Arch linux 的安装
- Arch Linux安装记录
- Android SVN开发实战之目录结构介绍 .
- iOS-swift-如何实现树级目录的折叠和展开
- acdream 1222 Quantization Problem [dp]
- HTML css基础
- 视频文件格式分析(1):avi格式
- Arch Linux raspberrypi 安装后扩展root分区
- 通过web方式查看Android源码的方法
- 4-1复数类的运算符重载
- 打开固定文件的pr_debug .
- JAVA - 基础练习 - 枚举出彩票36选7的所有组合
- 富人和穷人的对比图,时刻提醒自己!
- MVC之前的那点事儿系列(10):MVC为什么不再需要注册通配符(*.*)了?
- 在Android上使用ZXing识别条码/二维码
- UrlRouting的理解