You are not logged in.

#1 2012-04-20 22:35:45

specialist125
Member
Registered: 2010-06-16
Posts: 10

Dual boot Window 7 + Arch with lvm problems

Machine (laptop) : Asus Ul80vt: 4GB ram, Hybrid Graphic Card( Intel & Nvidia), 1Tb hard drive

I current upgraded the hard drive on my laptop from 320Gb to 1TB. I have clone over my Window 7 partitions with Clonezilla and will like to add Arch to my laptop hard dirve. I was previously running Archlinux from a portable hard drive. I like to lighten up the load some what by not having to carry that with me.

Current partition layout
Recovery      Primary                   14.65GB
Windows 7   Primary                   107.53GB
Data            Extended/Logical      308.34GB

*I have space for 2 more primary partitions

I want to dual boot Windows 7 and Archliux with LVM and Grub2. I have read the wiki pages, this forum https://bbs.archlinux.org/viewtopic.php?id=133170 and watched this video http://www.youtube.com/watch?v=69X9ZYA41xU as a guide. I'm a bit new to the whole LVM thing so hopefully someone can guide me here. The LVM layout I'm thinking is:

1 Primary Volume containing 500GB
/boot    100Mb
/swap    8GB "might be a little excessive"
/root      50GB
/home    Remaining  " Can always be re-sized later"


1. the forum and Video talks about allocating  34MB of the first sector....What would i need to do for this is it necessary since window is already there? I could try to move it over with Gparted from a live disc if need be.
2. What problem might I run into with this LVM Setup?
3. Should I also include a /var? and If I should what would be and adequate size?
4. Would it be better to have dual boot loader (Think its called chaining) where windows bootloader would run first and if I choose to boot into linux it would hand it off to Grub2 which would handle booting into Arch?
5. I read about the snapshot capability for LVM and would like to take advantage of that would this setup allow me to do this?

*Sorry that there are so many questions here but if you have any other recommendations please advise

Last edited by specialist125 (2012-04-20 22:37:58)

Offline

#2 2012-04-21 08:53:36

Gcool
Member
Registered: 2011-08-16
Posts: 1,456

Re: Dual boot Window 7 + Arch with lvm problems

1) It does not necessarily have to be in the first sectors of the disk. See here for a little bit of extra info.
2) Your boot partition looks fine to me. Swap is probably a bit too extensive (depending on how much RAM you have and if you want to do stuff like suspend to disk etc). Other than that, I would simply use LVM for both the root and home partition (for easy resizing should this ever be needed).
3) Unless you have a situation where you're going to be dealing with large amounts of logs written to /var/log; having a separate /var partition shouln't be necessary.
4) I don't really see the advantage in doing that. Simply sticking with GRUB2 and adding your Windows install to the bootloader config is probably the cleanest way to go.
5) Don't really have any experience with that myself. Will leave this one up for someone else to answer.


Burninate!

Offline

#3 2012-04-21 22:26:41

specialist125
Member
Registered: 2010-06-16
Posts: 10

Re: Dual boot Window 7 + Arch with lvm problems

Ok, that's good news not having to put that BIOS-GPT at the beginning of the partition table but it looks like the wiki recommends it be at the beginning ( I might go back and move the Windows 7 partition over a bit to add room for that file). I went back and read over the wiki for Grub2 and GPT again (Totally missed that location thing the first time) I want to make sure I'm clear on what is going on, because parts of these wiki's have me confused. Now my current setup has a MBR already so if I understand things correctly I can convert my MBR to GPT  (Not sure if windows 7 will cry about this or not but I don't think it will). After this conversion is done it will make all my primary and logical partition GPT partitions removing all the gaps between each partition.This is when I should add that BIOS-GPT partition for the configuration files(which will be at the end of that Extended partition unless i move Windows 7 to allow for the partition at the beginning of the table). Following the BIOS-GPT partition will be my new Primary Volume (PV) which will contain my Arch logical volumes where  Arch is going to be installed. AT the end grub2 will get installed to GPT (The newly converted MBR example /dev/sda not /boot inside the logical volume) Am I understanding this correctly?


Arch Grub2 Wiki wrote:

BIOS systems
GPT specific instructions

GRUB2 in BIOS-GPT configuration requires a BIOS Boot Partition to embed its core.img in the absence of post-MBR gap in GPT partitioned systems (which is taken over by the GPT Primary Header and Primary Partition table). This partition is used by GRUB2 only in BIOS-GPT setups. No such partition type exists in case of MBR partitioning (at least not for GRUB2). This partition is also not required if the system is UEFI based, as no embedding of bootsectors takes place in that case. Syslinux does not require this partition.

For a BIOS-GPT configuration, create a 2 MiB partition using cgdisk or GNU Parted with no filesystem. The location of the partition in the partition table does not matter but it should be within the first 2 TiB region of the disk. It is advisable to put it somewhere in the beginning of the disk before the /boot partition. Set the partition type to "EF02" in cgdisk or set <BOOT_PART_NUM> bios_grub on in GNU Parted.

.

Arch GPT Wiki wrote:

Convert from MBR to GPT

One of the best features of gdisk is its ability to convert MBR and BSD disklabels to GPT without data loss. Upon conversion, all the MBR primary partitions and the logical partitions become GPT partitions with the correct partition type GUIDs and Unique partition GUIDs created for each partition.

Just open the MBR disk using gdisk: Watch out for any error and fix them before writing any change to disk because you may risk losing data Doc for gdisk ! Exit with "w" option to write the changes back to the disk (similar to fdisk) to convert the MBR disk to GPT. After conversion, the bootloaders will need to be reinstalled to configure them to boot from GPT.

Offline

#4 2012-04-22 07:18:38

Gcool
Member
Registered: 2011-08-16
Posts: 1,456

Re: Dual boot Window 7 + Arch with lvm problems

That's pretty much the way it's supposed to be indeed.


Burninate!

Offline

#5 2012-10-15 02:43:41

jarshvor
Member
Registered: 2012-07-26
Posts: 28

Re: Dual boot Window 7 + Arch with lvm problems

so specialist125, did u manage to get the install working?

i've tried this same setup on two different machines in the past month, and Im having some problems booting with GRUB2.
even though ive installed it like so:

# pacman -S grub-bios
# grub-install --target=i386-pc --recheck /dev/sda
# cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo

my partition setup is this:

root@archiso ~ # lsblk
NAME                          MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda                             8:0    0  55.9G  0 disk 
├─sda1                          8:1    0   100M  0 part 
├─sda2                          8:2    0    25G  0 part 
├─sda3                          8:3    0     4M  0 part 
└─sda4                          8:4    0  30.8G  0 part 
  ├─arch-boot (dm-3)          254:3    0   100M  0 lvm  
  ├─arch-swap (dm-4)          254:4    0     5G  0 lvm  
  ├─arch-root (dm-5)          254:5    0    15G  0 lvm  
  └─arch-home (dm-6)          254:6    0  10.7G  0 lvm  

As far as I understand GRUB2 needs to be written to the first few sectors of the disk, AND embed its image in the BIOS Boot Partition, i.e. sda3. Is this correct?

I am not sure I have managed to do this following the above commands and mentioned sources, including grub and lvm wikis + quite some googling. hmm
If anyone has any ideas please let me know. Thanks in advance.

Offline

#6 2012-10-15 03:15:03

jarshvor
Member
Registered: 2012-07-26
Posts: 28

Re: Dual boot Window 7 + Arch with lvm problems

ok... damm!... i think i figured out what it was.

didnt include the

--boot-directory=/boot

option when doing grub-install.
still, i dont understand, since the man page describes /boot as already being the default location no?

 --boot-directory=DIR
              install GRUB images under the directory DIR/grub instead of the /boot/grub directory

can someone enlighten me?

Anyways... finally happy to figure this one out... few..
can finally get some sleep now. ^^

Offline

#7 2012-10-15 22:04:01

jarshvor
Member
Registered: 2012-07-26
Posts: 28

Re: Dual boot Window 7 + Arch with lvm problems

Now my Windows partition isnt booting.  sad

could this be because of changing MBR to GPT?
Windows repair disk doesnt detect any partitions or installs, but strangely I can see the ntfs partitions if I launch up the windows explorer.

Offline

#8 2012-10-20 11:58:42

jarshvor
Member
Registered: 2012-07-26
Posts: 28

Re: Dual boot Window 7 + Arch with lvm problems

had to set up GPT/hybrid MBR in th end to get windows to boot on my non-efi bios/pc

the bios boot partition ef02 was still needed in order to boot arch in gpt

if anyone else coniders doing this i recommend getting rid of the win7 hidden recovery partition just to make things look a little less ugly.
cheers

-------------
Working Arch/Win7 dual-boot on 60GB SSD with GPT/hybrid-MBR and LVM for the arch volume. (bios-based PC)

Last edited by jarshvor (2012-10-20 12:01:03)

Offline

Board footer

Powered by FluxBB