Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Happy I was, using my dual-boot FC3/WIndows laptop, when one dark and cloudy day GrUB decides that it hates me.
I hadn't altered grub.conf, hadn't touched device.map, hadn't really messed with anything. All of a sudden though, GrUB decided that it was just going to hang after the BIOS finished loading and print the word GRUB on the screen. That's it., 'GRUB' and a blinking cursur. I don't even get to the menu.
With a sigh, I went over to my neighbors house and downloaded Knoppix. Booted onto the live CD, chrooted, and examined my grub config. As I thought, everything was as I had left it. Here are the contents of grub.conf and device.map:
[root@Knoppix grub]# cat grub.conf
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You do not have a /boot partition. This means that
# all kernel and initrd paths are relative to /, eg.
# root (hd0,4)
# kernel /boot/vmlinuz-version ro root=/dev/hda5
# initrd /boot/initrd-version.img
#boot=/dev/hda5
default=3
timeout=5
splashimage=(hd0,4)/boot/grub/splash.xpm.gz
hiddenmenu
title Fedora Core (2.6.10)
root (hd0,4)
kernel /boot/vmlinuz-2.6.10 ro root=LABEL=/ rhgb quiet
initrd /boot/initrd-2.6.10.img
title Fedora Core (2.6.9-1.667smp)
root (hd0,4)
kernel /boot/vmlinuz-2.6.9-1.667smp ro root=LABEL=/ rhgb quiet
initrd /boot/initrd-2.6.9-1.667smp.img
title Windows XP
rootnoverify (hd0,1)
chainloader +1
[root@Knoppix grub]# cat device.map
# this device map was generated by anaconda
(fd0) /dev/fd0
(hd0) /dev/hda
I tried running grub-install, and I think I may have discovered the problem:
[root@Knoppix grub]# grub-install hd0
/dev/hda5: Not found or not a block device.
[root@Knoppix grub]# grub-install hda
/dev/hda5: Not found or not a block device.
And here is some further confirmation:
GNU GRUB version 0.95 (640K lower / 3072K upper memory)
[ Minimal BASH-like line editing is supported. For the first word, TAB
lists possible command completions. Anywhere else TAB lists the possible
completions of a device/filename.]
That is a bit odd. Did you add any new hardware? Change the internal device connections?
I had a problem with grub after something along those lines. It might not work for you, but it wouldn't hurt. Boot knoppix, chroot into your system, and execute:
Code:
grub-install --recheck /dev/hda
That will force grub to re-verify its device mapping even though the device.map file exists. Like I said, I don't think it'll hurt anything, so it's worth a shot.
[root@Knoppix grub]# grub-install --recheck /dev/hda
Probing devices to guess BIOS drives. This may take a long time.
/dev/hda: Not found or not a block device.
[root@Knoppix grub]#
The only thing I can think of that I did was to install the ATI drivers. That involved compiling a kernel module and editing xorg.conf; none of those things should have screwed with GRUB, right?
The only other thing I could think to try is fsck'ing your partitions. Maybe grub is bothered by something Knoppix doesn't mind.
I'm at a loss to explain it, because you're clearly mounting the partitions through Knoppix, and that means Knoppix is capable of recognizing /dev/hda & reading/writing to it. From what grub is saying, you'd think the drive had gone bad.
Originally posted by Ekpyrotic Partition table entries are not in disk order
I've never seen that message before. One thing you could try is to go into fdisk, delete your swap partition, save & exit, re-enter, recreate the swap, save & exit.
Just something to re-write the partition table without losing any data.
Disk /dev/hda: 60.0 GB, 60011642880 bytes
255 heads, 63 sectors/track, 7296 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda1 1 6 48163+ 16 Hidden FAT16
/dev/hda2 * 7 5563 44636602+ 7 HPFS/NTFS
/dev/hda3 6839 7295 3670852+ db CP/M / CTOS / ...
/dev/hda4 5564 6838 10241437+ f W95 Ext'd (LBA)
/dev/hda5 5564 6708 9197181 83 Linux
/dev/hda6 6709 6838 1044193+ 82 Linux swap
Partition table entries are not in disk order
Command (m for help): v
16251 unallocated sectors
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table.
The new table will be used at the next reboot.
Syncing disks.
root@ttyp1[knoppix]#
Chrooted and:
[root@Knoppix boot]# grub-install --recheck /dev/hda
Probing devices to guess BIOS drives. This may take a long time.
/dev/hda: Not found or not a block device.
[root@Knoppix boot]#
So to summarize, so I don't screw this up, I should fdisk the swap into oblivion, reboot with knoppix, make a new swap, reboot again, and then try grub-install --recheck?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.