When installing with Wubi, the default is 20G space, obviously not enough to add space from windows
First, use the Win7 disk partitioning tool to draw a new partition (lossless data) (such as NTFS) from any disk with more free space, which is used as a new space for Ubuntu.
Computer--management--Disk Management--disk 0--Select which partition, right--compress volume--wait for a piece of free partition--right-click New Simple volume, follow the instructions to go down
And then:
Mount the new disk under Linux to the specified directory/home or root directory/under (be sure to do a backup).
For example, add disk space to the/home directory:
Df-lh
Locate the location where the new disk is mounted, such as/DEV/SDA10, and the device number varies.
3. Reboot into single user mode (recovery modes), log in as root.
4, the format of the new partition is EXT4, can also be ext3:
Mkfs.ext4/dev/sda10
5. Back Up/home directory
Mv/home/home.bak
6. If the/home directory is already mounted, uninstall first, then delete:
Umount/home
Rm/home
7. Re-create the/home directory:
Mkdir/home
8. Mount the partition you just formatted to the/home directory:
Mount/dev/sda10/home
9. Restore all Files under/home:
Cp-r/home.bak/*/Home
10, set back the original user directory permissions:
Chown-r name:name File
Name is the user name, file is the user path, such as/home/zhengwei
11, modify the permissions:
CD ~/
Chown name. DMRC
Cd/home
Chown name Name
chmod 755 Name
12, edit the Fstab, so that the newly-entered devices automatically mount:
Vim/etc/fstab
Edit file,/dev/hda10/home Auto RW 0 0
Auto-recognize the disk format instead of auto. RW is readable and writable.
Last reboot, enter the system to view the remaining space of/home and/
Problems encountered:
In recover mode, unable to get root read-write permission, CP and MV operations are not valid
Execution at the command line: Mount-o REMOUNT,RW/
Can.
How to clean:
From the Internet to summarize the following several commonly used garbage cleanup methods:
1) Very useful to clean up the junk command:
#sudo Apt-get AutoClean
#sudo Apt-get Clean
#sudo Apt-get Autoremove
These three commands mainly clean up the upgrade cache and garbage packets.
2) Delete the old kernel and related configuration, you can go to the/boot directory, delete the old core/lib/modules the relevant module files
It's too dangerous!! If the kernel is deleted, there is no way to start it.
But there are ways to recover:
Http://www.linuxidc.com/Linux/2012-02/55303.htm
Ubuntu Additional disk space