[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Debian into an existing Loopback file system

On Thu, Aug 02, 2001 at 10:11:20PM -0700, Curt Howland wrote:
> > There are distros that are designed for people who want to give linux
> > a try without repartitioning.  I tried one a couple years ago, and it
> > had a windoze-based installer that created the image file, and set up
> > loadlin with an initrd thing.  If you get stuck, just look at how they
> > do it, or just use one of those and morph it into Debian once you've
> > installed :)
> This is exactly what I'm talking about. Dragon Linux in a
> one-gig loop-back "image file".
> And I would like to "morph it into Debian", but I'm not a
> programmer.

 BTW, you'd want to be a sysadmin for this job, not a programmer.  I
guess you're not one of those either :(  Lucky for you, you can just
ask us hackers on the list :)

> I don't know all the ins and outs, thus my
> original statement that I know the best way to change 
> distributions is to wipe out the old one and install the
> new one. Well, I would like to keep the present launch
> process.

 That shouldn't be a problem.  You should be able to keep using the
kernel that's currently installed by copying the modules for it into
the new Debian /lib/modules, and /boot/System.map-* to. (the kernel
image itself is probably on the FAT volume, not in the image file.

 upgrading the kernel could be trickier.  I don't know if the initrd
that the kernel you're using would continue to work with Debian
kernels.  Solve that hurdle when you come to it.

> Debian web page and docs have no "neat loop-back image file"
> type of install described, just second partition style.
> Has anyone done this, changing from an non-Debian to a 
> Debian "distribution" without actually erasing anything?

 Our LUG web server migrated from redhat to debian this way.  They had
Debian in a chroot, but I don't know exactly what they did after that.
Probably just moved aside /usr, and moved /chroot/usr to /, the same
for the other tier-1 directories.  Make sure you don't break shared
libraries while you move /lib... Booting off a floppy is the safe way
to do this.  Hmm... a challenge.  This might do it:

# /chroot is the debian installation
mkdir /old
mv /[^c]* /cdrom /old
LD_LIBRARY_PATH=/chroot/lib  /chroot/bin/mv /chroot/* /
run lilo, whatever.  (you probably can run lilo out of an image
file (if lilo can find the disk address of the files it needs through
a loopback device), but you'd have to rerun whenever you defrag and
the image gets moved.

 As for setting up the chroot env. in the first place, install potato
by untarring base2.2.tgz inside its own directory.  chroot in and run
/sbin/unconfigured.sh.  (copy stuff from your existing /etc as
necessary.  Probably you should cp -a /etc /chroot/old-etc, so you
will have everything in case you want it.)

 Woody would be be a little trickier, because it doesn't use a base
tarball, so the install options aren't as flexible :(  I would
recomment installing potato, and apt-get dist-upgrade from there after
editting /etc/apt/sources.list (and apt.conf).

#define X(x,y) x##y
Peter Cordes ;  e-mail: X(peter@llama.nslug. , ns.ca)

"The gods confound the man who first found out how to distinguish the hours!
 Confound him, too, who in this place set up a sundial, to cut and hack
 my day so wretchedly into small pieces!" -- Plautus, 200 BCE

Reply to: