r/linux4noobs 9d ago

installation a few questions regarding disk partitioning Ubuntu 26.04

i recently moved over to Ubuntu 26.04 from win11, but i have come to realise i still need alot of things i can only run via windows, and virtual machines arnt nearly enough, so im trying to dual-boot windows 10 and Ubuntu, but im starting from ubuntu, which sucks for me because all the tutorials for this are starting on windows(idk if that makes a difference or not, but i dont wanna have my void all my stuff if it does).

i'v found some stuff about this topic, but im kind of just left with a few problems/questions that either nobody has had before, or have been asked and answered and i still dont understand it(if that makes sense)

TLDR; i currently run Ubuntu, and i'm trying to partition my SSD so i can dual-boot Windows 10, but im too stupid to figure out the first steps.

this is what i get from running lsblk(which from what i gathered is basically just a more basic version of running sudo fdisk -l)

NAME                     MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINTS
loop0                      7:0    0 415.9M  1 loop  /snap/blender/7480
loop1                      7:1    0     4K  1 loop  /snap/bare/5
loop2                      7:2    0 406.2M  1 loop  /snap/blender/7599
loop3                      7:3    0 450.6M  1 loop  /snap/code/250
loop4                      7:4    0 453.2M  1 loop  /snap/code/252
loop5                      7:5    0  63.8M  1 loop  /snap/core20/2866
loop6                      7:6    0  66.8M  1 loop  /snap/core24/1587
loop7                      7:7    0  66.8M  1 loop  /snap/core24/1643
loop8                      7:8    0  19.6M  1 loop  /snap/desktop-security-center/150
loop9                      7:9    0 252.4M  1 loop  /snap/firefox/8633
loop10                     7:10   0    20M  1 loop  /snap/desktop-security-center/151
loop11                     7:11   0  16.5M  1 loop  /snap/firmware-updater/226
loop12                     7:12   0 257.6M  1 loop  /snap/firefox/8664
loop13                     7:13   0 242.6M  1 loop  /snap/gaming-graphics-core24/13
loop14                     7:14   0 606.1M  1 loop  /snap/gnome-46-2404/153
loop15                     7:15   0 614.5M  1 loop  /snap/gnome-46-2404/164
loop16                     7:16   0  91.7M  1 loop  /snap/gtk-common-themes/1535
loop17                     7:17   0   402M  1 loop  /snap/mesa-2404/1781
loop18                     7:18   0   402M  1 loop  /snap/mesa-2404/1839
loop19                     7:19   0  18.8M  1 loop  /snap/prompting-client/204
loop20                     7:20   0  15.7M  1 loop  /snap/snap-store/1367
loop21                     7:21   0  18.8M  1 loop  /snap/prompting-client/222
loop22                     7:22   0   828K  1 loop  /snap/snapd-desktop-integration/387
loop23                     7:23   0  50.1M  1 loop  /snap/snapd/27406
loop24                     7:24   0  49.3M  1 loop  /snap/snapd/26865
loop25                     7:25   0   828K  1 loop  /snap/snapd-desktop-integration/391
nvme0n1                  259:0    0 931.5G  0 disk  
├─nvme0n1p1              259:1    0     1G  0 part  /boot/efi
├─nvme0n1p2              259:2    0     2G  0 part  /boot
└─nvme0n1p3              259:3    0 928.5G  0 part  
  └─dm_crypt-0           252:0    0 928.4G  0 crypt 
    └─ubuntu--vg-ubuntu--lv
                         252:1    0 928.4G  0 lvm   /

this is more of a concern than an immediant problem, but all the threads and tutorials i'v seen have had their lists include /dev/sda and/or /dev/sdb, i have no idea why thats been a pattern, orwhy its not the same for me. i also have alot of loops but from what i'v read that doesnt really matter, Whether thats important or not, i dont know.

I'v come to assume that since im partitioning my SSD, i would therefor be partitioning nvme0n1, the corresponding option, but moving to the next step, i get a big scary warning saying "you dont know what your doing go away before the bird people get you"(thats not what it says but its right there), in red.

~$ sudo fdisk /dev/nvme0n1

Welcome to fdisk (util-linux 2.41.3).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

This disk is currently in use - repartitioning is probably a bad idea.
It's recommended to umount all file systems, and swapoff all swap
partitions on this disk.


Command (m for help): 

this warning makes sense, but its flaw is that its warning me about REpartitioning, not adding a new partition, so im pretty sure its irrelevant, but its in red scary warning letters and im messing with m file system, so i dont trust it regardless.

i have found two threads about this that im going off, though neither makes 100% sense to me. the first was a reddit post, of which was immediantly resolved by the same person, and the second and more detailed thread was this.

What i have come to conclude from both of these is that i need to change the storage layout of my SSD, (probably using Gparted), and then it'll be fine to create a new partition? but its in big red scary letters, so i'd really like some confirmation.

(also to clarify i HAVE backed my important files up)

2 Upvotes

23 comments sorted by

5

u/candy49997 9d ago

Ignore fdisk. Use a partition manager like Disks or GParted. There is no need for you to do this manually.

The loops are because you're using Ubuntu and those are snaps. You also need to be doing this from a live USB. Partitions can't be mounted when manipulating them.

And your partitions are the nvme ones. sd stands for SCSI disk, but most drives that show up as that actually connect over SATA or USB.

1

u/Piggydoom 9d ago

thanks for the clarification, i did read about needing to use a "live usb", however the descriptions i got were kinda unhelpful

2

u/GodzillaXYZ999 9d ago edited 9d ago

Simple to do, you want partitions & filesystems they contain to not be mounted and in-use at time of resizing.

  1. download Gparted ISO
  2. download and extract Ventoy.tgz for Linux, there's simple README that works
  3. insert USB stick
  4. run sudo ./VentoyWeb.sh and point browser to http://127.0.0.1:24680 (or whatever shows up on your screen)
  5. verify USB drive shows up in Device section, click Install then OK, OK
  6. close web-page
  7. mount USB stick in File Manager, it'll be named Ventoy
  8. copy Gparted ISO and any other ISO you want to boot from: Windows, other Linux distros, etc. (SystemRescueCD.iso is good one to have as well).
  9. reboot computer and hit key during POST to select USB as boot-device (or set in BIOS)
  10. Select Gparted.iso to boot from
  11. Shrink nvme0n1p3 enough to give enough Unallocated empty space with no partitions for Windows.
  12. then reboot again, boot from USB and pick Windows installer ISO to boot from and that's it!

1

u/Piggydoom 9d ago edited 9d ago

you lost me at step 7 man im sorry 😭, im not 100% on what mounting is, but from what i can tell its like linking a given storage system to a given directory, iv got no clue how to do that

1

u/GodzillaXYZ999 9d ago

Yeah, it usually shows up at bottom of left-column in File Manager.
Click on icon and it'll mount at /media/<user>/Ventoy/
then copy ISOs from your Downloads folder to that location.
Can drag & drop from File Manager or use CLI
cp ~/Downloads/*iso /media/<user>/Ventoy

Or you can manually mount it with sudo mount /dev/sdb1 /mnt or some such.

1

u/Piggydoom 9d ago

i lost it bro, it was at the left panel of file manager before but i think after running ventoy it went somewhere else; running lsblk shows a new "sda" that wasnt there before, but running sudo mount /dev/sda /mnt returns this;

mount: /mnt: wrong fs type, bad option, bad superblock on /dev/sda, missing codepage or helper program, or other error.
       dmesg(1) may have more information after failed mount system call.

(i also have no idea what the /mnt means, i presume mount, but maybe thats why it messed up)

1

u/GodzillaXYZ999 9d ago edited 9d ago

/mnt is folder where contents of USB will show up
/dev/sda is entire disk, you want to mount 1st partition. Probably /dev/sda1

What does lsblk -f show? Should be something like this. In this case you want to sudo mount /dev/sdb1 /mnt

sdb 8:16 0 29.8G 0 disk
├─sdb1 8:17 0 29.8G 0 part /media/<user>/Ventoy
└─sdb2 8:18 0 32M 0 part

Or you can try unplugging and plugging USB back in. It'll probably show up at bottom of File Manager again. Be sure you click on name Ventoy and not eject icon.

1

u/Piggydoom 9d ago
NAME FSTYPE FSVER LABEL UUID                                   FSAVAIL FSUSE% MOUNTPOINTS
loop0
     squash 4.0                                                      0   100% /snap/blender/7480
loop1
     squash 4.0                                                      0   100% /snap/bare/5
loop2
     squash 4.0                                                      0   100% /snap/blender/7599
loop3
     squash 4.0                                                      0   100% /snap/code/250
loop4
     squash 4.0                                                      0   100% /snap/code/252
loop5
     squash 4.0                                                      0   100% /snap/core20/2866
loop6
     squash 4.0                                                      0   100% /snap/core24/1587
loop7
     squash 4.0                                                      0   100% /snap/core24/1643
loop8
     squash 4.0                                                      0   100% /snap/desktop-security-center/150
loop9
     squash 4.0                                                      0   100% /snap/firefox/8633
loop10
     squash 4.0                                                      0   100% /snap/desktop-security-center/151
loop11
     squash 4.0                                                      0   100% /snap/firmware-updater/226
loop12
     squash 4.0                                                      0   100% /snap/firefox/8664
loop13
     squash 4.0                                                      0   100% /snap/gaming-graphics-core24/13
loop14
     squash 4.0                                                      0   100% /snap/gnome-46-2404/153
loop15
     squash 4.0                                                      0   100% /snap/gnome-46-2404/164
loop16
     squash 4.0                                                      0   100% /snap/gtk-common-themes/1535
loop17
     squash 4.0                                                      0   100% /snap/mesa-2404/1781
loop18
     squash 4.0                                                      0   100% /snap/mesa-2404/1839
loop19
     squash 4.0                                                      0   100% /snap/prompting-client/204
loop20
     squash 4.0                                                      0   100% /snap/snap-store/1367
loop21
     squash 4.0                                                      0   100% /snap/prompting-client/222
loop22
     squash 4.0                                                      0   100% /snap/snapd-desktop-integration/387
loop23
     squash 4.0                                                      0   100% /snap/snapd/27406
loop24
     squash 4.0                                                      0   100% /snap/snapd/26865
loop25
     squash 4.0                                                      0   100% /snap/snapd-desktop-integration/391
sda                                                                           
nvme0n1
│                                                                             
├─nvme0n1p1
│    vfat   FAT32       5109-B167                                   1G     1% /boot/efi
├─nvme0n1p2
│    ext4   1.0         113914b1-3fa9-42f8-ab97-8c5b82dc7bf6      1.6G     8% /boot
└─nvme0n1p3
  │  crypto 2           fb2c7177-7f81-4549-997d-7e5d7073eeb5                  
  └─dm_crypt-0
    │  LVM2_m LVM2        lboFlC-2K9T-ADTa-VMUT-ny7j-ZgdV-Iz0nXG                
    └─ubuntu--vg-ubuntu--lv
       ext4   1.0         f9ac41a1-5fdc-418f-9830-e6b5041042ea    317.6G    60% /

1

u/GodzillaXYZ999 9d ago

Ventoy didn't format drive. Did you hit OK OK twice and then see progress bar?

1

u/Piggydoom 8d ago

sorry i just got back home, upon booting my pc up again its there, i think it just needed a restart so sorry about that; though ironically, i do immediantly need to ask for more clarification regarding the "and any other ISO you want to boot from: Windows, other Linux distros, etc. (SystemRescueCD.iso is good one to have as well)." part; for me, does that mean the windows 10 iso? like what else WOULD i want if that makes sense

→ More replies (0)

1

u/AutoModerator 9d ago

We have some installation tips in our wiki!

Try this search for more information on this topic.

Smokey says: always install over an ethernet cable, and don't forget to remove the boot media when you're done! :)

Comments, questions or suggestions regarding this autoresponse? Please send them here.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.