You are not logged in.

#1 2012-08-16 16:50:39

metafractal
Member
Registered: 2012-08-16
Posts: 9

[SOLVED] Severely broken system -- reinstall from scratch?

Hello,

I'm a recent arch convert (and a very happy one!), but I recently broke my system doing two foolish things:

1. I tried to do a system update over ssh, but the computer I was sshing from went into hibernate mode, interrupting the update half way.
2. To add insult to injury, I tried to update glibc with --force, not reading the news article here. I've learnt my lesson.

Upon reboot, I was prompted to run fsck on the internal hard drive which found a number of errors. After running fsck the kernel still threw a panic message. Manually replacing /lib with a symlink to /usr/lib did not help; I still get /sbin/init not found when I try to boot.

Luckily, most of my personal files are backed up so it's really only the hassle of reinstalling everything that I have to worry about. I'm able to mount the internal hard drive and see the non-corrupted files.

Here is my plan of attack:
1. Backup old /home and /etc directories
2. Generate a list of all installed packages
3. Reformat disk and do clean install.
4. Reinstall old packages.
5. Copy back old config files where necessary.

Will this work? Is there an easier way? And how can I get the list in (2) into a format that I can feed straight back into pacman (regex wizards?)

If anyone can tell me a way to do the same with my AUR packages, that's icing on the cake.

Thank you for your patience with my newbie ineptitude. I am, by the way, blown away by Arch wiki and community. My Ubuntu days had almost made me think that linux and useful documentation, never the twain shall meet.

Meta.

Last edited by metafractal (2012-08-22 16:20:25)

Offline

#2 2012-08-16 17:15:09

fiddlinmacx
Member
Registered: 2011-03-02
Posts: 89

Re: [SOLVED] Severely broken system -- reinstall from scratch?

1. You can do a system update over ssh, just use 'screen' to handle the session for you. Then if your local machine crashes you can just reattach to the console session from another machine or wherever
2. You can boot up the arch install cd, chroot into your old system and continue where you left off. Basically follow the the installation instructions but skip everything that's about first time installation. I've recovered from stupid mistakes several times this way. Use the arch-chroot script once you have your drives mounted.

Offline

#3 2012-08-17 03:10:41

metafractal
Member
Registered: 2012-08-16
Posts: 9

Re: [SOLVED] Severely broken system -- reinstall from scratch?

Thanks fiddlinmancx, that's helpful advice.

Offline

#4 2012-08-17 04:29:52

metafractal
Member
Registered: 2012-08-16
Posts: 9

Re: [SOLVED] Severely broken system -- reinstall from scratch?

I could not even chroot into the new system to begin with. It reported "/bin/bash" not found, even though it was still there on the disk. I copied /bin from the live disk, this was enough to chroot into the new system and perform upgrades. I re-built mkinitcpio and can now boot into the old system again. I also got my list of installed packages with pacman -Q > packages.list. However, things are still acting up weirdly: X fails to load, for instance, reporting no screens found. I think it's time for a format and a fresh install, unless anyone has any ideas.

Offline

#5 2012-08-17 05:47:34

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,356

Re: [SOLVED] Severely broken system -- reinstall from scratch?

Did you use pacstrap to install? That doesn't require chrooting at all, and it installs the fundamentals of the system.

Copying /bin, /home and etc can easily cause problems since chroot expects quite a few basics to already be there. Better to copy the data in after you've fixed the system up. The cache is the only thing that can be easily copied over with no problems.


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#6 2012-08-19 06:32:12

metafractal
Member
Registered: 2012-08-16
Posts: 9

Re: [SOLVED] Severely broken system -- reinstall from scratch?

Success! Here's what I did:

Booted from live CD
Mounted hard disk
Copied over /bin
Chrooted to system
Changed /lib to a symlink to /usr/lib
Used pacstrap to reinstall base sysem
Performed system upgrade
Reinstalled video drivers (no idea how these went missing)

And voila! A fully upgraded system working like nothing ever happened.

This has hugely increased my faith and confidence in Arch Linux. In every other Linux distro I've tried, it's been easier to re-install the whole system rather than fix something broken. It's wonderful to understand your system well enough to fix things when they go wrong.

Offline

#7 2012-08-19 09:47:56

San2ban
Banned
From: Bangalore, India
Registered: 2010-02-09
Posts: 258

Re: [SOLVED] Severely broken system -- reinstall from scratch?

Pl. mark this thread as [Solved}


Satyam eva jayate

Registered linux user #535257

Offline

Board footer

Powered by FluxBB