View Single Post
qole's Avatar
Moderator | Posts: 7,109 | Thanked: 8,820 times | Joined on Oct 2007 @ Vancouver, BC, Canada
#6
Hi, b-man,

No big deal or anything, I'm glad more people are "getting into" Debian chroot, but... How is this different (or easier) than my method? The user of your script has to manually mount the partition, instead of having the script mount it.

Another thing (that I've recently discovered) for Debian booters who want to chroot as well:

BACK UP YOUR FILES.

The "cp" lines in the script above overwrite fairly important system files that may break your bootable Debian. I would recommend doing the following before chrooting to your bootable Debian with the above script:

(after mounting your partition to /opt, but before running the full chroot script)

Code:
chroot /opt
cd /etc
cp resolv.conf resolv.conf.deboot
cp hosts hosts.conf.deboot
cp group group.deboot
cp passwd passwd.deboot
When it is time to boot into Debian, you simply reverse the process, and copy the .deboot versions of the files back over the main versions.

For instance, the mpd music player daemon installed in the beta3 Debian has an mpd user that is lost when you copy your /etc/passwd file from OS2008, and apt-get install complains bitterly about this missing user. I found the best thing to do was put back my .deboot backup files and do an "apt-get remove --purge mpd" to maintain my sanity.

We haven't really discussed this over in the chroot thread, because it's mainly a development thread at the moment. The whole chroot process is, I know, needlessly complex and ugly. But I am not a developer, packager, whatever. I'm just a self-taught hacker guy. I would love to get the chroot process to the point where you can download an .img file and install it on any generic SD card that has enough room, and then install a .deb that drops all the right scripts in all the right places so you can start running Debian apps without a hassle.
__________________
qole.org --- twitter --- Easy Debian wiki page
Please don't send me a private message, post to the appropriate thread.
Thank you all for your donations!

Last edited by qole; 2008-06-16 at 18:11.
 

The Following 2 Users Say Thank You to qole For This Useful Post: