LinuxQuestions.org
Visit Jeremy's Blog.
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-28-2010, 05:02 AM   #16
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

When you boot up your Red Hat do you know which is you /boot? and post here the directory of /boot/grub. My Red Hat 9 looks like the following
Code:
[saikee@localhost saikee]$ su
Password:
[root@localhost saikee]# ls /boot/grub
device.map     ffs_stage1_5  menu.lst           splash.xpm.gz    xfs_stage1_5
device.map~    grub.conf     menu.lst~          stage1
e2fs_stage1_5  grub.conf~    minix_stage1_5     stage2
fat_stage1_5   jfs_stage1_5  reiserfs_stage1_5  vstafs_stage1_5
[root@localhost saikee]#
When I issue a Grub shell and ask Grub to find /boot/grub/grub.conf I got
Code:
    GRUB  version 0.93  (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.]
                                                                                
grub> find /boot/grub/grub.conf
 (hd0,9)
 (hd0,10)
 (hd0,20)
 (hd0,21)
 (hd0,23)
 (hd0,24)
 (hd0,28)
 (hd0,29)
 (hd0,32)
 (hd0,46)
 (hd0,57)
 (hd0,58)
 (hd0,59)
My Red Hat 9 is in hda11 or (hd0,10) among the 145 OSes I have booted and documented.
My (hd0,9) is Turbo Linux, (hd0,20) is Blag, (hd0,21) is Fedora Core 4, (hd0,23) is Red Flag, (hd0,24) is Linare, (hd0,28) is Vine, (hd0,29) is Specific, (hd0,32) is Asian Linux, (hd0,46) is Foresight, (hd0,57) is Haansoft, (hd0,58) is Fedora Core 3 and (hd0,59) is Scientific Linux, all of which are based on Red Hat and so have grub.conf inside their partitions.

The Grub in my Red Hat 9 is version 0.93 and the Red Hat 9 has a 2.4.20 kernel from command "uname -r" as indicated below
Code:
[root@localhost saikee]# uname -r
2.4.20-8

Last edited by saikee; 07-28-2010 at 05:11 AM.
 
Old 07-31-2010, 02:53 AM   #17
hadimotamedi
Member
 
Registered: Aug 2009
Posts: 228

Original Poster
Rep: Reputation: 30
Please find below the stuff of my /boot/grub from the primary disk (hd0):
'device.map e2fs_stage1_5 fat_stage1_5 ffs_stage1_5 grub.conf menu.lst->./grub.conf minix_stage1_5 reiserfs_stage1_5 splash.xpm.gz stage1 stage2 vstafs_stage1_5'
Then I issue grub shell and ask grub to find /boot/grub/grub.conf but I got :
Error 15: file not found
Please find below the output of 'uname -r' :
2.4.7-10
Please comment me back.
 
Old 07-31-2010, 04:48 AM   #18
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
According to your information of /boot/grub
Quote:
'device.map e2fs_stage1_5 fat_stage1_5 ffs_stage1_5 grub.conf menu.lst->./grub.conf minix_stage1_5 reiserfs_stage1_5 splash.xpm.gz stage1 stage2 vstafs_stage1_5'
The file grub.conf is inside but your v0.93 Grub refuses to acknowledge it.

If I have guess a reason why Grub behaves like this I would suspect your Grub V0.93 is too old for the job and may not have the driver to read a USB disk during boot time. Once booted the Linux kernel with the help of drivers can see your second hard disk and its contents.

Your Red Hat is indeed very old as I have not worked with such an old 2.4 kernel and such a ancient Grub, even I did have a V0.90 but it was a patched version for DSL.

My guess is even if you manage to get Grub working you still have one hell of an uphill struggle to get Red Hat working with the USB device as that kernel is clearly not equipped to work on USB.

For the cure I am pretty sure you can put a newer version of Grub into your existing installation. You can boot up a recent Linux that has Grub1, say from a Fedora, and copy the booted up /boot/grub directory into your Red Hat directory, which must be of course mounted first. You then used the new Grub from the booted up Fedora, which you use as a Live CD only, to set Grub1 up by command
Code:
grub
root (hd1,0)
setup (hd1)
quit
You should find the new Grub able to detect the (hd1).

Changing the Grub version is a simple matter. I often install Grub on its own this way.

Last edited by saikee; 07-31-2010 at 04:49 AM.
 
Old 07-31-2010, 11:42 PM   #19
hadimotamedi
Member
 
Registered: Aug 2009
Posts: 228

Original Poster
Rep: Reputation: 30
I have a centos5 machine ,so I burned a cd containing its /boot/grub contents. Then I copied it into the same folder on my redhat machine but nothing changed. Can you please confirm if my understanding of your comment is right?
 
Old 08-01-2010, 06:52 AM   #20
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
Here is the verdict.

I attached 2 flash drives, one without any partition and another with several partitions, to one of my boxes and booted up several version of Grub as I keep a few version in floppies.


V0.91, V0.95, V0.97 and v1.97 - All two flash drives (hd1) & (hd2) were reported.

However if I switch in the Bios page "USB legacy support" from "Enabled" to "Disabled" all the flash drives were not reported.

Conclusion : You need the motherboard to have the feature to present USB devices as disks by the Bios before Grub can see them.
 
Old 08-03-2010, 06:14 AM   #21
hadimotamedi
Member
 
Registered: Aug 2009
Posts: 228

Original Poster
Rep: Reputation: 30
I didn't have success to accomplish this. So I thought if I can resort it and try to install my old redhat on one of my centos partitions and them copy its contents via 'dd if of' to the usb disk (as my centos can recognize the usb disks). Can you please let me know how it can be accomplished (I mean dual booting centos with redhat) ?
 
Old 08-03-2010, 06:39 AM   #22
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
Don't think you can dd it out as your hard disk geometry is different to the USB disk.

You could transfer the content of an installed Red Hat by copying every partition of one disk to another disk with the same number of partitions by tar, cp etc commands and then repair Grub and the /etc/fstab. Your Red Hat should be old enough to permit migration.

It is a lot faster if you just take the Red Hat installation CD to the CentOS computer and install it there. I think you should be able to down load the old Red Hat from the Internet.
 
Old 08-03-2010, 06:57 AM   #23
hadimotamedi
Member
 
Registered: Aug 2009
Posts: 228

Original Poster
Rep: Reputation: 30
I have the redhat install cd but my redhat machine does not recognize usb disk (but my centos does). So I thought if I can install redhat on one of its partitions and then copy its contents to usb disk.
 
Old 08-03-2010, 07:06 AM   #24
hadimotamedi
Member
 
Registered: Aug 2009
Posts: 228

Original Poster
Rep: Reputation: 30
If so, then how can I make the usb disk geometry the same as my internal disk when formatting it? (I mean making the same number of partitions)
 
Old 08-03-2010, 12:28 PM   #25
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
You clone the whole disk. This way you get exactly the same geometry on the target disk as the source disk.
 
Old 08-06-2010, 10:41 PM   #26
hadimotamedi
Member
 
Registered: Aug 2009
Posts: 228

Original Poster
Rep: Reputation: 30
Sorry. How it can be done with he 'tar' command ?
 
Old 08-07-2010, 06:41 AM   #27
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
tar command operates on files inside a partition. It is a file-copying command, not one that transfers boot sectors, partition table, MBR and the entire disk using a sector-by-sector cloning.

Last edited by saikee; 08-07-2010 at 06:42 AM.
 
Old 08-07-2010, 06:55 AM   #28
hadimotamedi
Member
 
Registered: Aug 2009
Posts: 228

Original Poster
Rep: Reputation: 30
Sorry. You mean it cannot be used as what 'cp' is doing in the following?
#cp -ax / /new-disk
 
Old 08-07-2010, 04:36 PM   #29
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
Nop. You are copying folder / to folder /new-disk only.

You use dd to clone disk sda to sdb by
Code:
dd if=/dev/sda of=/dev/sdb
Just make sure the target disk to be written on sdb is bigger or exactly in size to the source disk and do not mount any of them. This way you copy only the "1" and "0" of the hard disk and so the boot sector, partition table and MBR are cloned.

Read

man cp
man tar
man dd
 
Old 08-08-2010, 01:32 AM   #30
hadimotamedi
Member
 
Registered: Aug 2009
Posts: 228

Original Poster
Rep: Reputation: 30
Sorry. You mean two ide disks? But not one ide and one usb disks? Can you please confirm if your proposed 'dd if of' procedure can be used for one ide disk as primary and one usb disk as secondary?
 
  


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 10:47 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