LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 07-25-2010, 06:13 AM   #1
hadimotamedi
Member
 
Registered: Aug 2009
Posts: 228

Rep: Reputation: 30
/dev/sda ?


Dear All
I tried to install RedHat on my external usb disk from the installation cd.At the prompt, I typed 'expert' and tried to install RedHat on the external usb disk as /dev/sda. But when I reboot and choose to boot from the usb disk at the setup menu, it cannot boot. Can you please let me know how to make a bootable usb disk ?
Thank you
 
Old 07-25-2010, 06:26 AM   #2
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
Red Hat uses Grub. Grub identifies a system to boot by the disk number and partition number.

When you install Red Hat you could have your internal hard disk as /dev/sda and the USB disk as /dev/sdb.

When you instruct the Bios to boot the USB disk first then Bios tells the boot loader the USB disk is now /dev/sda and the internal hard disk is /dev/sdb.

That means your original sda is now sdb. To Grub your original (hd0) and (hd1) has swapped positions.

Could this make sense to you? It would to me if you see no sign of Grub when trying to boot the USB disk.
 
Old 07-25-2010, 06:52 AM   #3
hadimotamedi
Member
 
Registered: Aug 2009
Posts: 228

Original Poster
Rep: Reputation: 30
When I installed RedHat, it showed my internal disk as /dev/hda and the usb disk as /dev/sda so I selected to install os on /dev/sda. Can you please confirm if it was a correct selection ?
 
Old 07-25-2010, 07:11 AM   #4
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
That is the correct interpretation if you still run your Red Hat with a IDE disk but the disk order would still be

/dev/hda (hd0)
/dev/sda (hd1)

if you check /boot/grub/device.map of the Red Hat partition.

You did not elaborate the error but just said it could not boot so there is no way we could cure your problem with the information supplied.

According to your description you should should have installed Grub into the USB device so you should be able to see a Grub menu. When selecting Red Hat it fails to boot.

If it can't load the kernel or could not find the required partition because the disk order mismatches you can overcome it by asking Grub to swap the disk order on-the-fly with commands
Code:
map (hd0) (hd1)
map (hd1) (hd0)
If Grub loads the kernel but the Red Hat fails to boot, say with a kernel panic, then your Red Hat has not been configured to boot from a USB device.

If you see a Grub menu then you can investigate all the above and try to boot the system manually in a Grub prompt.

Last edited by saikee; 07-25-2010 at 07:16 AM.
 
Old 07-25-2010, 07:21 AM   #5
hadimotamedi
Member
 
Registered: Aug 2009
Posts: 228

Original Poster
Rep: Reputation: 30
When I reboot the machine and then press 'Esc' and from the select boot device menu I select to boot from usb disk but I don't see any grub menu. But when I select to boot from internal disk I see the grub menu. Please let me know what can I do to correct it?
 
Old 07-25-2010, 08:17 AM   #6
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
That means you have a Grub menu in the internal hard disk and not in the USB hard disk. This can be either your internal hard disk is a Sata so Red Hat calls it /dev/sda, as it does to mine, or your installating Grub in the USB disk was unsuccessful.

You can test the system in the following manner.

Tell the Bios you want the internal hard disk as 1st boot disk and get a booting Grub menu but do not select a system to boot. Instead you press the "c" key to drop into a terminal mode with a Grub prompt. If your Red Hat has a Graphic background then before you press the "c" key you may need to press the "esc" key to change it from a graphic to terminal mode first.

Ask Grub to tell you how many partition has a Grub configuration file by this command
Code:
find /boot/grub/menu.lst
Let say Grub return with one of the choice as (hd1,0) that means in the 1st partition of the 2nd hard disk as Grub counts from 0, then you can fire up this system by command
Code:
root (hd1,0)
configfile /boot/grub/menu.lst
Please do adjust the (hd1,0) according to what Grub reports in your case.

If you succeed in the above then you have installed the Red Hat in the second disk but it has no Grub in its MBR.

Let us know your progress for the next fix.
 
Old 07-25-2010, 10:54 PM   #7
hadimotamedi
Member
 
Registered: Aug 2009
Posts: 228

Original Poster
Rep: Reputation: 30
Please find below the system reply to your commands :
grub>find /boot/grub/menu.lst
ERROR 15: File not found
grub>root (hd1,0)
Filesystem type is ext2fs,partition type 0x83
grub>configfile /boot/grub/menu.lst
ERROR 15: File not found
Please commend me back.
 
Old 07-26-2010, 02:22 AM   #8
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
Ask Grub which partition has /boot/grub/menu.lst by
Code:
find /boot/grub/menu.lst
This command also list the partition layout of the second disk
Code:
geometry (hd1)
 
Old 07-26-2010, 02:30 AM   #9
hadimotamedi
Member
 
Registered: Aug 2009
Posts: 228

Original Poster
Rep: Reputation: 30
I tried for your commands. Please find below the system reply :
grub>find /boot/grub/menu.lst
Error 15: File not found
grub>geometry (hd1)
Error 21: Selected disk does not exist
Please comment me.
 
Old 07-26-2010, 06:27 AM   #10
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
At the top of the Grub screen there is a Grub version number. What version of Grub are you using?

It appears your current Grub fails to find the 2nd hard disk.

You can confirm the 1st hard disk by command
Code:
geometry (hd0)
Current Grub1 0.97 has been patched to read Ext4 partition and work with gpt disks and shows no vserion number at the top of the Grub screen.

It is possible older Grub may not be able to see a USB drive unless the Bios arranges the USB drive as the first boot disk. In other word the older Grub cannot detect such a drive unless it is in the (hd0) position which only the Bios can change.
 
Old 07-26-2010, 07:00 AM   #11
hadimotamedi
Member
 
Registered: Aug 2009
Posts: 228

Original Poster
Rep: Reputation: 30
It shows my grub version as 0.90 .
When I try for the following :
grub>geometry (hd0)
It shows the internal disk geometry.
I need to press 'Esc' after reboot the machine and select the boot device from :
SATA
CD/DVD
USB
Please help.
 
Old 07-26-2010, 07:12 AM   #12
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
Boot up Red Hat and post here the output of
Code:
fdisk -l
When I entered Linux the oldest Grub I could lay my hand on was Grub 0.91 off DSL. You must be using the Red Hat 9 or older.

When you run Red Hat Linux its kernel has the driver for the USB device so you should be aboe to see the USB disk.

You can also confirm the availability of the USB disk in Red Hat's Bash terminal. The USB disk (hd1) will be reported by these commands (inside Red Hat terminal)
Code:
su
grub
geometry (hd0)
geometry (hd1)
find /boot/grub/menu.lst
quit
If you can locate a partition in (hd1), say for example (hd1,0), then you can ask Grub to install itself in the MBR of the USB disk by
Code:
grub
root (hd1,0)
setup (hd1)
quit
Please adjust the partition number that has /boot/grub/menu.lst in disk (hd1) in your case and do not put in (hd1,0) blindly. There shoudl be a partition in (hd0) that has /boot/grub/menu.lst too but it will be from the internal disk.

If you have done the above then instruct the Bios to boot the USB and the Red Har there will be fired up. Not saying it will work but it should boot.

Last edited by saikee; 07-26-2010 at 07:15 AM.
 
Old 07-28-2010, 01:17 AM   #13
hadimotamedi
Member
 
Registered: Aug 2009
Posts: 228

Original Poster
Rep: Reputation: 30
Please find below the output of 'fdisk' :
#fdisk -l /dev/hda
Disk /dev/hda: 16 heads, 63 sectors, 266305 cylinders
Units= cylinders of 1008 * 512 bytes
/dev/hda1 * 1 102 51376+ 83 Linux
/dev/hda2 103 175186 88242336 83 Linux
/dev/hda3 175187 178826 1834560 82 Linux swap
/dev/hda4 178827 266305 44089416 f Win95 Ext'd (LBA)
/dev/hda5 178827 265004 43433680 83 Linux
/dev/hda6 265005 265784 393088 83 Linux
/dev/hda7 265785 266304 262048 83 Linux

#fdisk -l /dev/sda
Disk /dev/hda: 64 heads, 63 sectors, 19077 cylinders
Units= cylinders of 2048 * 512 bytes
/dev/sda1 * 1 50 51184 83 Linux
/dev/sda2 51 1842 1835008 83 Linux swap
/dev/sda3 1843 13018 11444224 82 Linux
/dev/sda4 13019 19077 6204416 f Win95 Ext'd (LBA)
/dev/sda5 13019 18437 5549040 83 Linux
/dev/sda6 18438 18821 393200 83 Linux
/dev/sda7 18822 19077 262128 83 Linux

Then I tried as :
#su
#grub
grub>geometry (hd0)
drive 0x80: C/H/S = 4161/16/63, The number of sectors = 268435455, /dev/hda
Partition num:0,Filesystem type is ext2fs, partition type 0x83
Partition num:1,Filesystem type is ext2fs, partition type 0x83
Partition num:2,Filesystem type unknown , partition type 0x82
Partition num:4,Filesystem type is ext2fs, partition type 0x83
Partition num:5,Filesystem type is ext2fs, partition type 0x83
Partition num:6,Filesystem type is ext2fs, partition type 0x83
grub>geometry (hd1)
drive 0x81: C/H/S = 19077/64/32, The number of sectors = 39070080, /dev/sda
Partition num:0,Filesystem type is ext2fs, partition type 0x83
Partition num:1,Filesystem type unknown , partition type 0x82
Partition num:2,Filesystem type is ext2fs, partition type 0x83
Partition num:4,Filesystem type is ext2fs, partition type 0x83
Partition num:5,Filesystem type is ext2fs, partition type 0x83
Partition num:6,Filesystem type is ext2fs, partition type 0x83
grub>find /boot/grub/menu.lst
Error 15:file not found
grub>root (hd1,0)
Filesystem type is ext2fs, partition type 0x83
grub>setup (hd1)
Checking if"/boot/grub/stage1" exists ... no
Checking if"/grub/stage1" exists ... no
Error 15: file not found

Please help me, based on the above data.
 
Old 07-28-2010, 02:30 AM   #14
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
Try to find Grub's configuration file by

Code:
find /boot/grub/grub.conf
Some Red Hat calls Grub's configuration file "grub.conf" which sometimes is symbolic-linked with "menu.lst". Your version of Red Hat doesn't.

It was my mistake. I should have asked you to search grub.conf.
 
Old 07-28-2010, 02:39 AM   #15
hadimotamedi
Member
 
Registered: Aug 2009
Posts: 228

Original Poster
Rep: Reputation: 30
The file is present on the (hd0) , as the 'ls' from /boot/grub shows it. But on the grub :
grub>find /boot/grub/grub.conf
Error 15 : file not found
Please help me.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
iscsi: which local device (/dev/sda, /dev/sdb) is used WITHOUT dmesg? knikkerr Linux - Software 3 08-13-2010 04:30 AM
USB drive... /dev/sda1 doesn't show unless I try mounting /dev/sda as vfat finite Linux - Hardware 8 03-10-2009 12:52 AM
Installing RIP LinuX on a USB drive - device name /dev/sdc becomes /dev/sda Mleahy Linux - Software 1 07-30-2008 08:57 PM
Install lilo on external drive (/dev/sda), then boot as INTERNAL (/dev/hda)? slackware-elf Slackware 3 08-18-2007 04:51 PM
Sandisk USB card Reader not linking /dev/sg0 to /dev/sda acidraven Linux - Hardware 1 06-19-2004 03:56 PM


All times are GMT -5. The time now is 05:29 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration