LinuxQuestions.org
Register a domain and help support LQ
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 10-22-2003, 07:25 AM   #1
ab2650
LQ Newbie
 
Registered: Oct 2003
Posts: 4

Rep: Reputation: 0
Talking Dual HDD with old grub getting in the way


Hi All,
Disclaimer: Not exactly a newbie, but maybe a bit inexperienced in boot records and such... Here's my deal:

The system in question has 2 hard drives; one 9GB SCSI, and one 80GB IDE. I have made my installation so that the system and boot run from the SCSI drive, as well as allowing Grub to be installed there. The IDE drive (hda) has but 1 partition for file storage.

The issue is that i had a previous installation of Grub on the IDE drive, and if allowed by the BIOS to boot from that device first, it fouls up (obviously: no instance of that installation is left on the system). I have successfully set my BIOS to boot from the SCSI drive and all is fine.

But having to be thorough (maybe to a critical weakness) i would like to remove Grub from the boot record of the IDE drive. While not causing any issues, if the BIOS were to reset and/or allow boot from the IDE drive first, I may have a problem.

For posterity's sake, i am using RH9 on a Dell PowerApp.

Much thanks, and i can't say how much help this website (and its forums) have been.
--
Aaron Bennett
 
Old 10-22-2003, 08:15 AM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 14,930

Rep: Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520
You can use win 98 boot disk and run fdisk /mbr or dd to zeroize the MBR.

BTW. If the BIOS were to be reset and the SCSI drive was not in the boot order sequence the computer still would not boot. The computer would halt with a no OS found error.
 
Old 10-23-2003, 03:45 AM   #3
ab2650
LQ Newbie
 
Registered: Oct 2003
Posts: 4

Original Poster
Rep: Reputation: 0
Thanks michaelk,
Actually, the BIOS' default boot order lists both the SCSI and IDE drives, but in the incorrect sequence (i.e., IDE then SCSI). Before i go ahead with MS's fdisk /mbr, can you think of any issues that would arise that there is a SCSI drive in the system? (As far as I know, Win98 boot disks won't load SCSI, but that shouldn't be an issue, because i'm only concerned about the IDE mbr... Right?)
Thanks,
Aaron
 
Old 10-23-2003, 06:43 PM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 14,930

Rep: Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520
Correct, default Win 98 boot disks do not include SCSI support.
 
Old 10-24-2003, 02:09 AM   #5
ab2650
LQ Newbie
 
Registered: Oct 2003
Posts: 4

Original Poster
Rep: Reputation: 0
Well it appears here that my 2 options are:
1) pull the SCSI drive/card so the system only recognizes 1 drive, and use the win98 "fdisk /mbr" method. (note, this didn't work with the SCSI drive attached)
-or-
2) Use dd from the current working system on there, but i can only follow some sketchy instructions that i've found. I'm worried about doing damage to data on the drive. :-/

Update: It appears an earlier post never actually posted.. so here was the gist of it....

I tried win98's fdisk, but i suspect the SCSI drive being present is causing problems. I get a message to the effect of (and i appologize for innaccuracy; this was last night) "Couldn't access the primary disk" and when i run fdisk with "/mbr" i get a single line error message saying "The master boot record has NOT been altered."

As said, i believe this has to do with the SCSI drive being present, even though not given drivers by win98.

I suppose that i could yank the drive, and put it in another system to perform this, but i almost feel like that would be cheating... I don't particularily feel like un-racking the server, and fiddling around in a 1u. I may have to though...

thanks,
Aaron

Last edited by ab2650; 10-24-2003 at 02:13 AM.
 
Old 10-24-2003, 05:02 AM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 14,930

Rep: Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520
dd if=/dev/zero of=/dev/yourharddrive bs=512
That writes all zeros to your MBR. You will not damage the drive.

Never had the need to try this myself.

Your third option would be to just leave it as is.
 
Old 10-24-2003, 05:38 AM   #7
ab2650
LQ Newbie
 
Registered: Oct 2003
Posts: 4

Original Poster
Rep: Reputation: 0
michaelk,
I tried your dd advice as posted, and it did what I was afraid of. All information on that drive was garbled. Fortunatly, its not the system disk and i had a full backup of everything on it. This was certainly not the correct action to perform.

My question now is: Does fdisk and mkfs clear the boot record, or am i still stuck in the same place?
--Aaron
 
Old 10-24-2003, 07:07 AM   #8
michaelk
Moderator
 
Registered: Aug 2002
Posts: 14,930

Rep: Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520
Sorry about that. I'm glad you had a backup. Did you use /dev/hda?

No mkfs nor fdisk will clear MBR i.e that I know of.
 
Old 10-24-2003, 08:55 AM   #9
mwettach
Member
 
Registered: Oct 2003
Location: Germany
Distribution: SuSE 8.2, SuSE 9.1 on desktop (besides W2K). SuSE 9.1 on notebook (besides XP).
Posts: 44

Rep: Reputation: 15
I also have one IDE and one SCSI disk. I changed from Win98 to Win2k some time ago. This boot CD has SCSI support built in and I was able to clear a linux boot loader from the MBR with the rescue option. So maybe you can borrow a Win2K CD for that purpose...?

But Win98 does support SCSI in principle. So you should be able to create a boot disk (diskette) from your running Win98 system which contains and loads SCSI support on booting from diskette. Now if you also put your fdisk.exe from Win98 (should be in \windows\system\ or in \windows\command) on that diskette, you should be able to clear the MBR with the command
fdisk <DriveLetter:> /mbr

Overwriting the MBR (e. g. with dd from linux) should not damage your data. But there are two more sensible spots:

(a) In the sectors following the MBR on your HD is the partition table. This is important for any OS to be able to find your partition. Maybe that got overwritten by your DD command? In that case, you wouldn't be able to see that that drive from windows (it appears as "unused space" in fdisk). This is easy to fix:

- there are tools around for guessing and restoring a partition table; as you had only one partition they would likely succeed (but might offer suggestions of more than 1 partition, which in your case you shouldn't accept)

- you could also fix it by hand with fdisk (create just one partition for the whole disk but don't format it!) or with a disk editor.

(b) Or maybe you didn't overwrite the MBR (hda) but rather the first sector of your partition (hda1)? In that case, the File Allocation Table (FAT) could be damaged, which is much harder to fix. You would still "see" the partition, but with no files or queer file names. As you had made backups, I would then recommend formatting the disk and restoring the backups.

Hope this comes close.
 
Old 11-15-2003, 12:09 PM   #10
GAVollink
Member
 
Registered: Apr 2002
Location: St. Paul, Minnesota
Distribution: UbuntuStudio, Ubuntu
Posts: 357

Rep: Reputation: 31
the 'dd' command above...

missing from the 'dd' command above is count=1

dd waits for an end-of-file or end-of-media before stopping, unless you tell it how many sections of bs=<how_many_bytes> to do...

dd if=/dev/zero of=/dev/<hd?> bs=512 count=1

/dev/zero never gives an end of file, so without the count=1, it won't stop until it reaches the end of the "of" device.

However, this is still not a "safe" operation. It seems that it's still better to use the DOS/Windows FDISK command to zero out the Master Boot Record (MBR).
 
  


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
Dual boot XP(internal IDE HDD) Debian(external USB-IDE HDD) using boot.ini PolarDog Linux - Laptop and Netbook 2 07-01-2005 10:50 PM
Moving root from a dual-boot HDD to a new HDD Androoski SUSE / openSUSE 1 05-13-2005 11:34 PM
Dual HDD Interface Problem, Linux on SATA, NTFS Part on IDE HDD LILO Not Loading Blade44 Linux - Hardware 2 02-01-2005 07:56 PM
Advice (and some) Needed: Dual-HDD, Dual-Boot - Linux, WinXP elnomadkvn Linux - General 1 03-28-2004 11:11 AM
1st HDD = RH9.0 (grub) ... How do I modify grub when adding 2nd hard disk ? Onyx^ Linux - Software 1 09-05-2003 10:16 AM


All times are GMT -5. The time now is 03:37 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration