Autor |
Nachricht |
|
Titel: Cloning partition problem - wrong root
Verfasst am: 20.02.2007, 20:07 Uhr
|
|
Anmeldung: 20. Feb 2007
Beiträge: 4
|
|
Hi,
I'm trying to clone my current RC4 partition. I have tried a number of methods (pcopy, tar, cp -ax, etc), but all of them are not giving me the wrong root.
The current one is on /dev/hda7, and I am trying to clone it to /dev/hda6. I copied all the info using one of the above methods, then I modified etc/fstab on hda6 to mount hda6 as root. I also modified grub's menu.lst so that it has hda6 (with root=/dev/hda6 to the kernel option).
After rebooting, I select the one for hda6 (use the 'e' command to make sure I have the correct root specified, i.e., /dev/hda6) and then boot. However, after booting up, it still shows hda7 as my root. I checked /var/log/messages, and it showed the line:
Feb 20 00:13:37 mycomputer kernel: Kernel command line: root=/dev/hda6 ro quiet vga=791
so, it did see that I did specify hda6 as my root. However, when I checked with df or mount, it showed hda7 as my root.
Does anyone know what I have done wrong? Is the root hardcoded somewhere?
Thanks |
|
|
|
|
|
|
Titel:
Verfasst am: 20.02.2007, 21:23 Uhr
|
|
Anmeldung: 17. Dez 2003
Beiträge: 16790
|
|
a) menu.lst has to be correct -> kopt, groot, then run update-grub
b) DELETE /boot/initrd.* before running update-grub as long as no initramfs was used to create (usally it was yaird) |
|
|
|
|
|
|
Titel:
Verfasst am: 20.02.2007, 22:33 Uhr
|
|
Anmeldung: 20. Feb 2007
Beiträge: 4
|
|
Kano hat folgendes geschrieben::
a) menu.lst has to be correct -> kopt, groot, then run update-grub
b) DELETE /boot/initrd.* before running update-grub as long as no initramfs was used to create (usally it was yaird)
Thanks Kano for replying.
I already have the following lines in menu.lst:
title Debian hda7, kernel 2.6.18-kanotix-1
root (hd0,6)
kernel /boot/vmlinuz-2.6.18-kanotix-1 root=/dev/hda7 ro quiet vga=791
initrd /boot/initrd.img-2.6.18-kanotix-1
boot
title Debian hda6, kernel 2.6.18-kanotix-1
root (hd0,5)
kernel /boot/vmlinuz-2.6.18-kanotix-1 root=/dev/hda6 ro quiet vga=791
initrd /boot/initrd.img-2.6.18-kanotix-1
boot
The problem is when I select the second one, it still loads up hda7 as my root. So, I'm not sure if it is menu.lst that is causing the problem. Right now, my menu.lst does not use kopt or groot, since I set the options explicitly in each kernel line.
Thanks. |
|
|
|
|
|
|
Titel:
Verfasst am: 20.02.2007, 23:03 Uhr
|
|
Anmeldung: 17. Dez 2003
Beiträge: 16790
|
|
You did not do what I told you. You can use chroot to do so, you may NOT use initrds for those kernels. |
|
|
|
|
|
|
Titel:
Verfasst am: 21.02.2007, 18:55 Uhr
|
|
Anmeldung: 20. Feb 2007
Beiträge: 4
|
|
Kano,
Sorry, I was trying to understand the issue before I try it. Anyway, thanks a lot. It now works. I can boot up into hda6 as my root.
I examined the menu.lst before and after, and it seems that the only difference is the removal of the initrd line in menu.lst. Is that correct? If that is case, does that mean that initrd hardcoded the root partition in it?
Thanks a lot. |
|
|
|
|
|
|
Titel:
Verfasst am: 21.02.2007, 19:23 Uhr
|
|
Anmeldung: 17. Dez 2003
Beiträge: 16790
|
|
best rename menu.lst after successful boot and run
update-grub
to recreate it. you can add chainloader entries and gfxmenu from original file later. the rest should be standard - my fix-grub script needs a fully correct menu.lst, handchanged versions of amateurs do usually not work. |
|
|
|
|
|
|
Titel:
Verfasst am: 22.02.2007, 07:06 Uhr
|
|
Anmeldung: 20. Feb 2007
Beiträge: 4
|
|
Thank you very much for your help. |
|
|
|
|
|
|