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

Fwd: Relocating Squeeze partition



On 13 February 2011 10:54, Klistvud <quotations@aliceadsl.fr> wrote:
>> With Lenny I am able to take an image of a partition with an external
>> imaging tool and rewrite it to a different location on the (first)
>> hard drive. In this configuration I have a proprietary bootloader
>> (BootitNG) in the MBR with Grub in the Lenny partition.
>
> Let me get this straight. You installed Squeeze and then cloned it to
> another partition? Where does the Lenny partition come in?

Sorry, I now see I haven't explained it properly. BootitNG inserts
itself in the boot sequence and from its own separate data stored in a
small 8MB area of the drive loads the partition table with up to 4
primary partitions of your choice from up to 255 which you can create
on the hard drive, and then passes control to the OS (i.e. Grub) in
one of the 4 partitions. From that point, the other "partitions" not
in the partition table are treated as just unallocated space which you
just have to be careful to avoid trying to use. So my Lenny partition
is invisible to the Squeeze system and can be treated as non-existent.
So when I boot mySqueeze system I have a partition table with only one
entry for that drive (in practice there's another partition containing
data which I use for all the systems).

> Cloning a partition will give you two partitions with identical UUIDs. This
> will confuse Grub2 to no end. It will also confuse your fstab.Use tune2fs
> and blkid to set that right.

So there aren't 2 identical partitions. However prompted by your
suggestion I've done more Google digging and have concluded that the
UUID is constructed by an algorithm which uses the position of the
partition in the disk (which I haven't actually seen stated anywhere,
maybe it's too obvious?). So this would mean that cloning a partition
would effectively change the UUID. It looks like this might be my
problem as the bit for bit contents of the partition cloned are
identical, i.e. the fstab entries would be pointing to an area of the
disc which is no longer a partition as defined by the changed
partition table. I tried replacing the UUIDs in fstab with "/dev/sda1"
type entries which got me further: grub2 booted, but then somewhere in
its initialisation the OS complained about errors in the filesystems,
and threw me out to a command prompt. It seems that Squeeze stores the
entries in the partition table somewhere and doesn't expect them to
change after a reboot. Or maybe it's using the old UUIDs somewhere
else other than fstab. It wasn't a problem with the Lenny system.


Reply to: