LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 06-29-2004, 02:33 AM   #1
ashleyfrazer
LQ Newbie
 
Registered: Feb 2001
Location: London
Distribution: Red Hat Linux 9.0
Posts: 23

Rep: Reputation: 15
Moving a Disk from HDC to HDA?


Hi
I have upgraded my Linux box to a shuttle 41G from a standard PC tower. In the process I have moved only one of the disks (an old slow and very small disk that I though wasn't being used had been left in the old chassis)

Assembly of the machine was fine but when I switch it on it refused to boot. All the tests work etc but the machine can not boot from the drive which contains RH9 with all the latest patches etc.

I think the problem is that the drive was formally the master on the secondary channel of the old machine but it now the only drive on the primary channel of the new machine. Effectively its been moved from hdc to hda. Also there is no MBR on the drive. (I do have an emergency floppy)

I have an ISO image of SUSE on cd rom and have been able to boot the machine with it and look at the drive (hda) with all the data on it. I tried to reinstall grub into the mbr on hda but to do this grub-installer needs to build a list of drives and store them in /boot. This is impossible becasue /boot is on the cdrom!

Can anyone suggest how I could boot from either the SUSE cd or the floppy and change the previous hdc refs to hds (I know how to change the grub.conf files) I guess I need to change all the mount points too (/etc/???) and perhaps reinstall grub after using a floppy boot. But is there anything else?

I would rather not reinstall the RH - it would take ages to repatch it.

Thanks

ash
 
Old 06-29-2004, 03:24 AM   #2
nnsg
Member
 
Registered: Apr 2004
Distribution: Slackware 9.1/10.1, Mandrake 9.1/10.1
Posts: 75

Rep: Reputation: 15
Hi,

How about:

- boot with Suse
- mount your old file system to a tmp directory (e.g. /mnt/tmp)
- chroot to /mnt/tmp
- edit your /etc/fstab to reflect the changes
- edit and update grub (sorry I don't know anything about grub, I use lilo)
- exit chroot and unmount /mnt/tmp, reboot.
 
Old 06-29-2004, 03:37 AM   #3
ashleyfrazer
LQ Newbie
 
Registered: Feb 2001
Location: London
Distribution: Red Hat Linux 9.0
Posts: 23

Original Poster
Rep: Reputation: 15
Hi
Thanks for that - but how do I fix the missing MBR?

Ash
 
Old 06-29-2004, 03:56 AM   #4
nnsg
Member
 
Registered: Apr 2004
Distribution: Slackware 9.1/10.1, Mandrake 9.1/10.1
Posts: 75

Rep: Reputation: 15
There's a "-M" switch in Lilo to install a MBR.... maybe there's a option in grub similar to this, have a look in man page of grub?

Let's hope someone else can answer you as I really haven't use grub before
 
Old 06-29-2004, 05:30 AM   #5
gredhat
LQ Newbie
 
Registered: Jun 2004
Location: Delhi, INDIA
Distribution: Redhat, Fedora, Suse
Posts: 16

Rep: Reputation: 0
Hi
For this to work you have to get redhat boot cd. You can boot from the redhat bootable cd in to the rescue mode. Now mount the root filesystem by typing
chroot /mnt/sysimage
now edit the fstab to ur liking.
To install grub on MBR type
grub-install /dev/hda
to install on the root partiton type
grub-install /dev/hda(x) where x is your partition number on which grub is to be installed.

hope it helps.
 
  


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
Moving from hdc to hda - Kernel panic goozlq Linux - Hardware 5 08-31-2005 06:06 AM
How to shift hard disk from hda to hdc ? prabhatsoni Linux - Hardware 5 08-04-2005 06:44 PM
hda windows, hdc linux dataport Linux - Newbie 4 01-21-2004 07:26 PM
kernel panic:no init found after changing from hda to hdc janjack Linux - General 10 11-12-2003 07:19 PM
GRUB error WinXP hda, Linux hdc oLEG Linux - General 4 06-26-2003 01:15 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:42 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration