Creating Partitions In Linux Using fdisk (and other tools)

แชร์
ฝัง
  • เผยแพร่เมื่อ 5 ก.ค. 2024
  • When it comes to command line installations of Linux (and other operating systems), the scariest part for most people is partitioning and formatting your drives. But it's not that complicated, and tools like fdisk make it really simple. In this video, I show the basics of fdisk, mkswap, mkfs and related command line tools.
    WANT TO SUPPORT THE CHANNEL?
    💰 Patreon: / distrotube
    💳 Paypal: www.paypal.com/cgi-bin/webscr...
    🛍️ Amazon: amzn.to/2RotFFi
    👕 Teespring: teespring.com/stores/distrotube
    DONATE CRYPTO:
    💰 Bitcoin: 1Mp6ebz5bNcjNFW7XWHVht36SkiLoxPKoX
    🐶 Dogecoin: D5fpRD1JRoBFPDXSBocRTp8W9uKzfwLFAu
    📕 LBC: bMfA2c3zmcLxPCpyPcrykLvMhZ7A5mQuhJ
    SOCIAL PLATFORMS:
    🗨️ Mastodon: distrotoot.com/@derek
    👫 Reddit: / distrotube
    📽️ LBRY/Odysee: odysee.com/$/invite/@DistroTu...
    DT ON THE WEB:
    🕸️ Website: distrotube.com/
    🐿️ Gemini Capsule: gemini://distro.tube
    📁 GitLab: gitlab.com/dwt1
    FREE AND OPEN SOURCE SOFTWARE THAT I USE:
    🌐 Brave Browser - brave.com/dis872
    📽️ Open Broadcaster Software: obsproject.com/
    🎬 Kdenlive: kdenlive.org
    🎨 GIMP: www.gimp.org/
    🎵 Ardour: ardour.org/
    💻 VirtualBox: www.virtualbox.org/
    🗒️ Doom Emacs: github.com/hlissner/doom-emacs
    Your support is very much appreciated. Thanks, guys!
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 72

  • @Skeleton-wn2zu
    @Skeleton-wn2zu 2 ปีที่แล้ว +28

    We fell into his trap, he tricked us into seeing that arch isn't that hard to install.
    In all seriousness thank you for the video and thank you for the nice, informative, clean content.

    • @dougtilaran3496
      @dougtilaran3496 2 ปีที่แล้ว +1

      The feller is damn good aint he ! I never even got decent a typing so being a lazy bassid I use a lot of GUI. UNTIL...well y'all know. Derek reminds me of stuff I forgot since the 90'z 2000'z. Hell. I'm so old they asked me my dads full name so I had to go find my Hatching Certificate. Man that thing is one heavy piece of stone ;-)

  • @jaxxarmstrong
    @jaxxarmstrong 2 ปีที่แล้ว +40

    Great video on the basics of 'fdisk', but I'd like to add a few things:
    - Most old dogs have been using 'cfdisk' since before Y2K, except when you need a quick list of the partitions.
    - Swap files are preferred over swap partitions these days due to the ease of maintenance/expansion.
    - I would have added a quick explaination between 'MBR' and 'GPT', which is very important when we're talking partitions.
    Keep up the good work, sir!

    • @leonbishop7404
      @leonbishop7404 ปีที่แล้ว

      i guess only excuse for swap partition is that it arguably is easier to encrypt

  • @Jore__
    @Jore__ 2 ปีที่แล้ว +8

    I literally yesterday was installing arch and wondering what all these partitions are about. Well I know soon enough. Thank you DT for your work!

  • @driden1987
    @driden1987 2 ปีที่แล้ว +2

    This series of basic tools is great DT. Love them!

  • @russellbrooks3622
    @russellbrooks3622 2 ปีที่แล้ว +2

    We think alike. For years, I have kept a separate partition called storage that all of my personal files of any type are kept on, as well as VMs. That way, I don't have to back up anything to reinstall my OS, or change my OS. Nice instruction on fdisk. I've never really done that kind of stuff from the command line. Always use GParted or whatever is built into the graphical installer I'm running. I've always preferred GUI over command line. I use the options menu in gnome-disks to set up auto-mounting of my storage drive.

  • @jessevas5222
    @jessevas5222 2 ปีที่แล้ว

    I love these Professor Messer courses. Thanks, Jam..., I mean DT!

  • @send2gl
    @send2gl 2 ปีที่แล้ว

    Nicely explained.

  • @HeroSnowman
    @HeroSnowman 2 ปีที่แล้ว +8

    The saviour of college students

  • @Blorguehad
    @Blorguehad 2 ปีที่แล้ว

    Thanks DT!

  • @ljupconewman9357
    @ljupconewman9357 2 ปีที่แล้ว

    I was literally looking for a partitioning tutorial from you two days ago when I changed from Windows to Ubuntu! I found it today.
    The reason why is because my 10yo laptop has an SSD and HDD. Now previously the whole C drive was on the SSD and the rest on the HDD, but now I installed Ubuntu and don't know where the OS is installed.

  • @seta16
    @seta16 11 หลายเดือนก่อน

    just my comment your videos are like 200% times more engaging than the ones from the linux foundation in coursera

  • @Soochoup
    @Soochoup วันที่ผ่านมา

    You’re a life saver

  • @cloudytea3121
    @cloudytea3121 4 หลายเดือนก่อน

    Thank dude, imagine if the rest of the arch install was this easy 😂

  • @gamingvignesh9729
    @gamingvignesh9729 2 ปีที่แล้ว

    Hey DT,what tool you use to empty your trash in your main production machine?

  • @houssemgherissi7310
    @houssemgherissi7310 23 วันที่ผ่านมา

    Great thank you

  • @BEfirebone
    @BEfirebone 2 ปีที่แล้ว +4

    Hey DT think of m for manual? 😉

  • @holyhelga
    @holyhelga 2 ปีที่แล้ว +3

    if you continue at the warning it actually converts that drive to gpt

  • @wisnoskij
    @wisnoskij 2 ปีที่แล้ว

    With all the RAM you can get cheaply nowadays do swap partitions even make sense? At a certain point dont you simply have enough RAM?

  • @typingcat
    @typingcat 9 หลายเดือนก่อน

    Why position SWAP at the beginning of the disk? Isn't it better to position it at the end of the disk, so that you could resize it?

  • @Winnetou17
    @Winnetou17 2 ปีที่แล้ว +1

    Soooo, a couple of questions:
    - if I have a SSD and a HDD, both of 1 TB and non-NVME, how do I differentiate between them ?
    - if I install Linux on sdb and later I remove the drive that is now sda, when I boot back into Linux, would it still be sdb, or it would be sda ? How does consistency between drives, when swapping is a thing, work ? Edit: ok, finished viewing the video, this is done using UUID.

  • @kingofbubbles6220
    @kingofbubbles6220 2 ปีที่แล้ว

    And to think this was an issue that I was struggling with working on just a week ago.

  • @bleighhh
    @bleighhh 2 ปีที่แล้ว

    I need some help with doom emacs/vim, where can i find some support? i did not find it on google so i may have to speak with somebody

  • @guilherme5094
    @guilherme5094 2 ปีที่แล้ว

    Nice.

  • @mikechappell4156
    @mikechappell4156 2 ปีที่แล้ว +2

    Because of the hard limit of 4 primary partitions on dos partition tables, I'd have probably done an extended partition. Also worth mentioning,
    [sudo] umount /mnt/music
    [sudo] mount -a # assuming defaults includes auto - probably standard
    In lieu of a reboot to test changes to /etc/fstab.
    Is there a particular reason to make the swap as the first partition, or was it just done for simplicity?

    • @lingux_yt
      @lingux_yt 2 ปีที่แล้ว

      my swap is in partition 2
      1 for boot, 3 for system, 4 for files
      now I'm thinking why 😂 size, maybe

    • @supafiyalaito
      @supafiyalaito 2 ปีที่แล้ว +1

      Had actually accidentally erased my system hard disk drive once when trying to make a boot disk, thankfully it didn't go beyond my EFI and swap partition so with my partition table still intact on the system I can just reformat the EFI and swap partitions.

    • @lieryan9137
      @lieryan9137 2 ปีที่แล้ว

      I'd recommend against creating extended partition. If you need more than 4 partitions, just use GPT. It makes your life much simpler.

  • @janlam3344
    @janlam3344 ปีที่แล้ว

    Why does fdisk -l show a bunch of loop files instead of /dev/nvme1 on my Ubuntu system? Should I worry about it ?

  • @yuvvrajkperson
    @yuvvrajkperson 2 ปีที่แล้ว +4

    What about the grub partition?

    • @rustombhesania7265
      @rustombhesania7265 2 ปีที่แล้ว +1

      For efi u don't have to make a grub partition u install grub in the Boot partition
      For mbr install grub in root partition because it has mainly one one big partition

    • @0babul0
      @0babul0 2 ปีที่แล้ว +1

      @@rustombhesania7265 Also I like rEFInd boot manager, it's really nice, so no need for grub if you use EFI. I slapped that on separate partition and tried different linux distributions. What's great is turns out that if I reinstalled different distributions on my linux partition (re-formatted or even re-partitioned drives), I didn't even had to touch EFI partition or update settings, it auto detected new distro and it appeared in launch menu. And I can safely completely wipe Linux partition without ever breaking Windows. So good.

  • @scientiac
    @scientiac 2 ปีที่แล้ว

    Hey DT, what happened to your Gemini Capsule?

    • @Tn5421Me
      @Tn5421Me 2 ปีที่แล้ว

      I think it got replaced with his org-mode website

  • @avondsch3805
    @avondsch3805 2 ปีที่แล้ว +1

    hey dt! what are you upto?

  • @anantgupta1188
    @anantgupta1188 2 ปีที่แล้ว

    I think cfdisk is also great!

  • @blahaj___
    @blahaj___ 7 หลายเดือนก่อน

    better than the wiki

  • @peterbutler5597
    @peterbutler5597 2 ปีที่แล้ว

    I wonder whether in "m for help" the m is short for mayday (m'aidez) ie - Help Me! Was the creator French?

  • @Aditya-ce4iu
    @Aditya-ce4iu 2 ปีที่แล้ว

    Please make video on global menu bar with polybar ....
    Please 🙏🙏🙏🙏🙏🙏

  • @prajhualak
    @prajhualak 2 ปีที่แล้ว +1

    3:07 i guess 'm' refers to manual

  • @jayst
    @jayst 2 ปีที่แล้ว +2

    Lol the guy who said “second” was first, and the guy who said “first” was second

  • @dragonboyjazz
    @dragonboyjazz 2 ปีที่แล้ว

    i would assume M would be "Manpage/Manual"

  • @Imran-cw7jc
    @Imran-cw7jc 2 ปีที่แล้ว +3

    300+ plus views but only 4 comments, why?

    • @blogattacker
      @blogattacker 2 ปีที่แล้ว +2

      Refreshing matters

    • @lingux_yt
      @lingux_yt 2 ปีที่แล้ว +1

      those counters update separately

  • @nevoyu
    @nevoyu 2 ปีที่แล้ว +2

    I'll be honest, I've use parted

  • @97ynoT91
    @97ynoT91 2 หลายเดือนก่อน

    Probably "m" for manual, I'm assuming...

  • @dhruvadrhu3991
    @dhruvadrhu3991 2 ปีที่แล้ว +5

    second

    • @DistroTube
      @DistroTube  2 ปีที่แล้ว +7

      First, actually. But if you don't want your 'first' then I'll give it someone else. ;)

    • @Imran-cw7jc
      @Imran-cw7jc 2 ปีที่แล้ว +2

      Thats kinda rude.

    • @lingux_yt
      @lingux_yt 2 ปีที่แล้ว

      @@Imran-cw7jc the little ;-) was nice

  • @PaniacThrilla
    @PaniacThrilla 2 ปีที่แล้ว

    "DOS partition table format cannot be used on drives for volumes larger than..." The absolute state of DistroTube...

  • @killistan
    @killistan 2 ปีที่แล้ว

    beware non-linux fdisks -- the flags can be different so always check.

  • @solarwolf678
    @solarwolf678 2 ปีที่แล้ว +1

    I dont see the point of command line partition tools like fdisk because most of the time you partition once or twice and never really partition unless you reinstall the OS so the time saved by using something like fdisk over cfdisk would've been already taken up by the time learning how to use fdisk

    • @theodiscusgaming3909
      @theodiscusgaming3909 2 ปีที่แล้ว +4

      the point of command line partition tools is when you're doing an arch/gentoo minimal install. Plus command line tools can be more easily automated.

  • @danduby8416
    @danduby8416 2 ปีที่แล้ว +1

    I always had better luck with G-Parted

  • @rootminusonerootminusone9532
    @rootminusonerootminusone9532 2 ปีที่แล้ว

    why using fdisk where cfdisk is more easy to use?

  • @LukieHZX
    @LukieHZX 2 ปีที่แล้ว +2

    1

    • @Imran-cw7jc
      @Imran-cw7jc 2 ปีที่แล้ว +3

      Ur 2nd and the guy saying second is first..

  • @therealchonk
    @therealchonk 2 ปีที่แล้ว

    ext4 doesn't stand for 'extent 4', it actually stands for 'fourth extended filesystem' or 'extended 4'

  • @andrzejandrzejski229
    @andrzejandrzejski229 ปีที่แล้ว

    Why does it have to be that complex? It takes like 2 clicks in windows. :(

    • @xX_Lol6_Xx
      @xX_Lol6_Xx ปีที่แล้ว

      As if Windows users partition their disks LMAO.

  • @lieryan9137
    @lieryan9137 2 ปีที่แล้ว +1

    I'm confused by this tutorial. This tutorial is released in 2021, but it's talking about fdisk, DOS partition, Legacy Boot, ext4 filesystem, etc. These are all legacy technologies with serious limitations for daily usage, which IMO, we should've by now deleted from daily conversations in favor of newer, better techs, and to avoid misleading new users into those legacy traps.
    Nowadays there's no reason to use legacy partition, most physical machines you'll ever see and pretty much any virtual machine managers, would've supported GPT and UEFI. fdisk is also kinda an old and user unfriendly compared to other more modern partitioning tools, and if you're setting up new filesystem, there's usually more sensible choices than ext4, like btrfs for example, or zfs if that's your fancy. ext4 has its uses, but it really should no longer be your first choice.
    Also, we should also recommend LVM (Logical Volume Manager) for most users. I don't think I hear LVM being mentioned here anywhere, maybe I missed them.

    • @Tn5421Me
      @Tn5421Me 2 ปีที่แล้ว

      It's not worth it to set up a GPT partition table in a virtual machine, it's just wasted space that can cause compatibility problems

    • @lieryan9137
      @lieryan9137 2 ปีที่แล้ว +2

      @@Tn5421Me Sure maybe there's no reason to do partitioning in virtual machines, but presumably this tutorial is meant to be to help people who want to install Linux Desktop on their machine, which means those users are going to do set up in their real machine, which means that they would need partitions.
      Also, any compatibility issues with GPT are outdated. DOS partitions are much more likely to cause problems these days than GPT.

    • @CathrineMacNiel
      @CathrineMacNiel 2 ปีที่แล้ว

      @@lieryan9137 those who want to install Linux Desktop on their machine will use gparted anyway :)

    • @redrush-hp9li
      @redrush-hp9li 2 ปีที่แล้ว

      @@CathrineMacNiel no cfdisk

  • @Epsilonsama
    @Epsilonsama 2 ปีที่แล้ว +1

    /dev/sdx is not about SSD is about SCSI drives. /dev/hdx is about old IDE drives. Gotta make sure you do the reasearch about the terms before making the video. Also is important that before any partition table is created to verify it with either p command or v just in case you chose the wrong drive. While fdisk will send a warning if you are creating a partition table on a used drive it's always good practice to double check. Also in case you want to set up a Linux Distro test drive on a MBR disk is good practice to create an extended partition table to mount the / and /home mount point while keeping /boot and swap partition as primary partitions.

  • @redrush-hp9li
    @redrush-hp9li 2 ปีที่แล้ว

    Cfdisk ist much better then fdisk

  • @gfmhd1280
    @gfmhd1280 2 ปีที่แล้ว

    RIP. Gone too soon.