LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This 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


Reply
  Search this Thread
Old 05-08-2005, 05:43 PM   #1
rwalkerphl
Member
 
Registered: Jun 2004
Location: NJ, US (Ex UK)
Distribution: RHEL3.0 / FC2
Posts: 79

Rep: Reputation: 15
Remove dual boot drive (HDA)


Hey there,

I have a machine that I set up as dual boot to Linux and XP. /boot is on hdb, but Grub is on hda.

Can anyone tell me how to migrate grub to be useable from hdb? I want to physically remove hda all together.

Alternatively, is there any way I can convert to NTFS partition used for the Windows set up to be storage on the linux system?

Thanks!

Robin.
 
Old 05-08-2005, 06:29 PM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,142

Rep: Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123
Re: Remove dual boot drive (HDA)

Quote:
Originally posted by rwalkerphl
I have a machine that I set up as dual boot to Linux and XP. /boot is on hdb, but Grub is on hda.
Can anyone tell me how to migrate grub to be useable from hdb? I want to physically remove hda all together.
O.K., here goes;
- uncable the drive
- boot the Linux CD to get into recovery mode (varies by distro)
- re-install grub to the MBR
- check menu.lst/grub.conf
- update fstab to remove references to hdb (now will be hda)
- reboot from hard disk
Quote:
Alternatively, is there any way I can convert to NTFS partition used for the Windows set up to be storage on the linux system?
Much better option.
Code:
fdisk /dev/hda
Delete the windoze partition(s), and create some Linux ones.
*WARNING:* You will lose *ALL* the data on any deleted partition(s). Make sure you delete the correct one(s).
Then add the new (Linux) partitions to fstab to get them mounted on boot.
 
Old 05-08-2005, 09:09 PM   #3
rwalkerphl
Member
 
Registered: Jun 2004
Location: NJ, US (Ex UK)
Distribution: RHEL3.0 / FC2
Posts: 79

Original Poster
Rep: Reputation: 15
I tried uncabling, and received the error 'error starting operating system'.

I was worried if I did fdisk on hda that it would over write grub on the drive, and I wouldn't be able to get in at all. I am assuming /boot is on hda, but cannot be sure - it is not showing up in fstab other than LABEL=/boot

Any assurance or further advice would be appreciated.

Thanks,

Robin.
 
Old 05-08-2005, 09:49 PM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,142

Rep: Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123
Sounds like you tried to boot the remaining hard disk - you need to boot the CD to re-install grub.
fdisk'ing the (original) hda is *always* going to have less effect than removing it altogether.
fdisk deals with partitions. If you happen to remove the /boot partition, yes you will have problems.
That will show as a "grub>" prompt., and no way to proceed with the boot.

You originally stated /boot was on (original) hdb - you'll need to assure yourself of it's location prior to re-installation, and you'll need to use the same partition if it exists on (original) hdb, or create a new one if it existed on (original) hda, and is no longer available.

I don't know how this should be handled with FC - I've never used it.
Perhaps you should ask this in the Fedora forum, and get some-one with experience in that distro to help.
 
Old 05-08-2005, 10:08 PM   #5
rwalkerphl
Member
 
Registered: Jun 2004
Location: NJ, US (Ex UK)
Distribution: RHEL3.0 / FC2
Posts: 79

Original Poster
Rep: Reputation: 15
I just checked with df -a, and /boot is partitioned as hdb1, so, can I get the bios to point directly to that drive, and it should start up grub?
 
Old 05-09-2005, 04:12 AM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,142

Rep: Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123
No.
You will (probably) have no boot code in the MBR of the second disk - you'll get the error you mention above.
Have another look at my first post - you'll need all the steps (at least) I mentioned.
 
Old 05-09-2005, 01:57 PM   #7
rwalkerphl
Member
 
Registered: Jun 2004
Location: NJ, US (Ex UK)
Distribution: RHEL3.0 / FC2
Posts: 79

Original Poster
Rep: Reputation: 15
Ok, so I managed to get hda set up - tip... make sure you do an MKFS on the disk if it is not a linux formatted partition...

Anyway - another question. Is there any way to migrate the OS from hdb to hda? I want to free up the disk...

Thanks...
 
Old 05-09-2005, 04:27 PM   #8
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,142

Rep: Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123
Quote:
Originally posted by rwalkerphl
Ok, so I managed to get hda set up - tip... make sure you do an MKFS on the disk if it is not a linux formatted partition...
Goes without saying ....
But you're right, I should have included it.
Quote:
Anyway - another question. Is there any way to migrate the OS from hdb to hda? I want to free up the disk...
Plenty - most pretty simple; "cp -a" would do most of it if partitions are prepared, and keep things like permissions intact. Do a search - I've seen several suggestions pass by as I've watched these forums. Can be done from the running system, but there are issues with things like /proc.
I'd be inclined to do it from something like Knoppix, although you'd need to remount the targets as R/W as Knoppix mounts all disks as R/O for safety.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Boot Sector on dual boot PC. Remove Mandrake and replace with FreeBSD Phin666 *BSD 1 10-30-2004 05:02 PM
dual boot - hda & hdb - both Linux tw001_tw Slackware 8 09-07-2004 07:36 PM
Dual boot: How do I remove it? berntd Red Hat 2 07-22-2004 08:44 PM
Dual Boot HDA issues geckoinatux Linux - Hardware 5 05-24-2004 09:42 AM
lilo dual boot two linux distros / hda and hdb rioguia Linux - Newbie 2 01-23-2003 12:35 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:32 AM.

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