Trying to resize two disk partitions  [Solved]

Message
Author
User avatar
Falcon
Posts: 460
Joined: Mon Apr 22, 2019 9:34 pm

Re: Trying to resize two disk partitions

#21 Post by Falcon »

I tried to reinstall GRUB again from the MX Boot Repair tool. You were right about the disk naming. It looks like sda is the Live-USB and the computer's disk is sdb. So I tried installing to sdb, but the installation still failed as it had before.

I then used your instructions to try to install GRUB from Chroot Rescue Scan. It got the same error:

Code: Select all

(chroot> grub-install /dev/sda5
Installing for i386-pc platform.
grub-install: error: cannot copy `/usr/share/locale/sr.gmo' to `/boot/grub/locale/sr.mo': Is a directory.
i opened up the File Manager and started looking Into the /usr and /boot folders. I found the /usr/share/locale/sr.gmo' folder, but when I looked into /root/grub the only subfolder that was shown was Themes. So if the installer is looking for the /locale folder it doesn't exist. Maybe the error message should read "Is NOT a directory". I was going to go ahead and create that directory and try again, but thought that I had better check with you first to keep from causing some other problem.

User avatar
fehlix
Developer
Posts: 12604
Joined: Wed Apr 11, 2018 5:09 pm

Re: Trying to resize two disk partitions

#22 Post by fehlix »

Falcon wrote: Thu May 01, 2025 3:44 pm I tried to reinstall GRUB again from the MX Boot Repair tool. You were right about the disk naming. It looks like sda is the Live-USB and the computer's disk is sdb. So I tried installing to sdb, but the installation still failed as it had before.

I then used your instructions to try to install GRUB from Chroot Rescue Scan. It got the same error:

Code: Select all

(chroot> grub-install /dev/sda5

Installing for i386-pc platform.
grub-install: error: cannot copy `/usr/share/locale/sr.gmo' to `/boot/grub/locale/sr.mo': Is a directory.
i opened up the File Manager and started looking Into the /usr and /boot folders. I found the /usr/share/locale/sr.gmo' folder, but when I looked into /root/grub the only subfolder that was shown was Themes. So if the installer is looking for the /locale folder it doesn't exist. Maybe the error message should read "Is NOT a directory". I was going to go ahead and create that directory and try again, but thought that I had better check with you first to keep from causing some other problem.
MBR is on start of the disk /dev/sda, not on start of partition sda5
You have run

Code: Select all

grub-install /dev/sda5
So you command needs to be

Code: Select all

grub-install /dev/sda
in cas /dev/sda is the internal drive you want to boot from.
But wait a minute, something wrong with your grub (package) maybe.
What ISO is the installation based on?
Also noted you didn't post a QSI "Quick Sysem Info" from the running Live System.
In addtion to QSI, show partition layout from running live system:

Code: Select all

lsblk -f
and

Code: Select all

sudo parted --list

User avatar
Falcon
Posts: 460
Joined: Mon Apr 22, 2019 9:34 pm

Re: Trying to resize two disk partitions

#23 Post by Falcon »

Sorry that I didn't post the QSI. I was going to but got sidetracked.

Here is the output of the lsblk -f command:

Code: Select all

wartweasel@Wartweasel:~
$ lsblk -f
NAME   FSTYPE   FSVER LABEL           UUID                                 FSAVAIL FSUSE% MOUNTPOINT
fd0                                                                                       
loop0  squashfs 4.0                                                              0   100% /live/linu
sda                                                                                       
├─sda1 ntfs           PQSERVICE       5C28C22E28C2074C                                    
├─sda2 ntfs           SYSTEM RESERVED 8A80C2E480C2D63B                                    
├─sda3 ntfs           Acer            02BA9B45BA9B345F                                    
├─sda4                                                                                    
└─sda5 ext4     1.0   rootMX21        fea2ab78-0290-47ca-aa5a-12a52e172055                
sdb                                                                                       
└─sdb1 ntfs                           DE6A06686A063DB1                                    
sdc                                                                                       
├─sdc1 ext4     1.0   Live-usb        10d646a8-f283-410a-9a6f-4c544a6de781   23.5G    18% /live/boot
└─sdc2 vfat     FAT32 LIVE-UEFI       5FBD-6F74                                           
sr0


And here is the output of the sudo parted --list command:

Code: Select all

[/wartweasel@Wartweasel:~
$ sudo parted --list
[sudo] password for wartweasel: 
Model: ATA CT250MX500SSD1 (scsi)
Disk /dev/sda: 250GB
Sector size (logical/physical): 512B/4096B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type      File system  Flags
 1      1049kB  31.1GB  31.1GB  primary   ntfs         lba
 2      31.1GB  31.2GB  105MB   primary   ntfs         boot
 3      31.2GB  150GB   119GB   primary   ntfs
 4      150GB   250GB   99.9GB  extended
 5      150GB   250GB   99.9GB  logical   ext4


Model: ATA CT250MX500SSD1 (scsi)
Disk /dev/sdb: 250GB
Sector size (logical/physical): 512B/4096B
Partition Table: msdos
Disk Flags: 

Number  Start   End    Size   Type     File system  Flags
 1      32.3kB  160GB  160GB  primary  ntfs         boot


Model: SanDisk Cruzer Glide 3.0 (scsi)
Disk /dev/sdc: 31.3GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type     File system  Flags
 1      1049kB  31.3GB  31.3GB  primary  ext4         boot
 2      31.3GB  31.3GB  51.4MB  primary  fat32        esp
Here is the QSI

Code: Select all

Snapshot created on: 20230820_1243
System:    Kernel: 6.2.14-1-liquorix-amd64 [6.2-23~mx21+1] x86_64 bits: 64 compiler: gcc v: 10.2.1 
           parameters: audit=0 intel_pstate=disable hpet=disable rcupdate.rcu_expedited=1 quiet 
           splash usbcore.autosuspend=-1 lang=en_US kbd=us tz=America/New_York 
           Desktop: Xfce 4.18.1 tk: Gtk 3.24.24 info: xfce4-panel wm: xfwm 4.18.0 vt: 7 
           dm: LightDM 1.26.0 Distro: MX-21.3_x64 Wildflower October 20  2021 
           base: Debian GNU/Linux 11 (bullseye) 
Machine:   Type: Desktop System: Acer product: Veriton M265 v: P01-A1 serial: <filter> Chassis: 
           type: 3 serial: <filter> 
           Mobo: Acer model: EG31M v: P01-A1 serial: <filter> BIOS: ACER v: P01-A1 
           date: 11/10/2009 
Battery:   Device-1: hidpp_battery_0 model: Logitech Wireless Mouse M185 serial: <filter> 
           charge: 55% (should be ignored) rechargeable: yes status: Discharging 
CPU:       Info: Quad Core model: Intel Core2 Quad Q9550 bits: 64 type: MCP arch: Penryn family: 6 
           model-id: 17 (23) stepping: 7 microcode: 705 cache: L2: 6 MiB 
           flags: lm nx pae sse sse2 sse3 sse4_1 ssse3 vmx bogomips: 22611 
           Speed: 2826 MHz min/max: N/A Core speeds (MHz): 1: 2826 2: 2753 3: 2823 4: 2826 
           Vulnerabilities: Type: itlb_multihit status: KVM: VMX disabled 
           Type: l1tf mitigation: PTE Inversion; VMX: conditional cache flushes, SMT disabled 
           Type: mds status: Vulnerable: Clear CPU buffers attempted, no microcode; SMT disabled 
           Type: meltdown mitigation: PTI 
           Type: mmio_stale_data status: Unknown: No mitigations 
           Type: retbleed status: Not affected 
           Type: spec_store_bypass status: Vulnerable 
           Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization 
           Type: spectre_v2 
           mitigation: Retpolines, STIBP: disabled, RSB filling, PBRSB-eIBRS: Not affected 
           Type: srbds status: Not affected 
           Type: tsx_async_abort status: Not affected 
Graphics:  Device-1: AMD Caicos XT [Radeon HD 7470/8470 / R5 235/310 OEM] vendor: Dell 
           driver: radeon v: kernel alternate: amdgpu bus-ID: 01:00.0 chip-ID: 1002:6778 
           class-ID: 0300 
           Display: x11 server: X.Org 1.20.14 compositor: xfwm4 v: 4.18.0 driver: 
           loaded: ati,radeon unloaded: fbdev,modesetting,vesa display-ID: :0.0 screens: 1 
           Screen-1: 0 s-res: 1440x900 s-dpi: 96 s-size: 380x237mm (15.0x9.3") 
           s-diag: 448mm (17.6") 
           Monitor-1: DVI-0 res: 1440x900 hz: 60 
           OpenGL: renderer: AMD CAICOS (DRM 2.50.0 / 6.2.14-1-liquorix-amd64 LLVM 14.0.5) 
           v: 3.3 Mesa 22.0.5 compat-v: 3.1 direct render: Yes 
Audio:     Device-1: Intel NM10/ICH7 Family High Definition Audio vendor: Elite Systems 
           driver: snd_hda_intel v: kernel bus-ID: 00:1b.0 chip-ID: 8086:27d8 class-ID: 0403 
           Sound Server-1: ALSA v: k6.2.14-1-liquorix-amd64 running: yes 
           Sound Server-2: PulseAudio v: 14.2 running: yes 
Network:   Device-1: Realtek RTL8111/8168/8211/8411 PCI Express Gigabit Ethernet 
           vendor: Elite Systems RTL8111/8168/8411 driver: r8169 v: kernel port: d800 
           bus-ID: 03:00.0 chip-ID: 10ec:8168 class-ID: 0200 
           IF: eth0 state: up speed: 1000 Mbps duplex: full mac: <filter> 
Drives:    Local Storage: total: 494.95 GiB used: 18.92 GiB (3.8%) 
           SMART Message: Unable to run smartctl. Root privileges required. 
           ID-1: /dev/sda maj-min: 8:0 vendor: Crucial model: CT250MX500SSD1 size: 232.89 GiB 
           block-size: physical: 4096 B logical: 512 B speed: <unknown> type: SSD serial: <filter> 
           rev: 023 scheme: MBR 
           ID-2: /dev/sdb maj-min: 8:16 vendor: Crucial model: CT250MX500SSD1 size: 232.89 GiB 
           block-size: physical: 4096 B logical: 512 B speed: <unknown> type: SSD serial: <filter> 
           rev: 023 scheme: MBR 
           ID-3: /dev/sdc maj-min: 8:32 type: USB vendor: SanDisk model: Cruzer Glide 3.0 
           size: 29.18 GiB block-size: physical: 512 B logical: 512 B type: N/A serial: <filter> 
           rev: 1.00 scheme: MBR 
           SMART Message: Unknown USB bridge. Flash drive/Unsupported enclosure? 
Swap:      Alert: No swap data was found. 
Sensors:   System Temperatures: cpu: 30.0 C mobo: N/A gpu: radeon temp: 52.0 C 
           Fan Speeds (RPM): N/A 
Repos:     Packages: note: see --pkg apt: 2254 lib: 1102 flatpak: 0 
           No active apt repos in: /etc/apt/sources.list 
           Active apt repos in: /etc/apt/sources.list.d/brave-browser-release.list 
           1: deb [arch=amd64] https://brave-browser-apt-release.s3.brave.com/ bullseye main
           Active apt repos in: /etc/apt/sources.list.d/debian-stable-updates.list 
           1: deb http://deb.debian.org/debian bullseye-updates main contrib non-free
           Active apt repos in: /etc/apt/sources.list.d/debian.list 
           1: deb http://deb.debian.org/debian bullseye main contrib non-free
           2: deb http://security.debian.org/debian-security bullseye-security main contrib non-free
           Active apt repos in: /etc/apt/sources.list.d/google-earth-pro.list 
           1: deb [arch=amd64] http://dl.google.com/linux/earth/deb/ stable main
           Active apt repos in: /etc/apt/sources.list.d/mx.list 
           1: deb http://mirrors.rit.edu/mxlinux/mx-packages/mx/repo/ bullseye main non-free
           2: deb http://mirrors.rit.edu/mxlinux/mx-packages/mx/repo/ bullseye ahs
           Active apt repos in: /etc/apt/sources.list.d/softmaker.list 
           1: deb http://shop.softmaker.com/repo/apt stable non-free
           Active apt repos in: /etc/apt/sources.list.d/vivaldi.list 
           1: deb [arch=amd64] http://repo.vivaldi.com/stable/deb/ stable main
Info:      Processes: 236 Uptime: 3h 24m wakeups: 7 Memory: 3.83 GiB used: 2.03 GiB (52.9%) 
           Init: SysVinit v: 2.96 runlevel: 5 default: 5 tool: systemctl Compilers: gcc: 10.2.1 
           alt: 10 Client: shell wrapper v: 5.1.4-release inxi: 3.3.06 
Boot Mode: BIOS (legacy, CSM, MBR)
I didn't try installing GRUB to sda, yet. I thought that I would have you look at this first. Did I give you all of the info that you wanted?

User avatar
fehlix
Developer
Posts: 12604
Joined: Wed Apr 11, 2018 5:09 pm

Re: Trying to resize two disk partitions

#24 Post by fehlix »

Falcon wrote: Thu May 01, 2025 4:41 pm I didn't try installing GRUB to sda, yet. I thought that I would have you look at this first. Did I give you all of the info that you wanted?
Yea, wait a bit, don't do any thing, we need to figure out the grub-install error first.
You may try to boot into the installed system using LiveUSB,
by slecting on the LiveUSB boot menu:
Switch To Grub -> Boot Rescue -> Search from "GRUB.cfg" , ( not search for "GRUB loader" - wont work),
it may show a GRUB menu and may boot into the installed system b/c it would use the GRUB modules from the LiveUSB.
But anyway, need to figure out this grub-install error, before any additional repair attempts.

User avatar
Falcon
Posts: 460
Joined: Mon Apr 22, 2019 9:34 pm

Re: Trying to resize two disk partitions

#25 Post by Falcon »

Okay, I used the Live-USB GRUB menu to navigate to a boot loader for MX-21, as opposed to Live-USB. I think it was correct because I got the usual login screen. So that much works at least.

I really appreciate the time that you are devoting to helping me solve this issue.

juwido
Posts: 21
Joined: Thu Apr 25, 2024 12:55 pm

Re: Trying to resize two disk partitions

#26 Post by juwido »

Well, why does QSI show x86_64 while the error massage is: "Installing for i386-pc platform"?

User avatar
fehlix
Developer
Posts: 12604
Joined: Wed Apr 11, 2018 5:09 pm

Re: Trying to resize two disk partitions

#27 Post by fehlix »

juwido wrote: Thu May 01, 2025 6:05 pm Well, why does QSI show x86_64 while the error massage is: "Installing for i386-pc platform"?
grub is not run by the kernel and needs "i386-pc platform" modules to run on BIOS/mbr boot, even on 64bit CPU platform used by the kernel.

User avatar
fehlix
Developer
Posts: 12604
Joined: Wed Apr 11, 2018 5:09 pm

Re: Trying to resize two disk partitions  [Solved]

#28 Post by fehlix »

Falcon wrote: Thu May 01, 2025 5:34 pm Okay, I used the Live-USB GRUB menu to navigate to a boot loader for MX-21, as opposed to Live-USB. I think it was correct because I got the usual login screen. So that much works at least.

I really appreciate the time that you are devoting to helping me solve this issue.
OK, great,
And now the big news, the show stopper you have seen above

Code: Select all

Installing for i386-pc platform.
grub-install: error: cannot copy `/usr/share/locale/sr.gmo' to `/boot/grub/locale/sr.mo': Is a directory.
is a real one. And caused by something completely differently.
Seems to be related to a faulty package "xfce4-weather-plugin", which created all those "/usr/share/locale/*.gmo"
directories as these gmo, stuff rather looks like pacakge build artifatcts and do not belong under /usr/share/locale/,
where you normally only find valid local files like "*.mo".
So in case some other faulty gmo-artifcates are hanging around.
Simplest "workaround" would be to instruct grub-install to not install any translation files.
This way:
When booted into the installed system with help of
->MX LiveUSB->LiveBootMenu->Switch to GRUB->Search fot "GRUB cfg":
* Do open within the installed system terminal as normal user.
* Do check the device names (check this always before running grub-install)
with help of lsblk -f, so you are sure /dev/sda is you install drive.
Now run this:

Code: Select all

sudo grub-install --locale-directory=/tmp /dev/sda
where we use a "trick" to tell grub-install to search for locales with a /tmp directory, where it would not find any.
Effectively tells "grub-install" to not install any locale translations, which you don't need as the default is in English anyway.
The command should complete without any error.
Now to be sure, also do re-generated fresh the grub menu with:

Code: Select all

sudo update-grub
Note ; The above command could also have been run from the "Chroot Rescue" visited system, in case
you would not have any grub menu already with the system, and "Chroot Rescue " would be the only way
to fix grub.

You may consider to purge/remove the faulty package xfce4-weather-plugin
which caused the show-stopper gmo-locale dirs, by running this:

Code: Select all

sudo apt purge xfce4-weather-plugin
afterwards, you would probably not need the no-locale trick "--locale-directory=/tmp" to get grub-install run successfully.
Good Luck.
+++EDIT+++
Just checked again, the show stopper which caused grub-install to fail seems only xfce4-weather-plugin on MX-21

Code: Select all

apt policy xfce4-weather-plugin
xfce4-weather-plugin:
  Installed: 0.11.3-0.1~mx21+1
  Candidate: 0.11.3-0.1~mx21+1
xfce4-weather-plugin (0.11.3-0.1~mx21+1) mx; urgency=medium
maybe our MX maintainer:

Code: Select all

xfce4-weather-plugin (0.11.3-0.1~mx21+1) mx; urgency=medium

  * New upstream version 0.11.3.

 -- Steven Pusser <stevep@mxlinux.org>  Wed, 05 Feb 2025 11:31:02 -0800
would consider to rebuild, in order to avoid those build artifacts directories:

Code: Select all

/usr/share/locale/ar.gmo
/usr/share/locale/ast.gmo
/usr/share/locale/be.gmo
/usr/share/locale/bg.gmo
/usr/share/locale/ca.gmo
/usr/share/locale/cs.gmo
/usr/share/locale/da.gmo
/usr/share/locale/de.gmo
/usr/share/locale/el.gmo
/usr/share/locale/en_AU.gmo
/usr/share/locale/en_GB.gmo
/usr/share/locale/es.gmo
/usr/share/locale/et.gmo
/usr/share/locale/eu.gmo
/usr/share/locale/fi.gmo
/usr/share/locale/fr.gmo
/usr/share/locale/gl.gmo
/usr/share/locale/he.gmo
/usr/share/locale/hr.gmo
/usr/share/locale/hu.gmo
/usr/share/locale/hye.gmo
/usr/share/locale/id.gmo
/usr/share/locale/is.gmo
/usr/share/locale/it.gmo
/usr/share/locale/ja.gmo
/usr/share/locale/ko.gmo
/usr/share/locale/lt.gmo
/usr/share/locale/lv.gmo
/usr/share/locale/ms.gmo
/usr/share/locale/nb.gmo
/usr/share/locale/nl.gmo
/usr/share/locale/nn.gmo
/usr/share/locale/oc.gmo
/usr/share/locale/pa.gmo
/usr/share/locale/pl.gmo
/usr/share/locale/pt.gmo
/usr/share/locale/pt_BR.gmo
/usr/share/locale/ru.gmo
/usr/share/locale/sk.gmo
/usr/share/locale/sl.gmo
/usr/share/locale/sq.gmo
/usr/share/locale/sr.gmo
/usr/share/locale/sv.gmo
/usr/share/locale/te.gmo
/usr/share/locale/th.gmo
/usr/share/locale/tr.gmo
/usr/share/locale/ug.gmo
/usr/share/locale/uk.gmo
/usr/share/locale/ur.gmo
/usr/share/locale/ur_PK.gmo
/usr/share/locale/zh_CN.gmo
/usr/share/locale/zh_TW.gmo
@Stevo

User avatar
Falcon
Posts: 460
Joined: Mon Apr 22, 2019 9:34 pm

Re: Trying to resize two disk partitions

#29 Post by Falcon »

Fehlix, you are a genius! I executed the three commands above and grub installed successfully and now works. I verified that I can log into both MX and Windows without any problem. If I do a new Snapshot of the current system, will that insure that I won't have this problem again, should I need to do another reinstall in the future for some reason?

Once again, I really appreciate all of your help and assistance.

User avatar
fehlix
Developer
Posts: 12604
Joined: Wed Apr 11, 2018 5:09 pm

Re: Trying to resize two disk partitions

#30 Post by fehlix »

Falcon wrote: Thu May 01, 2025 7:55 pm Fehlix, you are a genius! I executed the three commands above and grub installed successfully and now works. I verified that I can log into both MX and Windows without any problem. If I do a new Snapshot of the current system, will that insure that I won't have this problem again, should I need to do another reinstall in the future for some reason?

Once again, I really appreciate all of your help and assistance.
Great. Yes, in case you don't need / use the weather-plugin, keep it uninstalled, otherwise I guess a new fixed version will be probably soon available.
Either-way, without the faulty locale/*.gmo directories the installer would probably not fail.
So perhaps do update all packages and any changes else needed and create a new personal snapshot, in order you have always an good one to reinstall if needed.
Re Windows partitions, ok, in case any adjustment are needed to deal with those partitions, do this only from within Windows itself.
Maybe turn off windows hyper/sleep faststartup. Or what I always do for folks using Windows to place a "Full Shutdown" icon on the Windows desktop.
In case your are interested how this looks like, I may look in to my Windows install to share it here.
Now, with help of the snapshotted-ISO/LiveUSB in the drawer, you have always a good failsafe and restore tool available including some rescue means, either with help
of "Chroot Rescue" tool or the LiveGRUB Rescue menus.
Take care.

Post Reply

Return to “Software / Configuration”