Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   ArchLinux General Discussion (http://www.linux-archive.org/archlinux-general-discussion/)
-   -   Wanted: advice dual-booting Arch and Windows 7 on new laptop (http://www.linux-archive.org/archlinux-general-discussion/705176-wanted-advice-dual-booting-arch-windows-7-new-laptop.html)

Martín Cigorraga 09-18-2012 05:39 PM

Wanted: advice dual-booting Arch and Windows 7 on new laptop
 
On Tue, Sep 18, 2012 at 6:14 AM, Robbie Smith <zoqaeski@gmail.com> wrote:

> Hi everyone
>
> TL;DR: I've just bought a new HP Pavilion g6-2103ax, and I'm having
> difficulties trying to figure out how I can dual-boot it with Windows 7
> (which was preinstalled).
>
> Windows *still* defaults to using MBR partitions, and even though the
> system is UEFI, HP have used some trickery somewhere to make it boot from
> BIOS. To make matters worse, the disk table already has four partitions:
>
> SYSTEM: 199 MB NTFS
> Windows C drive: ~ 450 GB NTFS
> HP Recovery partition: 18.5 GB NTFS
> HP_TOOLS: 99 MB FAT32
>
> The SYSTEM partition seems to contain the Windows bootloader, or something
> along those lines. The HP Recovery partition contains the software
> necessary to do a factory reset, and HP_TOOLS contains some UEFI
> applications (some system diagnostic things). C drive is Windows.
>
> What I was thinking of doing was shrinking C drive, and deleting the
> recovery partition to make space for Arch. But on my first attempt, parted
> bricked the table, and whilst I was able to recover it, Windows refused to
> boot. I obtained recovery disks to restore it, but they are completely
> non-interactive so cannot be used to rescue Windows, only reset to factory
> initial state.
>
> Due to the arrangement of the partitions, I don't think creating an
> Extended partition will work (they need to be the last one in the table,
> don't they?), and while I've read GRUB2 can use /boot in LVM, I'm not sure
> whether this will work. Also, I've never used GRUB2 before, and its configs
> look formidable compared to Syslinux. Ideally I'd switch to GPT, but
> Windows needs to be booted in UEFI mode for this, but I have no idea how to
> enable this as there's neither a switch in the BIOS settings, nor settings
> in Windows.
>
> Can anyone advise me on how I could overcome these issues? Has anyone had
> any experience with new HP g6 models?
>



On Tue, Sep 18, 2012 at 6:14 AM, Robbie Smith <zoqaeski@gmail.com> wrote:

> Hi everyone
>
> TL;DR: I've just bought a new HP Pavilion g6-2103ax, and I'm having
> difficulties trying to figure out how I can dual-boot it with Windows 7
> (which was preinstalled).
>
> Windows *still* defaults to using MBR partitions, and even though the
> system is UEFI, HP have used some trickery somewhere to make it boot from
> BIOS. To make matters worse, the disk table already has four partitions:
>
> SYSTEM: 199 MB NTFS
> Windows C drive: ~ 450 GB NTFS
> HP Recovery partition: 18.5 GB NTFS
> HP_TOOLS: 99 MB FAT32
>
> The SYSTEM partition seems to contain the Windows bootloader, or something
> along those lines. The HP Recovery partition contains the software
> necessary to do a factory reset, and HP_TOOLS contains some UEFI
> applications (some system diagnostic things). C drive is Windows.
>
> What I was thinking of doing was shrinking C drive, and deleting the
> recovery partition to make space for Arch. But on my first attempt, parted
> bricked the table, and whilst I was able to recover it, Windows refused to
> boot. I obtained recovery disks to restore it, but they are completely
> non-interactive so cannot be used to rescue Windows, only reset to factory
> initial state.
>
> Due to the arrangement of the partitions, I don't think creating an
> Extended partition will work (they need to be the last one in the table,
> don't they?), and while I've read GRUB2 can use /boot in LVM, I'm not sure
> whether this will work. Also, I've never used GRUB2 before, and its configs
> look formidable compared to Syslinux. Ideally I'd switch to GPT, but
> Windows needs to be booted in UEFI mode for this, but I have no idea how to
> enable this as there's neither a switch in the BIOS settings, nor settings
> in Windows.
>
> Can anyone advise me on how I could overcome these issues? Has anyone had
> any experience with new HP g6 models?
>


Hi Robbie

I will try to give you some advice based on my own experience with my HP
laptop (Pavilion dv7-4287cl) I bought roughly one year and half ago.
Short answer: nuke Windows, GPT your disk -be aware that it's likely to be
a 4kb/sector hd so take that in mind when partitioning-, install Arch, what
else? Oh yeah: never again buy any HP related product.

But I want to keep Windoze! answer: the four partitions layout is a shitty
move from HP/Microsoft, they enforce you to use only Windows because as you
already discovered the "rescue DVD" (rescue, yeah, they're shameless)
restores exactly that layout: it wipes your disk and recreate the same
structure; worst: if you read the HP warranty they say that it will be void
if you modify in any way the original layout of your hard drive, so in the
case -we hope not of course- you need to send your computer to their tech
support staff be sure to restore your HD to factory defaults before send it
or you'll be out of luck - yeah, they sucks.

So if you can't resize the actual Windows C: partition to make space for
Arch then you're out of luck but if you can then remember to backup your
MBR and partition table just in case:
https://wiki.archlinux.org/index.php/GRUB2#MBR_aka_msdos_partitioning_specific_instruct ions,
I think your best bet here will be GRUB Legacy (Syslinux may do the job too
but since I never really used it besides some playing I don't know if it
will work or not, check the wiki).

Another thing you may try -if you *really* need a physical install of W7-
is downloading a W7 that matchs your installed W7 version and try to use
your license key on it - I'm pretty sure it will likely don't work since
the good people at Micro$oft makes sure the licenses you already paid from
one source don't work on any other side (good people!) but who knows...

One last thing: if you choose to go with the Arch Linux only install you
are legally backed to ask for a full money refund for what you paid for the
Windows license -at least in my country-, do check at the store where you
bought your machine for the refund.

Rashif Ray Rahman 09-18-2012 06:27 PM

Wanted: advice dual-booting Arch and Windows 7 on new laptop
 
On 18 September 2012 17:14, Robbie Smith <zoqaeski@gmail.com> wrote:
> Can anyone advise me on how I could overcome these issues? Has anyone had
> any experience with new HP g6 models?

My current laptop is not my own, and when I got it, I didn't want to
mess with the partitioning. So I made some space using gparted running
from a LiveCD (you get more space that way, but defragment first),
installed Arch there, used GRUB (legacy, but any would do) on the
partition, and booted using Windows bootloader :) [1]

[1] http://blog.famzah.net/2011/11/12/boot-linux-using-windows-7-boot-loader/


--
GPG/PGP ID: C0711BF1

Guus Snijders 09-18-2012 09:02 PM

Wanted: advice dual-booting Arch and Windows 7 on new laptop
 
2012/9/18 Robbie Smith <zoqaeski@gmail.com>:
> Hi everyone
>
> TL;DR: I've just bought a new HP Pavilion g6-2103ax, and I'm having
> difficulties trying to figure out how I can dual-boot it with Windows 7
> (which was preinstalled).
>
> Windows *still* defaults to using MBR partitions, and even though the system
> is UEFI, HP have used some trickery somewhere to make it boot from BIOS. To
> make matters worse, the disk table already has four partitions:
>
> SYSTEM: 199 MB NTFS
> Windows C drive: ~ 450 GB NTFS
> HP Recovery partition: 18.5 GB NTFS
> HP_TOOLS: 99 MB FAT32
[...]

Hmm, i'd guess that the recovery partition is bootable, so it's best
not to modify it too much. The HP_Tools partition is probably just a
data partition (and not a very interesting one, but ymmv).
First of; do you have (or can you create) a recovery disk in case all
goes wrong?

There might be a way to repartition the drive without losing features:

1. Resize the Windows "C" partition to free up space. Either
defragment first or use windows's diskpart utitility.
2. move (don't delete!) the recovery partition next to the resized
Windows partition.
Now the tricky part:
3. either create an image of the tools partition or write down the
*exact* sectors it's using and the partition type number.
4. create a new extended partition in the free space, size: all available.
5a. create a logical partition using the type and sectors written down
at step 3 OR
5b. create a logical partition of the same type and size as written
down at step 3 and restore the image to this part.
6. If you used step 5a, move this (new!) logical partition to the
beginning of the free space. This is important for Windows drive
letters (not sure).
7. Use the rest of the extended partition to create your Linux partitions.

I'm not sure where the bootloader fits in best in the scenario, but
that shouldn't be too hard.

When you boot up Windows after all this, you might want to delete the
driveletters it will probably create for the Linux partitions to avoid
accidentally formatting them ;).


Hope that helps.
Note: this is just theoretical. It might work or it might not work...


mvg,
Gus

David Benfell 09-18-2012 10:36 PM

Wanted: advice dual-booting Arch and Windows 7 on new laptop
 
On 09/18/2012 02:14 AM, Robbie Smith wrote:


Due to the arrangement of the partitions, I don't think creating an
Extended partition will work (they need to be the last one in the
table, don't they?)
There are no extended partitions in UEFI. They're all primary partitions
and you can have more than four.


As to the rest of your saga, I, too, have a bricked Windows installation
on my mother's machine. Fortunately, she is, for the most part, adapting
well to Linux.

Robbie Smith 09-19-2012 09:37 AM

Wanted: advice dual-booting Arch and Windows 7 on new laptop
 
On 19/09/12 07:02, Guus Snijders wrote:

2012/9/18 Robbie Smith <zoqaeski@gmail.com>:

Hi everyone

TL;DR: I've just bought a new HP Pavilion g6-2103ax, and I'm having
difficulties trying to figure out how I can dual-boot it with Windows 7
(which was preinstalled).

Windows *still* defaults to using MBR partitions, and even though the system
is UEFI, HP have used some trickery somewhere to make it boot from BIOS. To
make matters worse, the disk table already has four partitions:

SYSTEM: 199 MB NTFS
Windows C drive: ~ 450 GB NTFS
HP Recovery partition: 18.5 GB NTFS
HP_TOOLS: 99 MB FAT32

[...]

Hmm, i'd guess that the recovery partition is bootable, so it's best
not to modify it too much. The HP_Tools partition is probably just a
data partition (and not a very interesting one, but ymmv).
First of; do you have (or can you create) a recovery disk in case all
goes wrong?

There might be a way to repartition the drive without losing features:

1. Resize the Windows "C" partition to free up space. Either
defragment first or use windows's diskpart utitility.
2. move (don't delete!) the recovery partition next to the resized
Windows partition.
Now the tricky part:
3. either create an image of the tools partition or write down the
*exact* sectors it's using and the partition type number.
4. create a new extended partition in the free space, size: all available.
5a. create a logical partition using the type and sectors written down
at step 3 OR
5b. create a logical partition of the same type and size as written
down at step 3 and restore the image to this part.
6. If you used step 5a, move this (new!) logical partition to the
beginning of the free space. This is important for Windows drive
letters (not sure).
7. Use the rest of the extended partition to create your Linux partitions.

I'm not sure where the bootloader fits in best in the scenario, but
that shouldn't be too hard.

When you boot up Windows after all this, you might want to delete the
driveletters it will probably create for the Linux partitions to avoid
accidentally formatting them ;).


Hope that helps.
Note: this is just theoretical. It might work or it might not work...


mvg,
Gus



I can delete the recovery partition, as I've got the "recovery" (AKA
factory reset) disks from HP under warranty. The HP_TOOLS partition is
at the end of the disk, so in theory I can't add an extended partition
before it, as extended partitions are meant to be the last in the table.
Although on this Samsung netbook I've got an extended partition as the
third (marked with *) of four primaries, so it seems to work:


# parted
GNU Parted 3.1
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) p
Model: ATA Hitachi HTS54323 (scsi)
Disk /dev/sda: 320GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:

Number Start End Size Type File system Flags
1 1049kB 106MB 105MB primary ntfs
2 106MB 98.9GB 98.8GB primary ntfs
* 3 98.9GB 303GB 205GB extended
* 5 98.9GB 233GB 134GB logical ntfs
* 6 233GB 233GB 57.5MB logical ext2 boot
* 7 233GB 303GB 70.0GB logical lvm
4 303GB 320GB 16.6GB primary ntfs diag

Using that as a guide I could set up the new laptop in a similar way.

It's a shame HP and Microsoft made it so difficult, and after this
little episode I'm beginning to suspect that the real reason Microsoft
is pushing Secure Boot is because UEFI+GPT makes it much easier to
install multiple operating systems on a machine without conflicts, but
Secure Boot will require an authorised and signed key, and guess who
will control the key distribution…

Kevin Chadwick 09-19-2012 11:02 AM

Wanted: advice dual-booting Arch and Windows 7 on new laptop
 
> I can delete the recovery partition, as I've got the "recovery" (AKA
> factory reset) disks from HP under warranty.

Personally if you have a large enough separate drive and enough
patience. I would do a bit level copy which if successful is guaranteed
to put the disk back exactly.

#/bin/dd bs=32k if=/dev/sd? | /usr/bin/gzip > /media/usb0/hpBACKUP.dd.gz

Restore with

#/bin/cat /media/usb0/hpBACKUP.dd.gz | /usr/bin/gunzip | /bin/dd bs=32k
of=/dev/sd?

--
__________________________________________________ _____________________

'Write programs that do one thing and do it well. Write programs to work
together. Write programs to handle text streams, because that is a
universal interface'

(Doug McIlroy)
__________________________________________________ _____________________

Guus Snijders 09-19-2012 05:00 PM

Wanted: advice dual-booting Arch and Windows 7 on new laptop
 
2012/9/19 Robbie Smith <zoqaeski@gmail.com>:
> On 19/09/12 07:02, Guus Snijders wrote:
>>
>> 2012/9/18 Robbie Smith <zoqaeski@gmail.com>:
>>>
>>> Hi everyone
>>>
>>> TL;DR: I've just bought a new HP Pavilion g6-2103ax, and I'm having
>>> difficulties trying to figure out how I can dual-boot it with Windows 7
>>> (which was preinstalled).
>>>
>>> Windows *still* defaults to using MBR partitions, and even though the
>>> system
>>> is UEFI, HP have used some trickery somewhere to make it boot from BIOS.
>>> To
>>> make matters worse, the disk table already has four partitions:
>>>
>>> SYSTEM: 199 MB NTFS
>>> Windows C drive: ~ 450 GB NTFS
>>> HP Recovery partition: 18.5 GB NTFS
>>> HP_TOOLS: 99 MB FAT32
>>
>> [...]
>>
>> Hmm, i'd guess that the recovery partition is bootable, so it's best
>> not to modify it too much. The HP_Tools partition is probably just a
>> data partition (and not a very interesting one, but ymmv).
>> First of; do you have (or can you create) a recovery disk in case all
>> goes wrong?
>>
[moving and deleting partitions]
>>
>> I'm not sure where the bootloader fits in best in the scenario, but
>> that shouldn't be too hard.
[...]
> I can delete the recovery partition, as I've got the "recovery" (AKA factory
> reset) disks from HP under warranty. The HP_TOOLS partition is at the end of
> the disk, so in theory I can't add an extended partition before it, as
> extended partitions are meant to be the last in the table. Although on this
> Samsung netbook I've got an extended partition as the third (marked with *)
> of four primaries, so it seems to work:
[...]
> Using that as a guide I could set up the new laptop in a similar way.

Indeed. In fact an extended partition is just a "special" primary partition.
In theory a single (MBR) harddisk could just as easily have 4 extended
partitions.

> It's a shame HP and Microsoft made it so difficult, and after this little
> episode I'm beginning to suspect that the real reason Microsoft is pushing
> Secure Boot is because UEFI+GPT makes it much easier to install multiple
> operating systems on a machine without conflicts, but Secure Boot will
> require an authorised and signed key, and guess who will control the key
> distribution…

I'm still not entirely sure what the real benefits of GPT are, but
that's another discussion.
That they made a it a bit more difficult; no argument there. I guess
they assume users never
touch the partition table anyway.

As for secure boot: Redhead/Fedora were working (or perhaps already
having) a secure
bootloader. It would't be too hard to install that and use it to boot
ArchLinux. ;)

mvg, Guus

Robbie Smith 09-24-2012 03:25 PM

Wanted: advice dual-booting Arch and Windows 7 on new laptop
 
On 19/09/12 03:39, Martín Cigorraga wrote:

On Tue, Sep 18, 2012 at 6:14 AM, Robbie Smith <zoqaeski@gmail.com> wrote:


Hi everyone

TL;DR: I've just bought a new HP Pavilion g6-2103ax, and I'm having
difficulties trying to figure out how I can dual-boot it with Windows 7
(which was preinstalled).

Windows *still* defaults to using MBR partitions, and even though the
system is UEFI, HP have used some trickery somewhere to make it boot from
BIOS. To make matters worse, the disk table already has four partitions:

SYSTEM: 199 MB NTFS
Windows C drive: ~ 450 GB NTFS
HP Recovery partition: 18.5 GB NTFS
HP_TOOLS: 99 MB FAT32

The SYSTEM partition seems to contain the Windows bootloader, or something
along those lines. The HP Recovery partition contains the software
necessary to do a factory reset, and HP_TOOLS contains some UEFI
applications (some system diagnostic things). C drive is Windows.

What I was thinking of doing was shrinking C drive, and deleting the
recovery partition to make space for Arch. But on my first attempt, parted
bricked the table, and whilst I was able to recover it, Windows refused to
boot. I obtained recovery disks to restore it, but they are completely
non-interactive so cannot be used to rescue Windows, only reset to factory
initial state.

Due to the arrangement of the partitions, I don't think creating an
Extended partition will work (they need to be the last one in the table,
don't they?), and while I've read GRUB2 can use /boot in LVM, I'm not sure
whether this will work. Also, I've never used GRUB2 before, and its configs
look formidable compared to Syslinux. Ideally I'd switch to GPT, but
Windows needs to be booted in UEFI mode for this, but I have no idea how to
enable this as there's neither a switch in the BIOS settings, nor settings
in Windows.

Can anyone advise me on how I could overcome these issues? Has anyone had
any experience with new HP g6 models?





On Tue, Sep 18, 2012 at 6:14 AM, Robbie Smith <zoqaeski@gmail.com> wrote:


Hi everyone

TL;DR: I've just bought a new HP Pavilion g6-2103ax, and I'm having
difficulties trying to figure out how I can dual-boot it with Windows 7
(which was preinstalled).

Windows *still* defaults to using MBR partitions, and even though the
system is UEFI, HP have used some trickery somewhere to make it boot from
BIOS. To make matters worse, the disk table already has four partitions:

SYSTEM: 199 MB NTFS
Windows C drive: ~ 450 GB NTFS
HP Recovery partition: 18.5 GB NTFS
HP_TOOLS: 99 MB FAT32

The SYSTEM partition seems to contain the Windows bootloader, or something
along those lines. The HP Recovery partition contains the software
necessary to do a factory reset, and HP_TOOLS contains some UEFI
applications (some system diagnostic things). C drive is Windows.

What I was thinking of doing was shrinking C drive, and deleting the
recovery partition to make space for Arch. But on my first attempt, parted
bricked the table, and whilst I was able to recover it, Windows refused to
boot. I obtained recovery disks to restore it, but they are completely
non-interactive so cannot be used to rescue Windows, only reset to factory
initial state.

Due to the arrangement of the partitions, I don't think creating an
Extended partition will work (they need to be the last one in the table,
don't they?), and while I've read GRUB2 can use /boot in LVM, I'm not sure
whether this will work. Also, I've never used GRUB2 before, and its configs
look formidable compared to Syslinux. Ideally I'd switch to GPT, but
Windows needs to be booted in UEFI mode for this, but I have no idea how to
enable this as there's neither a switch in the BIOS settings, nor settings
in Windows.

Can anyone advise me on how I could overcome these issues? Has anyone had
any experience with new HP g6 models?





Managed to get it all up and running, and added to the Laptops which run
Arch thread on the forums. Should I add a section on the wiki on the
steps I used? I haven't got an account there yet, but I guess it
wouldn't hurt to have one.

"David C. Rankin" 09-24-2012 08:36 PM

Wanted: advice dual-booting Arch and Windows 7 on new laptop
 
On 09/24/2012 10:25 AM, Robbie Smith wrote:

Managed to get it all up and running, and added to the Laptops which run Arch
thread on the forums. Should I add a section on the wiki on the steps I used?
I haven't got an account there yet, but I guess it wouldn't hurt to have one.


Yes, get an account and update the wiki. The wiki is one of the best among all
distros precisely because people take the time to add information like this to
it. The wiki is mediawiki, so syntax is simple with many good references to go
by. Arch uses some helpful macros (ie. {{Note|blah blah}} and {{Warning| blah
blah}} ) that really help emphasize the critical info. Good work on the HP
box. Nothing worse than hardware that is impossible to use the way you want to...


--
David C. Rankin, J.D.,P.E.

Georgios Nikolopoulos 09-25-2012 10:19 AM

Wanted: advice dual-booting Arch and Windows 7 on new laptop
 
>Personally if you have a large enough separate drive and enough
>patience. I would do a bit level copy which if successful is guaranteed
>to put the disk back exactly.
>
>#/bin/dd bs=32k if=/dev/sd? | /usr/bin/gzip > /media/usb0/hpBACKUP.dd.gz
>
>Restore with
>
>#/bin/cat /media/usb0/hpBACKUP.dd.gz | /usr/bin/gunzip | /bin/dd bs=32k
>of=/dev/sd?

You could also use ntfsclone which is part of the ntfsprogs package to get
an image of the windows partition just after resizing the partitions.

ntfsclone -s -o sda1.img /dev/sda1

Now provided that the partition table entry does not change position or
size you can restore it to its original state with
ntfsclone -r -O /dev/sda1 sda1.img

The main benefit of this method is that ntfsclone understands empty space
in the partition and the resulting image is only marginally larger than the
actual data stored in the partition.

For example an ntfs partition with size 100GB having 20GB of data and the
rest being empty space could be backed up to a 20GB image file.

George Nikolopoulos


All times are GMT. The time now is 05:16 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.