Re: migrate / to new partition; wants to use old mount points
On Thu, Apr 26, 2007 at 09:28:20 -0700, Ric Otte wrote:
> On Thu, Apr 26, 2007 at 05:25:27PM +0200, Florian Kulzer wrote:
> > On Thu, Apr 26, 2007 at 07:53:38 -0700, Ric Otte wrote:
> > > I wanted to migrate a sid install from a partition on a sata drive to a
> > > partition on another ide drive. I used dd to copy the partion, changed
> > > fstab, and tried to boot into the system on the ide drive. Grub recognizes
> > > the ide drive, begins to boot, but after several (maybe 7 or 8 screens) of
> > > data, the boot halts because it is trying to mount the old sata drive (which
> > > is not now connected to the machine).
[...]
> > > Is there any place besides /etc/fstab that indicates what partitions to
> > > mount? I changed /etc/mtab, but that didn't help, and can't find any other
> > > places that might be diverting the boot process to the old drive.
> >
> > I once shifted my root partition around and I had to rebuild the initrd
> > so that it would really boot from the new root partition. We recently
> > had someone ask if it is possible to simply edit the initrd to effect
> > such a change. To my knowledge that was never fully resolved. I
> > participated in that thread and outlined how to rebuild the initrd
> > instead. Maybe you can try that approach:
> >
> > http://lists.debian.org/debian-user/2007/04/msg03533.html
> >
> > In that thread the initrd had to be changed because booting with an
> > additional drive attached changed the device node of the root partition.
> > Your problem is slightly different, but I think you can easily adapt the
> > procedure by using "yaird --output=...." to put the newly generated
> > initrd onto the new root partition (which you can mount somewhere while
> > you are booted into one of the working old root partitions).
[...]
> I tried this, and it began booting, but fairly quickly I got the
> message:
> switching root ...
> /usr/lib/yaird/exec/run_init: opening console: no such file or
> directory
> Kernel panic - not syncing: Attempted to kill init!
> I looked and there is a /usr/lib/yaird/exec/run_init in my current
> system (where I installed yaird), but it doesn't exist on the new
> partition I'm trying to boot into. I've never used yaird before, and
> so I probably am missing something obvious. I put the output of yaird
> to the new partition and I gave it the option of the kernel version in
> the new partition. Do I have to do anything else to get the
> initrd.img to handoff to the regular kernel?
Are you sure you made the necessary changes to /etc/yaird/Default.cfg
and /etc/fstab before calling yaird?
You can extract the relevant file, "init", from the new initrd like this:
zcat new-initrd-name | cpio -i init
Then you can check if these lines in "init" specify the correct device:
mkbdev '/dev/sda' 'sda'
mkbdev '/dev/sda6' 'sda/sda6'
/bin/mount -n \
$ro \
-t ext3 \
-o 'errors=remount-ro' \
'/dev/sda6' \
'/mnt'
You could also try to chroot into the new root partition and build the
initrd from there.
--
Regards, | http://users.icfo.es/Florian.Kulzer
Florian |
Reply to: