Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I switched from an Ubuntu to the CentOS yesterday. But it seems I have messed my installation somehow, since OS will only start correctly if the USB with the installation is plugged in.

Long story:

I've downloaded a live DVD CentOS 6 from the public repository, and using it with unetbotin created USB installation. That USB was used to install CentOS.

During the installation, (only 1 ) hard disk was mounted under /sdb and USB installation was mounted under /sda. I "think" I selected to boot from the /sdb.

Output of sudo fdisk -l

Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
249 heads, 62 sectors/track, 126540 cylinders
Units = cylinders of 15438 * 512 = 7904256 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x671e6467

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1       26533   204800000    7  HPFS/NTFS
/dev/sdb2           26533       28557    15624193    5  Extended
/dev/sdb4   *       28569      126540   756238336   83  Linux
/dev/sdb5           26533       28557    15624192   82  Linux swap / Solaris

Disk /dev/sda: 8086 MB, 8086618112 bytes
37 heads, 13 sectors/track, 32836 cylinders
Units = cylinders of 481 * 512 = 246272 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x90909090

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           5       32837     7896064    b  W95 FAT32

Wierd thing:
if the USB stick is not connected to the machine, the boot screen will show up ( with both new installation of the CentOS and old Windows installation). But after I select either of them, after few seconds the machine will reboot. If the USB is connected, the same or similar boot screen shows up I OS starts normally.

I've tried to reinstall GRUB using grub-install using /dev/sdb and /dev/sda options, but I wasn't able to make progress.

Also, I don't understand purpose and content of the device.map file:

(hd0)   /dev/sda
(hd1)   /dev/sdb

I tried removing /dev/sda from the device.map, which also doesn't help.

grub.conf from /boot/grub/

# 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 (hd1,3)
#          kernel /boot/vmlinuz-version ro root=/dev/sdb4
#          initrd /boot/initrd-[generic-]version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd1,3)/boot/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.32-220.2.1.el6.x86_64)
        root (hd1,3)
        kernel /boot/vmlinuz-2.6.32-220.2.1.el6.x86_64 ro root=UUID=6cbcc55f-3342-4e85-a4c2-8355e73962f2 rd_NO_LUKS LANG=en_US.UTF-8  KEYBOARDTYPE=pc KEYTABLE=croat rd_NO_MD quiet SYSFONT=latarcyrheb-sun16 rhgb crashkernel=128M rd_NO_LVM rd_NO_DM
        initrd /boot/initramfs-2.6.32-220.2.1.el6.x86_64.img
title CentOS (2.6.32-220.el6.x86_64)
        root (hd1,3)
        kernel /boot/vmlinuz-2.6.32-220.el6.x86_64 ro root=UUID=6cbcc55f-3342-4e85-a4c2-8355e73962f2 rd_NO_LUKS LANG=en_US.UTF-8  KEYBOARDTYPE=pc KEYTABLE=croat rd_NO_MD quiet SYSFONT=latarcyrheb-sun16 rhgb crashkernel=128M rd_NO_LVM rd_NO_DM
        initrd /boot/initramfs-2.6.32-220.el6.x86_64.img
title Other
        rootnoverify (hd1,0)
        chainloader +1

EDIT: more information
by deleting "quiet" and "rhgb" from the grub.conf I was able to see the error message : No devices found .

share|improve this question

1 Answer 1

up vote 4 down vote accepted

It seems the problem was incorrect mapping of the hard disk.
If the USB was plugged in during boot, hard disk was recognized as hd1; but if there wasn't the USB, it was recognized as hd0.

Fixed the problem by changing grub.conf to use hd0.

share|improve this answer
1  
That was gonna be my guess ;) –  Aaron D. Marasco Jan 23 '12 at 1:16
1  
@Nils, I need to wait 2 days from answering my question to accept it. Deadline is tomorrow. –  bbaja42 Jan 23 '12 at 7:01

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.