Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
My friend somehow managed to write a MBR to his new IDE hard drive. Now his OS won't boot whenever it's plugged in because his compute reads the IDE drive first while his OS is on a SATA drive. He's tried changing order but doesn't seem to work.
I suggested using Knoppix to boot and use fdisk to erase the MBR. However, is fdisk capable of this?
Thanks.
Click here to see the post LQ members have rated as the most helpful post in this thread.
i do not know whethere fdisk can or not, but you friend could try and use the "dd" command to perfectly erase the entire mbr. I accidently did this on my computer and i lost my partition tables and everything on the MBR a month ago or so.
Originally posted by Comatose51
My friend somehow managed to write a MBR to his new IDE hard drive. Now his OS won't boot whenever it's plugged in because his compute reads the IDE drive first while his OS is on a SATA drive. He's tried changing order but doesn't seem to work.
This doesn't sound right.
Sounds like the BIOS isn't recognising the SATA as a primary disk if an IDE is present. The BIOS boots the primary disk - no ifs, no buts.
It doesn't cycle through to other disks.
Sounds like you mate needs a BIOS update - or a new motherboard.
Quote:
I suggested using Knoppix to boot and use fdisk to erase the MBR. However, is fdisk capable of this?
Won't help - not a function of fdisk, and see comment above.
Originally posted by camelrider Or how about using the Knoppix CD to install LILO to the MBR of the IDE drive?
Friend is afraid of Linux. Wanted to use the opportunity to show him how useful Linux is and then go from there... Alas, the lack of a quick answer persuaded him to install Windows XP on the hard drive and just migrate OS hard drives....
Originally posted by tsphan you probably don't need the dd command anymore, but if the mbr does mess up for no reason,
dd if=/dev/zero of=/dev/HD count=1 bs=512
HD is your hard drive letter
though, i'm guessing you're not going to need that anymore, and it's best not to, it ruined my partition tables
The reason it ruined your partition table is because you told it to.
The first sector is conventionally referred to as the MBR; as we all know - the MBR is *NOT* just the executable code we like to refer to as the boot-loader.
That executable code must be contained within the first 446 bytes. The description for (up to) 4 partitions follows - that is your "partition table".
All contained within that 512 byte sector - which the above command zeroes out as requested.
Originally posted by syg00 The reason it ruined your partition table is because you told it to.
The first sector is conventionally referred to as the MBR; as we all know - the MBR is *NOT* just the executable code we like to refer to as the boot-loader.
That executable code must be contained within the first 446 bytes. The description for (up to) 4 partitions follows - that is your "partition table".
All contained within that 512 byte sector - which the above command zeroes out as requested.
I found that out after I reformatted and some people told me that the MBR contained the partition tables . Believe me, I learned a valuable lesson about the MBR that day.
New respect for *nix. dd is just too cool... too powerful to contemplate, yet so simple. That's what I love about *nix. I can do whatever hell I want with my computer, as long as it works in concept. Linux is free as in freedom AND beer!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.