From: "Christian HOFFMANN" <hoffmann@noos.fr>
To: gentoo-dev@gentoo.org
Subject: Re: [gentoo-dev] Further observations on moving root
Date: Wed, 20 Mar 2002 20:10:20 +0100 [thread overview]
Message-ID: <3C98ECAC.5126.337C5B@localhost> (raw)
In-Reply-To: <1016646934.4859.1.camel@nosferatu.lan>
Hello,
I recently moved my root partition from one disk to the other and
experienced the same problem with /dev.
My solution is actualy simple, i did a mount /dev/hda3 /mnt/gentoo
(hda3 being my old root partition) and moved the hard drive content
with a tar cf | tar xfp from /mnt/gentoo to the new root. Working that
way, I copied the actual hard drive file not the dynamic filesystems in
/dev and /proc.
I worked without any problem, I'm also using this trick to backup my
system in a way similar of what is described in D.Robbins tutorial on
devlopperworks.
Regards
> On Wed, 2002-03-20 at 06:15, Fuper wrote:
> > If you ever might add a new disk drive and want to move the Gentoo
> > root partition onto the new (maybe faster) drive then my struggles
> > in doing that may be relevant to you. Copying the partition didn't
> > just work --- I found that the /dev directory initialization was not
> > obvious.
> >
> > I did conclude to my own satisfaction that the /sbin/rc script (v. 1.16)
> > is in error at line 312 and should read as follows:
> > 309 #we want devfsd running after a change of runlevel (if we return
> > 310 #from runlevel 'single')
> > 311 if [ -z "$(ps -A | grep devfsd)" ] && \
> > 312 [ -n "$(cat /proc/mounts | grep -e '/dev devfs')" ]
> > 313 then
> > 314 /sbin/devfsd /dev &>/dev/null
> > 315 fi
> > The distributed script had "cat mounts" and failed when devfsd
> > was not already running.
> >
> > After reading the devfs FAQ and Robbins paper on devfs at
> > IBM:developerWorks I concluded that a cleanly built root
> > partition should have an empty /dev directory. It is entirely
> > populated by devfs when that is "mounted" and accessed.
> >
> > BUT Gentoo linux, installed from build rc6 r14, crashes when
> > booted from the same /boot partition but using a new root ("/")
> > and an empty /dev (it had more interesting problems when
> > I attempted to create a fully populated dev/ by copying the
> > in-use /dev from the old root partition onto the new partition
> > s.a.
> > star -c /dev | star -x -C /mnt/partition # Don't do this
> >
> > I had to add the devfs mount option to the kernel so that
> > the grub commands that had been
> > root (hd0,0)
> > kernel /boot/bzImage root=/dev/hda2 hdc=ide-scsi
> > became now
> > root (hd0,0)
> > kernel /boot/bzImage root=/dev/sdb1 hdc=ide-scsi devfs=mount
> >
> > It is a mystery to me why it now becomes necessary to add
> > the devfs=mount option to the grub kernel command, booting
> > the same kernel using the same devfs.conf file and same
> > root partition (but copied onto a new disk). If this is obvious
> > to everyone else, then so be it; but maybe it is worth
> > documenting that under some conditions it becomes
> > necessary to add the kernel option.
> >
>
> This is because /sbin/init needs /dev/initctl, and as we dropped
> the initwrapper that created that if not existing, it fails when
> a unmounted /dev do not contain it.
>
> > I hope that this is helpful.
> > _______________________________________________
> > gentoo-dev mailing list
> > gentoo-dev@gentoo.org
> > http://lists.gentoo.org/mailman/listinfo/gentoo-dev
> --
>
> Martin Schlemmer
> Gentoo Linux Developer, Desktop Team Developer
> Cape Town, South Africa
>
>
> _______________________________________________
> gentoo-dev mailing list
> gentoo-dev@gentoo.org
> http://lists.gentoo.org/mailman/listinfo/gentoo-dev
>
-------------------------------------------
Christian HOFFMANN <hoffmann@noos.fr>
prev parent reply other threads:[~2002-03-20 19:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-03-19 1:52 [gentoo-dev] Moving root Fuper
2002-03-20 4:15 ` [gentoo-dev] Further observations on moving root Fuper
2002-03-20 17:55 ` Martin Schlemmer
2002-03-20 19:10 ` Christian HOFFMANN [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3C98ECAC.5126.337C5B@localhost \
--to=hoffmann@noos.fr \
--cc=gentoo-dev@gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox