Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have Mint 16 installed on an LVM system. I originally had 3 logical volumes: lvswap, lvrootone, and lvstorage, with Mint 16 installed on lvrootone. I was hoping to use this scheme to upgrade and try new distros by adding logical volumes, but hadn't done so until now, when I tried to install Mint17.

While running under Mint 16 I created another logical volume, lvroottwo. I ran the Mint17 installer, choosing 'something else' and asked that Mint17's root file system be installed on lvroottwo. The installation proceeded but ended with (something like): 'failed to install bootloader'. I was given the option of trying to have bootloader installed onto sda, which I chose, but that failed too.

I gave up, exited the installer and rebooted. It booted to the old Mint 16 as usual. I can mount lvroottwo and see the Mint17 installation there. What can I do to be able to boot to Mint17 or, preferably, to have a choice? What is the 'proper' way to use LVM in order to try new installations? As you can tell I haven't had any prior experience with the bootloader or anything concerning the boot process.

Thanks for any help.


Pavel (his answer and comments are below) asks for details on how I tried to get it working. I didn't try anything. I don't know anything about boot or boot tools and did not know what to try. My question is: what should I try?

Pavel also requested description of disk layout. Output from fdisk -l is below. (Please note that sdb is not being used. I added it to the volume group as a physical volume and tried to use it as a raid1 type mirror to one of the logical volumes on sda. But then the system would not boot. So using a live CD I removed the mirror and system booted again. I think that for this current question my experience with sdb could be ignored, but I need to learn about the boot process so I mention it here.)

output from fdisk -l:

Disk /dev/sda: 500.1 GB, 500107862016 bytes 255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk identifier: 0x000d8478

Device Boot Start End Blocks Id System /dev/sda1 * 2048 976773119 488385536 83 Linux

Disk /dev/sdb: 500.1 GB, 500107862016 bytes 255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk identifier: 0x00000000

Disk /dev/mapper/vgpender-lvswap: 8589 MB, 8589934592 bytes 255 heads, 63 sectors/track, 1044 cylinders, total 16777216 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk identifier: 0x00000000

Disk /dev/mapper/vgpender-lvrootone: 26.8 GB, 26843545600 bytes 255 heads, 63 sectors/track, 3263 cylinders, total 52428800 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk identifier: 0x00000000

Disk /dev/mapper/vgpender-lvstorage: 375.8 GB, 375809638400 bytes 255 heads, 63 sectors/track, 45689 cylinders, total 734003200 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk identifier: 0x00000000

Disk /dev/mapper/vgpender-lvroottwo: 26.8 GB, 26843545600 bytes 255 heads, 63 sectors/track, 3263 cylinders, total 52428800 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk identifier: 0x00000000

share|improve this question

1 Answer 1

You should always have a simple partitioning scheme that leaves space for the boot loader, good old DOS MBR works the best for this purpose plus guards the disk from being treated as unformatted when attached to windows machine. Even the fancy new GPT format uses MBR as the basis.

The GRUB2 bootloader is capable of booting from stuff like RAID and LVM and combination of those. But it needs a place to install itself, which typically consists of a code block in MBR and more code in the gap between MBR and the first partition. Current versions of fdisk and similar tools already create a large enough gap (the first partition typically starts on a megabyte boundary).

If you're using just one disk, you can format it using the DOS disklable (o command in fdisk) and create one partition spanning the disk space (n command in fdisk, p for primary, confirm the default start and end). Then format the partition as LVM physical volume, and the rest you know already.

When multiple disks are used, the partition is typically formatted for RAID instead of LVM, a raid array is assembled and formatted as LVM physical volume and the rest is the same again.

share|improve this answer
    
Thank you Pavel. I guess you're suggesting what I could have done, or what I should do now if I were to start from scratch and reinstall on a clean disk. But is there anything I can do now, with what I've got, to be able to boot into the new system on lvroottwo? Thanks. –  lkjre Jul 1 at 20:33
    
If you can't install GRUB to the hard disk because of its format, you would have to use a different boot media like another small disk, usb drive or whatever booting method your firmware supports. –  Pavel Šimerda Jul 3 at 10:25
    
Do I understand correctly that you are capable of booting the original system but not the new system? If that is the case, my answer is incomplete and you might want to tell me how to boot it. –  Pavel Šimerda Jul 3 at 10:27
    
A careful description of your disk layout would be handy, too. –  Pavel Šimerda Jul 3 at 10:28
    
Pavel:Yes, I can boot into the original system, but not the new system. And when I boot into the original system I can then mount the logical volume on which the new system was installed, and can confirm that it was indeed installed. I will try to provide tomorrow a detailed description of disk layout. Thanks. –  lkjre Jul 4 at 23:44

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.