Linux Drive and Partition Config (dd, fdisk, resize2fs, tune2fs and more)

แชร์
ฝัง
  • เผยแพร่เมื่อ 23 ต.ค. 2020
  • I have a new SSD for my computer, so in this video, I want to move my operating system over to it and make it bootable. This will free up space on my older 1TB hard drive, but also give me more space to have more goodies. I'll have to do things like renew the device's copied UUID as well. I also move over my copy of the Monero blockchain to the new hard drive.
    WEBSITE: lukesmith.xyz 🌐❓🔎
    DONATE: lukesmith.xyz/donate 💰😎👌💯
    OR affiliate links to things l use:
    www.epik.com/?affid=we2ro7sa6 Get a cheap and reliable domain name with Epik.
    www.vultr.com/?ref=8384069-6G Get a VPS and host a website or server for anything else.
    brave.com/luk005 Get the Brave browser.
    lbry.tv/$/invite/@Luke View my videos on LBRY. Get a bonus for joining.
    www.coinbase.com/join/smith_5to1 Get crypto-rich on Coinbase. We both get $10 in Bitcoin when you buy or sell $100 in cryptocurrencies.
  • แนวปฏิบัติและการใช้ชีวิต

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

  • @deldrinov
    @deldrinov 3 ปีที่แล้ว +76

    He leaked his partition UUIDs!

  • @victorprokop2240
    @victorprokop2240 3 ปีที่แล้ว +18

    You try to control it. But at the end "the Chad guzzle" slips out lol...4chad moment

  • @Rustyuoiman
    @Rustyuoiman 3 ปีที่แล้ว +42

    A drive dedicated to CONSOOMING? Shame!

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

      It looks like he's actually a big Disney consoomer ! Shame !

  • @Link-channel
    @Link-channel 3 ปีที่แล้ว +9

    You just increased tenfold my disk management skill in Linux, in just few minutes;
    After thousands of useless tutorial and scattered information for years... THANK YOU

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

      Absolutely true and still to this day, good content about partitioning and dd in combination with tune2fs is pretty limited or rather non existent.

  • @rm-rf4612
    @rm-rf4612 3 ปีที่แล้ว +35

    >not LVM over LUKS
    You had one job, Luke.

  • @mcdeleve
    @mcdeleve 3 ปีที่แล้ว +1

    luke, thanks for sharing your knowledge with us. I have learned a lot here on this side. you encouraged me a lot and provided me with a base to explore new lands.

  • @nicokulmann8398
    @nicokulmann8398 3 ปีที่แล้ว +11

    universally unique identifier. the reason its "universal" is because its just a random number but its such a huge number of bits that the chance of collision is incredibly low and practically 0, even with all the devices on the planet that use it

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

      I remember I had generated 2 same uuids and was freaking out, but turns out my drive was failing :P

  • @MRRAGER-iv3pw
    @MRRAGER-iv3pw 3 ปีที่แล้ว +8

    ARE YA WINNING, SON?

  • @ivanbogush
    @ivanbogush 3 ปีที่แล้ว +5

    I prefer labels over UUIDs since they are easier to remember and type in a tty. `mkfs.ext4 -L mylabel ` to add a label during formatting and `e2label mylabel` to non-destructively relabel a partition. Then replace UUID=xxxx with LABEL=mylabel and you're golden.

  • @unfa00
    @unfa00 3 ปีที่แล้ว

    I'm so glad you pronounce fstab the proper way.

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

    Came faster than notification alert. Lucky. Even though I probably won't understand it.

  • @ts-vq7gc
    @ts-vq7gc 3 ปีที่แล้ว

    great video as always! :D

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

    If you only need your locality's offline maps, the size isn't bad at all. I got all of Kentucky on my phone. If I recall, it was like 1.1GB. Cities are usually a couple hundred MB or so.

  • @Argletrough
    @Argletrough 3 ปีที่แล้ว +1

    I coincidentally needed to do exactly this when you posted the video. Thanks!

  • @AndyRufasto
    @AndyRufasto 3 ปีที่แล้ว

    I think this is your best video.

  • @6w817
    @6w817 3 ปีที่แล้ว +3

    Luke, we already read the Gentoo handbook

  • @greob
    @greob 3 ปีที่แล้ว +21

    22:45 Better use "which md" instead of "alias md" to display the current alias. Don't want to accidentally overwrite the alias by typing an extra character right before pressing enter...

    • @bahathir_
      @bahathir_ 3 ปีที่แล้ว +1

      $ type md

    • @sayanghosh6996
      @sayanghosh6996 3 ปีที่แล้ว +4

      that would change change the alias for that current session, he could just reopen another terminal

  • @sanjacobs6261
    @sanjacobs6261 3 ปีที่แล้ว +6

    This comment section is absolutely incredible

  • @tato-chip7612
    @tato-chip7612 3 ปีที่แล้ว +3

    man chadpads are so nice
    Thank god i got mine.

  • @BrenoSilveira94
    @BrenoSilveira94 3 ปีที่แล้ว +5

    #XMR4LIFE
    Edit.: Luke give us that GNU/Moonshine recipe.

  • @avesnassan1032
    @avesnassan1032 3 ปีที่แล้ว +35

    Let's be conservative here
    starts typing cp
    really makes you think

    • @con-f-use
      @con-f-use 3 ปีที่แล้ว +8

      >> ...hide some more... "sensitive" stuff on there... maybe my old... "emails"

    • @uknowme1811
      @uknowme1811 3 ปีที่แล้ว +1

      Then pounds back so moonshine from his mason jar

  • @minhajsixbyte
    @minhajsixbyte 3 ปีที่แล้ว

    thanks man

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

    "we're always getting closer"
    Nice subtle christian message.

  • @YuriShevchouk
    @YuriShevchouk 3 ปีที่แล้ว +1

    Hi Luke, you mention Monero, but im confused the name of the folder is bitmonero (which is last developed in 2018) what actual client are you using?

  • @gnumengor
    @gnumengor 3 ปีที่แล้ว +14

    Why not just change the UUID of /dev/sda1 to random, then you can omit all other config file and grub install stuff... Or am I wrong?

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

      That sounds like a pretty nice shortcut.

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

      You can omit changing fstab
      But you have to reinstall grub

  • @LiveWireBT
    @LiveWireBT 3 ปีที่แล้ว

    9:54 status=progress? Cool! I remember crude one-liners (or more) and using two terminals which looked more wrong the more I tinkered with bash scripting. Thanks. Also there is partclone you might want to check out.
    You are not going to use LVM, just plain EXT4? I avoided LVM in the past und hoped that BTRFS, ZFS or some other more easy to use solution would arrive. Ubuntu decided to use ZFS, Fedora will give BTRFS another try, at work our RHEL servers mandate to use XFS (I was the one on the team to care to actually read their documentation), Stratis and VDO look interesting but for the mean time I got comfortable with LVM and it's not so terribly complex as it looks and you gain more flexibility. Running out of space, thinking about migrating to a bigger drive and many of the headaches of the past I could have avoided if I avoided LVM not that vehemently as I did. It seemed like legacy server-cargo-cult to me and you have your point not to make too much partitions which was also mine not too long ago until I ran this "Lynis" tool within the first weeks on my new job. :( Okay with LUKS and LVM caching it is crazy and I may have just gotten used to it.

  • @n3r0z3r0
    @n3r0z3r0 3 ปีที่แล้ว

    i found ddrescue more convenient, it shows a nice progress and if you add log file, can continue if interrupted.

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

    (UUID) is stands for "Universally Unique Identifier".

  • @yuvaldahan642
    @yuvaldahan642 3 ปีที่แล้ว +1

    How could you extend your /home into sda1, Is there a simple way of merging both partitions when the data is in the second partition?

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

    Luke pogging @ 4:34

  • @kenba8176
    @kenba8176 3 ปีที่แล้ว +9

    how to delet porn partition from system 32!? y ur pc look like that and the slashes is leaning the wrong way tho!?

  • @Storm_.
    @Storm_. 3 ปีที่แล้ว +7

    Luke, do you also realise how 99% of other Linux/Unix content on TH-cam are people who don't know how to do any of this kind of thing? Does it annoy you?

  • @42tai_
    @42tai_ 3 ปีที่แล้ว

    Can you use this method to copy your entire linux system (including swap partition) to a larger drive or is there a more efficient method for that?

  • @AlanTheGreater1
    @AlanTheGreater1 3 ปีที่แล้ว +4

    Usr stands for "Universal system resources"

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

      It used to stand for "user" tho. It's where the home directories of all the users were stored in. But they changed the meaning and use of it at some point to what you just said.

  • @chickenwinna
    @chickenwinna 3 ปีที่แล้ว +4

    hey lukesmith whats your opinion on big chungus

  •  3 ปีที่แล้ว +5

    Hi Luke, if you had changed the UUID of sda1 instead of sdc1 in minute 15:22, would it be possible to eliminate the next steps, since the UUID of sdc1 is matched?

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

      That's right. I only did it this way in case there was some error later in installation so it'd be easier to undo it.

  • @TheLazyLemmon
    @TheLazyLemmon 3 ปีที่แล้ว +4

    Hell directory, interesting

    • @c4call
      @c4call 3 ปีที่แล้ว

      Dante has entered the chat

  • @OnTheEdgex23
    @OnTheEdgex23 3 ปีที่แล้ว

    >A Walk To Remember
    Mmm.. me too

  • @haley9425
    @haley9425 3 ปีที่แล้ว

    Wow

  • @jokerkof7131
    @jokerkof7131 3 ปีที่แล้ว

    what is the shortcut key you use to del UUID at 19:16 ?
    is it df ???

  • @Cknight700
    @Cknight700 3 ปีที่แล้ว

    I watched the video hoping to learn how to use fdisk on a drive with multiple partitions... Instead I was reminded how many extra steps you need to use with Grub and MBR

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

    The partition doesn't think it's only 30.2 GB but reather the ext4 file system.

  • @uuu12343
    @uuu12343 3 ปีที่แล้ว +4

    Dd...the disk destroyer
    Destroyed my external hard drive backups countless times because I was too complacent and chose the wrong device drive

  • @XxYoShIkOgAkIxX
    @XxYoShIkOgAkIxX 3 ปีที่แล้ว

    Could have needed that on Monday, before I screwed up my partition table and ended up with bad magic numbers

  • @anxo_
    @anxo_ 3 ปีที่แล้ว

    what if you wanted to change the letter from sdc to sda? would that be possible now?

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

    What does the information in brackets mean?

  • @djsigmann
    @djsigmann 3 ปีที่แล้ว

    This may be a dumb question, but when would someone want to use LVM over regular partitions?

  • @ngoquang2708
    @ngoquang2708 3 ปีที่แล้ว +1

    You can make dd faster by using a buffer, like `dd if=... of=... status=progress bs=8MiB`

  • @willpaxman5236
    @willpaxman5236 3 ปีที่แล้ว +1

    >directory named hell
    must be where the anime goes

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

    cool and educational, but wouldn't it be more efficient to just replicate /dev/sda on /dev/sdc using dd, fix the size & then just plug out the old drive?

  • @MemeScreen
    @MemeScreen 3 ปีที่แล้ว +1

    I thought dd wasn’t recommend for solid state drives?

  • @anonymous14
    @anonymous14 3 ปีที่แล้ว

    Does anyone know what happened? I just saw a notification for Lukes Channel "Last Livestream for now (rip)". I clicked on it but that livestream was already deleted?

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

    2:48 how you edit/rename massive amount of files' names like that. I frequently ran across such edition and have to manually and one by one edit/rename them. Do you use globbing or sth?

    • @LukeSmithxyz
      @LukeSmithxyz  3 ปีที่แล้ว +10

      that's just piping output to a pager. If you want to mass-edit filenames in a directory, use vidir.

    • @reverseila4363
      @reverseila4363 3 ปีที่แล้ว +1

      @@LukeSmithxyz thank you!

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

      I use "nnn" for that. Pressing R takes you to vim where very line I the name of a file in a directory
      From there you can use macros in vim/nvim/gvim

    • @reverseila4363
      @reverseila4363 3 ปีที่แล้ว +1

      @@joselaw6669awesome. thank you.

  • @siksniper1996
    @siksniper1996 3 ปีที่แล้ว

    What is the purpose of having copies of the blockchains?

  • @RasmusFrederiksen169
    @RasmusFrederiksen169 3 ปีที่แล้ว +1

    14:01 Weeeell actually, you're wrong the first U, as it's "Universal Unique Identifier"

  • @mustafababdullah2485
    @mustafababdullah2485 3 ปีที่แล้ว

    Unique universal indentifier drive

  • @MrRozburn
    @MrRozburn 3 ปีที่แล้ว

    /etc = Everything To Configure

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

    its own /var
    can be good on big iron and
    swervers where run away errors will b0rk your b0xen
    if
    not
    else
    (ee aka echo exit ==true)

  • @DonEdward
    @DonEdward 3 ปีที่แล้ว

    What is the best way to backup your data in linux to either a new drive, or flash drive, etc? If I tried to boot from this drive, would it boot?

    • @DonEdward
      @DonEdward 3 ปีที่แล้ว

      Never mind, I watched on and saw how you boot from this new partition.

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

    24:30 now drink from that pickle jar

  • @6400ab
    @6400ab 2 ปีที่แล้ว

    When I tried this on my system everything copied over just fine and I was able to reinstall grub and generate grub.cfg. But for whatever reason grub would not recognize my linux install on boot and just kicked me into BIOS. Not sure why. I was able to fix it by reinstalling linux via Artix wiki on top of my existing install and then generating a new grub.cfg. Glad I didn't have to reinstall from scratch. Now I've got 2TB of storage on this bad boy.

  • @gorudonu
    @gorudonu 3 ปีที่แล้ว +1

    Drinking some liquid from a jar was the most boomer thing I've seen in a while 😅

    • @c4call
      @c4call 3 ปีที่แล้ว

      So we're just ignoring the BLACKBOARD behind him?

  • @heterodoxagnostic8070
    @heterodoxagnostic8070 3 ปีที่แล้ว +7

    1:54 >not using an ortho-linear fully programmable keyboard

    • @adamkoxxl
      @adamkoxxl 3 ปีที่แล้ว +1

      U mean hipster virginity protector?

    • @kot3405
      @kot3405 3 ปีที่แล้ว +1

      @@adamkoxxl v i r g i n i t y p r o t e c t o r
      kek

    • @c4call
      @c4call 3 ปีที่แล้ว

      His typing is giving me ptsd and flashbacks to a war i never fought in.

  • @bienjieonex
    @bienjieonex 3 ปีที่แล้ว

    Luke, how old is your lovely pet?

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

    Linux Luke is back 😵

    • @rustyelectron
      @rustyelectron 3 ปีที่แล้ว

      @Its GNU /Freedom GNU/Thanks for correcting me 😎

  • @MrRozburn
    @MrRozburn 3 ปีที่แล้ว +18

    Hunter Bidens laptop uses LVM partitions

    • @jasonleo
      @jasonleo 3 ปีที่แล้ว

      Good one

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

    Lukes btrfs please.

  • @asais1024
    @asais1024 3 ปีที่แล้ว

    Thanks, I hate Tux with Pepe the frog's head.

  • @repomansez
    @repomansez 3 ปีที่แล้ว +1

    Luke, why don't you use LVM instead of regular partitions?

  • @hacerdemirel9833
    @hacerdemirel9833 3 ปีที่แล้ว

    20 Mar 2020?

  • @user-qf6yt3id3w
    @user-qf6yt3id3w 3 ปีที่แล้ว

    Wouldn't dd run faster if you specified a bigger block size? Last time I used it the default was pretty small. In fact you can see from the number of records copied that each one is 512 bytes. This link
    stackoverflow.com/questions/6161823/dd-how-to-calculate-optimal-blocksize
    Suggests bs=8388608 (some versions of dd allow 8m or 8M as a shortcut) is a good starting point. The idea being that you spend a bit of time setting up a transfer and by making the transfers bigger you amortize that.

  • @mustafababdullah2485
    @mustafababdullah2485 3 ปีที่แล้ว +1

    Look up history etc is actually ECteta that is why so many things go there and yes usr is user linux was created kiss

  • @thatdude8020
    @thatdude8020 3 ปีที่แล้ว

    If we have a boot partition on our system will we need to make two partitions on the new hard drive for the root and boot?

    • @thatdude8020
      @thatdude8020 3 ปีที่แล้ว

      Nvm I put my big boy pants on and figured it out

    • @PLAYGAME-wj9bw
      @PLAYGAME-wj9bw ปีที่แล้ว

      @@thatdude8020 tell me how daddy

  • @Sad_Cirno
    @Sad_Cirno 3 ปีที่แล้ว

    Post garden folder

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

    Dont need to partition the drive if you don't put OS, just "mkfs.ext4 /dev/sdX" the whole drive.

    • @minhajsixbyte
      @minhajsixbyte 3 ปีที่แล้ว

      nice! thanks for the tip.

  • @djsigmann
    @djsigmann 3 ปีที่แล้ว

    So, why does one need to use chroot when they could instead just do:
    nvim /mnt/etc/fstab

    • @yScribblezHD
      @yScribblezHD 3 ปีที่แล้ว

      pretty sure chroot changes the behavior of grub install.

  • @multiio1424
    @multiio1424 3 ปีที่แล้ว +1

    usr = unix system resources, but everyone including Brian Kernighan calls it "user".

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

    Daily content? Brodie clone?

  • @rae6261
    @rae6261 3 ปีที่แล้ว

    boomer says "lets get this party started"
    6:36

  • @gorgecunth1581
    @gorgecunth1581 3 ปีที่แล้ว

    Should I just change the old partition uuid and have everything set up?
    - No, I'd rather change the new partition's uuid and change all the settings.

  • @wretchedghost4548
    @wretchedghost4548 3 ปีที่แล้ว

    65MBps is 520Mbps. Definitely nowhere near the cap of 3Gbps which is about 375 MBps on SATA II.

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

    Hyperion background

  • @sophiatheodores7985
    @sophiatheodores7985 3 ปีที่แล้ว

    its unix shared resources

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

    spotted 3 idiots did he really watched it? but its my favorite movie till now

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

    But not everyone uses grub, some people just like simplicity. They use systemd.

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

      And some people like even more simplicity. They use Windows 10.

    • @Aemilindore
      @Aemilindore 3 ปีที่แล้ว

      @@BurgerKingHarkinian you're hurt because systemd boot is less lines than grub.

    • @BurgerKingHarkinian
      @BurgerKingHarkinian 3 ปีที่แล้ว

      @@Aemilindore Ah yes, I'm in indescribable pain rn because of that.
      Also let's just forget about the monolithic, Unix philosophy violating nature of systemd. Systemd is a flawless "init system" without any flaws.
      Those who dare criticizing it are just butt-hurt. lol

    • @Aemilindore
      @Aemilindore 3 ปีที่แล้ว

      @@BurgerKingHarkinian sure, if you don't use systemd in your os instead of unit, it makes sense to use init. But if you use systemd, then systems boot it is.

    • @BurgerKingHarkinian
      @BurgerKingHarkinian 3 ปีที่แล้ว

      @@Aemilindore Idk, never really given much thought to systemd's boot manager. But yeah, if you're already using systemd, I can see that you may just want to use that thing as well. Never really compared it to grub or anything.
      It's just funny to me to use the words "simplicity" and "systemd" in the same sentence.

  • @vosatom2019
    @vosatom2019 3 ปีที่แล้ว

    3 hard drives is bloat, i use a single usb stick

  • @richardwayne809
    @richardwayne809 3 ปีที่แล้ว +1

    /usr = unix system resources

  • @MarkKrubsack
    @MarkKrubsack 3 ปีที่แล้ว

    PayPal announced they will begin to deal with Bitcoin.

  • @fernandos.946
    @fernandos.946 3 ปีที่แล้ว

    Finally, some good fucking Linux

  • @Aleksandar0100
    @Aleksandar0100 3 ปีที่แล้ว +1

    Clean your keyboard bucko!

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

    i would avoid pronouncing /usr/ as "user" because it is NOT supposed to be related to "users". it's meant to stand for "universal system resources" so i say "U-S-R"

    • @bullfrog9296
      @bullfrog9296 3 ปีที่แล้ว +4

      That's actually a backronym. /usr/ was originally meant for user home directories and has always been pronounced "user". /etc/ was also originally pronounced etcetera, despite similar backronyms being created for it. Brian Kernigan (who helped develop UNIX along with Dennis Ritche and Ken Thompson), directly refers to /etc/ as "et cetera" and /usr as the "user file system" in his book The UNIX Programming Environment. Speed when speaking ("go to et see resolve dot conf" vs "go to et cetera resolve dot conf") is the only reason to not say et cetera when referring to the folder, as it is technically more correct to do so.

  • @unknown8088928
    @unknown8088928 3 ปีที่แล้ว

    "Not a big fan of encryption"

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

    Hey Lukesmith what’s your opinion on Big Chungus

  • @artedwards717
    @artedwards717 3 ปีที่แล้ว +1

    slow down

  • @MeLlamoChopa
    @MeLlamoChopa 3 ปีที่แล้ว

    More on crypto - blockchain pls

  • @elliotalderson6609
    @elliotalderson6609 3 ปีที่แล้ว +23

    uh, again this useless linux stuff

  • @PaulIannazzo
    @PaulIannazzo 3 ปีที่แล้ว

    you gotta stop with your poly-amorous hard-drive degeneracy. 1 hard-drive is optimal, more than that and they start getting envious of each other. they forget how to read and write, and then they just refuse to work. always leads to disaster.

  • @MrConcord75
    @MrConcord75 3 ปีที่แล้ว

    Meh, I am not entertained!

  • @liesdamnlies3372
    @liesdamnlies3372 3 ปีที่แล้ว

    fs-tab? Nah. It’ll always be f-stab to me.

  • @RhozetaVODS
    @RhozetaVODS 3 ปีที่แล้ว +4

    hey lukesmith whats your opinion on big chungus