vass: A bottle of diet Coke with the words "When you pry it from my cold, caffeineless hands." (diet Coke)
Vass ([personal profile] vass) wrote in [community profile] linux4all2010-09-11 09:48 pm

Chroot question

[crossposted to my own journal]
OK, this is complicated. I have a friend living interstate, and I'm trying to talk her through this remotely.

Here's the deal: her old Linux computer died, but she managed to save the hard drive and put it in a USB external enclosure. She's plugged this into her Eee PC. The hard drive had a password on it. When she mounts it, the graphical file browser (I don't know which, whichever one Xandros uses?) shows certain files and folders as locked, particularly (but not limited to) her Thunderbird downloaded email.

Here's what we've done so far:
Created a mount point and mounted the hard drive
Chrooted into the hard drive and succeessfully accessed her files that way.

All this worked fine. I didn't bother to create a boot mount point in etc/fstab because it's a USB drive and she'll be unplugging it often.

What I don't know is an easy way of giving her access to the files through her graphical browser. In particular, it'd be good if there was some not too complicated (since I have to explain it to her over the phone) way of setting it up so she can use Thunderbird normally.

She's going to get a new desktop very soon, with a larger hard drive. Would it be easiest just to copy everything over to that? Maybe clone the old hard drive? Is there an easier way I'm not thinking of?
aphenine: Teresa and Claire (Default)

[personal profile] aphenine 2010-09-14 01:15 am (UTC)(link)
The problem with sticking an external hard drive from one system into another system is that the User/Group IDs on the external hard drive don't match the ones in the /etc/ directories of the computer you're connecting to, resulting in files belonging to some very strange users and groups. That's why, when you plug the hard drive in and access it, you get some really, really weird locking errors. However, when you chroot, as you did, you bypass that by using the /etc/ directory on the external hard drive. That's why you have to chroot if you want to recover stuff easily.

I've never done this, however it should be possible to run a graphical browser app using chroot with some option (followed by the name of the app), as I can remember seeing this in the man pages. Please check the man page of chroot for more details. Note: you may still have screwed up user/group IDs on the destination hard drive after a copy. The only real solution to that is to become root (or sudo) and chown the files to something the graphical interfaces can handle and then carry on.