Migrating a Linux (Debian Squeeze) system from one HD to another HD
Yedidyah Bar-David
linux-il at didi.bardavid.org
Sun Feb 19 17:44:56 IST 2012
On Sun, Feb 19, 2012 at 03:47:32PM +0200, Omer Zak wrote:
> Thanks, Daniel and Amos, for your suggestions.
> However they address the wrong part of my problem.
> All my regular files were already copied to the new hard disk and it was
> properly set up.
> The only problem is to boot from it.
>
> I successfully set up grub2 to boot from the new disk's boot partition
> (a physical partition, not under LVM control). For this purpose, I
> modified grub.cfg.
> I need to rebuild initrd.img files for all kernels that I have.
"need" or "needed"?
For testing, building for one is enough, BTW.
>
> Yedidiah, you questioned my finding that logical volume paths are
> hardwired in the initrd images. They are.
> The relevant files are:
> /scripts/local-top/cryptroot and /conf/param.conf
> in the initrd image.
>
> According to man mkinitramfs, the file which configures the above
> is /etc/initramfs-tools/initramfs.conf and in practice I see files also
> in /etc/initramfs-tools/conf.d
>
> I created files which set
> RESUME=/path/to/swap/volume
> ROOT=/path/to/root/volume
>
> However even after doing so, the boot loader doesn't find them.
You mean after doing so and building another initrd image?
> So I must have been doing something wrong.
> Any other suggestions?
Did you try passing 'root=DEV'?
Where does the boot process get stuck? What are the last few lines?
Can you try 'break=premount' and debug a bit from there - e.g. see
if you can manually mount the new root, etc.?
You might also try dracut, BTW, and even yaird (which isn't in squeeze) -
I have no experience with either of them.
You can also try booting using some kind of rescue system (Debian's
bootable media or something else) and then mkinitrd again.
--
Didi
More information about the Linux-il
mailing list