LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   Trying to recover a badly trashed devuan system (https://www.linuxquestions.org/questions/debian-26/trying-to-recover-a-badly-trashed-devuan-system-4175734532/)

davcefai 03-04-2024 05:35 AM

Trying to recover a badly trashed devuan system
 
A short while back, while upgrading my Devuan Ceres PC I heard a "click" and the system died.


PSU is Ok and I replaced the motherboard. This was a Gigabyte B450M and I decided to go for the B550M - a more recent one with a newer chipset.


I had some difficulties in getting it to boot. It turns out that the ATX plug was very stiff and it seems that one or more pins were not making contact I sorted this out by lightly rubbing the plug with a candle. It then slid in easily and the system came to life. (I report this in case it helps anybody else - I doubt that it was related to my problem)

I have 3 variants of kernel 6.6 and one of 6.5 installed. All three 6.6 panic:

Code:

VFS: unable to mount root fs on unknown block (0,0)
the 6.5 will boot - with some complaints - . I get a "pstore is not supported" message and complaints about firmware.

I have no idea what pstore is nor where it came from.


I only have one initrd image:
Code:

initrd.img-6.5.0-5-amd64
but have the vmlinuz and config files for the other kernels.

The firmware errors may not be surprising, after all it is upgraded and not yet installed firmware.

When the system finally gets through to multiuser mode i am presented with a login screen I have never seen before (slim?) but the keyboard and mouse do not work.

If in single user (recovery) mode I log in as me and then run startx the same thing happens.

When the login screen is displayed I can connect to the PC using putty from another machine

The only way forward I can see is to run a dist-upgrade. How dangerous can this be? Can I completely lose the system?


Would update initramfs work?



Suggestions or miracle fixes will be very welcome.

boughtonp 03-04-2024 08:03 AM

Quote:

Originally Posted by davcefai (Post 6487498)
Can I completely lose the system?

How? If anything goes wrong you just restore from your verified external backup, so the only thing you'd lose is a bit of time.


davcefai 03-04-2024 10:33 AM

You are quite right. However my problem is that for over 40 years I have been backing up Data not System files.


I am on the way to "fixing" that. A bigger external drive and backing up everything. Probably "dd" each disc. In the meantime i am faced with a worst case of having to reinstall everything - system and program files- and spending a lot of time reconfiguring everything.


It look like, unless I get some good suggestions, I will have to go the dist-upgrade route.


Thanks for the reply. Others also welcome.

boughtonp 03-04-2024 10:49 AM


 
What's stopping you booting into a LiveCD (one with a kernel that's at least six months newer than the hardware), and cloning the relevant disk(s) before you start experimenting?


_blackhole_ 03-05-2024 03:19 AM

Changing the motherboard is not going to install / channge the display manager, nor delete initrd files - more has happened...

davcefai 03-05-2024 04:46 AM

I agree completely. What happened was that the m/b failed during an upgrade, leaving the system in ruins.


No apt incantation works. Too many packages are broken and apt will not do anything to try to fix things.


I have decided that rather than try to fix things and end up with a patched up system I shall recreate the system on another PC and transfer all the data files.


Probably a couple of weeks work :-)

syg00 03-05-2024 05:25 AM

Huh - how can that be a couple of weeks work ?.

How do you have kernels without a corresponding initrd (if initrd is actually required in this case). As a non-Debian (Devuan, whatever) user, most of this thread makes no sense. Go re-read post #4. If you have new hardware, you need support for the new(er) chips - note the VFS message, which is likely disk controller.

FWIW I (almost) never bother backing up the full system files - and dd is the worst option, even if you choose to. Re-install is so much easier. Your data is all that matters. But a couple of weeks ... sheesh

davcefai 03-05-2024 05:33 AM

Like I said, thje system failed during an upgrade. Part of the damage was losing the initrd files.


Couple of weeks: Installing only takes a couple of hours. However, restoring the system to its former state means tweaking the CAD progs, torrents, Music collection......


Yes it's all backed up but I want what I have been comfortable with for a long time.

boughtonp 03-05-2024 09:32 AM


 
Whilst a fresh rebuild might be the better approach, if you have a working hard drive, you can examine the logs in /var/log/apt and see exactly what stage things got to before it failed.

Even if Apt can't be forced to do things, dpkg will probably allow manually install/uninstall/reconfigure the relevant packages.

You'll also still have your various application configurations in /etc and in your home dir - maybe there's a mismatch of old/new, but a simple find with a date filter should be able to differentiate, and allow you to have almost all of your configuration copied across, if you do a rebuild, or to generate a list of configs to be examined if you go for repairing.

(Once you've got into a working state, you might consider versioning the /etc directory with EtcKeeper as worth doing.)


_blackhole_ 03-05-2024 09:39 AM

I don't think the initrd files were deleted, they were probably never generated in the first place if the upgrade was interrupted.

Just boot to the last known working kernel (6.5). Back up your important data and rerun the upgrade. That should finish the upgrade off, run post-installation scripts and generate the initrd files.

Devuan also has it's own official support channels and you may be better served there.

https://www.devuan.org/os/community

boughtonp 03-05-2024 09:43 AM

Quote:

Originally Posted by syg00 (Post 6487746)
FWIW I (almost) never bother backing up the full system files

Backups should contain whatever you don't want to lose - that generally means /home and /etc as a minimum, but might also include /usr/local, /opt, /srv, some parts of /var, and maybe other locations depending on precisely how one administers one's system.

Of course, there's a difference between a Stable system (where system files don't change that often), and a developer-focused Unstable edition (Devuan Ceres is Debian Sid) where things change frequently, are expected to break, and should only be used by people willing and able to deal with that.


business_kid 03-05-2024 10:13 AM

With reference to Post #1:

You sound like s sensible guy. 11 posts and you're not sorted - it looks bad.

I'm an ex-hardware guy. There's fairly potent inductors in the power supply. A sudden drop in current on any voltage line can give a significant voltage spike,k enough to blow stuff. I've recently replaced my motherboard because the PSU went. I'd be expecting hardware failure. Anything powered up at the time is suspect.

I'd expect that disk throwing major errors to be gone. Anything giving an 'Input/output error' is gone. Replacing the system is quick; Re-configuring (if you didn't back up /etc) is slower. A live usb is a very handy way of fixing things. As you're an Arch user, you're not afraid of hard work, get the best:
https://download.liveslak.org/

That's the Slackware live usb kit by Slackware's Alien Bob.

_blackhole_ 03-05-2024 10:43 AM

Quote:

Originally Posted by boughtonp (Post 6487796)
...a developer-focused Unstable edition (Devuan Ceres is Debian Sid) where things change frequently, are expected to break, and should only be used by people willing and able to deal with that.

I hadn't spotted that.

It seems contradictory to put together a system you don't want to lose / reinstall and with no backup strategy, using the equivalent to Debian unstable as the OS...

I think this proves that - yes thing go wrong and when they do, they often go badly wrong. I can better see your hesitation to upgrade now... but that in itself is an indication that you were following the wrong distribution channel in the first place.

I think your best exit strategy is to stop now, backup your data and install the stable release.

The current stable release seems to follow Debian 12 bookworm:

https://www.devuan.org/os/announce/d...nce-2023-08-14

These are recent releases, so I don't really see the justification in running unstable.


All times are GMT -5. The time now is 09:03 PM.