Gentoo Archives: gentoo-user

From: Matti Nykyri <matti.nykyri@×××.fi>
To: "gentoo-user@l.g.o" <gentoo-user@l.g.o>
Subject: Re: [gentoo-user] Re: [OT] LENOVO Z510 + Dual Boot + Gentoo == True ?
Date: Sun, 16 Mar 2014 11:21:12
Message-Id: 69B275A4-52D9-4426-AA8A-054C6C8F4FE4@iki.fi
In Reply to: Re: [gentoo-user] Re: [OT] LENOVO Z510 + Dual Boot + Gentoo == True ? by Mick
1 On Mar 16, 2014, at 12:38, Mick <michaelkintzios@×××××.com> wrote:
2
3 > On Sunday 16 Mar 2014 09:07:49 Matti Nykyri wrote:
4 >> Change the hard disk device ID to the same value as the old disk. It is
5 >> written on MBR. Change the UUID of the windows partition to the same as on
6 >> the old partition. UUID on NTFS partition is written at the beginning of
7 >> the partition at 0x48-4F.
8 >
9 > Can you give more detail please? How would you change disk and partition
10 > UUIDs?
11 >
12 > --
13 > Regards,
14 > Mick
15
16 Well when you purchase a new blank disk it is full with null's. When you first time open that drive with for example with fdisk it complains about incorrect mbr. If you in that situation print the partition table you will see that the device id is null.
17
18 When you create a partition these errors will be corrected by write. Fdisk creates a new device id from random data. It is then written to the mbr. Just explore the disk with hexedit and you'll find the device id. Just remember endianess.
19
20 By the same way a UUID is created when you format a new NTFS partition. It is also just random data written to the disk. It can easily edited with hexedit. At least my win7 booted normally when i moved it from a disk to another and fixed the UUID's of the new drive. Windows didn't notice anything. After i switched the motherboard of the machine then windows required a new activation.
21
22 Actually if you copy the windows partition with dd the uuid of the NTFS partition will not change. If you also copy the beginning of the old disk to a new one it will copy the device id to the new disk. Instead if you make a new partition table the device id will change.
23
24 There is nothing magical with partitioning and moving data on disk or to another disk. You can completely wipe mbr and partition table and then write a new partition table with partitions pointing to the beginning of your data and all your data will be intact.
25
26 Just experiment with hexedit. I can give you correct addresses when i'm back at home tomorrow. Or just google your self, if you are unable to find it with hexedit.
27
28 --
29 Matti