Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

grub-pc error : no such disk occuring at boot

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
Flash Koti
Posts: 29
Joined: 2009-10-27 14:06

grub-pc error : no such disk occuring at boot

#1 Post by Flash Koti »

Hi,

I update grub-legacy to grub2 (ie grub-pc) on debian machine but on machine with lvm set up I get a error message just after the hello grub and before the grub menu (the menu where you chose which system to boot).
The error message is : "Error : no such disk".

Trying to see what happen, I set up a virtual machine with virtualbox software, here is the config :
two virtual 4.5 Go IDE disk (like the trues machines with lvm that cause me problem except that is 80Go IDE HDD).
Virtual HDD ' setting :
hda1 /boot 100 Mo
hda2 swap 252 Mo
vg00 hda3 and hdb
vg00-lv00 / 512 Mo
vg00-lv01 /tmp 252 Mo
vg00-lv02 /usr 3.5 Go
vg00-lv03 /var 3.5 Go
vg00-lv04 /home "what is left."

Lenny was installed up to date, following by a grub-pc install and update-from-grub-legacy (note the error message was already present in grub-pc chainloaded by grub-legacy)

Extract of config file /boot/grub/grub.cfg (only what can cause havoc is copied here) :
...
# BEGIN 00_header
...
insmod lvm
set root=(vg00-lv02)
search --fs-uuid --set xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxxxxxx
if font /share/grub/ascii.pff ; then
set gfxmode = 640x480
insmod gfxterm
insmod vbe
terminal gfxterm
fi
# END 00_header
...
# BEGIN 10_linux
menuentry "Debian GNU/Linux, Linux 2.6.26-2-686" {
set root=(hd0,1)
search --fs-uuid --set yyyyyyy-yyyy-yyyy-yyyy-yyyyyyyy
linux /vmlinuz-2.6.26-2-686 root=/dev/mapper/vg00-lv00 ro
initrd /initrd.img-2.6.26-2-686
}
# Like normal but for single user
menuentry ... (single user mode)" {
...
... ro single
}
# END

I 've tested to modify /etc/defautl/grub, deactivate uuid do nothing.
But activate "GRUB_TERMINAL=console" remove all the line in 00_header's part in /boot/grub/grub.cfg (after update-grub of course) and become :
# BEGIN 00_header
set default = 0
set timeout = 5
terminal console
# END 00_header
When I reboot with this options, the error message have disapear.
So I put some sleep command to recheck and no more message. Next, I had the line that was present manually in /boot/grub/grub.cfg (don't do that because this file will be construct a time or another, it's ok for test purpose only).
The first line added : insmod lvm :
# BEGIN 00_header
set default = 0
set timeout = 5
insmod lvm
sleep 5
terminal console
# END 00_header
reboot and the error coming back. So lvm module cause this but why ? I 've checked /boot/grub/lvm.mod and the file is present, so what ?

I have tried to find some tips on the net but info on grub2 are spartiate. I need (or I think I need) grub2 because I want to transform this hdd setting on a raid1 using mdadm with lvm :
/dev/md0 /boot 100 Mo
/dev/md1 swap 252 Mo
vg00 /dev/md2
vg00-lv00 / 512 Mo
vg00-lv01 /tmp 252 Mo
vg00-lv02 /usr 3.5 Go
vg00-lv03 /var 3.5 Go
vg00-lv04 /home "what is left."
With :
md0 = hda1+hdb1
md1 = hda2+hdb2
md2 = hda3+hdb3
This will set a more robust system as I need only far less than 80 Go for my system and don't want to lose all because of a failled drive.

So anyhelp is welcome, in advance thanks for you help.

Flash Koti
Debian fan

User avatar
bugsbunny
Posts: 5354
Joined: 2008-07-06 17:04
Been thanked: 1 time

Re: grub-pc error : no such disk occuring at boot

#2 Post by bugsbunny »

I strongly suspect you'll be much better off looking for help in a grub2 mailing list or irc channel. Those of us currently using grub2 are basically going by feel, since (as you say) documentation is still rather sparse.
Mailing lists: MailingLists - GRUB Wiki
IRC - IrcChannels - GRUB Wiki

Please post back anything you find out.

smallchange
Posts: 1740
Joined: 2009-05-04 15:56
Been thanked: 1 time

Re: grub-pc error : no such disk occuring at boot

#3 Post by smallchange »

I notice you do not have

Code: Select all

insmod ext2
In my case this comes right after

Code: Select all

insmod lvm

Flash Koti
Posts: 29
Joined: 2009-10-27 14:06

Re: grub-pc error : no such disk occuring at boot

#4 Post by Flash Koti »

Hi,

@smallchange : just put the module lvm raise the error but perhaps I lack also the ext2 module (as I use ext3 for the whole). I will check this too.

@Bugsbunny : I will go in this direction thanks for the tips.

++
Flash Koti

smallchange
Posts: 1740
Joined: 2009-05-04 15:56
Been thanked: 1 time

Re: grub-pc error : no such disk occuring at boot

#5 Post by smallchange »

Ext3 is just ext2 with a journal. I do not have an ext3 grub module.

Flash Koti
Posts: 29
Joined: 2009-10-27 14:06

Re: grub-pc error : no such disk occuring at boot

#6 Post by Flash Koti »

Hi,

The mailing list for Grub didn't help at this time but I have do some test.

Now I 'm sure what cause "error : no such disk", it's this command "insmod lvm" in the header :

Code: Select all

# BEGIN 00_header
...
insmod lvm # This popup error message
set root=(vg00-lv02)
search --fs-uuid --set xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxxxxxx
if font /share/grub/ascii.pff ; then
set gfxmode = 640x480
insmod gfxterm
insmod vbe
terminal gfxterm
fi
# END 00_header
My test was, activate the option Terminal Console which suppress the header, and try to load lvm in shell grub when editing at boot.

Now, what I don't understant is why. lvm mod is present in the /boot/grub directory, so why it's not happy ?

Flash Koti
Debian Fan

smallchange
Posts: 1740
Joined: 2009-05-04 15:56
Been thanked: 1 time

Re: grub-pc error : no such disk occuring at boot

#7 Post by smallchange »

I think you need the ext2 module. You need to get grub.cfg to look like this
### BEGIN /etc/grub.d/00_header ###
set default=0
insmod lvm
insmod ext2
I can not find exactly where my system is deciding which modules to load but I am sure you need both of these. There must be a way to do this other than editing /boot/grub/grub.cfg but I do not find it, unless it is to add GRUB_PRELOAD_MODULES to /etc/default/grub.

Post Reply