Page 1 of 1

Moving /home directory

Posted: Thu Apr 10, 2025 6:52 pm
by NewLinuxBro
Hello, I currently have my entire MX install on a 256 GB SSD, and I just bought a 2 TB SSD that I'd like to move my home directory to, while keeping my root directory on the old drive and expanding it, I installed Bazzite on the 2 TB drive to test it out but now I want to replace it with my Home directory, how exactly would I go about doing that?

Code: Select all

System:
  Kernel: 6.1.0-32-amd64 [6.1.129-1] arch: x86_64 bits: 64 compiler: gcc v: 12.2.0
    parameters: BOOT_IMAGE=/boot/vmlinuz-6.1.0-32-amd64 root=UUID=<filter> ro quiet splash
  Desktop: Xfce v: 4.20.0 tk: Gtk v: 3.24.38 info: xfce4-panel wm: xfwm v: 4.20.0 vt: 7
    dm: LightDM v: 1.32.0 Distro: MX-23.5_x64 Libretto Jan 12  2025 base: Debian GNU/Linux 12
    (bookworm)
Machine:
  Type: Desktop System: Gigabyte product: Z390 AORUS PRO WIFI v: N/A serial: <superuser required>
  Mobo: Gigabyte model: Z390 AORUS PRO WIFI-CF v: x.x serial: <superuser required>
    UEFI-[Legacy]: American Megatrends v: F7 date: 12/04/2018
CPU:
  Info: model: Intel Core i5-9600K bits: 64 type: MCP arch: Coffee Lake gen: core 9 level: v3
    note: check built: 2018 process: Intel 14nm family: 6 model-id: 0x9E (158) stepping: 0xC (12)
    microcode: 0xF8
  Topology: cpus: 1x cores: 6 smt: <unsupported> cache: L1: 384 KiB desc: d-6x32 KiB; i-6x32 KiB
    L2: 1.5 MiB desc: 6x256 KiB L3: 9 MiB desc: 1x9 MiB
  Speed (MHz): avg: 800 min/max: 800/4600 scaling: driver: intel_pstate governor: powersave
    cores: 1: 800 2: 800 3: 800 4: 800 5: 800 6: 800 bogomips: 44398
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
  Vulnerabilities:
  Type: gather_data_sampling mitigation: Microcode
  Type: itlb_multihit status: KVM: VMX disabled
  Type: l1tf status: Not affected
  Type: mds mitigation: Clear CPU buffers; SMT disabled
  Type: meltdown status: Not affected
  Type: mmio_stale_data mitigation: Clear CPU buffers; SMT disabled
  Type: reg_file_data_sampling status: Not affected
  Type: retbleed mitigation: IBRS
  Type: spec_rstack_overflow status: Not affected
  Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via prctl
  Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization
  Type: spectre_v2 mitigation: IBRS; IBPB: conditional; STIBP: disabled; RSB filling;
    PBRSB-eIBRS: Not affected; BHI: Not affected
  Type: srbds mitigation: Microcode
  Type: tsx_async_abort mitigation: TSX disabled
Graphics:
  Device-1: NVIDIA TU104 [GeForce RTX 2080 Rev. A] vendor: Gigabyte driver: nvidia v: 570.124.06
    alternate: nouveau,nvidia_drm non-free: 530.xx+ status: current (as of 2023-03) arch: Turing
    code: TUxxx process: TSMC 12nm FF built: 2018-22 pcie: gen: 3 speed: 8 GT/s lanes: 16 ports:
    active: none off: DP-2,HDMI-A-1 empty: DP-1,DP-3,Unknown-1 bus-ID: 01:00.0 chip-ID: 10de:1e87
    class-ID: 0300
  Display: x11 server: X.Org v: 1.21.1.7 compositor: xfwm v: 4.20.0 driver: X: loaded: nvidia
    unloaded: fbdev,modesetting,nouveau,vesa alternate: nv gpu: nvidia,nvidia-nvswitch
    display-ID: :0.0 screens: 1
  Screen-1: 0 s-res: 6400x1440 s-dpi: 96 s-size: 1694x382mm (66.69x15.04")
    s-diag: 1737mm (68.37")
  Monitor-1: DP-2 pos: primary,top-center res: 2560x1440 dpi: 109 size: 598x336mm (23.54x13.23")
    diag: 686mm (27.01") modes: N/A
  Monitor-2: DP-4 pos: bottom-r res: 1920x1080 hz: 60 dpi: 92 size: 531x299mm (20.91x11.77")
    diag: 609mm (23.99") modes: N/A
  Monitor-3: HDMI-0 pos: bottom-l res: 1920x1080 hz: 60 dpi: 119 size: 410x230mm (16.14x9.06")
    diag: 470mm (18.51") modes: N/A
  API: OpenGL v: 4.6.0 NVIDIA 570.124.06 renderer: NVIDIA GeForce RTX 2080/PCIe/SSE2
    direct-render: Yes
Audio:
  Device-1: Intel Cannon Lake PCH cAVS vendor: Gigabyte driver: snd_hda_intel bus-ID: 1-3:2
    v: kernel alternate: snd_soc_skl,snd_sof_pci_intel_cnl chip-ID: 8888:1234 class-ID: 0300
    bus-ID: 00:1f.3 chip-ID: 8086:a348 serial: <filter> class-ID: 0403
  Device-2: NVIDIA TU104 HD Audio vendor: Gigabyte driver: snd_hda_intel v: kernel pcie: gen: 3
    speed: 8 GT/s lanes: 16 bus-ID: 01:00.1 chip-ID: 10de:10f8 class-ID: 0403
  Device-3: CMTECK type: USB driver: snd-usb-audio
  API: ALSA v: k6.1.0-32-amd64 status: kernel-api tools: alsamixer,amixer
  Server-1: PipeWire v: 1.0.0 status: active with: 1: pipewire-pulse status: active
    2: wireplumber status: active 3: pipewire-alsa type: plugin 4: pw-jack type: plugin
    tools: pactl,pw-cat,pw-cli,wpctl
Network:
  Device-1: Intel Cannon Lake PCH CNVi WiFi driver: iwlwifi v: kernel modules: wl bus-ID: 00:14.3
    chip-ID: 8086:a370 class-ID: 0280
  IF: wlan0 state: down mac: <filter>
  Device-2: Intel Ethernet I219-V vendor: Gigabyte driver: e1000e v: kernel port: N/A
    bus-ID: 00:1f.6 chip-ID: 8086:15bc class-ID: 0200
  IF: eth0 state: up speed: 1000 Mbps duplex: full mac: <filter>
Bluetooth:
  Device-1: Broadcom BCM20702A0 Bluetooth 4.0 type: USB driver: btusb v: 0.8 bus-ID: 1-13.3:9
    chip-ID: 0a5c:21e8 class-ID: fe01 serial: <filter>
  Report: hciconfig ID: hci1 rfk-id: 2 state: up address: <filter> bt-v: 2.1 lmp-v: 4.1
    sub-v: 220e hci-v: 4.1 rev: 16e4
  Info: acl-mtu: 1021:8 sco-mtu: 64:1 link-policy: rswitch sniff link-mode: peripheral accept
    service-classes: rendering, capturing, object transfer, audio, telephony
  Device-2: Intel Bluetooth 9460/9560 Jefferson Peak (JfP) type: USB driver: btusb v: 0.8
    bus-ID: 1-14:11 chip-ID: 8087:0aaa class-ID: e001
  Report: ID: hci0 rfk-id: 3 state: up address: <filter> bt-v: 3.0 lmp-v: 5.1 sub-v: 100
    hci-v: 5.1 rev: 100
  Info: acl-mtu: 1021:4 sco-mtu: 96:6 link-policy: rswitch sniff link-mode: peripheral accept
    service-classes: rendering, capturing, object transfer, audio, telephony
Drives:
  Local Storage: total: 4.79 TiB used: 172.17 GiB (3.5%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Samsung model: SSD 990 EVO Plus 2TB size: 1.82 TiB
    block-size: physical: 512 B logical: 512 B speed: 126 Gb/s lanes: 4 type: SSD serial: <filter>
    rev: 1B2QKXG7 temp: 27.9 C scheme: GPT
  ID-2: /dev/sda maj-min: 8:0 vendor: Seagate model: ST1000DM003-1CH162 size: 931.51 GiB
    block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s type: HDD rpm: 7200 serial: <filter>
    rev: CC47 scheme: MBR
  ID-3: /dev/sdb maj-min: 8:16 vendor: Seagate model: ST1000DM010-2EP102 size: 931.51 GiB
    block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s type: HDD rpm: 7200 serial: <filter>
    rev: CC43 scheme: MBR
  ID-4: /dev/sdc maj-min: 8:32 vendor: Samsung model: SSD 860 EVO 1TB size: 931.51 GiB
    block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s type: SSD serial: <filter> rev: 2B6Q
    scheme: MBR
  ID-5: /dev/sdd maj-min: 8:48 vendor: SanDisk model: SDSSDHP256G size: 238.47 GiB block-size:
    physical: 512 B logical: 512 B speed: 6.0 Gb/s type: SSD serial: <filter> rev: 6RL scheme: MBR
  ID-6: /dev/sde maj-min: 8:64 type: USB vendor: SanDisk model: Cruzer Blade size: 7.45 GiB
    block-size: physical: 512 B logical: 512 B type: N/A serial: <filter> rev: 1.27 scheme: MBR
  SMART Message: Unknown USB bridge. Flash drive/Unsupported enclosure?
Partition:
  ID-1: / raw-size: 35.73 GiB size: 34.88 GiB (97.60%) used: 28.28 GiB (81.1%) fs: ext4
    dev: /dev/sdd2 maj-min: 8:50
  ID-2: /home raw-size: 202.49 GiB size: 198.25 GiB (97.91%) used: 143.89 GiB (72.6%) fs: ext4
    dev: /dev/sdd3 maj-min: 8:51
Swap:
  Kernel: swappiness: 15 (default 60) cache-pressure: 100 (default)
  ID-1: swap-1 type: file size: 4 GiB used: 0 KiB (0.0%) priority: -2 file: /swap/swap
Sensors:
  System Temperatures: cpu: 25.0 C pch: 32.0 C mobo: N/A
  Fan Speeds (RPM): N/A
Repos:
  Packages: 2725 pm: dpkg pkgs: 2700 libs: 1514 tools: apt,apt-get,aptitude,nala,synaptic pm: rpm
    pkgs: 0 pm: flatpak pkgs: 25
  No active apt repos in: /etc/apt/sources.list
  Active apt repos in: /etc/apt/sources.list.d/debian-stable-updates.list
    1: deb http://deb.debian.org/debian bookworm-updates main contrib non-free non-free-firmware
  Active apt repos in: /etc/apt/sources.list.d/debian.list
    1: deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware
    2: deb http://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
  Active apt repos in: /etc/apt/sources.list.d/freedownloadmanager.list
    1: deb [arch=amd64 signed-by=/usr/share/keyrings/freedownloadmanager.gpg] https://debrepo.freedownloadmanager.org/ jammy main
  Active apt repos in: /etc/apt/sources.list.d/home:strycore.list
    1: deb http://download.opensuse.org/repositories/home:/strycore/Debian_12/ /
  Active apt repos in: /etc/apt/sources.list.d/mx.list
    1: deb http://mirror.math.princeton.edu/pub/mxlinux/mx/repo/ bookworm main non-free
    2: deb http://mirror.math.princeton.edu/pub/mxlinux/mx/repo/ bookworm ahs
  Active apt repos in: /etc/apt/sources.list.d/winehq-bookworm.sources
    1: deb [arch=amd64 i386] https://dl.winehq.org/wine-builds/debian bookworm main
Info:
  Processes: 291 Uptime: 4m wakeups: 1 Memory: 15.55 GiB used: 3.52 GiB (22.6%) Init: SysVinit
  v: 3.06 runlevel: 5 default: graphical tool: systemctl Compilers: gcc: 12.2.0 alt: 12
  Client: shell wrapper v: 5.2.15-release inxi: 3.3.26
Boot Mode: BIOS (legacy, CSM, MBR)

Re: Moving /home directory

Posted: Thu Apr 10, 2025 7:19 pm
by rokytnji.1
Might help ya.

viewtopic.php?t=66701

I've symlinked certain files like in /home on SD card card before also.
Now I plan a little better. :bagoverhead:

Re: Moving /home directory

Posted: Thu Apr 10, 2025 8:45 pm
by CharlesV

Re: Moving /home directory

Posted: Thu Apr 10, 2025 10:21 pm
by Michael-IDA
CharlesV's link is more complete, but the copy command they use probably won't copy . files correctly (or at all). Use the Thunar steps from rokytnji.1's link for that. Personally I use tar for this step, which has the benefit of making you a nice backup file.

Very stripped down version:

Code: Select all

#!/bin/bash
# # # Description
# Make a Daily backup of /home directory

DirHome='/home'
DirUser='username'
Back="pathtobackup/backupfilename"
TempFile01="pathtoLogDir/logfile.txt"

cd "$DirHome"
# Put all tar commands on their own lines so we can read it.
tar \
  --create \
  --gzip \
  --file="$Back" \
  "$DirUser" \
  2>&1 \
  | tee "$TempFile01"
  
HTH

Re: Moving /home directory  [Solved]

Posted: Thu Apr 10, 2025 11:54 pm
by RedGreen925
NewLinuxBro wrote: Thu Apr 10, 2025 6:52 pm Hello, I currently have my entire MX install on a 256 GB SSD, and I just bought a 2 TB SSD that I'd like to move my home directory to, while keeping my root directory on the old drive and expanding it, I installed Bazzite on the 2 TB drive to test it out but now I want to replace it with my Home directory, how exactly would I go about doing that?

Code: Select all

System:
  Kernel: 6.1.0-32-amd64 [6.1.129-1] arch: x86_64 bits: 64 compiler: gcc v: 12.2.0
    parameters: BOOT_IMAGE=/boot/vmlinuz-6.1.0-32-amd64 root=UUID=<filter> ro quiet splash
  Desktop: Xfce v: 4.20.0 tk: Gtk v: 3.24.38 info: xfce4-panel wm: xfwm v: 4.20.0 vt: 7
    dm: LightDM v: 1.32.0 Distro: MX-23.5_x64 Libretto Jan 12  2025 base: Debian GNU/Linux 12
    (bookworm)
Machine:
  Type: Desktop System: Gigabyte product: Z390 AORUS PRO WIFI v: N/A serial: <superuser required>
  Mobo: Gigabyte model: Z390 AORUS PRO WIFI-CF v: x.x serial: <superuser required>
    UEFI-[Legacy]: American Megatrends v: F7 date: 12/04/2018
CPU:
  Info: model: Intel Core i5-9600K bits: 64 type: MCP arch: Coffee Lake gen: core 9 level: v3
    note: check built: 2018 process: Intel 14nm family: 6 model-id: 0x9E (158) stepping: 0xC (12)
    microcode: 0xF8
  Topology: cpus: 1x cores: 6 smt: <unsupported> cache: L1: 384 KiB desc: d-6x32 KiB; i-6x32 KiB
    L2: 1.5 MiB desc: 6x256 KiB L3: 9 MiB desc: 1x9 MiB
  Speed (MHz): avg: 800 min/max: 800/4600 scaling: driver: intel_pstate governor: powersave
    cores: 1: 800 2: 800 3: 800 4: 800 5: 800 6: 800 bogomips: 44398
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
  Vulnerabilities:
  Type: gather_data_sampling mitigation: Microcode
  Type: itlb_multihit status: KVM: VMX disabled
  Type: l1tf status: Not affected
  Type: mds mitigation: Clear CPU buffers; SMT disabled
  Type: meltdown status: Not affected
  Type: mmio_stale_data mitigation: Clear CPU buffers; SMT disabled
  Type: reg_file_data_sampling status: Not affected
  Type: retbleed mitigation: IBRS
  Type: spec_rstack_overflow status: Not affected
  Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via prctl
  Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization
  Type: spectre_v2 mitigation: IBRS; IBPB: conditional; STIBP: disabled; RSB filling;
    PBRSB-eIBRS: Not affected; BHI: Not affected
  Type: srbds mitigation: Microcode
  Type: tsx_async_abort mitigation: TSX disabled
Graphics:
  Device-1: NVIDIA TU104 [GeForce RTX 2080 Rev. A] vendor: Gigabyte driver: nvidia v: 570.124.06
    alternate: nouveau,nvidia_drm non-free: 530.xx+ status: current (as of 2023-03) arch: Turing
    code: TUxxx process: TSMC 12nm FF built: 2018-22 pcie: gen: 3 speed: 8 GT/s lanes: 16 ports:
    active: none off: DP-2,HDMI-A-1 empty: DP-1,DP-3,Unknown-1 bus-ID: 01:00.0 chip-ID: 10de:1e87
    class-ID: 0300
  Display: x11 server: X.Org v: 1.21.1.7 compositor: xfwm v: 4.20.0 driver: X: loaded: nvidia
    unloaded: fbdev,modesetting,nouveau,vesa alternate: nv gpu: nvidia,nvidia-nvswitch
    display-ID: :0.0 screens: 1
  Screen-1: 0 s-res: 6400x1440 s-dpi: 96 s-size: 1694x382mm (66.69x15.04")
    s-diag: 1737mm (68.37")
  Monitor-1: DP-2 pos: primary,top-center res: 2560x1440 dpi: 109 size: 598x336mm (23.54x13.23")
    diag: 686mm (27.01") modes: N/A
  Monitor-2: DP-4 pos: bottom-r res: 1920x1080 hz: 60 dpi: 92 size: 531x299mm (20.91x11.77")
    diag: 609mm (23.99") modes: N/A
  Monitor-3: HDMI-0 pos: bottom-l res: 1920x1080 hz: 60 dpi: 119 size: 410x230mm (16.14x9.06")
    diag: 470mm (18.51") modes: N/A
  API: OpenGL v: 4.6.0 NVIDIA 570.124.06 renderer: NVIDIA GeForce RTX 2080/PCIe/SSE2
    direct-render: Yes
Audio:
  Device-1: Intel Cannon Lake PCH cAVS vendor: Gigabyte driver: snd_hda_intel bus-ID: 1-3:2
    v: kernel alternate: snd_soc_skl,snd_sof_pci_intel_cnl chip-ID: 8888:1234 class-ID: 0300
    bus-ID: 00:1f.3 chip-ID: 8086:a348 serial: <filter> class-ID: 0403
  Device-2: NVIDIA TU104 HD Audio vendor: Gigabyte driver: snd_hda_intel v: kernel pcie: gen: 3
    speed: 8 GT/s lanes: 16 bus-ID: 01:00.1 chip-ID: 10de:10f8 class-ID: 0403
  Device-3: CMTECK type: USB driver: snd-usb-audio
  API: ALSA v: k6.1.0-32-amd64 status: kernel-api tools: alsamixer,amixer
  Server-1: PipeWire v: 1.0.0 status: active with: 1: pipewire-pulse status: active
    2: wireplumber status: active 3: pipewire-alsa type: plugin 4: pw-jack type: plugin
    tools: pactl,pw-cat,pw-cli,wpctl
Network:
  Device-1: Intel Cannon Lake PCH CNVi WiFi driver: iwlwifi v: kernel modules: wl bus-ID: 00:14.3
    chip-ID: 8086:a370 class-ID: 0280
  IF: wlan0 state: down mac: <filter>
  Device-2: Intel Ethernet I219-V vendor: Gigabyte driver: e1000e v: kernel port: N/A
    bus-ID: 00:1f.6 chip-ID: 8086:15bc class-ID: 0200
  IF: eth0 state: up speed: 1000 Mbps duplex: full mac: <filter>
Bluetooth:
  Device-1: Broadcom BCM20702A0 Bluetooth 4.0 type: USB driver: btusb v: 0.8 bus-ID: 1-13.3:9
    chip-ID: 0a5c:21e8 class-ID: fe01 serial: <filter>
  Report: hciconfig ID: hci1 rfk-id: 2 state: up address: <filter> bt-v: 2.1 lmp-v: 4.1
    sub-v: 220e hci-v: 4.1 rev: 16e4
  Info: acl-mtu: 1021:8 sco-mtu: 64:1 link-policy: rswitch sniff link-mode: peripheral accept
    service-classes: rendering, capturing, object transfer, audio, telephony
  Device-2: Intel Bluetooth 9460/9560 Jefferson Peak (JfP) type: USB driver: btusb v: 0.8
    bus-ID: 1-14:11 chip-ID: 8087:0aaa class-ID: e001
  Report: ID: hci0 rfk-id: 3 state: up address: <filter> bt-v: 3.0 lmp-v: 5.1 sub-v: 100
    hci-v: 5.1 rev: 100
  Info: acl-mtu: 1021:4 sco-mtu: 96:6 link-policy: rswitch sniff link-mode: peripheral accept
    service-classes: rendering, capturing, object transfer, audio, telephony
Drives:
  Local Storage: total: 4.79 TiB used: 172.17 GiB (3.5%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Samsung model: SSD 990 EVO Plus 2TB size: 1.82 TiB
    block-size: physical: 512 B logical: 512 B speed: 126 Gb/s lanes: 4 type: SSD serial: <filter>
    rev: 1B2QKXG7 temp: 27.9 C scheme: GPT
  ID-2: /dev/sda maj-min: 8:0 vendor: Seagate model: ST1000DM003-1CH162 size: 931.51 GiB
    block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s type: HDD rpm: 7200 serial: <filter>
    rev: CC47 scheme: MBR
  ID-3: /dev/sdb maj-min: 8:16 vendor: Seagate model: ST1000DM010-2EP102 size: 931.51 GiB
    block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s type: HDD rpm: 7200 serial: <filter>
    rev: CC43 scheme: MBR
  ID-4: /dev/sdc maj-min: 8:32 vendor: Samsung model: SSD 860 EVO 1TB size: 931.51 GiB
    block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s type: SSD serial: <filter> rev: 2B6Q
    scheme: MBR
  ID-5: /dev/sdd maj-min: 8:48 vendor: SanDisk model: SDSSDHP256G size: 238.47 GiB block-size:
    physical: 512 B logical: 512 B speed: 6.0 Gb/s type: SSD serial: <filter> rev: 6RL scheme: MBR
  ID-6: /dev/sde maj-min: 8:64 type: USB vendor: SanDisk model: Cruzer Blade size: 7.45 GiB
    block-size: physical: 512 B logical: 512 B type: N/A serial: <filter> rev: 1.27 scheme: MBR
  SMART Message: Unknown USB bridge. Flash drive/Unsupported enclosure?
Partition:
  ID-1: / raw-size: 35.73 GiB size: 34.88 GiB (97.60%) used: 28.28 GiB (81.1%) fs: ext4
    dev: /dev/sdd2 maj-min: 8:50
  ID-2: /home raw-size: 202.49 GiB size: 198.25 GiB (97.91%) used: 143.89 GiB (72.6%) fs: ext4
    dev: /dev/sdd3 maj-min: 8:51
Swap:
  Kernel: swappiness: 15 (default 60) cache-pressure: 100 (default)
  ID-1: swap-1 type: file size: 4 GiB used: 0 KiB (0.0%) priority: -2 file: /swap/swap
Sensors:
  System Temperatures: cpu: 25.0 C pch: 32.0 C mobo: N/A
  Fan Speeds (RPM): N/A
Repos:
  Packages: 2725 pm: dpkg pkgs: 2700 libs: 1514 tools: apt,apt-get,aptitude,nala,synaptic pm: rpm
    pkgs: 0 pm: flatpak pkgs: 25
  No active apt repos in: /etc/apt/sources.list
  Active apt repos in: /etc/apt/sources.list.d/debian-stable-updates.list
    1: deb http://deb.debian.org/debian bookworm-updates main contrib non-free non-free-firmware
  Active apt repos in: /etc/apt/sources.list.d/debian.list
    1: deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware
    2: deb http://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
  Active apt repos in: /etc/apt/sources.list.d/freedownloadmanager.list
    1: deb [arch=amd64 signed-by=/usr/share/keyrings/freedownloadmanager.gpg] https://debrepo.freedownloadmanager.org/ jammy main
  Active apt repos in: /etc/apt/sources.list.d/home:strycore.list
    1: deb http://download.opensuse.org/repositories/home:/strycore/Debian_12/ /
  Active apt repos in: /etc/apt/sources.list.d/mx.list
    1: deb http://mirror.math.princeton.edu/pub/mxlinux/mx/repo/ bookworm main non-free
    2: deb http://mirror.math.princeton.edu/pub/mxlinux/mx/repo/ bookworm ahs
  Active apt repos in: /etc/apt/sources.list.d/winehq-bookworm.sources
    1: deb [arch=amd64 i386] https://dl.winehq.org/wine-builds/debian bookworm main
Info:
  Processes: 291 Uptime: 4m wakeups: 1 Memory: 15.55 GiB used: 3.52 GiB (22.6%) Init: SysVinit
  v: 3.06 runlevel: 5 default: graphical tool: systemctl Compilers: gcc: 12.2.0 alt: 12
  Client: shell wrapper v: 5.2.15-release inxi: 3.3.26
Boot Mode: BIOS (legacy, CSM, MBR)

Use live boot USB once booted open a Terminal and use the commands.

Code: Select all

sudo mkdir /tmp/oldhome
sudo mkdir /tmp/newhome
sudo mount /dev/sdd3 /tmp/oldhome
sudo mount /dev/sd?? /tmp/newhome
rsync -avP /tmp/oldhome/username /tmp/newhome/
Your listing does not appear to show the 2tb drive so whatever it shows up as replace the ?? with its settings. This assumes you already formatted the new drive partition to be able to rsync the old home user directory to it, if you choose the ext4 files system one less step to do. Now for the next boot to have it used.

Code: Select all

sudo mkdir /tmp/root
sudo mount /dev/sdd2 /tmp/root
sudo nano /tmp/root/etc/fstab
Where you would edit the fstab on the install to use the new UUID of the /home partition on the 2tb SSD you get this by using the command sudo blkid | grep sd?? again replacing the ?? with the new drives detected settings to be used. If you did not use the ext4 on the new drive for the file system then that needs to be changed as well in the fstab. Reboot to confirm everything works then you can delete the old home and expand the / partition.

Re: Moving /home directory

Posted: Fri Apr 11, 2025 12:13 am
by NewLinuxBro
RedGreen925 wrote: Thu Apr 10, 2025 11:54 pm
NewLinuxBro wrote: Thu Apr 10, 2025 6:52 pm Hello, I currently have my entire MX install on a 256 GB SSD, and I just bought a 2 TB SSD that I'd like to move my home directory to, while keeping my root directory on the old drive and expanding it, I installed Bazzite on the 2 TB drive to test it out but now I want to replace it with my Home directory, how exactly would I go about doing that?

Code: Select all

System:
  Kernel: 6.1.0-32-amd64 [6.1.129-1] arch: x86_64 bits: 64 compiler: gcc v: 12.2.0
    parameters: BOOT_IMAGE=/boot/vmlinuz-6.1.0-32-amd64 root=UUID=<filter> ro quiet splash
  Desktop: Xfce v: 4.20.0 tk: Gtk v: 3.24.38 info: xfce4-panel wm: xfwm v: 4.20.0 vt: 7
    dm: LightDM v: 1.32.0 Distro: MX-23.5_x64 Libretto Jan 12  2025 base: Debian GNU/Linux 12
    (bookworm)
Machine:
  Type: Desktop System: Gigabyte product: Z390 AORUS PRO WIFI v: N/A serial: <superuser required>
  Mobo: Gigabyte model: Z390 AORUS PRO WIFI-CF v: x.x serial: <superuser required>
    UEFI-[Legacy]: American Megatrends v: F7 date: 12/04/2018
CPU:
  Info: model: Intel Core i5-9600K bits: 64 type: MCP arch: Coffee Lake gen: core 9 level: v3
    note: check built: 2018 process: Intel 14nm family: 6 model-id: 0x9E (158) stepping: 0xC (12)
    microcode: 0xF8
  Topology: cpus: 1x cores: 6 smt: <unsupported> cache: L1: 384 KiB desc: d-6x32 KiB; i-6x32 KiB
    L2: 1.5 MiB desc: 6x256 KiB L3: 9 MiB desc: 1x9 MiB
  Speed (MHz): avg: 800 min/max: 800/4600 scaling: driver: intel_pstate governor: powersave
    cores: 1: 800 2: 800 3: 800 4: 800 5: 800 6: 800 bogomips: 44398
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
  Vulnerabilities:
  Type: gather_data_sampling mitigation: Microcode
  Type: itlb_multihit status: KVM: VMX disabled
  Type: l1tf status: Not affected
  Type: mds mitigation: Clear CPU buffers; SMT disabled
  Type: meltdown status: Not affected
  Type: mmio_stale_data mitigation: Clear CPU buffers; SMT disabled
  Type: reg_file_data_sampling status: Not affected
  Type: retbleed mitigation: IBRS
  Type: spec_rstack_overflow status: Not affected
  Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via prctl
  Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization
  Type: spectre_v2 mitigation: IBRS; IBPB: conditional; STIBP: disabled; RSB filling;
    PBRSB-eIBRS: Not affected; BHI: Not affected
  Type: srbds mitigation: Microcode
  Type: tsx_async_abort mitigation: TSX disabled
Graphics:
  Device-1: NVIDIA TU104 [GeForce RTX 2080 Rev. A] vendor: Gigabyte driver: nvidia v: 570.124.06
    alternate: nouveau,nvidia_drm non-free: 530.xx+ status: current (as of 2023-03) arch: Turing
    code: TUxxx process: TSMC 12nm FF built: 2018-22 pcie: gen: 3 speed: 8 GT/s lanes: 16 ports:
    active: none off: DP-2,HDMI-A-1 empty: DP-1,DP-3,Unknown-1 bus-ID: 01:00.0 chip-ID: 10de:1e87
    class-ID: 0300
  Display: x11 server: X.Org v: 1.21.1.7 compositor: xfwm v: 4.20.0 driver: X: loaded: nvidia
    unloaded: fbdev,modesetting,nouveau,vesa alternate: nv gpu: nvidia,nvidia-nvswitch
    display-ID: :0.0 screens: 1
  Screen-1: 0 s-res: 6400x1440 s-dpi: 96 s-size: 1694x382mm (66.69x15.04")
    s-diag: 1737mm (68.37")
  Monitor-1: DP-2 pos: primary,top-center res: 2560x1440 dpi: 109 size: 598x336mm (23.54x13.23")
    diag: 686mm (27.01") modes: N/A
  Monitor-2: DP-4 pos: bottom-r res: 1920x1080 hz: 60 dpi: 92 size: 531x299mm (20.91x11.77")
    diag: 609mm (23.99") modes: N/A
  Monitor-3: HDMI-0 pos: bottom-l res: 1920x1080 hz: 60 dpi: 119 size: 410x230mm (16.14x9.06")
    diag: 470mm (18.51") modes: N/A
  API: OpenGL v: 4.6.0 NVIDIA 570.124.06 renderer: NVIDIA GeForce RTX 2080/PCIe/SSE2
    direct-render: Yes
Audio:
  Device-1: Intel Cannon Lake PCH cAVS vendor: Gigabyte driver: snd_hda_intel bus-ID: 1-3:2
    v: kernel alternate: snd_soc_skl,snd_sof_pci_intel_cnl chip-ID: 8888:1234 class-ID: 0300
    bus-ID: 00:1f.3 chip-ID: 8086:a348 serial: <filter> class-ID: 0403
  Device-2: NVIDIA TU104 HD Audio vendor: Gigabyte driver: snd_hda_intel v: kernel pcie: gen: 3
    speed: 8 GT/s lanes: 16 bus-ID: 01:00.1 chip-ID: 10de:10f8 class-ID: 0403
  Device-3: CMTECK type: USB driver: snd-usb-audio
  API: ALSA v: k6.1.0-32-amd64 status: kernel-api tools: alsamixer,amixer
  Server-1: PipeWire v: 1.0.0 status: active with: 1: pipewire-pulse status: active
    2: wireplumber status: active 3: pipewire-alsa type: plugin 4: pw-jack type: plugin
    tools: pactl,pw-cat,pw-cli,wpctl
Network:
  Device-1: Intel Cannon Lake PCH CNVi WiFi driver: iwlwifi v: kernel modules: wl bus-ID: 00:14.3
    chip-ID: 8086:a370 class-ID: 0280
  IF: wlan0 state: down mac: <filter>
  Device-2: Intel Ethernet I219-V vendor: Gigabyte driver: e1000e v: kernel port: N/A
    bus-ID: 00:1f.6 chip-ID: 8086:15bc class-ID: 0200
  IF: eth0 state: up speed: 1000 Mbps duplex: full mac: <filter>
Bluetooth:
  Device-1: Broadcom BCM20702A0 Bluetooth 4.0 type: USB driver: btusb v: 0.8 bus-ID: 1-13.3:9
    chip-ID: 0a5c:21e8 class-ID: fe01 serial: <filter>
  Report: hciconfig ID: hci1 rfk-id: 2 state: up address: <filter> bt-v: 2.1 lmp-v: 4.1
    sub-v: 220e hci-v: 4.1 rev: 16e4
  Info: acl-mtu: 1021:8 sco-mtu: 64:1 link-policy: rswitch sniff link-mode: peripheral accept
    service-classes: rendering, capturing, object transfer, audio, telephony
  Device-2: Intel Bluetooth 9460/9560 Jefferson Peak (JfP) type: USB driver: btusb v: 0.8
    bus-ID: 1-14:11 chip-ID: 8087:0aaa class-ID: e001
  Report: ID: hci0 rfk-id: 3 state: up address: <filter> bt-v: 3.0 lmp-v: 5.1 sub-v: 100
    hci-v: 5.1 rev: 100
  Info: acl-mtu: 1021:4 sco-mtu: 96:6 link-policy: rswitch sniff link-mode: peripheral accept
    service-classes: rendering, capturing, object transfer, audio, telephony
Drives:
  Local Storage: total: 4.79 TiB used: 172.17 GiB (3.5%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Samsung model: SSD 990 EVO Plus 2TB size: 1.82 TiB
    block-size: physical: 512 B logical: 512 B speed: 126 Gb/s lanes: 4 type: SSD serial: <filter>
    rev: 1B2QKXG7 temp: 27.9 C scheme: GPT
  ID-2: /dev/sda maj-min: 8:0 vendor: Seagate model: ST1000DM003-1CH162 size: 931.51 GiB
    block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s type: HDD rpm: 7200 serial: <filter>
    rev: CC47 scheme: MBR
  ID-3: /dev/sdb maj-min: 8:16 vendor: Seagate model: ST1000DM010-2EP102 size: 931.51 GiB
    block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s type: HDD rpm: 7200 serial: <filter>
    rev: CC43 scheme: MBR
  ID-4: /dev/sdc maj-min: 8:32 vendor: Samsung model: SSD 860 EVO 1TB size: 931.51 GiB
    block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s type: SSD serial: <filter> rev: 2B6Q
    scheme: MBR
  ID-5: /dev/sdd maj-min: 8:48 vendor: SanDisk model: SDSSDHP256G size: 238.47 GiB block-size:
    physical: 512 B logical: 512 B speed: 6.0 Gb/s type: SSD serial: <filter> rev: 6RL scheme: MBR
  ID-6: /dev/sde maj-min: 8:64 type: USB vendor: SanDisk model: Cruzer Blade size: 7.45 GiB
    block-size: physical: 512 B logical: 512 B type: N/A serial: <filter> rev: 1.27 scheme: MBR
  SMART Message: Unknown USB bridge. Flash drive/Unsupported enclosure?
Partition:
  ID-1: / raw-size: 35.73 GiB size: 34.88 GiB (97.60%) used: 28.28 GiB (81.1%) fs: ext4
    dev: /dev/sdd2 maj-min: 8:50
  ID-2: /home raw-size: 202.49 GiB size: 198.25 GiB (97.91%) used: 143.89 GiB (72.6%) fs: ext4
    dev: /dev/sdd3 maj-min: 8:51
Swap:
  Kernel: swappiness: 15 (default 60) cache-pressure: 100 (default)
  ID-1: swap-1 type: file size: 4 GiB used: 0 KiB (0.0%) priority: -2 file: /swap/swap
Sensors:
  System Temperatures: cpu: 25.0 C pch: 32.0 C mobo: N/A
  Fan Speeds (RPM): N/A
Repos:
  Packages: 2725 pm: dpkg pkgs: 2700 libs: 1514 tools: apt,apt-get,aptitude,nala,synaptic pm: rpm
    pkgs: 0 pm: flatpak pkgs: 25
  No active apt repos in: /etc/apt/sources.list
  Active apt repos in: /etc/apt/sources.list.d/debian-stable-updates.list
    1: deb http://deb.debian.org/debian bookworm-updates main contrib non-free non-free-firmware
  Active apt repos in: /etc/apt/sources.list.d/debian.list
    1: deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware
    2: deb http://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
  Active apt repos in: /etc/apt/sources.list.d/freedownloadmanager.list
    1: deb [arch=amd64 signed-by=/usr/share/keyrings/freedownloadmanager.gpg] https://debrepo.freedownloadmanager.org/ jammy main
  Active apt repos in: /etc/apt/sources.list.d/home:strycore.list
    1: deb http://download.opensuse.org/repositories/home:/strycore/Debian_12/ /
  Active apt repos in: /etc/apt/sources.list.d/mx.list
    1: deb http://mirror.math.princeton.edu/pub/mxlinux/mx/repo/ bookworm main non-free
    2: deb http://mirror.math.princeton.edu/pub/mxlinux/mx/repo/ bookworm ahs
  Active apt repos in: /etc/apt/sources.list.d/winehq-bookworm.sources
    1: deb [arch=amd64 i386] https://dl.winehq.org/wine-builds/debian bookworm main
Info:
  Processes: 291 Uptime: 4m wakeups: 1 Memory: 15.55 GiB used: 3.52 GiB (22.6%) Init: SysVinit
  v: 3.06 runlevel: 5 default: graphical tool: systemctl Compilers: gcc: 12.2.0 alt: 12
  Client: shell wrapper v: 5.2.15-release inxi: 3.3.26
Boot Mode: BIOS (legacy, CSM, MBR)

Use live boot USB once booted open a Terminal and use the commands.

Code: Select all

sudo mkdir /tmp/oldhome
sudo mkdir /tmp/newhome
sudo mount /dev/sdd3 /tmp/oldhome
sudo mount /dev/sd?? /tmp/newhome
rsync -avP /tmp/oldhome/username /tmp/newhome/
Your listing does not appear to show the 2tb drive so whatever it shows up as replace the ?? with its settings. This assumes you already formatted the new drive partition to be able to rsync the old home user directory to it, if you choose the ext4 files system one less step to do. Now for the next boot to have it used.

Code: Select all

sudo mkdir /tmp/root
sudo mount /dev/sdd2 /tmp/root
sudo nano /tmp/root/etc/fstab
Where you would edit the fstab on the install to use the new UUID of the /home partition on the 2tb SSD you get this by using the command sudo blkid | grep sd?? again replacing the ?? with the new drives detected settings to be used. If you did not use the ext4 on the new drive for the file system then that needs to be changed as well in the fstab. Reboot to confirm everything works then you can delete the old home and expand the / partition.
I will try this, my new drive comes up as /dev/nvme0n1 when I use QSI on the live usb, and it's already formatted to ext4

Re: Moving /home directory

Posted: Fri Apr 11, 2025 12:40 am
by NewLinuxBro
Okay I had to mount the new home drive as /dev/nvme0n1p1, but the rsync is copying everything over now, and I got the UUID for the new drive from Gparted already

Re: Moving /home directory

Posted: Fri Apr 11, 2025 1:23 am
by NewLinuxBro
It worked perfectly, thank you very much for the help, and to everyone else who responded as well

Re: Moving /home directory

Posted: Fri Apr 11, 2025 2:10 am
by DukeComposed
Michael-IDA wrote: Thu Apr 10, 2025 10:21 pm CharlesV's link is more complete, but the copy command they use probably won't copy
There are probably a dozen different ways to do this. OP needs to understand the process instead of blindly following a series of instructions here or anywhere else. If you don't know what you're doing, no tutorial will be complete enough, and no thread can ever be long enough until the penny drops.

In short, as each of these links outlines:
  1. Boot to a live session
  2. Repartition and format the new drive
  3. Copy the /home data from sda to sdb. I like rsync for this.
  4. Fix the fstab to mount the new sdb partition instead of the old sda partition
  5. Delete the old /home data and expand sda to fill the rest of the available disk space
If one isn't intimately familiar with how these steps work on Linux or UNIX, it's going to be a bad time trying to muddle through. None of these actions are particularly difficult, or even unexpected if you know how data gets stored and how mount points work, but someone, somewhere, is always just a hair too optimistic that computers should always know what the user thinks should happen and gets incredulous about having to be so utterly pedantic as to tell their machine to copy their files from A to B and then also remind it to check there again later in /etc/fstab, as though the machine itself should remember that... just because.

I think the best thing in this circumstance is to read both the other thread and the howtogeek.com article and really meditate on what the basic process of file transfer looks like in Linux: make a new partition, copy the data, fix the mount point. It's very simple, but hardly self-evident without years of UNIX experience that reading an article or two just can't easily convey.

Re: Moving /home directory

Posted: Fri Apr 11, 2025 12:46 pm
by RedGreen925
NewLinuxBro wrote: Fri Apr 11, 2025 1:23 am It worked perfectly, thank you very much for the help, and to everyone else who responded as well
You are welcome. It always does for me and has for so many years I have forgotten how long I have used it. Good to read it has worked for you too as I knew it would. Though you can do this with a live running system using two commands and an exclude list option for rsync copy for simplicity it it is better to do it on a non running system as it is a simple rsync single command only operation. As there is nothing to worry about excluding when not running.