Re: moving /var
- From: Andrew Sackville-West <andrew@xxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 20 Dec 2006 15:20:33 -0800
On Wed, Dec 20, 2006 at 10:01:35PM -0000, richard@xxxxxxxxxxxxx wrote:
On Wed, Dec 20, 2006 at 01:41:11PM -0500, Greg Folkert wrote:
On Wed, 2006-12-20 at 14:36 +0000, richard@xxxxxxxxxxxxx wrote:
I recently tried to move /var to a new partition. Booted from some
live cd, moved it and edited /etc/fstab to suit. Broke the machine
as it wouldn't boot afterwards (in fact I recollect it booted but with
[...]
What should I have done?
I have done it many times from LiveCD, also from Single user mode. I had
to turn off some logging and other things even in single user mode.
Effectively you have to make sure you get everything. If you are running
Ubuntu there are additional items you need to make sure are taken care
of. (Make sure /var/run and /var/lock are on the root partition for
tmpfs filesystems)
[...]
So, what did you do to move it? (list of commands used, would be good)
Hmm, it's a couple of weeks ago now. I usually use cp -a for things
like this and then rename the directory and make a new one to mount to,
but in this case I think I used mv. I don't think there are any critical
symlinks. The old /var directory was definitely empty after the move,
because I checked. Anyway cp -a back again put everything into place
and the system booted as normal afterwards.
when I've done it in the past, I have tar'd the whole directory, cp'd
and untar'd it in the new location, change fstab and reboot. done. I
don't see why cp -a wouldn't work too... hmmm... maybe you've got some
other problem and this is just a symptom.
The implication of your comments is that you don't think there was any
problem with initrd. In fact, I am sure I have done this before with no
problems. I was surprised when there was a problem. I did also move
/usr (to another partition) which was of course trouble-free. Perhaps I
shall try again when I get back to that box ( am in the wrong country at
the moment).
Really, I asked two questions mixed up together. The other is how to
run makeinitrd, or anything else such as lilo or grub-install (or
whatever the command is) in a chroot, when chrooting cuts you off from
the /dev and /proc filesystems so that none of these commands will run.
mount proc -t proc /mnt/chroot/proc
check the debian install manual, there is information on installing
from another unix system and included there is how to install kernels
from the chroot. should be applicable here.
A
Attachment:
signature.asc
Description: Digital signature
- Follow-Ups:
- Re: moving /var
- From: Michelle Konzack
- Re: moving /var
- From: richard
- Re: moving /var
- References:
- moving /var
- From: richard
- Re: moving /var
- From: Greg Folkert
- Re: moving /var
- From: richard
- moving /var
- Prev by Date: Re: Linux friendly colour printer?
- Next by Date: Re: New User Information Request
- Previous by thread: Re: moving /var
- Next by thread: Re: moving /var
- Index(es):