LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware - Installation (https://www.linuxquestions.org/questions/slackware-installation-40/)
-   -   moving 15.0 install to a different partition/fs-type (?) (https://www.linuxquestions.org/questions/slackware-installation-40/moving-15-0-install-to-a-different-partition-fs-type-4175736238/)

mw.decavia 04-19-2024 09:12 PM

moving 15.0 install to a different partition/fs-type (?)
 
Hello,

I am interested in moving a bootable slackware64 15.0 install to a different partition on the same harddrive. With the old partition being type Ext4 and the new partition being type Xfs.

Is there any way I can do this without doing a whole new install process to the new partition? Like maybe formatting the new partition with Xfs, then copying all the files from the old partition? Or something like that?

The old partition boots with lilo from the mbr.

mw.decavia 04-20-2024 11:29 AM

With no one replying, I tried a solution recommended for a different distro:

format the new partition
use "cp -a" to copy all the contents from the old partition to the new
edit the fstab for the new partition
edit the bootloader conf (in my case, lilo.conf)

It worked to copy files. But I did not end up with a working install on the new system. It booted, but by the time it got to the login prompt, it could not find any devices at all

Petri Kaukasoina 04-20-2024 02:05 PM

Did you chroot to the new fs, build a new initrd with the xfs module included, and run lilo?

mw.decavia 04-20-2024 06:42 PM

Quote:

Originally Posted by Petri Kaukasoina (Post 6497353)
Did you chroot to the new fs, build a new initrd with the xfs module included, and run lilo?

After you replied, I did try running lilo while chroot'd , I did not need to build a new initrd because I am just running the "huge.s" generic kernel.

But that did not help.
So then I erased the copy partition and started over again.

Before, I had booted from the source partition I had copied from.
This time I booted from the slackware dvd, mounted both partitions, then copied.

+ then edited fstab for the new partition location and fs-type
+ then chroot'd and ran lilo from the new destination partition
+ then edited lilo.conf , and tried to lilo
+ lilo gave me an error about not finding "proc/partitions" in the destination partition, so I manually added that.
+ and ran lilo again

And it worked.

Petri Kaukasoina 04-21-2024 04:51 AM

Good that you got it working.
Quote:

Originally Posted by mw.decavia (Post 6497401)
+ lilo gave me an error about not finding "proc/partitions" in the destination partition, so I manually added that.

On the install dvd, the setup image has a command for that, /sbin/mkbindmounts

Code:

#!/bin/bash
# Create bind mounts from / to /mnt for /dev/, /proc, and /sys.
# This may be useful for chrooting to a system partition mounted
# on /mnt (for example to run mkinitrd_command_generator.sh or to
# reinstall boot loaders).

mkdir -p /mnt/{dev,proc,sys}
mount -o bind /dev /mnt/dev
mount -o bind /proc /mnt/proc
mount -o bind /sys /mnt/sys



All times are GMT -5. The time now is 10:16 AM.