我是Ubuntu的新手。最近,我重新安装了Ubuntu,发现原始的Ubuntu系统看起来像这样
Filesystem Size Used Avail Use% Mounted on
/dev/nvme0n1p8 69G 4.6G 61G 7% /media/david/ec0fd309...
我当前的系统是
/dev/nvme0n1p5 15G 8.8G 5.4G 62% /
有Windows系统,/media/david/Windows
所以我想知道是否有一种方法可以将旧的系统合并为新的系统。
的结果 sudo fdisk -l
Device Start End Sectors Size Type
/dev/nvme0n1p1 2048 534527 532480 260M EFI System
/dev/nvme0n1p2 534528 567295 32768 16M Microsoft reserved
/dev/nvme0n1p3 567296 288354303 287787008 137.2G Microsoft basic data
/dev/nvme0n1p4 498069504 500117503 2048000 1000M Windows recovery environment
/dev/nvme0n1p5 288354304 320354303 32000000 15.3G Linux filesystem
/dev/nvme0n1p6 320354304 352354303 32000000 15.3G Linux swap
/dev/nvme0n1p7 352354304 352854015 499712 244M Linux filesystem
/dev/nvme0n1p8 352854016 498069503 145215488 69.3G Linux filesystem
我想我需要将存储空间合并/dev/nvmen1p8
到/dev/nvmen1p5
我搜索并找到了一些与GParted有关的解决方案,但是我使用默认设置来重新安装Ubuntu,因此我认为可能是一种方便的方法。
这是有关所有文件系统的信息。
Filesystem Size Used Avail Use% Mounted on
udev 3.8G 0 3.8G 0% /dev
tmpfs 775M 9.6M 766M 2% /run
/dev/nvme0n1p5 15G 9.1G 5.1G 65% /
tmpfs 3.8G 132M 3.7G 4% /dev/shm
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 3.8G 0 3.8G 0% /sys/fs/cgroup
/dev/nvme0n1p1 256M 34M 223M 14% /boot/efi
tmpfs 775M 56K 775M 1% /run/user/1000
/dev/nvme0n1p8 69G 4.6G 61G 7% /media/david/ec0fd309...
/dev/nvme0n1p3 138G 33G 105G 24% /media/david/Windows
的结果 sudo mkdir /mntp7 && sudo mount /dev/nvme0n1p7 /mntp7 && ls -l /mntp7
➜ / sudo mkdir /mntp7
[sudo] password for david:
➜ / ls
bin boot cdrom dev etc home initrd.img initrd.img.old lib lib64 lost+found media mnt mntp7 opt proc root run sbin snap srv sys tmp usr var vmlinuz vmlinuz.old
➜ / sudo mount /dev/nvme0n1p7 /mntp7
➜ / ls -l /mntp7
total 161417
-rw-r--r-- 1 root root 1246246 Apr 20 20:02 abi-4.4.0-75-generic
-rw-r--r-- 1 root root 1407843 Feb 5 19:32 abi-4.8.0-36-generic
-rw-r--r-- 1 root root 1408671 Apr 20 21:07 abi-4.8.0-49-generic
-rw-r--r-- 1 root root 190214 Apr 20 20:02 config-4.4.0-75-generic
-rw-r--r-- 1 root root 199575 Feb 5 19:32 config-4.8.0-36-generic
-rw-r--r-- 1 root root 199588 Apr 20 21:07 config-4.8.0-49-generic
drwxrwxr-x 2 root root 1024 Apr 25 19:26 efi
drwxr-xr-x 5 root root 1024 Apr 26 19:00 grub
-rw-r--r-- 1 root root 37695951 Apr 26 19:00 initrd.img-4.4.0-75-generic
-rw-r--r-- 1 root root 41298900 Apr 25 19:36 initrd.img-4.8.0-36-generic
-rw-r--r-- 1 root root 40063966 Apr 26 15:33 initrd.img-4.8.0-49-generic
drwx------ 2 root root 12288 Apr 25 19:26 lost+found
-rw-r--r-- 1 root root 182704 Jan 28 2016 memtest86+.bin
-rw-r--r-- 1 root root 184380 Jan 28 2016 memtest86+.elf
-rw-r--r-- 1 root root 184840 Jan 28 2016 memtest86+_multiboot.bin
-rw------- 1 root root 3883390 Apr 20 20:02 System.map-4.4.0-75-generic
-rw------- 1 root root 4060748 Feb 5 19:32 System.map-4.8.0-36-generic
-rw------- 1 root root 4066773 Apr 20 21:07 System.map-4.8.0-49-generic
-rw------- 1 root root 7081872 Apr 20 20:02 vmlinuz-4.4.0-75-generic
-rw-r--r-- 1 root root 7297312 Apr 25 19:27 vmlinuz-4.8.0-36-generic
-rw------- 1 root root 7305856 Apr 20 21:07 vmlinuz-4.8.0-49-generic
-rw------- 1 root root 7307768 Apr 25 19:36 vmlinuz-4.8.0-49-generic.efi.signed
做的结果 vi /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/nvme0n1p5 during installation
UUID=720839ca-117c-4103-91a8-c21f3b39cf7c / ext4 errors=remount-ro 0 1
# /boot/efi was on /dev/nvme0n1p1 during installation
UUID=908D-193B /boot/efi vfat umask=0077 0 1
# swap was on /dev/nvme0n1p6 during installation
UUID=468d2512-9472-4d90-af6c-f38d5614be13 none swap sw 0 0
的结果 sudo mkdir /mntp1 && sudo mount /dev/nvme0n1p1 /mntp1 && ls -l
➜ ~ sudo mkdir /mntp1 && sudo mount /dev/nvme0n1p1 /mntp1 && ls -l /mntp1
ls: cannot open directory '/mntp1': Permission denied
➜ ~ cd /
➜ / sudo su
root@david:/# cd mntp1
root@david:/mntp1# ls -l
total 8
drwx------ 2 root root 4096 Mar 29 02:52 BOOT
drwx------ 5 root root 4096 Apr 25 19:36 EFI
root@david:/mntp1# cd BOOT
root@david:/mntp1/BOOT# ls -l
total 3096
-rwx------ 1 root root 3170304 June 16 2016 BOOT.SDI
root@david:/mntp1/EFI# ls -l
total 12
drwx------ 2 root root 4096 Mar 29 02:52 Boot
drwx------ 4 root root 4096 Mar 29 02:52 Microsoft
drwx------ 3 root root 4096 Apr 27 18:45 ubuntu
在等待有关p1和/ etc / fstab的信息时,我做了以下情况。
在我们确定已涵盖所有内容之前,请不要应用这些操作。
更新#1:
请记住以下几点:
始终swapoff
在任何已安装的交换分区上发出a来开始整个过程,并swapon
在同一交换分区上发出a来结束整个过程。
一个移动是通过在一个分区的中心指向鼠标指针并拖动它做左/右与手形光标
一调整大小被分隔的左/右侧/拖动到左侧向右方向箭头光标完成
如果无法以图形方式移动/调整分区大小,则可能必须手动输入所需的特定数字数据(除非我指示您这样做,否则不要这样做)
您可以通过右键单击主窗口下部的分区来开始任何移动/调整大小,然后从弹出菜单中选择所需的操作,然后在新的移动/调整大小窗口中完成该操作
Proposed actions per partition:
NB. Make sure there are no links in your p5 partition to p7/p8 directory or files.
If so, these must be removed.
1 /dev/nvme0n1p5
to be expanded to larger size
2 /dev/nvme0n1p6
Current Linux swap. Move partition to end of disk.
3 /dev/nvme0n1p7
p7 holds grub/efi files. Move partition to right of disk.
4 /dev/nvme0n1p8
old Ubuntu, will be deleted, space re-used.
Boot from the Ubuntu Live USB/CD and select Try Ubuntu.
Start gparted.
Right-click p8; select 'Delete'; click the green Apply sign; Apply; Close.
More unallocated space and in the graphic bar.
Right-click p7; select Resize/Move.
In the Resize/Move window click the middle of the slider; drag it to the right.
Click Resize/Move; Apply sign; Close.
Right-click p6 Linux-swap; select 'Swapoff'.
Right-click p6 Linux-swap; select Resize/Move.
In the Resize/Move window click the middle of the slider; drag it to the right.
Click Resize/Move; Apply sign; Close.
Right-click p6 Linux-swap; select 'Swapon`
Right-click p5; select Resize/Move.
In the Resize/Move window click the right arrow of the slider and enlarge to the full.
Click Resize/Move; Apply sign; Close.
Close gparted.
更新2:
要为Ubuntu的双引导配置正确地准备Windows,请执行以下操作。
change what the power buttons do
change options that are unavailable
fast startup
powercfg /h off
chkdsk /f c:
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句