You are not logged in.

#1 2012-10-05 20:01:11

vladev
Member
Registered: 2012-01-04
Posts: 7

[SOLVED] Broken /var HDD. How to recover?

The disk that holds my /var partition (and /home) went fishing and I had it replaced. The problem is that I cannot bring my arch installation back to life.

What I have:
  • A copy if my /var partition on a ntfs external hdd (made with cp -r).

  • Pretty much nothing from my home (everything I need is somewhere else, so no big deal, just getting the system to work is enough).

  • A new HDD.

What I've done:
  • Partition the new HDD the same way I did the old one - /var and /home on it (/ is on a different hdd, it has not been changed).

  • Copy everything I've backed up back to /var (probably with completely wrong permissions).

  • Edit to /etc/fstab to change the UUIDs.

Result:

The system goes through grub2, loads the kernel and errors out with a message that it cannot find a hdd (by listing it by UUID) with the UUID of the / (root) hard drive (the one that's not changed in any way) and drops me into a [rootfs /] prompt that even doesn't have fdisk in it.

Thank you.

Last edited by vladev (2012-10-07 10:46:32)

Offline

#2 2012-10-05 20:12:58

graysky
Member
From: /run/user/1000
Registered: 2008-12-01
Posts: 8,440
Website

Re: [SOLVED] Broken /var HDD. How to recover?

Yeah, the permissions thing is going to suck.  Dunno how to recover from that.  Boot from a live CD, chroot into your install, and regenerate the grub.cfg.

In the future, you can simply tar up the target partition -- to any fs -- which will retain the permissions therein.  You'll just have to do it from a live CD or another Linux partition.

# tar zcvfp /path/to/var_backup-20121005.tar.gz /path/to/var/

CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#3 2012-10-07 10:46:21

vladev
Member
Registered: 2012-01-04
Posts: 7

Re: [SOLVED] Broken /var HDD. How to recover?

I eneded up reinstalling Arch. Thank you graysky, will know the next time.

Offline

Board footer

Powered by FluxBB