在将 Ubuntu 双启动到现有的 Windows 10 安装后,需要分区方面的帮助

在将 Ubuntu 双启动到现有的 Windows 10 安装后,需要分区方面的帮助

我得到了一台装有 Windows 10 的旧 Compaq Presario CQ60 笔记本电脑,我设置了双启动和 Ubuntu 18.04.2 LTS。我是 Linux 初学者,安装过程让我头疼不已,但一切正常。在努力学习终端和不同的分区命令 lsblk、fdisk、sfdisk 和 parted 时,我发现我遇到了一些分区问题,我不知道该怎么办。似乎有一个旧的 Windows 8 分区,我在安装时没有注意到。

使用命令 sudo parted -l 得到输出:

wildman@wildman-Compaq-Presario-CQ60-Notebook-PC:~$ sudo parted -l  
[sudo] password for wildman:   
Model: ATA ST320LT020-9YG14 (scsi)  
Disk /dev/sda: 320GB  

Sector size (logical/physical): 512B/4096B
Partition Table: msdos
Disk Flags: 

Number  Start   End    Size    Type      File system     Flags  
 1      1049kB  246GB  246GB   primary   ntfs            boot  
 2      246GB   262GB  16.1GB  primary   ext4  
 3      262GB   310GB  48.3GB  extended                  lba  
 5      262GB   308GB  46.2GB  logical   ext4  
 6      308GB   310GB  2146MB  logical   linux-swap(v1)  
 4      310GB   320GB  9707MB  primary   ntfs  

命令 lsblk 给出以下输出

wildman@wildman-Compaq-Presario-CQ60-Notebook-PC:~$ lsblk  
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT  
loop0    7:0    0  54.4M  1 loop /snap/core18/1055  
loop1    7:1    0 140.7M  1 loop /snap/gnome-3-26-1604/74  
loop2    7:2    0   3.7M  1 loop /snap/gnome-system-monitor/95  
loop3    7:3    0  35.3M  1 loop /snap/gtk-common-themes/1198  
loop4    7:4    0  42.8M  1 loop /snap/gtk-common-themes/1313  
loop5    7:5    0   8.4M  1 loop /snap/canonical-livepatch/81  
loop6    7:6    0   3.7M  1 loop /snap/gnome-system-monitor/100  
loop7    7:7    0  14.8M  1 loop /snap/gnome-characters/296  
loop8    7:8    0    91M  1 loop /snap/core/6350  
loop9    7:9    0 140.7M  1 loop /snap/gnome-3-26-1604/90  
loop10   7:10   0  1008K  1 loop /snap/gnome-logs/61  
loop11   7:11   0 149.9M  1 loop /snap/gnome-3-28-1804/67  
loop12   7:12   0  14.5M  1 loop /snap/gnome-logs/45  
loop13   7:13   0  14.8M  1 loop /snap/gnome-characters/292  
loop14   7:14   0   8.4M  1 loop /snap/nmap/249  
loop15   7:15   0   2.3M  1 loop /snap/gnome-calculator/260  
loop16   7:16   0 149.9M  1 loop /snap/gnome-3-28-1804/63  
loop17   7:17   0     4M  1 loop /snap/gnome-calculator/406  
loop18   7:18   0    16M  1 loop /snap/communitheme/1768  
loop19   7:19   0 180.2M  1 loop /snap/spotify/35  
loop20   7:20   0  88.5M  1 loop /snap/core/7270  
loop21   7:21   0  54.4M  1 loop /snap/core18/1049  
sda      8:0    0 298.1G  0 disk   
├─sda1   8:1    0   229G  0 part   
├─sda2   8:2    0    15G  0 part /  
├─sda3   8:3    0     1K  0 part   
├─sda4   8:4    0     9G  0 part   
├─sda5   8:5    0    43G  0 part /home  
└─sda6   8:6    0     2G  0 part [SWAP]  
sr0     11:0    1  1024M  0 rom   

最后使用命令 sudo sfdisk -l /dev/sda 得到以下输出

wildman@wildman-Compaq-Presario-CQ60-Notebook-PC:~$ sudo sfdisk -l /dev/sda  
Disk /dev/sda: 298.1 GiB, 320072933376 bytes, 625142448 sectors  
Units: sectors of 1 * 512 = 512 bytes  
Sector size (logical/physical): 512 bytes / 4096 bytes  
I/O size (minimum/optimal): 4096 bytes / 4096 bytes  
Disklabel type: dos  
Disk identifier: 0x8f3b2f58  

Device     Boot     Start       End   Sectors  Size Id Type  
/dev/sda1  *         2048 480351524 480349477  229G  7 HPFS/NTFS/exFAT  
/dev/sda2       480352256 511809535  31457280   15G 83 Linux  
/dev/sda3       511811582 606183423  94371842   45G  f W95 Ext'd (LBA)  
/dev/sda4       606183424 625142447  18959024    9G  7 HPFS/NTFS/exFAT  
/dev/sda5       511811584 601989119  90177536   43G 83 Linux  
/dev/sda6       601991168 606183423   4192256    2G 82 Linux swap / Solaris  


If I understand correctly Windows 10 is on sda1  
before the install I shrank the partition into three parts for root, home, and swap.  
sda2 should be root for Ubuntu
Sda5 should be home for Ubuntu
sda6 should be swap for Ubuntu

That leave sda3 which is 45 GB W98 Ext'd (LBA) and sda4 which is 9 GB HPFS/NTFS/exFAT

我该怎么办?请帮忙。

相关内容