Page 1 of 1

Is it safe to resize system on this situation?

Posted: Sun Feb 18, 2024 8:31 am
by keos
I broke the system ... I made a new installation this time totally in Spanish.

May I ask if after installing a new system 'on this machine' is it safe to resize it in order to have another one installed? - I see that I have 100GB 'left over' in the disk/system (i made the instalation in the whole disk).

@j2mcgreg
That's likely a "hidden" Windows recovery partition. If you have no intention of ever using Windows again, you can use GParted to remove it and then use the space for whatever.
What confuses me is the output information: 'inxi -Fxxxrza' :

Code: Select all

Partition:
  ID-1: / raw-size: 118.74 GiB size: 116.32 GiB (97.96%)
    used: 15.01 GiB (12.9%) fs: ext4 dev: /dev/sda2 maj-min: 8:2
  ID-2: /boot/efi raw-size: 512 MiB size: 511 MiB (99.80%)
    used: 6.1 MiB (1.2%) fs: vfat dev: /dev/sda1 maj-min: 8:1
In any case ... what should I do?
Captura de pantalla_2024-02-18_12-05-12.png

Code: Select all

keos@keos-ThinkPad-Yoga-11e-3rd-Gen:~$ inxi -Fxxxrza
System:
  Kernel: 5.15.0-94-generic x86_64 bits: 64 compiler: gcc v: 11.4.0
    parameters: BOOT_IMAGE=/boot/vmlinuz-5.15.0-94-generic
    root=UUID=d6b38d7a-4f7b-4c51-b858-b855b20ce677 ro quiet splash
  Desktop: Xfce 4.18.1 tk: Gtk 3.24.33 info: xfce4-panel wm: xfwm 4.18.0
    vt: 7 dm: LightDM 1.30.0 Distro: Linux Mint 21.3 Virginia
    base: Ubuntu 22.04 jammy
Machine:
  Type: Convertible System: LENOVO product: 20G8S04G00
    v: ThinkPad Yoga 11e 3rd Gen serial: <superuser required> Chassis: type: 31
    serial: <superuser required>
  Mobo: LENOVO model: Intel powered classmate PC
    serial: <superuser required> UEFI: LENOVO v: R0AET38W (1.21)
    date: 01/21/2019
Battery:
  ID-1: BAT1 charge: 38.1 Wh (100.0%) condition: 38.1/42.0 Wh (90.6%)
    volts: 12.7 min: 11.4 model: LGC LNV-00HW043 type: Li-poly serial: <filter>
    status: Full
CPU:
  Info: model: Intel Celeron N3150 bits: 64 type: MCP arch: Airmont family: 6
    model-id: 0x4C (76) stepping: 3 microcode: 0x368
  Topology: cpus: 1x cores: 4 smt: <unsupported> cache: L1: 224 KiB
    desc: d-4x24 KiB; i-4x32 KiB L2: 2 MiB desc: 2x1024 KiB
  Speed (MHz): avg: 1826 high: 2080 min/max: 480/2080 scaling:
    driver: intel_cpufreq governor: schedutil cores: 1: 1940 2: 1215 3: 2071
    4: 2080 bogomips: 12800
  Flags: ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3
  Vulnerabilities:
  Type: gather_data_sampling status: Not affected
  Type: itlb_multihit status: Not affected
  Type: l1tf status: Not affected
  Type: mds mitigation: Clear CPU buffers; SMT disabled
  Type: meltdown mitigation: PTI
  Type: mmio_stale_data status: Unknown: No mitigations
  Type: retbleed status: Not affected
  Type: spec_rstack_overflow status: Not affected
  Type: spec_store_bypass status: Not affected
  Type: spectre_v1
    mitigation: usercopy/swapgs barriers and __user pointer sanitization
  Type: spectre_v2 mitigation: Retpolines, IBPB: conditional, IBRS_FW,
    STIBP: disabled, RSB filling, PBRSB-eIBRS: Not affected
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: Intel Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx
    Integrated Graphics
    vendor: Lenovo driver: i915 v: kernel ports: active: eDP-1
    empty: DP-1, DP-2, HDMI-A-1, HDMI-A-2 bus-ID: 00:02.0 chip-ID: 8086:22b1
    class-ID: 0300
  Device-2: Chicony Integrated Camera type: USB driver: uvcvideo
    bus-ID: 1-3:3 chip-ID: 04f2:b55d class-ID: 0e02 serial: <filter>
  Display: x11 server: X.Org v: 1.21.1.4 compositor: xfwm v: 4.18.0 driver:
    X: loaded: modesetting unloaded: fbdev,vesa gpu: i915 display-ID: :0.0
    screens: 1
  Screen-1: 0 s-res: 1366x768 s-dpi: 96 s-size: 361x203mm (14.2x8.0")
    s-diag: 414mm (16.3")
  Monitor-1: eDP-1 model: Samsung built: 2015 res: 1366x768 hz: 60 dpi: 136
    gamma: 1.2 size: 256x144mm (10.1x5.7") diag: 294mm (11.6") ratio: 16:9
    modes: 1366x768
  OpenGL: renderer: Mesa Intel HD Graphics 400 (BSW)
    v: 4.6 Mesa 23.2.1-1ubuntu3.1~22.04.2 direct render: Yes
Audio:
  Device-1: Intel Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series
    High Definition Audio
    vendor: Lenovo driver: snd_hda_intel v: kernel bus-ID: 00:1b.0
    chip-ID: 8086:2284 class-ID: 0403
  Sound Server-1: ALSA v: k5.15.0-94-generic running: yes
  Sound Server-2: PulseAudio v: 15.99.1 running: yes
  Sound Server-3: PipeWire v: 0.3.48 running: yes
Network:
  Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
    vendor: Lenovo driver: r8169 v: kernel pcie: gen: 1 speed: 2.5 GT/s
    lanes: 1 port: 1000 bus-ID: 02:00.0 chip-ID: 10ec:8168 class-ID: 0200
  IF: enp2s0 state: down mac: <filter>
  Device-2: Intel Wireless 7265 driver: iwlwifi v: kernel pcie: gen: 1
    speed: 2.5 GT/s lanes: 1 bus-ID: 03:00.0 chip-ID: 8086:095b class-ID: 0280
  IF: wlp3s0 state: up mac: <filter>
Bluetooth:
  Device-1: Intel Bluetooth wireless interface type: USB driver: btusb v: 0.8
    bus-ID: 1-5:4 chip-ID: 8087:0a2a class-ID: e001
  Report: hciconfig ID: hci0 rfk-id: 2 state: down
    bt-service: enabled,running rfk-block: hardware: no software: yes
    address: <filter>
  Info: acl-mtu: 1021:5 sco-mtu: 96:6 link-policy: rswitch hold sniff
    link-mode: peripheral accept
Drives:
  Local Storage: total: 119.24 GiB used: 15.02 GiB (12.6%)
  SMART Message: Required tool smartctl not installed. Check --recommends
  ID-1: /dev/sda maj-min: 8:0 vendor: Samsung model: MZNTY128HDHP-000L1
    size: 119.24 GiB block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s
    type: SSD serial: <filter> rev: 3L0Q scheme: GPT
Partition:
  ID-1: / raw-size: 118.74 GiB size: 116.32 GiB (97.96%)
    used: 15.01 GiB (12.9%) fs: ext4 dev: /dev/sda2 maj-min: 8:2
  ID-2: /boot/efi raw-size: 512 MiB size: 511 MiB (99.80%)
    used: 6.1 MiB (1.2%) fs: vfat dev: /dev/sda1 maj-min: 8:1
Swap:
  Kernel: swappiness: 60 (default) cache-pressure: 100 (default)
  ID-1: swap-1 type: file size: 2 GiB used: 84.5 MiB (4.1%) priority: -2
    file: /swapfile
Sensors:
  System Temperatures: cpu: 50.0 C mobo: 0.0 C
  Fan Speeds (RPM): cpu: 3829
Repos:
  Packages: apt: 2601 lib: 1436 flatpak: 0
  No active apt repos in: /etc/apt/sources.list
  Active apt repos in: /etc/apt/sources.list.d/official-package-repositories.list
    1: deb http://packages.linuxmint.com virginia main upstream import backport
    2: deb http://archive.ubuntu.com/ubuntu jammy main restricted universe multiverse
    3: deb http://archive.ubuntu.com/ubuntu jammy-updates main restricted universe multiverse
    4: deb http://archive.ubuntu.com/ubuntu jammy-backports main restricted universe multiverse
    5: deb http://security.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse
  Active apt repos in: /etc/apt/sources.list.d/yandex-stable.list
    1: deb [arch=amd64 signed-by=/usr/share/keyrings/yandex.gpg] http://repo.yandex.ru/yandex-browser/deb stable main
Info:
  Processes: 259 Uptime: 8h 43m wakeups: 2 Memory: 3.65 GiB
  used: 1.76 GiB (48.3%) Init: systemd v: 249 runlevel: 5 tool: systemctl
  Compilers: gcc: 11.4.0 alt: 11/12 Shell: Bash v: 5.1.16
  running-in: xfce4-terminal inxi: 3.3.13
keos@keos-ThinkPad-Yoga-11e-3rd-Gen:~$ 

Re: Is it safe to resize system?

Posted: Sun Feb 18, 2024 9:48 am
by Eadwine Rose
@keos Here is your new topic.

Re: Is it safe to resize system on this situation?

Posted: Sun Feb 18, 2024 12:23 pm
by CharlesV
As with any procedure of this nature, you should make a backup first if you have anything on that partition that you would not want to lose ... And then use pgarted ( booted from a live usb ) to change the partition size.

Yes it should be 'safe' and it works well - but make a backup first!

Re: Is it safe to resize system on this situation?

Posted: Sun Feb 18, 2024 12:29 pm
by keos
That is the point that I do not understand, what appears in the screenshot is the new system that I have installed, if I delete with gparted .... for sure it takes it completely on the road!

EDIT:

Which is the real situation?

Code: Select all

root@keos-ThinkPad-Yoga-11e-3rd-Gen:~# LANG=C free -h
               total        used        free      shared  buff/cache   available
Mem:           3.6Gi       1.6Gi       693Mi       216Mi       1.3Gi       1.5Gi
Swap:          2.0Gi       290Mi       1.7Gi
root@keos-ThinkPad-Yoga-11e-3rd-Gen:~# 

Re: Is it safe to resize system on this situation?

Posted: Sun Feb 18, 2024 12:47 pm
by CharlesV
Not delete. You said resize. You can resize that large partition and make it much smaller ( depending upon how full it is now.)

Re: Is it safe to resize system on this situation?

Posted: Sun Feb 18, 2024 1:01 pm
by keos
I think you are right, I do not explain well, the problem is that according to the information that gives the command that the space is 119GB (which I do not think is true, and it is what confuses me) I thought that maybe I could install another system and reduce the one already installed. But something is very wrong.

EDIT:

Code: Select all

keos@keos-ThinkPad-Yoga-11e-3rd-Gen:~$ sudo lsblk -fm
[sudo] contraseña para keos:  
NAME FSTYPE FSVER LABEL UUID                                 FSAVAIL FSUSE% MOUNTPOINTS   SIZE OWNER GROUP MODE
sda                                                                                     119.2G root  disk  brw-rw----
├─sda1
│    vfat   FAT32       03B5-3946                             504.9M     1% /boot/efi     512M root  disk  brw-rw----
└─sda2
     ext4   1.0         d6b38d7a-4f7b-4c51-b858-b855b20ce677   95.3G    13% /           118.7G root  disk  brw-rw----
keos@keos-ThinkPad-Yoga-11e-3rd-Gen:~$ 

Re: Is it safe to resize system on this situation?

Posted: Sun Feb 18, 2024 1:06 pm
by CharlesV
I think your backwards. If you want to keep your existing system, then resize it and create the *area* to install the new system too.

Re: Is it safe to resize system on this situation?

Posted: Sun Feb 18, 2024 1:27 pm
by DukeComposed
keos wrote: Sun Feb 18, 2024 1:01 pm I think you are right, I do not explain well, the problem is that according to the information that gives the command that the space is 119GB (which I do not think is true, and it is what confuses me) I thought that maybe I could install another system and reduce the one already installed. But something is very wrong.
From this and looking at the QSI it appears you're running a Linux Mint system with a 120 GB hard disk, which has one boot partition and one ext4 partition that contains the Mint OS. Since Mint is only taking up 15 GB, you can, in theory, fit another operating system on that disk... but you aren't going to fit it in that ext4 partition. There's no more unallocated space on the drive to put another disk partition. Let's not confuse free space ("I have room to put files on this disk") with unallocated space ("This is a part of the disk that hasn't been touched and I can make a new section with a new file system to start using it").
CharlesV wrote: Sun Feb 18, 2024 1:06 pm I think your backwards. If you want to keep your existing system, then resize it and create the *area* to install the new system too.
What CharlesV is telling you is that you will need to administratively shrink the size of the 120 GB ext4 partition, create a third partition on that disk, format and install MX to it, then fix your bootloader to let you boot both OSes.

Re: Is it safe to resize system on this situation?

Posted: Sun Feb 18, 2024 1:36 pm
by j2mcgreg
@keos wrote:
I think you are right, I do not explain well, the problem is that according to the information that gives the command that the space is 119GB (which I do not think is true, and it is what confuses me) I thought that maybe I could install another system and reduce the one already installed. But something is very wrong.
It's OK to be confused because Lenovo says on it's site that the SSD in your Yoga has a capacity of 125 GB while your OS reports 119GiB. Both are correct and this Wikipedia article explains why this is so:
https://en.wikipedia.org/wiki/Gigabyte

Re: Is it safe to resize system on this situation?

Posted: Sun Feb 18, 2024 1:50 pm
by keos
I think this is really confusing the hell out of me.

In that case, then the most practical thing to do would be to delete/remove everything with gparted; partition the disk and reinstall Mint and install MXLinux as well -- no need to resize anything as I thought before.

*It looks like the title won't be right but I won't be able to see what could be the right ...

Thanks to all of you.

Re: Is it safe to resize system on this situation?

Posted: Sun Feb 18, 2024 3:51 pm
by MXRobo
I think that the memory (and maybe to a lesser extent, swap) in posts+ #4 with "free -h" is basically irrelevant as the memory is not ssd space - "lsblk -f" may suit you better.

And often you don't really have to be too concerned with GiB vs GB, but pay attention to the percentage used – try to stay under 80%.

Somewhat as others have said: If it were me, and since you're considering deleting Mint and reinstalling everything, and this is unorthodox advice, but if the data in "/dev/sda2" isn't too important, just use Gparted to shrink it – to maybe 30 or 25 GiB (or GB), then use the remaining approximately 80 GiB to install MX.

Pay attention to space particularly before, and after the partition you're focused on.

Always backup, unless you don't care too much! Gparted is rock solid.

Rots of Ruck!

Re: Is it safe to resize system on this situation?

Posted: Sun Feb 18, 2024 4:36 pm
by CharlesV
@keos and if your thinking of just deleting and replacing... might be a good exercise for you to shrink the partition and see how it all works etc, before you delete and start over.

Re: Is it safe to resize system on this situation?

Posted: Mon Feb 19, 2024 6:23 am
by keos
@CharlesV

It is a good idea, i will do it, but now i'm having problem with systemback in Mint, not able no copy the system -- i'll be back after i ...

Re: Is it safe to resize system on this situation?

Posted: Fri Feb 23, 2024 11:01 am
by keos
Well, yes, I was able to resize the partition, I did several reboots and shutdowns and it was fine, but then when installing MX I didn't realize that I chosed the wrong partition to install MX and I did it on Mint ...

Now I'm trying to figure out how to copy Mint (from the other machine) with 'dd' to reinstall it here, on this machine, by using Gparted but I've tried several ways to do it but so far nothing works.

This USB has 60GB and everytime it gives the same output, "no space" ...

Code: Select all

root@kaos:~# dd if=/dev/nvme0n1p6 of=/dev/sda1 bs=4M status=progress
62901977088 bytes (63 GB, 59 GiB) copied, 5215 s, 12.1 MB/s
dd: error al escribir en '/dev/sda1': No queda espacio en el dispositivo
15000+0 records in
14999+0 records out
62913511424 bytes (63 GB, 59 GiB) copied, 5337.61 s, 11.8 MB/s
root@kaos:~#

Re: Is it safe to resize system on this situation?

Posted: Fri Feb 23, 2024 11:23 am
by DukeComposed
keos wrote: Fri Feb 23, 2024 11:01 am Now I'm trying to figure out how to copy Mint (from the other machine) with 'dd' to reinstall it here, on this machine, by using Gparted but I've tried several ways to do it but so far nothing works.

This USB has 60GB and everytime it gives the same output, "no space" ...

Code: Select all

root@kaos:~# dd if=/dev/nvme0n1p6 of=/dev/sda1 bs=4M status=progress
62901977088 bytes (63 GB, 59 GiB) copied, 5215 s, 12.1 MB/s
dd: error al escribir en '/dev/sda1': No queda espacio en el dispositivo
15000+0 records in
14999+0 records out
62913511424 bytes (63 GB, 59 GiB) copied, 5337.61 s, 11.8 MB/s
root@kaos:~#
If I have a 60 GB hard disk and I run "dd if=/dev/zero of=/dev/sda1 bs=4M", dd will write zeroes to /dev/sda1 in blocks of 4 million. There's just one problem. I didn't tell dd when to stop. So dd will keep writing data to the target device until it hits an error. The "out of space" error in this case means "I ran out of writable bytes on the destination before I ran out of readable bytes at the source."

More importantly though, I'm curious to know why you'd choose to use dd to copy blocks on a storage device when you could much more safely copy files between mountpoints. There's no chance your Linux Mint partition uses a file system you can't read normally.

Re: Is it safe to resize system on this situation?

Posted: Fri Feb 23, 2024 11:49 am
by keos
Sorry but don't understand, I'm not an expert, why you type 'zero', the partition where the system is, acording to Gparted: '/nvme0n1p6' what m i doing wrong?

[coderoot@kaos:~# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 1 58.6G 0 disk
└─sda1 8:1 1 58.6G 0 part
nvme0n1 259:0 0 238.5G 0 disk
├─nvme0n1p1 259:1 0 1.4G 0 part /boot/efi
├─nvme0n1p2 259:2 0 1.4G 0 part [SWAP]
├─nvme0n1p3 259:3 0 39.6G 0 part
├─nvme0n1p4 259:4 0 45.5G 0 part
├─nvme0n1p5 259:5 0 48.5G 0 part /
└─nvme0n1p6 259:6 0 59.2G 0 part
root@kaos:~#][/code]

Code: Select all

kaos@kaos-Inspiron-3583:~$ LANG=C sudo fdisk -l
[sudo] password for kaos:    
Disk /dev/nvme0n1: 238.47 GiB, 256060514304 bytes, 500118192 sectors
Disk model: PC SN520 NVMe WDC 256GB                 
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: D3C3AE91-35A3-4FC3-8778-09C16F235FCF

Device             Start       End   Sectors  Size Type
/dev/nvme0n1p1      2048   3002367   3000320  1.4G EFI System
/dev/nvme0n1p2   3002368   5984255   2981888  1.4G Linux swap
/dev/nvme0n1p3   5984256  88997887  83013632 39.6G Linux root (x86)
/dev/nvme0n1p4  88997888 184377343  95379456 45.5G Linux filesystem
/dev/nvme0n1p5 184377344 286046207 101668864 48.5G Linux filesystem
/dev/nvme0n1p6 286046208 410208317 124162110 59.2G Linux filesystem


Disk /dev/sda: 58.59 GiB, 62914560000 bytes, 122880000 sectors
Disk model: ProductCode     
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: FED293A4-E9B5-4743-9669-4ED00CC71129

Device     Start       End   Sectors  Size Type
/dev/sda1   2048 122877951 122875904 58.6G Microsoft basic data
kaos@kaos-Inspiron-3583:~$

Re: Is it safe to resize system on this situation?

Posted: Fri Feb 23, 2024 12:20 pm
by DukeComposed
keos wrote: Fri Feb 23, 2024 11:49 am Sorry but don't understand, I'm not an expert, why you type 'zero', the partition where the system is, acording to Gparted: '/nvme0n1p6' what m i doing wrong?

Code: Select all

kaos@kaos-Inspiron-3583:~$ LANG=C sudo fdisk -l
Device             Start       End   Sectors  Size Type
/dev/nvme0n1p6 286046208 410208317 124162110 59.2G Linux filesystem

/dev/sda1   2048 122877951 122875904 58.6G Microsoft basic data
Let's make this as simple as we can. Let's subtract "End" from "Start". This is how big the partitions are, it's how the "Sectors" field is calculated:

Code: Select all

nvme0n1p6: 410208317 - 286046208 = 124162109
sda1:      122877951 -      2048 = 122875903
You know for a fact that one of these numbers is bigger than the other... right? That's why the "Size" fields are different by 0.6 GB.

Re: Is it safe to resize system on this situation?  [Solved]

Posted: Fri Feb 23, 2024 12:38 pm
by keos
Sorry but i'm still without understand your point.

I took another USB, this time of 152GB:

Code: Select all

keos@kaos:~$ sudo -i
[sudo] contraseña para keos: 
root@kaos:~# dd if=/dev/nvme0n1p6 of=/dev/sda1 bs=4M status=progress
63560482816 bytes (64 GB, 59 GiB) copied, 2567 s, 24.8 MB/s
15156+1 records in
15156+1 records out
63571000320 bytes (64 GB, 59 GiB) copied, 2601.3 s, 24.4 MB/s
root@kaos:~#
*Gparted > copy/paste, from the USB (after reduce ...) to the partition ... the system is already reinstalled with all its configurations ...!

Any way, thanks to all of you ... :happy:

Re: Is it safe to resize system on this situation?

Posted: Fri Feb 23, 2024 2:55 pm
by MXRobo
I started to type the following: "I don't know, I never tried to squeeze something that size into something just a smidgen larger, but the 59.2Gb may no t fit into the 60GB USB – maybe?"
but then I saw that Duke had replied before I posted.

Start End
59.2 GB – 58.6 GB = 0.6 GB, thanks for pointing this out Duke – learned something.
So the 60 GB USB wasn't large enough.