copied wubi root.disk to another drive what changes should I do in grub

Marius Gedminas marius at pov.lt
Fri Oct 21 09:48:42 UTC 2011


On Fri, Oct 21, 2011 at 08:34:06AM +0530, Tapas Mishra wrote:
> I installed Ubuntu 11.04 by Wubi and then copied the ubuntu folder
> from C: to D: drive what changes should I make in grub and where as
> the grub folder was empty.

Inside the Wubi image.

You need to boot your Ubuntu and then reinstall Grub, I think.

To boot, get a USB key (or a CD) with GRUB, and do the following in the
GRUB console (I'm assuming D: is /dev/sda2, i.e. the second partition of
your first hard disk):

  insmod ntfs
  set root=(hd0,2)   <--- if you boot from CD
  set root=(hd1,2)   <--- if you boot from USB
  loopback loop0 /ubuntu/disks/root.disk
  linux /boot/vmlinuz-.... root=/dev/sda2 loop=/ubuntu/disks/root.disk ro quiet splash
  initrd /boot/initrd.img-....
  boot

You'll need to do some looking around or tab-completion to get the exact
filenames of your kernel/initrd images (and make sure the versions
match!).

If your D: is on a separate hard disk, replace /dev/sda2 with /dev/sdb1
and (hd0,2) with (hd1,1), as appropriate.

Once you've booted, you'll need to edit the GRUB configuration files, tell them
your root.disk is now not on (hd0,1) but somewhere else -- you should
have already figured out where -- then regenerate grub.conf with
update-grub.  I'm not sure that will be enough; I don't recall how
precisely is grub loaded from NTLDR and how it is able to find its
grub.cfg.  You may need to regenerate the block map (assuming grub even
has one), or something like that.

Marius Gedminas
-- 
Everything you read in newspapers is absolutely true, except for that
rare story of which you happen to have first-hand knowledge.
                -- Erwin Knoll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20111021/136a5695/attachment.sig>


More information about the ubuntu-users mailing list