[Solved] Mint16 & LVM Grub Rescue no such device

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read how to get help
Post Reply
apaseall
Level 1
Level 1
Posts: 41
Joined: Mon Dec 02, 2013 10:50 pm

[Solved] Mint16 & LVM Grub Rescue no such device

Post by apaseall »

Hi,
After breaking cinnamon in mint14 I thought I would use gnome to back up files and software. Done.
Install mint16 with a view to going XEN.
SO I followed the tutorial here : [url]http://forums.linuxmint.com/viewtopic.php?f=42&t=108442[/url]

only on final reboot I am faced with the grub rescue prompt with
error: no such device: e66ef71e-907a-43a3-9a28-3988ef1dc150

I'll post the steps I followed as I have 4 drives not 1 like the tutorial.

Mint16 disk burnt from downloaded iso from mint.

Code: Select all

        sudo -i
        apt-get install lvm2
        fdisk -l
4.1 Run gparted from the Linux Mint "administration" menu.
4.1 Partition the disk (/dev/sdc) to MBR (default option).
4.2. Create /dev/sdc1 size 512MB formatted as ext2 and flagged as "boot".
4.3. Create /dev/sdc2 unformatted using the rest of the disk.

Code: Select all

        pvcreate /dev/sdc2

        vgcreate lm13 /dev/sdc2

        lvcreate -L 15G -n root lm13
        lvcreate -L 5G -n swap lm13
        lvcreate -L 29G -n home lm13

        ls /dev/mapper
        mkfs -t ext4 /dev/mapper/lm13-root
        mkfs -t ext4 /dev/mapper/lm13-home
        mkswap /dev/mapper/lm13-swap
6. Now run the Linux Mint 13 installer.
In the partitioner, select "something else" - DON'T use the preselected option!

Press "Change" to edit the /dev/mapper/lm13-home partition:
Do the same for the /dev/mapper/lm13-root partition and assign it to /.
And change the /dev/sdc1 as follows:
After you assigned all partitions you should get something like this:

Make sure that "Device for bootloader installation:" at the bottom reads "/dev/sda" !
Check that everything is OK and press "Install Now".

7. After the installer finishes, DON'T reboot !!!

Code: Select all

        mount /dev/mapper/lm13-root /mnt
        mount /dev/mapper/lm13-home /mnt/home
        mount /dev/sdc1 /mnt/boot

        cp /etc/resolv.conf /mnt/etc/
        mount --bind /dev /mnt/dev

        chroot /mnt
        mount -t sysfs none /sys
        mount -t proc none /proc
        mount -t devpts none /dev/pts

        apt-get update
        apt-get install lvm2
"apt-get install lvm2" should update grub and the initram file - look at the output messages.

since lvm is already present it does not update the initram file and because I do not know how to do that manually I

Code: Select all

apt-get purge lvm2
apt-get install lvm2
that does give me messages about it updating the initram file.

Code: Select all

        blkid

    The screen should look similar to that:
        /dev/loop0: TYPE="squashfs"
        /dev/sda1: UUID="bef3dfcf-eda3-4f36-bca5-3b3da8d11b84" TYPE="ext2"
        /dev/sda2: UUID="olwatC-fcdl-atIX-m4a7-suCY-uoXo-bjhfJd" TYPE="LVM2_member"
        /dev/sdc1: LABEL="USBDISK" UUID="D4B7-1DAB" TYPE="vfat"
        /dev/mapper/lm13-home: UUID="079228e8-a467-4cfc-9bb1-66586a5c7f39" TYPE="ext4"
        /dev/mapper/lm13-root: UUID="862e50e7-6683-4da9-b7ed-c4dc77b3ebad" TYPE="ext4"
        /dev/mapper/lm13-swap: UUID="045c015c-75a9-4561-b747-1db9f6a9d1b5" TYPE="swap"
        /dev/dm-5: UUID="045c015c-75a9-4561-b747-1db9f6a9d1b5" TYPE="swap"
I did look like that, I noticed nothing amiss.

Code: Select all

        umount /dev/pts
        umount /proc
        umount /sys

        exit

        umount /mnt/dev
        umount /mnt/home
        umount /mnt/boot
        umount /mnt

        sync 
12. Now comes the moment of truth - reboot the system.

This is where I am faced with the grub rescue.

Code: Select all

ls
list of hdds (hd0) (hd1) ... (hd3) (hd1,msdos2) ... (hd3,msdos2) (hd3,msdos1)

ls (hd3,msdos1)/
list of folders /grub ... [no /boot] list of vmlinuz-3.11.0-12-generic initrd.img-3.11.0-12-generic

set prefix=(hd3,msdos1)/grub

insmod normal
insmod lvm

ls
now the list includes (lvm/lm13-root) ... (lvm/lm13-swap)

set root=(lvm/lm13-root)

insmod linux

linux (hd3,msdos1)/vmlinuz-3.11.0-12-generic root=(lvm/lm13-root) rootdelay=90 ro
initrd (hd3,msdos1)/initrd.img-3.11.0-12-generic

boot
Now I am faced with a (initfrms) prompt.

Can someone spot when I am going wrong ?

I presume that if I can enter the right details into the grub rescue I will go straight to mint16 login, ie bypass the (initfrms) prompt part ?
There I guess I would

Code: Select all

sudo update-grub
Please help.

--edit--
read posts, to see why last post is the solution
Last edited by apaseall on Sun Dec 08, 2013 1:10 am, edited 1 time in total.
apaseall
Level 1
Level 1
Posts: 41
Joined: Mon Dec 02, 2013 10:50 pm

Re: Mint16 & LVM Grub Rescue no such device

Post by apaseall »

I have made progress :D

Code: Select all

set prefix=(hd3,msdos1)/grub
insmod normal
normal
Doing the above take me to the expected grub boot menu.
I can pick the mint16 option and boot as normal.

After loging in I have tried

Code: Select all

sudo update-grub
sudo reboot
-dumped at grub rescue again

Code: Select all

sudo apt-get update
sudo update-grub
-dumped at grub rescue again

Code: Select all

sudo apt-get purge grub-common
sudo apt-get install grub-pc
sudo reboot
-dumped at grub rescue again

Code: Select all

sudo update-grub
grub-probe -t device /boot/grub 
sudo grub-install /dev/sdc
sudo grub-install --recheck /dev/sdc
-dumped at grub rescue again

It seems that for some reason grub is not updating itself with the idea that prefix=(hd3,msdos1).
powerhouse
Level 6
Level 6
Posts: 1097
Joined: Thu May 03, 2012 3:54 am
Location: Israel
Contact:

Re: Mint16 & LVM Grub Rescue no such device

Post by powerhouse »

I'm not a grub expert but since you are using Linux Mint 16 you don't need to follow my how-to.

Starting with Linux Mint 15 the installer has a LVM option. So in LM 16 you simply run the installer, at the appropriate menu select "something else" (or whatever gives you a manual partitioning option), then proceed with partitioning /boot (ext2/3/4), the rest of the drive as LVM (there should be an option for LVM). Then you create the / and /home partitions as logical volumes (LV).

Pay attention to the drive you select! Also, pay attention to where you install the boot loader !!!

The installer should then partition the drive using LVM where indicated.

EDIT: Not sure what the reason is for not being able to boot, but I suggest you use the LVM installation option in the Linux Mint 16 installer. Good luck!
Gigabyte Aorus X570 Pro, AMD Ryzen 3900X CPU, 2x32GB Corsair DDR4, water cooler, GTX 970 + Quadro 2000 GPU, Asus Xonar Essence STX, Samsung 500GB + 1TB NVMe + Samsung Evo 1TB SSD + 4 HDD, Corsair 500R, SeaSonic 660W Gold X PS https://heiko-sieger.info
apaseall
Level 1
Level 1
Posts: 41
Joined: Mon Dec 02, 2013 10:50 pm

Re: Mint16 & LVM Grub Rescue no such device

Post by apaseall »

There does not appear to be an option to use lvm inside the install app.
lvm2 does exist, as sudo apt-get install lvm2 tells me so.
NuxNubkins
Level 1
Level 1
Posts: 36
Joined: Fri Oct 04, 2013 5:51 pm

Re: Mint16 & LVM Grub Rescue no such device

Post by NuxNubkins »

It could be BIOS related. I have multiple disks as well, and if I point BIOS to startup with the disk that doesn't have grub on it, I hit an initramfs prompt.
powerhouse
Level 6
Level 6
Posts: 1097
Joined: Thu May 03, 2012 3:54 am
Location: Israel
Contact:

Re: Mint16 & LVM Grub Rescue no such device

Post by powerhouse »

apaseall wrote:There does not appear to be an option to use lvm inside the install app.
lvm2 does exist, as sudo apt-get install lvm2 tells me so.
I haven't tried LM 16 yet but LM 15 definitely has a LVM option in the installer. For LM 16 see here under step 5: [url]http://www.tecmint.com/linux-mint-16-installation-guide/[/url].
Gigabyte Aorus X570 Pro, AMD Ryzen 3900X CPU, 2x32GB Corsair DDR4, water cooler, GTX 970 + Quadro 2000 GPU, Asus Xonar Essence STX, Samsung 500GB + 1TB NVMe + Samsung Evo 1TB SSD + 4 HDD, Corsair 500R, SeaSonic 660W Gold X PS https://heiko-sieger.info
apaseall
Level 1
Level 1
Posts: 41
Joined: Mon Dec 02, 2013 10:50 pm

Re: Mint16 & LVM Grub Rescue no such device

Post by apaseall »

:evil: Not where I wanted to use it. There I was trying to do partition stuff in the part where you do partition stuff and the option had to be picked prior to that.
I just went straight to the something else, since that is where we do all the partition stuff. :evil:
powerhouse
Level 6
Level 6
Posts: 1097
Joined: Thu May 03, 2012 3:54 am
Location: Israel
Contact:

Re: Mint16 & LVM Grub Rescue no such device

Post by powerhouse »

apaseall wrote::evil: Not where I wanted to use it. There I was trying to do partition stuff in the part where you do partition stuff and the option had to be picked prior to that.
I just went straight to the something else, since that is where we do all the partition stuff. :evil:
I agree with you. Not very intuitive, if not problematic. I will try to install LM 16 on an external drive to see what can be done.
Gigabyte Aorus X570 Pro, AMD Ryzen 3900X CPU, 2x32GB Corsair DDR4, water cooler, GTX 970 + Quadro 2000 GPU, Asus Xonar Essence STX, Samsung 500GB + 1TB NVMe + Samsung Evo 1TB SSD + 4 HDD, Corsair 500R, SeaSonic 660W Gold X PS https://heiko-sieger.info
powerhouse
Level 6
Level 6
Posts: 1097
Joined: Thu May 03, 2012 3:54 am
Location: Israel
Contact:

Re: Mint16 & LVM Grub Rescue no such device

Post by powerhouse »

OK, I just installed LM 16 on an external drive. I've placed the instructions under the original post here: [url]http://forums.linuxmint.com/viewtopic.php?f=42&t=108442#p793203[/url]
Gigabyte Aorus X570 Pro, AMD Ryzen 3900X CPU, 2x32GB Corsair DDR4, water cooler, GTX 970 + Quadro 2000 GPU, Asus Xonar Essence STX, Samsung 500GB + 1TB NVMe + Samsung Evo 1TB SSD + 4 HDD, Corsair 500R, SeaSonic 660W Gold X PS https://heiko-sieger.info
apaseall
Level 1
Level 1
Posts: 41
Joined: Mon Dec 02, 2013 10:50 pm

Re: Mint16 & LVM Grub Rescue no such device

Post by apaseall »

Sorry but I have to post once more on the subject of LVM use during installation.

I am presented with these options [once i have confirmed my language, that i have disk space and i am connected to the internet]

Code: Select all

this computer currently has windows 7 and ubuntu 9.04 on it. what would you like to do?
erase ubuntu 9.04 and reinstall
erase everything and reinstall
something else
With erase ubuntu 9.04 and reinstall selected both of these options are unavailable [greyed out]

Code: Select all

encrypt the new linux mint installation for security
use lvm with the new linux mint installation
Picking erase everything and reinstall makes those two options available.

Now since I do have windows 7 & ubuntu 9.04 on sda plus I do want to keep them...
I can select sdb, but ... I am wary of pressing the install button because at this point I have not told the install anything about the size of the partitions I would like to have, let alone to use lvm.

There is an option to use the advanced partitioning tools, however that just takes me to the tool I mentioned earlier which has no lvm options at all.

To be clear. I am using grub legacy to chainload the separate windows and ubuntu 9.04 bootloaders.
That is working fine now [after many many hours].

My intention is to use the sda grub legacy bootloader to chainload the sdb grub2 bootloader.
I am trying to use sdb1 as a small primary partition for the grub2 bootloader with the rest of sdb for the linux mint 16 using lvm [aka the tutorial I am trying to follow].

My current problem is that my present install of mint 16 has sdb1 primary partition with /grub and the core image is not in /grub or in /grub/i386
indeed there is a file in /grub/i386 but it kindly tells me that "setup_left_core_image_in_the_filesystem, which would be inside lvm.
Of course grub legacy cannot access the lvm because lvm is not installed at the time it needs to access the core.img.
What I am hoping for is to somehow get the installer to actually install the core image file 'where I need it' in sdb1.
apaseall
Level 1
Level 1
Posts: 41
Joined: Mon Dec 02, 2013 10:50 pm

Re: [Solved] Mint16 & LVM Grub Rescue no such device

Post by apaseall »

I am now able to do what I want, namely use grub legacy to chainload my other OS's.

Grub legacy currently has 3 entries,

Code: Select all

title              ubuntu 9.04
rootnoverify  (hd0,4)
chainloader   +1

tittle             Linux Mint 16
rootnoverify  (hd1,0)
chainloader   +1

title              Windows (loader)
rootnoverify  (hd0,0)
savedefault
chainloader  +1
How did I do this ? why did it not work ? why does it work now ?

I followed these instructions;
[url]http://ubuntuguide.org/wiki/Multiple_OS_Installation[/url]
[url]http://forums.linuxmint.com/viewtopic.php?f=42&t=108442#p793203[/url]

I use 4 hdds [2 x small ssd -sda, sdb & 2 x 1TB sdc, sdd ]

I installed windows first on sda, left me with sda1 windows boot, sda2 windows os
resized sda2, created sda3 for grub legacy, created sda4 as extended.
installed ubuntu 9.04 with boot on sda3 and os on sda5 [inside sda4] and swap on sdc5 [inside sdc1 extended partition]

installed linux mint 16 using lvm from above guide [used lm16 instead of lm13, but that is just a name]
with boot on sdb1 and os on sdb2 [which is where the lvm is, so used sdb2 rather than sda2 in the guide].
i let the installer use the swap on sdc5 [which differs from the lvm in the guide]
made sure that the installer was going to install the boot to sdb1. yes sdb1, not sdb2 or sdb.

now after the installer has finished the guide asks us to install lvm at step 9.
instead i did this in the same terminal that was still chroot'd on /mnt

Code: Select all

update-grub
update-initramfs -u
I then resumed following the guide.

Hope this helps.

what went wrong ? I think it was at step 9.
I had the dual boot working at the point i tried to get minty 16 up.
since 16 already has the packages for lvm, installing it could not happen, thus grub and initramfs were not updated.
purging lvm and then installing it did not seem to help.
only when i understood that the purpose of asking us to install lvm was not only to get lvm on the maching but to also update both grub and initramfs.
hence the leaving lvm alone and going directly to the update commands [which i did not know before going down this road].

plus i needed to carefully follow the instructions.
for example in one set of instructions we mount GRUBPartition, except we don't, we mount a folder named that, we mount the device which we may have labeled something else.
ie

Code: Select all

mkdir /mnt/somenameorother
mount /dev/sda3 -t ext2 /mnt/somenameorother
instead of

Code: Select all

mkdir /mnt/GRUBPartition
mount /dev/sda3 -t ext /mnt/GRUBPartition
i got a bit confused around that point which lead me to try and get grub to handle /GRUBPartition/boot/grub rather than /boot/grub.
needless to say i saw grub rescue > more often than i thought i would.
the instructions were correct, but only if you knew what they meant, not something i understood when i tried to follow them.
powerhouse
Level 6
Level 6
Posts: 1097
Joined: Thu May 03, 2012 3:54 am
Location: Israel
Contact:

Re: [Solved] Mint16 & LVM Grub Rescue no such device

Post by powerhouse »

I'm glad you got it working finally.

Following my own instructions I got Linux Mint 16 installed on a USB drive. I currently use the F8 key (may vary depending on motherboard) during boot to get a boot menu, then select the external drive to boot into Linux Mint 16.

I got a bit lost at your explanations regarding chroot since LM16 didn't require me to use chroot, nor did I have to run any update-initramfs and update-grub at this point. Note that my LM16 tutorial doesn't use chroot etc. Instead, I use gparted to create the partitions /boot and an unformatted partition, then pvcreate, vgcreate, and lvcreate to create the partitions. Only then do I run the installer and use "something else", at the next step I select the preconfigured /boot and /dev/mapper/lm??-root etc. volumes, format and mount them accordingly. Obviously I can boot into LM16 and my LVM partitions/volumes are recognized.

Anyway, what's important is that it works! Running update-grub and update-initramfs won't hurt.

P.S.: Still struggling with some odds but I hope to be able to include Linux Mint 16 in the Xen VGA passthrough tutorial :) .
Gigabyte Aorus X570 Pro, AMD Ryzen 3900X CPU, 2x32GB Corsair DDR4, water cooler, GTX 970 + Quadro 2000 GPU, Asus Xonar Essence STX, Samsung 500GB + 1TB NVMe + Samsung Evo 1TB SSD + 4 HDD, Corsair 500R, SeaSonic 660W Gold X PS https://heiko-sieger.info
apaseall
Level 1
Level 1
Posts: 41
Joined: Mon Dec 02, 2013 10:50 pm

Re: [Solved] Mint16 & LVM Grub Rescue no such device

Post by apaseall »

my apologies, i wrote the post in a hurry before bed.

lets see if i can remember correctly this time.
i used ubuntu 9.04 from a cd to install ubuntu 9.04 and thus grub legacy. I was following the instructions in the first of the two links i just posted.

in step 5 of yours we sudo -i. when i got to step 9 i was still using that terminal. you are most correct, i did not chroot, my confusion sorry.
step 9 includes apt-get install lvm2, as you say that would normally update grub and initram for the newly installed system [mint 16 in my case].
the problem is that lvm already exists due to mint 16. thus the command apt-get install lvm2 does nothing, other than tell you lvm is already present.
in order to update grub and the initram file i used update-grub and update-initramfs -u.

i used gparted [whilst in ubuntu 9.04, i think its got a different name in the menu but does launch maybe an early version of gparted] to create sdb1 and an unformatted partition.
then i used the sudo -i terminal to enter the commands for pvcreate, vgcreate and lvcreate, following your instructions.
that was the only way i found to have those present when i started the mint 16 install.

i mentioned that i did not use your guide to lvcreate for the swap file. at that point i already had a swap on one of the 1tb drives [that i use for storage].
the swap file i created when i installed ubuntu 9.04.

the stuff about GRUBPartition was me trying to let others know that i got confused [following the other instructions] when i was installing ubuntu 9.04.

now to take a read about xen and pci passthrough instead of vga passthrough. i have 2 gpus in my system and i am hoping to pci one to a windows client.
i am hoping that i can reuse the existing windows install i have on sda for that client.
i have not read that far but if i can i think i will try.

i am also not sure if i can use my mint 16 for the hypervisor? or if i need to install another os for that.
i know i cannot presently use the ubuntu 9.04 because it has no working connection to the internet [a driver issue maybe ?].
i am not concerned about lack of internet with 9.04 as i merely installed that to get grub legacy installed.
i think i will keep the 9.04 just in case i need to reinstall grub legacy or repair it.
apaseall
Level 1
Level 1
Posts: 41
Joined: Mon Dec 02, 2013 10:50 pm

Re: [Solved] Mint16 & LVM Grub Rescue no such device

Post by apaseall »

oh and re your mint 16 instructions.
gparted is already present on the mint install disk.

maybe also copy your mint 14 warning about not rebooting after the install completes.

thank you for taking the time to update and create these instructions, they are invaluable to beginners like me.
Post Reply

Return to “Installation & Boot”