Running mkinitcpio -p wiped half my drive

Hi there, I ran into an issue where I had kdfontop funtion error on boot and tried to fix it with this dev suggestion (SOLVED) KDFONTOP function not implemented

I put mkinitcpio -p into the terminal and after a reboot my system is all goofed up. All my installed apps/games disappeared and icons are just white now. My ssd lost over 200gb out of 500gb. Tried to use snapshots but they boot to the same thing. Any idea what I can do here? Even my terminal history is wiped and I can see the default garuda flavour text on printf. I use the default snapshot tool that comes with garuda. I can't see what else I put in the terminal that might have caused this issue since it got cleared.

Is there a way I can roll everything back before I attempted this? I have access to a live USB if needed.

I am quite new when it comes to this stuff.

Thanks

--

System:
Kernel: 6.3.4-zen1-1-zen arch: x86_64 bits: 64 compiler: gcc v: 13.1.1
parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen
root=UUID=bec9422a-d102-4b77-900d-522e97b1d1f8 rw rootflags=subvol=@
quiet quiet splash rd.udev.log_priority=3 vt.global_cursor_default=0
loglevel=3 ibt=off
Desktop: KDE Plasma v: 5.27.5 tk: Qt v: 5.15.9 wm: kwin_x11 vt: 1 dm: SDDM
Distro: Garuda Linux base: Arch Linux
Machine:
Type: Desktop System: ASUS product: All Series v: N/A
serial: <superuser required>
Mobo: ASUSTeK model: Z97-P v: Rev X.0x serial: <superuser required>
UEFI: American Megatrends v: 2907 date: 03/11/2016
CPU:
Info: model: Intel Core i5-4690K bits: 64 type: MCP arch: Haswell
gen: core 4 level: v3 note: check built: 2013-15 process: Intel 22nm
family: 6 model-id: 0x3C (60) stepping: 3 microcode: 0x28
Topology: cpus: 1x cores: 4 smt: <unsupported> cache: L1: 256 KiB
desc: d-4x32 KiB; i-4x32 KiB L2: 1024 KiB desc: 4x256 KiB L3: 6 MiB
desc: 1x6 MiB
Speed (MHz): avg: 3799 high: 3900 min/max: 800/3900 scaling:
driver: intel_cpufreq governor: performance cores: 1: 3900 2: 3498 3: 3900
4: 3900 bogomips: 27983
Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3
Vulnerabilities: <filter>
Graphics:
Device-1: NVIDIA GM206 [GeForce GTX 950] vendor: Micro-Star MSI
driver: nvidia v: 530.41.03 alternate: nouveau,nvidia_drm non-free: 530.xx+
status: current (as of 2023-05) arch: Maxwell code: GMxxx
process: TSMC 28nm built: 2014-19 pcie: gen: 3 speed: 8 GT/s lanes: 16
bus-ID: 01:00.0 chip-ID: 10de:1402 class-ID: 0300
Display: x11 server: X.Org v: 21.1.8 with: Xwayland v: 23.1.1
compositor: kwin_x11 driver: X: loaded: nvidia unloaded: modesetting
alternate: fbdev,nouveau,nv,vesa gpu: nvidia display-ID: :0 screens: 1
Screen-1: 0 s-res: 1920x1080 s-dpi: 30 s-size: 1626x914mm (64.02x35.98")
s-diag: 1865mm (73.44")
Monitor-1: HDMI-0 res: 1920x1080 hz: 60 dpi: 30
size: 1600x900mm (62.99x35.43") diag: 1836mm (72.27") modes: N/A
API: OpenGL v: 4.6.0 NVIDIA 530.41.03 renderer: NVIDIA GeForce GTX
950/PCIe/SSE2 direct-render: Yes
Audio:
Device-1: Intel 9 Series Family HD Audio vendor: ASUSTeK 9
driver: snd_hda_intel v: kernel bus-ID: 00:1b.0 chip-ID: 8086:8ca0
class-ID: 0403
Device-2: NVIDIA GM206 High Definition Audio vendor: Micro-Star MSI
driver: snd_hda_intel v: kernel pcie: gen: 3 speed: 8 GT/s lanes: 16
bus-ID: 01:00.1 chip-ID: 10de:0fba class-ID: 0403
Device-3: PreSonus Audio AudioBox USB 96 driver: snd-usb-audio type: USB
rev: 2.0 speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 3-4:3 chip-ID: 194f:0303
class-ID: fe01 serial: <filter>
API: ALSA v: k6.3.4-zen1-1-zen status: kernel-api with: aoss
type: oss-emulator tools: N/A
Server-1: PipeWire v: 0.3.71 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: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
vendor: ASUSTeK AM1I-A driver: r8169 v: kernel pcie: gen: 1 speed: 2.5 GT/s
lanes: 1 port: d000 bus-ID: 03:00.0 chip-ID: 10ec:8168 class-ID: 0200
IF: enp3s0 state: up speed: 1000 Mbps duplex: full mac: <filter>
IF-ID-1: virbr0 state: down mac: <filter>
IF-ID-2: ztyouusv64 state: unknown speed: 10000 Mbps duplex: full
mac: <filter>
Drives:
Local Storage: total: 2.27 TiB used: 181.47 GiB (7.8%)
SMART Message: Unable to run smartctl. Root privileges required.
ID-1: /dev/sda maj-min: 8:0 vendor: Western Digital
model: WD2003FZEX-00Z4SA0 size: 1.82 TiB block-size: physical: 512 B
logical: 512 B speed: 6.0 Gb/s tech: N/A serial: <filter> fw-rev: 1E.8
scheme: GPT
ID-2: /dev/sdb maj-min: 8:16 vendor: Samsung model: SSD 860 EVO 500GB
size: 465.76 GiB block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s
tech: SSD serial: <filter> fw-rev: 3B6Q scheme: GPT
Partition:
ID-1: / raw-size: 465.46 GiB size: 465.46 GiB (100.00%)
used: 181.47 GiB (39.0%) fs: btrfs dev: /dev/sdb2 maj-min: 8:18
ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%)
used: 592 KiB (0.2%) fs: vfat dev: /dev/sdb1 maj-min: 8:17
ID-3: /home raw-size: 465.46 GiB size: 465.46 GiB (100.00%)
used: 181.47 GiB (39.0%) fs: btrfs dev: /dev/sdb2 maj-min: 8:18
ID-4: /var/log raw-size: 465.46 GiB size: 465.46 GiB (100.00%)
used: 181.47 GiB (39.0%) fs: btrfs dev: /dev/sdb2 maj-min: 8:18
ID-5: /var/tmp raw-size: 465.46 GiB size: 465.46 GiB (100.00%)
used: 181.47 GiB (39.0%) fs: btrfs dev: /dev/sdb2 maj-min: 8:18
Swap:
Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default)
ID-1: swap-1 type: zram size: 15.56 GiB used: 0 KiB (0.0%) priority: 100
dev: /dev/zram0
Sensors:
System Temperatures: cpu: 32.0 C mobo: N/A gpu: nvidia temp: 24 C
Fan Speeds (RPM): N/A gpu: nvidia fan: 42%
Info:
Processes: 231 Uptime: 1m wakeups: 0 Memory: available: 15.56 GiB
used: 2.2 GiB (14.1%) Init: systemd v: 253 default: graphical
tool: systemctl Compilers: gcc: 13.1.1 clang: N/A Packages: pm: pacman
pkgs: 2141 libs: 573 tools: octopi,pamac,paru pm: flatpak pkgs: 0
Shell: fish v: 3.6.1 default: Bash v: 5.1.16 running-in: konsole
inxi: 3.3.27
Garuda (2.6.16-1):
System install date:     2022-12-01
Last full system update: 2023-05-26
Is partially upgraded:   No
Relevant software:       snapper NetworkManager mkinitcpio nvidia-dkms
Windows dual boot:       No/Undetected
Failed units:            wg-quick@wg0.service

McFly: Upgrading McFly DB to version 3, please wait...thread 'main' panicked at 'McFly error: Unable to add cmd_tpl to commands (duplicate column name: cmd_tpl)', src/history/schema.rs:49:17
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

Are you sure about that? Your drive as a whole is only 500 gigs in size, and it woudl confuse me if you had used your drive at it’s very upper storage limit all this time.

could you try sudo btrfs check --force /dev/sdb2 ? Are there any corruption errors?

Also, out of curiosity regarding the broken terminal config: Did you make any modifications to your fish config? If yes, what about diff /etc/skel/.config/fish/config.fish ~/.config/fish/config.fish ?

1 Like

the command uses a capital ‘P’

sudo mkinitcpio -P

i just followed Filo’s instructions to the letter with the singular variance in that i made the ‘setfont’ modification needed to both mkinitcpio.conf and mkinitcpio.conf.pacnew and then rebuilt the initramfs with the above command and rebooted without issue.

my thanks to Filo for the fix.
i’ve been seeing that for a few months but i knew it wasn’t a significant problem so i just ignored til now lol

3 Likes

I had about 30-40gb free.. Now I have 280gb free.

I ran both of your commands and got this back

Opening filesystem to check...
WARNING: filesystem mounted, continuing because of --force
Checking filesystem on /dev/sdb2
UUID: bec9422a-d102-4b77-900d-522e97b1d1f8
[1/7] checking root items
[2/7] checking extents
[3/7] checking free space tree
[4/7] checking fs roots
[5/7] checking only csums items (without verifying data)
[6/7] checking root refs
[7/7] checking quota groups skipped (not enabled on this FS)
found 192859947008 bytes used, no error found
total csum bytes: 174407372
total tree bytes: 1650343936
total fs tree bytes: 1306722304
total extent tree bytes: 105545728
btree space waste bytes: 309525102
file data blocks allocated: 302240608256
referenced 230333976576
McFly: Upgrading McFly DB to version 3, please wait...thread 'main' panicked at 'McFly error: Unable to add cmd_tpl to commands (duplicate column name: cmd_tpl)', src/history/schema.rs:49:17
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

<    fastfetch --load-config neofetch
---
>    fastfetch --load-config dr460nized

I wish I could check the terminal for all the commands I inputted. This is the only one I can think of that caused issues. Is there a kernel rollback?

Running mkinitcpio -p or mkinitcpio -P just generates a new initramfs image. It doesn’t interact with your user data in any way.

Are you logged in as the right user? What you are describing almost sound like a new user is logged in.

Your issue sounds similar to what folks ran into with this long-standing KDE bug: 427861 – Sometimes desktop loses its settings (wallpaper, widgets, icons settings) after re-login. It was closed as resolved back in December, but the most recent comments suggest it is still happening to some folks and there may be quite a few things that can cause it (“there are approximately 5,781,740 things that can cause this issue”, according to the most recent comment by Nate Graham).

There are quite a few troubleshooting ideas and workarounds described in the thread, so maybe it will be useful to read through it and try out some of the suggestions.

It sounds like you already tried restoring a snapshot, but that would definitely be the easy way to walk back whatever change you made. You just need to identify a snapshot from back when the system was working normally and restore it.

8 Likes

Thanks for the brilliant response. I appreciate it! I had a read of the linked thread and looked around my plasma configs and nothing seems out of order.

Yes, I only have one user on my system

I reset everything to default now to narrow down issues

About the snapshot. What's the proper procedure to roll everything back? I tried to follow the article but nothing changes (visuals like wallpaper etc remain the same and my storage is still the same) even though I know for a fact those snapshots were at a day where everything worked fine. Not sure if I am doing this correctly.

Also I just realised that my whole steam library got uninstalled so that's probably the majority of the data loss

nothing changes (visuals like wallpaper etc remain the same and my storage is still the same)

Snapshots only cover the operating system volumes, files in home are not managed (by default).
In the general case, it would be undesirable to find own data files reverted after restoring a snapshot.
Things like wallpaper and other settings reside in home, if that is unaccessible or (hopefully not) wiped, restoring the snapshot will not fix it.

I find it unlikely though that mkinitcpio was the culprit here, can you recall any other recent event or activity that may have caused the problem?

Can you access your home from the live media?

3 Likes

That makes sense. I can always rebuild. Hopefully rolling back to the oldest snapshot helped things.

Sadly I can't really. All I was trying to fix was the kdfontop issue. Is there anything that could cause your entire steam library to be uninstalled?

And yes I can on live.

And yes I can on live

and you can see your files there, likely also the game files? I’m not sure but I think they go in home too, somewhere… internet says it’s ~/.local/share/Steam.

And can you still see the home with the same files when booted normally?

3 Likes

Can't seem to access the steam folders on live as they don't seem to exist. I also checked my lutris games and such and those got deleted too. Even some custom commands I ran for wireguard got reverted. No idea

Do you remember using find together with rm? Or maybe a wildcard when using rm?

2 Likes

You're running a 10-year old system. Is it possible an older disk may be failing?

1 Like

I try to stay away from those commands so I don't recall any that I ran.

And possibly. Last I checked my boot drive it was healthy.

I'd like to understand what happened but I think it's too random as what it could be

This topic was automatically closed after 2 days. New replies are no longer allowed.