In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces the raspberry pie how to expand the memory card space, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, let the editor take you to understand it.
Making a system image for raspberry pie usually requires a 4G SD or TF card, but do you know that if your SD card is 8G or 16G or larger, you can only use SD cards within 4G when you make various types of Linux and boot into the system, and the rest of the excess is a blank unpartitioned space. This is a great waste, if we want to make full use of the space of the SD card, we can use fdisk to expand the partition table of the SD card.
Operation process
Use the fdisk command for partition operations (it is best to be familiar with the use of fdisk before actual operation)
Command format:
Fdisk / such as: fdisk / dev/sda
After entering fdisk, use the single button command
M display Help
P list all partitions
D delete partition
N New partition
W save disk exit
Q exit without saving the disk
Press p to list all partitions, so there are two or three partitions
The first partition is the FAT32 partition, which is used for boot
The second partition is the Linux primary partition
The third partition is the Linux Swap swap file partition (which may not be in the virtual machine)
Write down the Start Sector number of the primary partition of Linux with a pen (122880 in my img file)
Press d key Partition Number (partition number) to select 2, delete linux primary partition (2nd zone) if there is a linuxSwap partition, press d key Partition Number (partition number) to select 3, delete linuxSwap partition (3rd zone)
Press p to list all partitions, so you can see that only the first partition is left
Press the n key to recreate the linux primary partition
Partition Type (classification type) Select P (Primary)
Partition Number (partition number) Select 2
First Sector (starting Sector) be sure to enter the Start Sector number you just wrote down (mine is 122880)
Last Sector (termination Sector) use the default value and enter directly
Press p key to list all partitions, you can see that there are two partitions, the linux primary partition is in the second, and the starting position is the original location.
Press w key to save disk and exit fdisk
Next, restart immediately and don't do anything else.
Sudo reboot
Immediately after restarting and logging in, use the following command
Sudo resize2fs / dev/mmcblk0p2
This command will extend the second partition to the new space
Check the usage of the hard drive, OK
Df-h
Thank you for reading this article carefully. I hope the article "how to expand the memory card space of raspberry pie" shared by the editor will be helpful to everyone. At the same time, I also hope that you will support and pay attention to the industry information channel. More related knowledge is waiting for you to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.