Results 1 to 6 of 6
I want to move a working distro contents to a new partition, leaving behind the ReiserFS, and moving onto a fresh ext3 system. Can that be done reasonably simply without ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 06-16-2008 #1
- Join Date
- Nov 2006
Filesystems - The Nuke Option?
If I were to format a partition, and then copy the whole distro into it .. e.g.
~# mkfs.ext3 /dev/sda12 ~# cp -v --preserve=all /dev/sda5 /dev/sda12
Yes - I know. Words like "naive" and "simplistic" I can already feel coming, but I have to start somewhere. I already fear questions like "what happens with symbolic links"? Oops - there's that /etc/fstab that needs to know the new filesystem type!
Reiser has done quite fine for a long time, but I am now persuaded another filesystem is the wiser choice. Is there a preferred way to do this?
Last edited by Gtrax; 06-16-2008 at 09:12 PM. Reason: Remembered fstab
- 06-16-2008 #2
- 06-16-2008 #3
I'd think if you were going to do it you'd might be better to backup your data, format your root partition and go back to that. You'll need to fix up fstab, amend grub's menu.lst as you mentioned and perhaps amend your initrd. I can imagine links breaking (as again you mentioned) and other strange problems.
It'll certainly make for an interesting experience. I'll be reading up on your progress. If you wanted the easy route you could always reinstall. Less chance of breakage and it might be the end result anyway. Good luck!
- 06-16-2008 #4
- Join Date
- Nov 2006
Not that I am at all like Moe, but I have been distro delving. No doubt most will get reworked eventually, but some were built for purpose, and I don't want to start from scratch right now.
I have a mix of drives and partition types. The 2 big drives are LVMs, and do not carry distros. The main SATA has 14 partitions with sda1 being a little /boot now abandoned, sda2 is a 1G swap, sda3 is the extended, sda4 is not allowed, so the remainder sda5 onward carry distros.
I confess to a prized fully working Gentoo
A trashed adventure with Mepis 7.0
The preserved /home from Mepis
The present default PCLinuxOS
A fast industrial Debian Etch with Xfce4
A Debian Lenny with a Gnome desktop I have not set up right.
A trashed Zenwalk - partition now given to XP in VirtualBox
A new Ubuntu 8.04 with a Gnome desktop I have not set up right
A whole SuSE 10.3 set up for industrial control automation
A Studio64 aventure.
OK - step 1. the trashed Mepis 7.0 provides the 20G space to to do this.
I simply formatted it using..
~# mkfs.ext3 /dev/sda6 ~# tune2fs -c 65 -i 180dCode:
~#kdesu kwrite /etc/fstab
Now comes - the risky copy command ..Code:
~# mount /dev/sda6 /mnt/sda6 ~#cp -dPRp /mnt/sda5 /mnt/sda6
BUT .. it seems to have worked - so far. The next step is to trash the ReiserFS Gentoo partition, and make it ext3.Code:
~# mkfs.ext3 /dev/sda5
- 06-17-2008 #5
- Join Date
- Nov 2007
- Córdoba (Spain)
First, make sure your kernel has support for the new file system. You shouldn't need to change your initrd, unless you are loading the filesystem modules from there, and ext3 has not been included. Then, revise fstab and grub.conf/menu.lst.
As for the copy, there's no problem in that, as long as you are careful enough to preserve the ownerships and permissions while doing it. (tar -p or cp -a, there are other solutions, like rsync). I suggest copy, and not move, since that way you can still boot your old partition if needed. Remember also that you can edit the kernel lines in grub if something goes bad on the boot stage.
So far, you seem to know all of this, so you shouldn't need anything more. There's no mystery on this operation and if you do it carefully and understand everything you shouldn't have any problem. I have done it many times with gentoo and some others.
The most critical part is where you copy all the files, because if you screw up the permissions then you are, in fact, screwed. The rest means no problem, because if something goes bad, you can still boot your old partition, and in the worse case, you can boot a livecd, chroot and fix your kernel, fstab or whatever is failing.
- 06-21-2008 #6
- Join Date
- Nov 2006
Its done - and my Gentoo survived!
Down with 'convertfs' !
The safest and really quite easy option is to copy it all to a safe place, then copy it all back onto same partition, having reformatted to the new filesystem. There follows a little phase just getting at the /etc/fstab to alter the lines mentioning the filesystem type.
This only works if you take care to preserve the file attributes. File permissions, link destinations, everything. Fortunately, the copy command is easy. It only takes as long as needed to copy all away, and then copy back. Searching out the ways good and bad is easy too. Lots of folk have done this. i92guboj mentions all the right things, though you have to be a real minimalist to have a kernel that did not include ext3 just because you happen to be using reiserfs!
This being coffee lounge, the detail can be discussed in other places, but I will warn against 'convertfs' It's for experts with patience! I experimented with converting my copied Debian Lenny. Before I went too far, I thought better of it. Its complicated, uses several stages, including a re-mapping that can take many days and MUST NOT be interrupted. The off-putting procedure is HERE
Last edited by Gtrax; 06-21-2008 at 12:16 PM. Reason: ack i92guboj