Code: Select all
error: fd0 read error
Code: Select all
error: fd0 read error
Code: Select all
su
grub-install /dev/sda
update-grub
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.
Code: Select all
su
aptitude update
aptitude upgrade
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.
What does it say? It's always worked for me._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.
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: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.
Sorry, but my knowledge doesn't go that far_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?
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.
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?_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?
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.
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?)_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.
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.
Code: Select all
ls
Code: Select all
set root=(hd0,1)
ls /
ls /boot/
Code: Select all
set root=(hd0,1)
linux /vmlinuz root=/dev/sda1 ro
initrd /initrd.img
boot
Code: Select all
fdisk -l
Code: Select all
rsync -avh --progress /dev/sda1/ /dev/DesktopPC-root/boot/
Code: Select all
dd if=/dev/zero of=/dev/sda1 bs=446 count=1
Code: Select all
apt-get install lvm2
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
Code: Select all
lvscan
Code: Select all
ACTIVE '/dev/DesktopPC/root' [295.32 GiB] inherit
ACTIVE '/dev/DesktopPC/swap_1' [2.53 GiB] inherit
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
Code: Select all
chroot /mnt
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
Code: Select all
dpkg-reconfigure grub-pc
Code: Select all
failed (code 8)
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?)._stefanos_ wrote:Upon using a LiveCD, I saw that /dev/sda1 and /dev/DesktopPC-root contained both of them a grub folder!
Typo. /etc/fstab_stefanos_ wrote:Now it's about time to edit /dev/fstab
_stefanos_ wrote:/dev/mapper/DesktopPC-root / ext3 errors=remount-ro 0 1
I am curious._stefanos_ wrote:/dev/mapper/DesktopPC-swap_1 none swap sw 0 0
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.And so, your update-grub only changed the contents of /boot in /dev/DesktopPC-root (in LVM?).
I forgot to mention that I edited /etc/default/grub and added this lineGrub2 can recognize LVM and RAID. You could include correct modules for LVM and RAID into core.img of grub2.
Installing grub2 correctly is better.
Code: Select all
GRUB_PRELOAD_MODULES=lvm
Thanks for detecting the typo; already fixed it.Typo. /etc/fstab
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 RepositoryI 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.)
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.Please run boot info script and submit the result if you care.
No._stefanos_ wrote: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.Please run boot info script and submit the result if you care.
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
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