Grub 2 and moved sytem (rant and question)

Thierry de Coulon tcoulon at decoulon.ch
Fri Nov 19 05:41:05 GMT 2010


On Friday 19 November 2010 04:41:17 am Tom H wrote:
> > Now to the question: does anyone know how to do with grub 2 if you move
> > your system to another partition?
>
> 1. You could've found out the UUIDs of "/" and "/boot" with blkid or
> tune2fs, run "tune2fs -U <uuid> ..." to change the UUID(s) of the new
> filesystem(s) to the old UUIDs, and run "tune2fs -U random ..." on the
> old filesystem(s).

Hmm... but then the old system would no more boot, right? I'd prefer not to 
loose the ability to boot in the old system before I checked the copy is 
really working.

> 2. You could've booted into your old install, chrooted your new
> install, and run "update-grub".

Probably, I just have no idea how to do that. Besides, why would update-grub 
have worked in the copied install but it did not in the old one (I mean, I 
was booting from mbr in the system on sda6, if update-grub did not make it 
possible to boot on sda1, would it have chaged something to run the same 
command on the same system copied on sda1? It's probably there that I don't 
understand things yet).

> This isn't a grub2 problem! Had you been running 9.04 and done the the
> same "cp" you'd have had the same issue with UUIDs.

Absolutely. What is a grub 2 problem is that I don't know how and where to 
change it. You are both rght and wrong, I would not have had "the same" 
issue. As soon as I replaced grub 2 with grun legacy, my problem was gone: I 
replaced the UUIDs in menu.lst and that was it.

So if the UUIDs are not a grub 2 problem, it's made to a problem by the way 
grub 2 is configured.

Mark pointed me to the idea of doing what's supposed _not_ to be done, editing 
the grub.conf file, which probably would let me boot the new system. But it's 
not clear to me how to make the change permanent, would update-grub from new 
system automaticaly correct the grub settings or would I have to manually add 
the new UUIDs to the manual config?

Thierry




More information about the ubuntu-users mailing list