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 error, error: fd0 read error

If none of the specific sub-forums seem right for your thread, ask here.
Message
Author
User avatar
vehemoth
Posts: 17
Joined: 2011-03-27 07:23

Grub error, error: fd0 read error

#1 Post by vehemoth »

how do I fix this error

Code: Select all

error: fd0 read error
debian squeeze install, two hard drives, one partition on each which make up a software raid1.

User avatar
mvdan
Posts: 237
Joined: 2010-12-17 17:52
Location: Barcelona, Spain

Re: Grub error, error: fd0 read error

#2 Post by mvdan »

Boot from your install CD/DVD, go to Other options / Rescue mode and once you get there, open a shell (through any of the two debian partitions) and run:

Code: Select all

su
grub-install /dev/sda
update-grub
Note that you might not want to install grub to the main hard drive (/dev/sda), but that is mostly the best choice.

Good luck!
Unstable 'Sid' amd64 - Awesome WM - https://gitorious.org/~mvdan
Richard M. Stallman wrote:We can't take the future of freedom for granted. Don't take it for granted! If you want to keep your freedom, you must be prepared for it.

_stefanos_
Posts: 8
Joined: 2011-06-17 05:58

Re: Grub error, error: fd0 read error

#3 Post by _stefanos_ »

danielmarti5,

I have exactly the same issue with wheezy...I ran the unsafe updates (yeah stupid me!) and now I can't do anything about it. I have tried every possible solution I know or have found through Google and still returns to grub prompt. I have mounted the necessary partitions, chroot-ed it and ran update-grub, grub-install, and so forth...you know, the normal steps to make it work but still it does not work.

Is there a way to solve this problem? It appeared right after I installed the latest updates on my system. The last thing I want to do is to reinstall everything; that won't be the solution or the proper way to solve an issue.

What would be your recommendation to such issue?

User avatar
mvdan
Posts: 237
Joined: 2010-12-17 17:52
Location: Barcelona, Spain

Re: Grub error, error: fd0 read error

#4 Post by mvdan »

Have you tried reinstalling GRUB as I explained above?

If so, then the problem might be that Wheezy is broken. In such case, you could go back to the shell from the rescue mode in the install CD/DVD, and run

Code: Select all

su
aptitude update
aptitude upgrade
If there was any problem with some update, that might be already fixed. If that doesn't work, try making a backup copy of /home and reinstalling. Sorry, but in testing the errors might be many nowadays :)
Unstable 'Sid' amd64 - Awesome WM - https://gitorious.org/~mvdan
Richard M. Stallman wrote:We can't take the future of freedom for granted. Don't take it for granted! If you want to keep your freedom, you must be prepared for it.

_stefanos_
Posts: 8
Joined: 2011-06-17 05:58

Re: Grub error, error: fd0 read error

#5 Post by _stefanos_ »

I have GNU/Linux Debian 6.0.1a DVD and run in Rescue Mode, but it would not let me mount anything. BusyBox had limited commands and couldn't run the normal procedure so I may "chroot" my current system and fix it.

With Knoppix 6.4 though I can run the same procedure and get successful results; nevertheless, the system returns to grub prompt which means something went wrong upon updating.

Is there a way to repair the current system without reinstalling everything from scratch? Once upon a time when I was a FreeBSD user I could self-host another version of FreeBSD and upon success I would merge guest with host without losing valuable data from server; it was a brilliant feature.

Do you think I could do so with Debian?

User avatar
mvdan
Posts: 237
Joined: 2010-12-17 17:52
Location: Barcelona, Spain

Re: Grub error, error: fd0 read error

#6 Post by mvdan »

_stefanos_ wrote:I have GNU/Linux Debian 6.0.1a DVD and run in Rescue Mode, but it would not let me mount anything. BusyBox had limited commands and couldn't run the normal procedure so I may "chroot" my current system and fix it.
What does it say? It's always worked for me.
_stefanos_ wrote:With Knoppix 6.4 though I can run the same procedure and get successful results; nevertheless, the system returns to grub prompt which means something went wrong upon updating.
That way, you install Knoppix' version of GRUB. I don't know if it would work, but I would use Debian's anyway.
_stefanos_ wrote:Is there a way to repair the current system without reinstalling everything from scratch? Once upon a time when I was a FreeBSD user I could self-host another version of FreeBSD and upon success I would merge guest with host without losing valuable data from server; it was a brilliant feature.

Do you think I could do so with Debian?
Sorry, but my knowledge doesn't go that far :)
Unstable 'Sid' amd64 - Awesome WM - https://gitorious.org/~mvdan
Richard M. Stallman wrote:We can't take the future of freedom for granted. Don't take it for granted! If you want to keep your freedom, you must be prepared for it.

_stefanos_
Posts: 8
Joined: 2011-06-17 05:58

Re: Grub error, error: fd0 read error

#7 Post by _stefanos_ »

I have tried your way...and unfortunately it didn't work.

Silly me I did not chroot to /target to have all commands to my availability. I was expecting to have all these commands without doing so...I have even tried dpkg-reconfigure grub-pc and still the same. I am run out of options or ideas.

Where do you think the error might be and causing the error: fd0 read error? Do you think that a package might got corrupted somewhere?

User avatar
mvdan
Posts: 237
Joined: 2010-12-17 17:52
Location: Barcelona, Spain

Re: Grub error, error: fd0 read error

#8 Post by mvdan »

_stefanos_ wrote:I have tried your way...and unfortunately it didn't work.

Silly me I did not chroot to /target to have all commands to my availability. I was expecting to have all these commands without doing so...I have even tried dpkg-reconfigure grub-pc and still the same. I am run out of options or ideas.

Where do you think the error might be and causing the error: fd0 read error? Do you think that a package might got corrupted somewhere?
Does it say "loading..." and then "welcome to grub", and when you select Debian it says error or does it say "loading..." and then error?

If it's the first one, then the configuration file for grub has errors or the debian install is damaged. If it's the other way, GRUB can't find the partition marked as boot. In other words, it can't load /etc/grub/grub.cfg. In this case, reinstalling grub (using chroot ;-)) is the only way to go, as far as I know.
Unstable 'Sid' amd64 - Awesome WM - https://gitorious.org/~mvdan
Richard M. Stallman wrote:We can't take the future of freedom for granted. Don't take it for granted! If you want to keep your freedom, you must be prepared for it.

_stefanos_
Posts: 8
Joined: 2011-06-17 05:58

Re: Grub error, error: fd0 read error

#9 Post by _stefanos_ »

No, it does not say "loading..." or something like that. It goes to Welcome to GRUB! and takes me to the grub prompt.

I have disabled my floppy from BIOS and even deleted the --no-floppy lines from grub.cfg. With this option it does not delay for 15 seconds; it goes straight to grub prompt.

Right now I am backing up my system and try a few more times to sort things out. I really don't know what else to do. If you know a way to repair my system without reinstalling it from scratch, I would be grateful to you.

User avatar
mvdan
Posts: 237
Joined: 2010-12-17 17:52
Location: Barcelona, Spain

Re: Grub error, error: fd0 read error

#10 Post by mvdan »

_stefanos_ wrote:No, it does not say "loading..." or something like that. It goes to Welcome to GRUB! and takes me to the grub prompt.

I have disabled my floppy from BIOS and even deleted the --no-floppy lines from grub.cfg. With this option it does not delay for 15 seconds; it goes straight to grub prompt.

Right now I am backing up my system and try a few more times to sort things out. I really don't know what else to do. If you know a way to repair my system without reinstalling it from scratch, I would be grateful to you.
In that case, grub is fine and the boot partition is in its place. Either Debian is damaged or the hard disk is damaged. If it's the first one, you could repair it using chroot. I'm thinking... you could reinstall the linux kernel and grub, and see if that does the trick (using aptitude, of course). If the disk is damaged, then even wiping wouldn't solve it. But that second possibility is less likely since you haven't been throwing your computer around (or have you?) ;-)

PS: It could be GRUB's fault, but in that case it would say "root partition not found", "boot image not found" or similar (as far as I've seen).
Unstable 'Sid' amd64 - Awesome WM - https://gitorious.org/~mvdan
Richard M. Stallman wrote:We can't take the future of freedom for granted. Don't take it for granted! If you want to keep your freedom, you must be prepared for it.

User avatar
kiyop
Posts: 3983
Joined: 2011-05-05 15:16
Location: Where persons without desire to improve themselves fear to tread, in Japan
Been thanked: 3 times

Re: Grub error, error: fd0 read error

#11 Post by kiyop »

If you get into Grub menu, type "C" to enter grub prompt.

If you successfully get into grub prompt,
grub>
is shown.
At grub prompt, type

Code: Select all

ls
and submit the result.
If you understand what is the debian partition, for example (hd0,1), type

Code: Select all

set root=(hd0,1)
ls /
ls /boot/
or so to search if there are correct kernel and initramfs or not.
If there are possible kernel and initramfs, type

Code: Select all

set root=(hd0,1)
linux /vmlinuz root=/dev/sda1 ro
initrd /initrd.img
boot
Of course, if you know the correct version of kernel and its initramfs, type them instead of /vmlinuz and /initrd.img, for example,
/boot/vmlinuz-2.6.32-5-686
/boot/initrd.img-2.6.32-5-686
...although they are for Stable (Squeeze). I am not familiar with Testing (Wheezy).

You can use boot info script to analyze the problem.
http://bootinfoscript.sourceforge.net/
Openbox, JWM: Jessie, Sid, Arch / Win XP (on VirtualBox), 10
http://kiyoandkei.bbs.fc2.com/

_stefanos_
Posts: 8
Joined: 2011-06-17 05:58

Re: Grub error, error: fd0 read error

#12 Post by _stefanos_ »

After I have extensively searched the internet and have spoken to great guys from Debian channel, (they couldn't help me at all) I decided to give a try to my patience before I attempt to reinstall everything.

Fortunately for me and my system, I have realized that "patience is a virtue!". Upon using a LiveCD, I saw that /dev/sda1 and /dev/DesktopPC-root contained both of them a grub folder!

After a bit of investigation I have discovered the problem. For those who are still using GRUB1 and want to upgrade to GRUB2, or have already done so and have the same problem like in my case (under an LVM system of course), they should follow this procedure accordingly:

Check for your boot partition as root user.

Code: Select all

fdisk -l
In my case is /dev/sda1. Under your system it might be something totally different.

With a LiveCD mount it, copy its contents [as root user of course] to your LVM partition.

Code: Select all

rsync -avh --progress /dev/sda1/ /dev/DesktopPC-root/boot/
NOTE: Please make sure that in /dev/sda1 there's a folder named grub. By running the above command, it synchronizes the contents of /dev/DesktopPC-root/boot/ with that of /dev/sda1.

By doing so, you are moving your GRUB1 files to GRUB2 directory. After you do so, run VERY CAREFULLY this command:

Code: Select all

dd if=/dev/zero of=/dev/sda1 bs=446 count=1
That would fill up your /dev/sda1 with zeros.

DISCLAIMER: I take no responsibility for any data loss. Run it at your own risk please. You have been warned! Please run backups before you attempt such command!

NOTE: If your LiveCD does not have installed lvm2 package you have to manually install it. In my case, one of the LiveCDs I had to use was GNU/Linux Ubuntu 10.04 which did not have lvm2 installed; I had to install it myself to make it work.

Code: Select all

apt-get install lvm2
After you have successfully installed your lvm2 package, run:

Code: Select all

vgscan

Code: Select all

Reading all physical volumes.  This may take a while...
Found volume group "DesktopPC" using metadata type lvm2

Code: Select all

lvscan

Code: Select all

 
inactive '/dev/DesktopPC/root' [295.32 GiB] inherit
inactive '/dev/DesktopPC/swap_1' [2.53 GiB] inherit

Code: Select all

vgchange -ay
Doing so will activate your inactive volume groups. Run again the previous lvscan command.

Code: Select all

lvscan

Code: Select all

 
ACTIVE '/dev/DesktopPC/root' [295.32 GiB] inherit
ACTIVE '/dev/DesktopPC/swap_1' [2.53 GiB] inherit
There you go. It should show the above message to you.

Time to mount our filesystems:

Code: Select all

mount -t ext3 /dev/DesktopPC-root /mnt
mount --bind /dev /mnt/dev
mount -t proc none /mnt/proc
mount -t sysfs /sys /mnt/sys
Now it's time to make mnt to behave like a root (/) directory:

Code: Select all

chroot /mnt
Now it's about time to edit /etc/fstab and disable /boot and most probably its representative UUID. At least in my case, I had to do so.

Code: Select all

# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    defaults        0       0
/dev/mapper/DesktopPC-root /               ext3    errors=remount-ro 0       1
#/dev/sda1       /boot           ext2    defaults        0       2
#UUID=1a602b40-cc39-4cea-9894-d28ff3451d80       /boot           ext2    defaults        0       2
/dev/mapper/DesktopPC-swap_1 none            swap    sw              0       0
/dev/scd0       /media/cdrom0   udf,iso9660 user,noauto     0       0
/dev/scd1       /media/cdrom1   udf,iso9660 user,noauto     0       0
/dev/fd0        /media/floppy0  auto    rw,user,noauto  0       0
After you do so, run

Code: Select all

dpkg-reconfigure grub-pc
We have to do so, because we have removed a partition from our system and we have to inform it that we have done a major change to it. If we don't inform it, fsck will produce an error most probably with

Code: Select all

failed (code 8)
.

If I have forgotten something here guys, I will update it again and I will let you know for sure. It was a painful procedure, but heck...I have learnt so much from it!

Remember: Every single failure is a step closer to success. NEVER GIVE UP!

Cheers ;)
Last edited by _stefanos_ on 2011-06-20 08:30, edited 3 times in total.

User avatar
kiyop
Posts: 3983
Joined: 2011-05-05 15:16
Location: Where persons without desire to improve themselves fear to tread, in Japan
Been thanked: 3 times

Re: Grub error, error: fd0 read error

#13 Post by kiyop »

_stefanos_ wrote:Upon using a LiveCD, I saw that /dev/sda1 and /dev/DesktopPC-root contained both of them a grub folder!
Maybe, your /etc/fstab and/or grub2 setting was not suitable. And so, your update-grub only changed the contents of /boot in /dev/DesktopPC-root (in LVM?).
Grub2 can recognize LVM and RAID. You could include correct modules for LVM and RAID into core.img of grub2.
Installing grub2 correctly is better.
_stefanos_ wrote:Now it's about time to edit /dev/fstab
Typo. /etc/fstab
_stefanos_ wrote:/dev/mapper/DesktopPC-root / ext3 errors=remount-ro 0 1
_stefanos_ wrote:/dev/mapper/DesktopPC-swap_1 none swap sw 0 0
I am curious.
Is your Grub2 menu, which is shown just after booting, updated after your kernel is updated?
(Usually there is no problem. But your case is not usual.)
Please run boot info script and submit the result if you care.

Good luck.
Openbox, JWM: Jessie, Sid, Arch / Win XP (on VirtualBox), 10
http://kiyoandkei.bbs.fc2.com/

_stefanos_
Posts: 8
Joined: 2011-06-17 05:58

Re: Grub error, error: fd0 read error

#14 Post by _stefanos_ »

And so, your update-grub only changed the contents of /boot in /dev/DesktopPC-root (in LVM?).
After I copied contents of /boot/ to /dev/DesktopPC-root/boot/, which that included the kernel and others files plus the grub folder, I ran the necessary commands and updated my system.
Grub2 can recognize LVM and RAID. You could include correct modules for LVM and RAID into core.img of grub2.
Installing grub2 correctly is better.
I forgot to mention that I edited /etc/default/grub and added this line

Code: Select all

GRUB_PRELOAD_MODULES=lvm
, so I guess editing core.img would be unnecessary.
Typo. /etc/fstab
Thanks for detecting the typo; already fixed it.
I am curious.
Is your Grub2 menu, which is shown just after booting, updated after your kernel is updated?
(Usually there is no problem. But your case is not usual.)
I'm afraid I cannot recall. For sure what I know is that I have fixed my problem and everything works just fine now, thanks to Jim's Repository
Please run boot info script and submit the result if you care.
You mean you want my grub.cfg as it has been generated by dpkg-reconfigure grub-pc? If yes, let me know by tonight when I will get back home to post it here for you.

User avatar
kiyop
Posts: 3983
Joined: 2011-05-05 15:16
Location: Where persons without desire to improve themselves fear to tread, in Japan
Been thanked: 3 times

Re: Grub error, error: fd0 read error

#15 Post by kiyop »

Thanks for your reply.
I have understood what you did a little further.
_stefanos_ wrote:
Please run boot info script and submit the result if you care.
You mean you want my grub.cfg as it has been generated by dpkg-reconfigure grub-pc? If yes, let me know by tonight when I will get back home to post it here for you.
No.
boot info script reports not only the contents of /boot/grub/grub.cfg, but also the detail information on the bootloader in MBR and PBR and the relation between the necessary files in some partitions and MBR and/or PBR.
It would be greatly appreciated if you kindly report the result of boot info script.
Thanks in advance.
Openbox, JWM: Jessie, Sid, Arch / Win XP (on VirtualBox), 10
http://kiyoandkei.bbs.fc2.com/

_stefanos_
Posts: 8
Joined: 2011-06-17 05:58

Re: Grub error, error: fd0 read error

#16 Post by _stefanos_ »

I'm afraid I don't know how to do it. Can you please provide me with the necessary command so I may help?

Cheers

User avatar
kiyop
Posts: 3983
Joined: 2011-05-05 15:16
Location: Where persons without desire to improve themselves fear to tread, in Japan
Been thanked: 3 times

Re: Grub error, error: fd0 read error

#17 Post by kiyop »

Thanks for your kind consideration.

Please execute the following with root privilege.

Code: Select all

apt-get update
apt-get install wget unzip
wget http://downloads.sourceforge.net/project/bootinfoscript/bootinfoscript/0.60/boot_info_script060.zip
unzip boot_info_script060.zip
bash ./boot_info_script.sh
The result is saved in the file named "RESULTS.txt".
Please open with text editor and so on and submit its content.

Thanks in advance.
Openbox, JWM: Jessie, Sid, Arch / Win XP (on VirtualBox), 10
http://kiyoandkei.bbs.fc2.com/

_stefanos_
Posts: 8
Joined: 2011-06-17 05:58

Re: Grub error, error: fd0 read error

#18 Post by _stefanos_ »

The latest script has an issue, I guess somewhere with a closing fi-if because the complain about parentheses seems fine to me; maybe I am wrong. But anyway, I have downloaded the 0.55 edition and ran the test. Here you are

Code: Select all

                Boot Info Script 0.55    dated February 15th, 2010                    

============================= Boot Info Summary: ==============================

 => Grub 2 is installed in the MBR of /dev/sda and looks for Wvt.

sda1: _________________________________________________________________________

    File system:       
    Boot sector type:  -
    Boot sector info:  
    Mounting failed:
mount: unknown filesystem type ''

sda2: _________________________________________________________________________

    File system:       LVM2_member
    Boot sector type:  -
    Boot sector info:  

DesktopPC-root: _________________________________________________________________________

    File system:       ext3
    Boot sector type:  Grub 2
    Boot sector info:  Grub 2 is installed in the boot sector of 
                       DesktopPC-root and looks at sector 148907 of the same 
                       hard drive for core.img, but core.img can not be found 
                       at this location.
    Operating System:  Debian GNU/Linux wheezy/sid
    Boot files/dirs:   /boot/grub/grub.cfg /etc/fstab /boot/grub/core.img

DesktopPC-swap_1: _________________________________________________________________________

    File system:       swap
    Boot sector type:  -
    Boot sector info:  

=========================== Drive/Partition Info: =============================

Drive: sda ___________________ _____________________________________________________

Disk /dev/sda: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes

Partition  Boot         Start           End          Size  Id System

/dev/sda1    *             63       498,014       497,952  83 Linux
/dev/sda2             498,015   625,137,344   624,639,330  8e Linux LVM


blkid -c /dev/null: ____________________________________________________________

Device           UUID                                   TYPE       LABEL                         

/dev/mapper/DesktopPC-root 5737b5d1-dc33-492b-972e-f78d49e4c006   ext3                                     
/dev/mapper/DesktopPC-swap_1                                        swap                                     
/dev/sda2        W27y8M-vK1C-jMqV-eF3i-1isz-zE5Z-n4hIX4 LVM2_member                               
/dev/sda: PTTYPE="dos" 

=============================== "ls -R /dev/mapper/" output: ===============================
/dev/mapper:
control
DesktopPC-root
DesktopPC-swap_1

============================ "mount | grep ^/dev  output: ===========================

Device           Mount_Point              Type       Options

/dev/mapper/DesktopPC-root /                        ext3       (rw,errors=remount-ro,commit=0)


====================== DesktopPC-root/boot/grub/grub.cfg: ======================

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
insmod lvm
if [ -s $prefix/grubenv ]; then
  load_env
fi
set default="0"
if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}

function load_video {
  insmod vbe
  insmod vga
  insmod video_bochs
  insmod video_cirrus
}

insmod lvm
insmod part_msdos
insmod ext2
set root='(DesktopPC-root)'
search --no-floppy --fs-uuid --set=root 5737b5d1-dc33-492b-972e-f78d49e4c006
if loadfont /usr/share/grub/unicode.pf2 ; then
  set gfxmode=640x480
  load_video
  insmod gfxterm
  insmod lvm
  insmod part_msdos
  insmod ext2
  set root='(DesktopPC-root)'
  search --no-floppy --fs-uuid --set=root 5737b5d1-dc33-492b-972e-f78d49e4c006
  set locale_dir=($root)/boot/grub/locale
  set lang=C
  insmod gettext
fi
terminal_output gfxterm
set timeout=5
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
insmod lvm
insmod part_msdos
insmod ext2
set root='(DesktopPC-root)'
search --no-floppy --fs-uuid --set=root 5737b5d1-dc33-492b-972e-f78d49e4c006
insmod png
if background_image /usr/share/images/desktop-base/spacefun-grub.png; then
  set color_normal=light-gray/black
  set color_highlight=white/black
else
  set menu_color_normal=cyan/blue
  set menu_color_highlight=white/blue
fi
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Debian GNU/Linux, with Linux 2.6.38-2-686' --class debian --class gnu-linux --class gnu --class os {
	insmod gzio
	insmod lvm
	insmod part_msdos
	insmod ext2
	set root='(DesktopPC-root)'
	search --no-floppy --fs-uuid --set=root 5737b5d1-dc33-492b-972e-f78d49e4c006
	echo	'Loading Linux 2.6.38-2-686 ...'
	linux	/boot/vmlinuz-2.6.38-2-686 root=/dev/mapper/DesktopPC-root ro  quiet
	echo	'Loading initial ramdisk ...'
	initrd	/boot/initrd.img-2.6.38-2-686
}
menuentry 'Debian GNU/Linux, with Linux 2.6.38-2-686 (recovery mode)' --class debian --class gnu-linux --class gnu --class os {
	insmod gzio
	insmod lvm
	insmod part_msdos
	insmod ext2
	set root='(DesktopPC-root)'
	search --no-floppy --fs-uuid --set=root 5737b5d1-dc33-492b-972e-f78d49e4c006
	echo	'Loading Linux 2.6.38-2-686 ...'
	linux	/boot/vmlinuz-2.6.38-2-686 root=/dev/mapper/DesktopPC-root ro single 
	echo	'Loading initial ramdisk ...'
	initrd	/boot/initrd.img-2.6.38-2-686
}
menuentry 'Debian GNU/Linux, with Linux 2.6.32-5-686' --class debian --class gnu-linux --class gnu --class os {
	insmod gzio
	insmod lvm
	insmod part_msdos
	insmod ext2
	set root='(DesktopPC-root)'
	search --no-floppy --fs-uuid --set=root 5737b5d1-dc33-492b-972e-f78d49e4c006
	echo	'Loading Linux 2.6.32-5-686 ...'
	linux	/boot/vmlinuz-2.6.32-5-686 root=/dev/mapper/DesktopPC-root ro  quiet
	echo	'Loading initial ramdisk ...'
	initrd	/boot/initrd.img-2.6.32-5-686
}
menuentry 'Debian GNU/Linux, with Linux 2.6.32-5-686 (recovery mode)' --class debian --class gnu-linux --class gnu --class os {
	insmod gzio
	insmod lvm
	insmod part_msdos
	insmod ext2
	set root='(DesktopPC-root)'
	search --no-floppy --fs-uuid --set=root 5737b5d1-dc33-492b-972e-f78d49e4c006
	echo	'Loading Linux 2.6.32-5-686 ...'
	linux	/boot/vmlinuz-2.6.32-5-686 root=/dev/mapper/DesktopPC-root ro single 
	echo	'Loading initial ramdisk ...'
	initrd	/boot/initrd.img-2.6.32-5-686
}
menuentry 'Debian GNU/Linux, with Linux 2.6.26-2-686' --class debian --class gnu-linux --class gnu --class os {
	insmod gzio
	insmod lvm
	insmod part_msdos
	insmod ext2
	set root='(DesktopPC-root)'
	search --no-floppy --fs-uuid --set=root 5737b5d1-dc33-492b-972e-f78d49e4c006
	echo	'Loading Linux 2.6.26-2-686 ...'
	linux	/boot/vmlinuz-2.6.26-2-686 root=/dev/mapper/DesktopPC-root ro  quiet
	echo	'Loading initial ramdisk ...'
	initrd	/boot/initrd.img-2.6.26-2-686
}
menuentry 'Debian GNU/Linux, with Linux 2.6.26-2-686 (recovery mode)' --class debian --class gnu-linux --class gnu --class os {
	insmod gzio
	insmod lvm
	insmod part_msdos
	insmod ext2
	set root='(DesktopPC-root)'
	search --no-floppy --fs-uuid --set=root 5737b5d1-dc33-492b-972e-f78d49e4c006
	echo	'Loading Linux 2.6.26-2-686 ...'
	linux	/boot/vmlinuz-2.6.26-2-686 root=/dev/mapper/DesktopPC-root ro single 
	echo	'Loading initial ramdisk ...'
	initrd	/boot/initrd.img-2.6.26-2-686
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###

========================== DesktopPC-root/etc/fstab: ==========================

# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    defaults        0       0
/dev/mapper/DesktopPC-root /               ext3    errors=remount-ro 0       1
#/dev/sda1       /boot           ext2    defaults        0       2
#UUID=1a602b40-cc39-4cea-9894-d28ff3451d80       /boot           ext2    defaults        0       2
/dev/mapper/DesktopPC-swap_1 none            swap    sw              0       0
/dev/scd0       /media/cdrom0   udf,iso9660 user,noauto     0       0
/dev/scd1       /media/cdrom1   udf,iso9660 user,noauto     0       0
/dev/fd0        /media/floppy0  auto    rw,user,noauto  0       0

============== DesktopPC-root: Location of files loaded by Grub: ==============


 230.6GB: boot/grub/core.img
 229.5GB: boot/grub/grub.cfg
 128.9GB: boot/initrd.img-2.6.26-2-686
 128.9GB: boot/initrd.img-2.6.26-2-686.bak
 128.9GB: boot/initrd.img-2.6.32-5-686
  91.3GB: boot/initrd.img-2.6.38-2-686
 128.9GB: boot/vmlinuz-2.6.26-2-686
 128.9GB: boot/vmlinuz-2.6.32-5-686
 128.9GB: boot/vmlinuz-2.6.38-2-686

User avatar
kiyop
Posts: 3983
Joined: 2011-05-05 15:16
Location: Where persons without desire to improve themselves fear to tread, in Japan
Been thanked: 3 times

Re: Grub error, error: fd0 read error

#19 Post by kiyop »

Thanks for your posting the result.
In my installed debian (on non-lvm partition), boot info script version 0.60 correctly worked and posted the result.
Maybe, version 0.60 has some bug in dealing LVM or so, about parentheses and/or if-fi.

The result of boot info script is interesting. I will analyze more.
But boot info script version 0.55 may give wrong report for new version of GRUB2 or on LVM, though I am not sure.

Anyway, thank you very much for posting the result.
Openbox, JWM: Jessie, Sid, Arch / Win XP (on VirtualBox), 10
http://kiyoandkei.bbs.fc2.com/

mimo
Posts: 1
Joined: 2011-07-05 12:46

Re: Grub error, error: fd0 read error

#20 Post by mimo »

Have you worked this one out? Or made any progress? I have a very similar case. I have done two installs/upgrades on almost identical machines and have the "wait + fd0 read error + wait" issue on one machine only.

Here's what I did (or better say what I can remember).
  • had migrated my system from 32 bit to 64 bit Debian Lenny using debootstrap on the swap partition on a serial console
  • upgraded to grub2 (1.96 haha!)
  • all looking good, now convert to a raid1 ready system
  • I copied my basic system from /dev/sda1 to /dev/md1 (consisting of a degraded array of two devices with only /dev/sda2 present)
  • rebooted into that system - all fine
  • created /dev/md0 consisting of /dev/sda1 and a missing device
  • copied my system back to /dev/md0
  • ran update-grub etc
  • reboot
  • the wait + fd0 read error + wait happens. The system boots still okay but it's slightly disconcerting and anotehr sysadmin here might panic and just hit reset while waiting
I've tried most of the things I've found - like grub-install --no-floppy --recheck, ran update-grub two million times etc. I can't try the scarier things like dd'ing sda because the machine is in the co-lo center.
Anything else I could try?

Post Reply