[gentoo-user] Re: [OT] LENOVO Z510 + Dual Boot + Gentoo == True ?

2014-03-25 Thread »Q«
On Sat, 15 Mar 2014 20:56:26 +
Mick michaelkintz...@gmail.com wrote:

 On Saturday 15 Mar 2014 17:17:19 »Q« wrote:
  On Mon, 10 Mar 2014 13:33:20 +
  
  Mick michaelkintz...@gmail.com wrote:  
   On Saturday 08 Mar 2014 20:22:12 »Q« wrote:  
On Sat, 08 Mar 2014 08:23:21 +0100

grub booted Gentoo just fine, but Windows booting failed,
something about not finding partitions or files.  Instead of
troubleshooting that, I disabled os probing for grub
(GRUB_DISABLE_OS_PROBER=true in /etc/default/grub) and added
Windows via /etc/grub.d/40_custom ,  
 
like so:  
   If you moved the MSWindows OS or boot partitions then the UUIDs
   would have changed.  
  
  I moved the OS partition, and it's UUID did indeed change.

   You'll need to edit the MSWindows boot menu (in the MSWindows boot
   partition) and change their entrie(s) accordingly.  
  
  If somebody can post a link to a recipe for doing that, I'd
  appreciate it.  I don't understand the Windows boot stuff.  
 
 Like most things MSWindows related you will need patience which in my
 case runs short  - at some subconscious level I consider spending
 time on MSWindows a resentful waste of my life ... but YMMV.

I've snipped it, but thanks very much for all the good info in your
post.  Before your post, I'd gotten bogged down in bcdedit.exe
documentation, and that resentful attitude had overwhelmed me.  You
post makes a lot of it clearer to me than Microsoft's documentation did.
I'll file it away for a rainy day when I tolerate wasting some of my
life on it.





[gentoo-user] Re: [OT] LENOVO Z510 + Dual Boot + Gentoo == True ?

2014-03-25 Thread »Q«
On Sun, 16 Mar 2014 11:07:49 +0200
Matti Nykyri matti.nyk...@iki.fi wrote:

 On Mar 15, 2014, at 19:17, »Q« boxc...@gmx.net wrote:
 
  On Mon, 10 Mar 2014 13:33:20 +
  Mick michaelkintz...@gmail.com wrote:
  
  On Saturday 08 Mar 2014 20:22:12 »Q« wrote:
  On Sat, 08 Mar 2014 08:23:21 +0100
  
  grub booted Gentoo just fine, but Windows booting failed,
  something about not finding partitions or files.  Instead of
  troubleshooting that, I disabled os probing for grub
  (GRUB_DISABLE_OS_PROBER=true in /etc/default/grub) and added
  Windows via /etc/grub.d/40_custom , like so:
  
  If you moved the MSWindows OS or boot partitions then the UUIDs
  would have changed.
  
  I moved the OS partition, and it's UUID did indeed change.
  
 
 I have swaped the hard drive from my dual boot box and ran into the
 same problem trying get windows 7 to boot. As you also quite fast
 realice by reading different forums that changing windows boot
 parameters is a quite big hassle. I would not go that way! You have
 another simpler solution.
 
 Change the hard disk device ID to the same value as the old disk. It
 is written on MBR. Change the UUID of the windows partition to the
 same as on the old partition. UUID on NTFS partition is written at
 the beginning of the partition at 0x48-4F. 
 
 So by changing 2x16 bytes of data your machine should boot again
 correctly. Also if you grub is not on the same physical disk as
 windows then you need trick windows by changing the order with grub
 before booting (see map command)

Thanks.  That is a lot simpler, but I'm too scared I'd screw it up. 






Re: [gentoo-user] Re: [OT] LENOVO Z510 + Dual Boot + Gentoo == True ?

2014-03-16 Thread Matti Nykyri
On Mar 15, 2014, at 19:17, »Q« boxc...@gmx.net wrote:

 On Mon, 10 Mar 2014 13:33:20 +
 Mick michaelkintz...@gmail.com wrote:
 
 On Saturday 08 Mar 2014 20:22:12 »Q« wrote:
 On Sat, 08 Mar 2014 08:23:21 +0100
 
 grub booted Gentoo just fine, but Windows booting failed, something
 about not finding partitions or files.  Instead of troubleshooting
 that, I disabled os probing for grub (GRUB_DISABLE_OS_PROBER=true
 in /etc/default/grub) and added Windows via /etc/grub.d/40_custom ,
 like so:
 
 If you moved the MSWindows OS or boot partitions then the UUIDs would
 have changed.
 
 I moved the OS partition, and it's UUID did indeed change.
 

I have swaped the hard drive from my dual boot box and ran into the same 
problem trying get windows 7 to boot. As you also quite fast realice by reading 
different forums that changing windows boot parameters is a quite big hassle. I 
would not go that way! You have another simpler solution.

Change the hard disk device ID to the same value as the old disk. It is written 
on MBR. Change the UUID of the windows partition to the same as on the old 
partition. UUID on NTFS partition is written at the beginning of the partition 
at 0x48-4F. 

So by changing 2x16 bytes of data your machine should boot again correctly. 
Also if you grub is not on the same physical disk as windows then you need 
trick windows by changing the order with grub before booting (see map command)

 You'll need to edit the MSWindows boot menu (in the MSWindows boot
 partition) and change their entrie(s) accordingly.
 
 If somebody can post a link to a recipe for doing that, I'd appreciate
 it.  I don't understand the Windows boot stuff.
 
 




Re: [gentoo-user] Re: [OT] LENOVO Z510 + Dual Boot + Gentoo == True ?

2014-03-16 Thread Mick
On Sunday 16 Mar 2014 09:07:49 Matti Nykyri wrote:
 Change the hard disk device ID to the same value as the old disk. It is
 written on MBR. Change the UUID of the windows partition to the same as on
 the old partition. UUID on NTFS partition is written at the beginning of
 the partition at 0x48-4F. 

Can you give more detail please?  How would you change disk and partition 
UUIDs? 

-- 
Regards,
Mick


signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] Re: [OT] LENOVO Z510 + Dual Boot + Gentoo == True ?

2014-03-16 Thread Matti Nykyri
On Mar 16, 2014, at 12:38, Mick michaelkintz...@gmail.com wrote:

 On Sunday 16 Mar 2014 09:07:49 Matti Nykyri wrote:
 Change the hard disk device ID to the same value as the old disk. It is
 written on MBR. Change the UUID of the windows partition to the same as on
 the old partition. UUID on NTFS partition is written at the beginning of
 the partition at 0x48-4F. 
 
 Can you give more detail please?  How would you change disk and partition 
 UUIDs? 
 
 -- 
 Regards,
 Mick

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.

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.

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.

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.

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.

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.

-- 
Matti


[gentoo-user] Re: [OT] LENOVO Z510 + Dual Boot + Gentoo == True ?

2014-03-15 Thread »Q«
On Mon, 10 Mar 2014 13:33:20 +
Mick michaelkintz...@gmail.com wrote:

 On Saturday 08 Mar 2014 20:22:12 »Q« wrote:
  On Sat, 08 Mar 2014 08:23:21 +0100
 
  grub booted Gentoo just fine, but Windows booting failed, something
  about not finding partitions or files.  Instead of troubleshooting
  that, I disabled os probing for grub (GRUB_DISABLE_OS_PROBER=true
  in /etc/default/grub) and added Windows via /etc/grub.d/40_custom ,
  like so:
 
 If you moved the MSWindows OS or boot partitions then the UUIDs would
 have changed.

I moved the OS partition, and it's UUID did indeed change.

 You'll need to edit the MSWindows boot menu (in the MSWindows boot
 partition) and change their entrie(s) accordingly.

If somebody can post a link to a recipe for doing that, I'd appreciate
it.  I don't understand the Windows boot stuff.




Re: [gentoo-user] Re: [OT] LENOVO Z510 + Dual Boot + Gentoo == True ?

2014-03-15 Thread Mick
On Saturday 15 Mar 2014 17:17:19 »Q« wrote:
 On Mon, 10 Mar 2014 13:33:20 +
 
 Mick michaelkintz...@gmail.com wrote:
  On Saturday 08 Mar 2014 20:22:12 »Q« wrote:
   On Sat, 08 Mar 2014 08:23:21 +0100
   
   grub booted Gentoo just fine, but Windows booting failed, something
   about not finding partitions or files.  Instead of troubleshooting
   that, I disabled os probing for grub (GRUB_DISABLE_OS_PROBER=true
   in /etc/default/grub) and added Windows via /etc/grub.d/40_custom ,
  
   like so:
  If you moved the MSWindows OS or boot partitions then the UUIDs would
  have changed.
 
 I moved the OS partition, and it's UUID did indeed change.
 
  You'll need to edit the MSWindows boot menu (in the MSWindows boot
  partition) and change their entrie(s) accordingly.
 
 If somebody can post a link to a recipe for doing that, I'd appreciate
 it.  I don't understand the Windows boot stuff.


Like most things MSWindows related you will need patience which in my case 
runs short  - at some subconscious level I consider spending time on MSWindows 
a resentful waste of my life ... but YMMV.

It used to be simple enough, until the Vista-disaster was launched.  In any 
post Vista OS you will find that the boot system files have changed somewhat.  
First of all from Windows 7 onward there is usually a separate boot partition.  
Second, you now have to use the bcdedit.exe command to edit the 'boot.ini' 
file.  Third, the plain text 'boot.ini' file is no longer called boot.ini 
and it is no longer a plain text file, but binary.  :-(

So, the new boot.ini is called BCD and if you search for it through your 
MSWindows partitions you will eventually find the partition with the boot 
files.  The BCD file is in the hidden (for MSWindows) Boot directory, in a 
separate from the OS boot partition:

ls -la /mnt/Win7/Boot/BCD
-rwxrwxrwx 1 root root 36864 Mar  9 08:57 /mnt/iso/Boot/BCD

(here I have mounted the MSWindows boot partition under /mnt/Win7/)


To view its contents, boot into MSWindows and run in a console:

 C:\Windows\system32bcdedit /v

(assuming that your OS partition is mapped to C:\ drive).

You will need to change the UUIDs for the MSWindows OS and for the boot 
partitions (called GUID in MSWindows) using the bcdedit command, one line at a 
time.  It is primitive compared to a Linux text editor and painful if you make 
a typo, but that's MSWindows for you.

The MSWindows boot partition will have the identifier {bootmgr}, while the 
OS would have {current}, or {default}.

To find out what GUIDs your moved MSWindows partitions (Volumes) have, you can 
use the diskpart command.  Startruncmddiskpartlist disk and diskpartlist 
volume.  If that doesn't show what you're after, use the GWMI command in 
MSWindows powershell:

GWMI -namespace root\cimv2 -class win32_volume | FL -property 
Label,DriveLetter,DeviceID,SystemVolume,Capacity,Freespace


For more info have a look here, from when I fought setting up a MSWindows dual 
boot system by chainloading grub:

 http://thread.gmane.org/gmane.linux.gentoo.user/226452/focus=227265


PS. For bcdedit options see these links:

  http://technet.microsoft.com/en-us/library/cc709667(v=ws.10).aspx

  http://diddy.boot-land.net/bcdedit/files/commands.htm#enum

HTH.
-- 
Regards,
Mick


signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] Re: [OT] LENOVO Z510 + Dual Boot + Gentoo == True ?

2014-03-10 Thread Mick
On Saturday 08 Mar 2014 20:22:12 »Q« wrote:
 On Sat, 08 Mar 2014 08:23:21 +0100
 
 Dan Johansson d...@dmj.nu wrote:
  I am considering buying a new Notebook and found that a LENOVO
  IdeaPad Z510 would fit into my budget and seems quite OK.
  Does anyone here on the list have any experience with the Z510 running
  dual-boot (Win8.x and Gentoo) that would like to share their
  experience?
 
 I have an Ideapad y510p that's dual-booting Win8.x and Gentoo.  It
 shipped with 8.0 and after I got it dual-booting I upgraded to 8.1.
 It's not quite the same model, but I guess it can't hurt to type what I
 remember.  I didn't take notes, because if I ran into any trouble it
 was my plan just to wipe the drive and install only Gentoo.  I just
 flew by the seat of my pants, so I'm sure this isn't the smartest way
 to do things.
 
 My model came with a smallish SSD meant for caching.  The SSD is sda and
 the HDD is sdb.
 
 Here's the current state of sdb, from gdisk:
 
 Number  Start (sector)End (sector)  Size   Code  Name
12048 2050047   1000.0 MiB  2700  Basic data
 partition 2 2050048 2582527   260.0 MiB   EF00  EFI system
 partition 3 2582528 4630527   1000.0 MiB    Basic data
 partition 4 4630528 4892671   128.0 MiB   0C01  Microsoft
 reserved part 5  1563490304  1870690303   146.5 GiB   0700  Basic
 data partition 6  1870690304  1923119103   25.0 GiB0700  Basic
 data partition 7  1923119104  1953523711   14.5 GiB2700  Basic
 data partition 8  1562466304  1563490303   500.0 MiB   0700
9 4892672 5199871   150.0 MiB   0700
   10 519987221583871   7.8 GiB 0700
   1121583872  1562466303   734.8 GiB   0700
 
 sdb1-sdb7 existed on the drive when I got it.  sdb5 is where Windows is
 installed.  To make room for Gentoo, I shrunk sdb5 it and slid it to the
 end of its space using the GUI partition tool on System Rescue CD,
 which I think is gparted.  I also used System Rescue CD to install
 Gentoo.  It's important to boot System Rescue CD in EFI mode, at least
 for installing the bootloader.
 
 sdb8 is meant for an installation of System Rescue CD, but I haven't
 gotten around to installing it.
 
 sdb9 is /boot, sdb10 is swap, and sdb 11 is Gentoo /
 
 I emerged grub in the chrooted environment.  I mounted sdb2
 at /boot/efi, installed grub on sdb9 (/boot), and ran grub-mkconfig to
 make a config file for grub. The output indicated that it had found
 both Gentoo and Windows.  The bios (or whatever it's called now)
 setup recognized grub as a new EFI-booting option and let me move it to
 first priority, and I got to the grub menu.
 
 grub booted Gentoo just fine, but Windows booting failed, something
 about not finding partitions or files.  Instead of troubleshooting that,
 I disabled os probing for grub (GRUB_DISABLE_OS_PROBER=true
 in /etc/default/grub) and added Windows via /etc/grub.d/40_custom ,
 like so:
 
 menuentry Windows 8.x {
 set root='(hd1,gpt2)'
 chainloader /EFI/microsoft/BOOT/bootmgfw.efi
 }
 
 Running grub-mkconfig after that got me a grub.cfg which works to boot
 Gentoo and Windows, though I don't get any fancy options for Windows,
 such as safe mode.

If you moved the MSWindows OS or boot partitions then the UUIDs would have 
changed.  You'll need to edit the MSWindows boot menu (in the MSWindows boot 
partition) and change their entrie(s) accordingly.

-- 
Regards,
Mick


signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] Re: [OT] LENOVO Z510 + Dual Boot + Gentoo == True ?

2014-03-10 Thread Matti Nykyri
On Mar 10, 2014, at 15:33, Mick michaelkintz...@gmail.com wrote:

 On Saturday 08 Mar 2014 20:22:12 »Q« wrote:
 On Sat, 08 Mar 2014 08:23:21 +0100
 
 Dan Johansson d...@dmj.nu wrote:
 I am considering buying a new Notebook and found that a LENOVO
 IdeaPad Z510 would fit into my budget and seems quite OK.
 Does anyone here on the list have any experience with the Z510 running
 dual-boot (Win8.x and Gentoo) that would like to share their
 experience?
 
 I have an Ideapad y510p that's dual-booting Win8.x and Gentoo.  It
 shipped with 8.0 and after I got it dual-booting I upgraded to 8.1.
 It's not quite the same model, but I guess it can't hurt to type what I
 remember.  I didn't take notes, because if I ran into any trouble it
 was my plan just to wipe the drive and install only Gentoo.  I just
 flew by the seat of my pants, so I'm sure this isn't the smartest way
 to do things.
 
 My model came with a smallish SSD meant for caching.  The SSD is sda and
 the HDD is sdb.
 
 Here's the current state of sdb, from gdisk:
 
 Number  Start (sector)End (sector)  Size   Code  Name
   12048 2050047   1000.0 MiB  2700  Basic data
 partition 2 2050048 2582527   260.0 MiB   EF00  EFI system
 partition 3 2582528 4630527   1000.0 MiB    Basic data
 partition 4 4630528 4892671   128.0 MiB   0C01  Microsoft
 reserved part 5  1563490304  1870690303   146.5 GiB   0700  Basic
 data partition 6  1870690304  1923119103   25.0 GiB0700  Basic
 data partition 7  1923119104  1953523711   14.5 GiB2700  Basic
 data partition 8  1562466304  1563490303   500.0 MiB   0700
   9 4892672 5199871   150.0 MiB   0700
  10 519987221583871   7.8 GiB 0700
  1121583872  1562466303   734.8 GiB   0700
 
 sdb1-sdb7 existed on the drive when I got it.  sdb5 is where Windows is
 installed.  To make room for Gentoo, I shrunk sdb5 it and slid it to the
 end of its space using the GUI partition tool on System Rescue CD,
 which I think is gparted.  I also used System Rescue CD to install
 Gentoo.  It's important to boot System Rescue CD in EFI mode, at least
 for installing the bootloader.
 
 sdb8 is meant for an installation of System Rescue CD, but I haven't
 gotten around to installing it.
 
 sdb9 is /boot, sdb10 is swap, and sdb 11 is Gentoo /
 
 I emerged grub in the chrooted environment.  I mounted sdb2
 at /boot/efi, installed grub on sdb9 (/boot), and ran grub-mkconfig to
 make a config file for grub. The output indicated that it had found
 both Gentoo and Windows.  The bios (or whatever it's called now)
 setup recognized grub as a new EFI-booting option and let me move it to
 first priority, and I got to the grub menu.
 
 grub booted Gentoo just fine, but Windows booting failed, something
 about not finding partitions or files.  Instead of troubleshooting that,
 I disabled os probing for grub (GRUB_DISABLE_OS_PROBER=true
 in /etc/default/grub) and added Windows via /etc/grub.d/40_custom ,
 like so:
 
 menuentry Windows 8.x {
set root='(hd1,gpt2)'
chainloader /EFI/microsoft/BOOT/bootmgfw.efi
 }
 
 Running grub-mkconfig after that got me a grub.cfg which works to boot
 Gentoo and Windows, though I don't get any fancy options for Windows,
 such as safe mode.
 
 If you moved the MSWindows OS or boot partitions then the UUIDs would have 
 changed.  You'll need to edit the MSWindows boot menu (in the MSWindows boot 
 partition) and change their entrie(s) accordingly.
 

Not necessarily. You can make uuid identical. It is just data on disk. Even if 
you change the order of partitions windows can be tricked with grub by changing 
the bios order of drives through mapping. After that windows boots without 
modification. I've tested this up to win7. Grub and dd are only tools you need.

--
Matti


 -- 
 Regards,
 Mick



[gentoo-user] Re: [OT] LENOVO Z510 + Dual Boot + Gentoo == True ?

2014-03-08 Thread »Q«
On Sat, 08 Mar 2014 08:23:21 +0100
Dan Johansson d...@dmj.nu wrote:

 I am considering buying a new Notebook and found that a LENOVO
 IdeaPad Z510 would fit into my budget and seems quite OK.
 Does anyone here on the list have any experience with the Z510 running
 dual-boot (Win8.x and Gentoo) that would like to share their
 experience?

I have an Ideapad y510p that's dual-booting Win8.x and Gentoo.  It
shipped with 8.0 and after I got it dual-booting I upgraded to 8.1.
It's not quite the same model, but I guess it can't hurt to type what I
remember.  I didn't take notes, because if I ran into any trouble it
was my plan just to wipe the drive and install only Gentoo.  I just
flew by the seat of my pants, so I'm sure this isn't the smartest way
to do things.

My model came with a smallish SSD meant for caching.  The SSD is sda and
the HDD is sdb.

Here's the current state of sdb, from gdisk:

Number  Start (sector)End (sector)  Size   Code  Name
   12048 2050047   1000.0 MiB  2700  Basic data partition
   2 2050048 2582527   260.0 MiB   EF00  EFI system partition
   3 2582528 4630527   1000.0 MiB    Basic data partition
   4 4630528 4892671   128.0 MiB   0C01  Microsoft reserved part
   5  1563490304  1870690303   146.5 GiB   0700  Basic data partition
   6  1870690304  1923119103   25.0 GiB0700  Basic data partition
   7  1923119104  1953523711   14.5 GiB2700  Basic data partition
   8  1562466304  1563490303   500.0 MiB   0700  
   9 4892672 5199871   150.0 MiB   0700  
  10 519987221583871   7.8 GiB 0700  
  1121583872  1562466303   734.8 GiB   0700 

sdb1-sdb7 existed on the drive when I got it.  sdb5 is where Windows is
installed.  To make room for Gentoo, I shrunk sdb5 it and slid it to the
end of its space using the GUI partition tool on System Rescue CD,
which I think is gparted.  I also used System Rescue CD to install
Gentoo.  It's important to boot System Rescue CD in EFI mode, at least
for installing the bootloader.

sdb8 is meant for an installation of System Rescue CD, but I haven't
gotten around to installing it.

sdb9 is /boot, sdb10 is swap, and sdb 11 is Gentoo /

I emerged grub in the chrooted environment.  I mounted sdb2
at /boot/efi, installed grub on sdb9 (/boot), and ran grub-mkconfig to
make a config file for grub. The output indicated that it had found
both Gentoo and Windows.  The bios (or whatever it's called now)
setup recognized grub as a new EFI-booting option and let me move it to
first priority, and I got to the grub menu.

grub booted Gentoo just fine, but Windows booting failed, something
about not finding partitions or files.  Instead of troubleshooting that,
I disabled os probing for grub (GRUB_DISABLE_OS_PROBER=true
in /etc/default/grub) and added Windows via /etc/grub.d/40_custom ,
like so:

menuentry Windows 8.x {
set root='(hd1,gpt2)'
chainloader /EFI/microsoft/BOOT/bootmgfw.efi
}

Running grub-mkconfig after that got me a grub.cfg which works to boot
Gentoo and Windows, though I don't get any fancy options for Windows,
such as safe mode.