[Linux-bruxelles] problem with transfering the distribution on another partition

audiobraille at bxlug.org audiobraille at bxlug.org
Ven 4 Jan 20:42:57 CET 2002


(J'essaye d'aider un ami Allemand; sa question va autour du transfert
d'un Linux umsdos vers une partition ext; il a bien documenté mais
qq'un a-t-il la réponse?)


Hi!

My name is Christian and I live in Germany, so excuse me for my bad english
:-)
I just installed the brlspeak distribution and I was very amazed, that it
really worked immediately. It really only took some minutes and my little
Linux was bootable with braille support. I am working with a Tieman
Combibraille 45. This was not my first Linuxinstallation. A friend of mine
helped my the last few times. I worked with SUSE Linux which is very popular
in Germany. brlspeak was easy to install and configure for me, because I
already knew a bit about Linux. The next step to take was to build up a
autonomous working Linux, which should be bootable with Lilo, so I followed
the steps which I found in the Slagware FAQ. Here they are:

Q7: Can my ZipSlack installation be moved onto a real Linux partition?

A:  Yes, it can.  Here are the steps you'll need to follow to migrate your
    installation onto a Linux ext2 partition:

    1.  Define a Linux partition using fdisk or cfdisk.  If you find it
        easier, you can use DOS or Windows tools to create the partition and
        then use Linux fdisk to change the partition type to 83 (Linux
native).

*no problem*

    2.  Format this partition with 'mke2fs'.  For example, if your new Linux
        partition is /dev/hdb1 you'd use the following command:

        mke2fs /dev/hdb1

        Formatting destroys the existing filesystem on the partition, so
make
        sure to format the correct partition!

*no problem*

    3.  Mount the new partition on /mnt.  In the case of the example above,
        this command will do it:

        mount /dev/hdb1 /mnt

    4.  Make a few directories on the new partition:

        mkdir /mnt/cdrom
        mkdir /mnt/mnt
        mkdir /mnt/proc

*no problem*

    5.  Now it's time to actually move the data.  First you'll need to set
your
        'umask' to 000 to correctly preserve all file permissions, and then
        you'll copy the top-level directories (other than cdrom, mnt, and
proc)
        and the kernel file (vmlinuz) onto the new Linux partition:

        umask 000
        cp -a /bin /mnt
        cp -a /boot /mnt
        cp -a /dev /mnt

This does not work here. The system freezes and I have to remove electricity
to force a reboot :-)
After this and after the reboot of Linux, I did:
e2fsck /dev/hda2 (the new Linux partition), because /dev/hda2 was not
propperly unmounted.

Would you please tell me, why this doesn't work here. I did it another
way... a friend of mine sent me a tar-file containing the contents of his
/dev directory. I unzipped it and there they were!

        cp -a /etc /mnt
        cp -a /home /mnt
        cp -a /lib /mnt
        cp -a /root /mnt
        cp -a /sbin /mnt
        cp -a /tmp /mnt
        cp -a /usr /mnt
        cp -a /var /mnt
        cp -a vmlinuz /mnt

        If you've made any new top-level directories that you want to save,
        copy them over to the new partition in the same way.

    6.  Edit the /mnt/etc/fstab.  Change the device listed for the '/'
        partition to the new Linux partition's device.

If you habe al look at the fstab, you will find, that there is an entry
like:
/dev/fd2 / umsdos etc.

I turned it into:
/dev/hda2 / ext2 etc.

Now I build a lilo.conf with the correct entrys. A friend of mine who is
familiar with Linux had a look at it. I started lilo.

The messages:
added linux*
added win

Now I rebooted the system and I was able to choose between linux and win. If
I choose linux, the system freezes, but windows is booting...

Any suggestions?

    7.  That's it!  Your system should be ready to boot on the new
partition.
        To do that, you can use loadlin (if it's installed on your DOS or
        Windows partition), or a bootdisk.  Once you've booted the new
        partition you can proceed to set up LILO if you like.  Note that
when
        you boot a native Linux partition you should boot it in read-only
        mode (unlike UMSDOS).  This allows it to do automatic filesystem
        checking periodically, or if the machine is ever shut down
improperly.
        To boot a partition in read-only mode, add 'ro' instead of 'rw' to
the
        bootdisk or loadlin command line.

    Since this operation must be done as root and involves dangerous
operations
    like using fdisk, you need to be careful to avoid losing data.  But, if
you
    can migrate your installation successfully, you've earned your
intermediate
    Linux sysadmin merit badge.  :^)

It would be very nice of you, if you would help me a bit.

Bye Christian









Plus d'informations sur la liste de diffusion Linux-bruxelles