Re: moving /var



On Wed, Dec 20, 2006 at 10:01:35PM -0000, richard@xxxxxxxxxxxxx wrote:

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.

I've done this several times over the years as needs change and I've
never had a problem. Here's how I do it:

from single-user mode
format the new partition
mount it on e.g. /newvar
use mc and copy /var to /newvar (keeping same attributes)
shutdown -Fr now
boot the install disk and:
rename /newvar to /oldvar
edit /etc/fstab to point /var to the new partition,
and mount the old var partition on /oldvar
for my friend Justin Case.
reboot to single user mode, and ensure all is well,
reboot to standard mode.
if all looks good, unmount /oldvar and delete the partition or
otherwise reclaim that space.

As far as running a command from within the partition (e.g. chroot) from
a rescue, I note that the Etch installer has this on the rescue-mode
menu (including installing grub or lilo), I would just do that if need
be.

YMMV, good luck.

Doug.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx
with a subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx



Relevant Pages

  • Re: SATA drive probs: Knoppix OK, but nothing else
    ... Hash: SHA1 ... installed copy of lilo. ... And then chroot into that mounted partition and run the ...
    (Debian-User)
  • Re: SATA drive probs: Knoppix OK, but nothing else
    ... <snip - problems booting new installation from SATA drive> ... installed copy of lilo. ... And then chroot into that mounted partition and run the ...
    (Debian-User)
  • Re: fedora bug fixes here
    ... I've never worked with lilo before, ... directory, the lilo command will ... Read up on "chroot" to understand how this works. ... > It is this kind of arrogance that discourages people from using Linux ...
    (comp.os.linux.setup)
  • Re: fedora bug fixes here
    ... I've never worked with lilo before, ... directory, the lilo command will ... Read up on "chroot" to understand how this works. ... > It is this kind of arrogance that discourages people from using Linux ...
    (comp.os.linux.misc)
  • Re: fedora bug fixes here
    ... I've never worked with lilo before, ... directory, the lilo command will ... Read up on "chroot" to understand how this works. ... > It is this kind of arrogance that discourages people from using Linux ...
    (comp.os.linux.questions)