[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: migrate / to new partition; wants to use old mount points



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).  I originally thought this was a grub
> problem (see thread "moved system do different partition; grub boot
> problem"), but now think that the kernel on the new partition is booting, but
> at some point in the boot process it begins to use all of the mount points on
> the sata drive.  It is almost as if it is using the old fstab is being used
> instead of the new one.  I then erased the new partition, and copied over the
> old / using 'cp -a', which had the same result.  I then tried rsync, with the
> same effect.  
> 
> The message on the screen when the boot process stops reads something like:
>     waiting 7 seconds for /sys/block/sda/sda10/dev to show up
>     /bin/cat /sys/block/sda/sda10/dev: No such file or Directory
> I cannot figure out why it is looking for sda10, which is where the original
> / was located on the sata drive, instead of looking at hdc2, which is where
> the new / is located and is what it booted off of.
> 
> 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).

-- 
Regards,            | http://users.icfo.es/Florian.Kulzer
          Florian   |



Reply to: