LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 03-26-2007, 06:24 AM   #1
AdamskiAirsoft
LQ Newbie
 
Registered: Jul 2006
Posts: 11

Rep: Reputation: 0
Harddrive is read-only and whacked up after Arch installation


I tried installing Arch Linux for the second time. I've never had problems with Linux before, or atleast major problems. I got the partition working, and it worked, or it didn't, and reinstalled Windows.

I followed http://wiki.archlinux.org/index.php/..._Install_Guide both times, Everything went fine, no odd messages, no obstructing errors.

I did an MD5 check both times, and they were good.

My guess is it's the boot loader. This time, I did the auto-prepare for the hard drive, and choose GRUB as my boot loader, and had it go to the default place, which apparently wasn't correct.

My situation as of now? I am stuck at the first boot screen, where it says to press F2 for Boot, and F10 for BIOS, but I can't get there. If I unplug my IDE Harddrive, I can, which is how I've been able to boot to a CD, and use a LiveCD like this, Xubuntu, or get back to the Arch screen.

Now, if I fdisk /dev/hda, it says it doesn't exist. When I fdisk /dev/hdc it does, but it says there are no partitions. When I remember after doing auto-prepare, checking it out under manual, that all three partitions were there. I tried getting help in the Arch IRC Chat, but didn't get it fixed, and basically found out that /dev/hdc is read-only.

When FDisking, all that seems to work is:

Code:
fdisk -l /dev/hdc
And I get this message:

Code:
"Note: sector size is 2048 (not 512)

Disk /dev/hdc: 7740 MB, 7740522496 bytes
255 heads, 63 sectors/track, 235 cylinders
Units = cylinders of 16065 * 2048 = 32901120 bytes

Disk /dev/hdc doesn't contain a valid partition table"
When I do:

Code:
cfdisk /dev/hdc
(Which is the only working one again) I get a message saying it's read only, I do not have permission to write to it. Inside, it has no partitions, only one of type Pri/Log and Free Space. What concerns me, is that it says the disk has 7,740 MB. This is an 80 GB drive, so it's missing another digit there.

Also incase it matters:

"ls /dev/hd*"
/dev/hdc /dev/hdd

"ls /dev/sd*"
ls: /dev/sd*: No such file or directory

Last edited by AdamskiAirsoft; 03-26-2007 at 07:12 AM.
 
Old 03-26-2007, 07:17 AM   #2
Unknown_User
Member
 
Registered: Jan 2003
Location: EU (UK)
Distribution: Ubuntu 14.x, Raspbian, Kali
Posts: 226

Rep: Reputation: 30
I'm no expert here but hard drives typically have a reserved area, this is a few Mb over and above that which is typically reported. This is often known as a private or logging area.

Most people don't know it is there as Windows can't see it but, Linux being far superior, can.

My guess is that you have managed to write the GRUB config to point at that reserved area and not the main drive.

You could remove the master boot record (MBR) and start again using dd (something like dd if=/dev/zero of=/dev/HD count=1 bs=512) or simply reinstall the OS including GRUB again.
 
Old 03-26-2007, 07:41 AM   #3
AdamskiAirsoft
LQ Newbie
 
Registered: Jul 2006
Posts: 11

Original Poster
Rep: Reputation: 0
I ran

Code:
dd if=/dev/zero of=/dev/HD count=1 bs=512
and got

Code:
1+0 records in
1+0 records out
512 bytes (512 B) copied, 5e-05 seconds, 10 MB/s
I don't know how to remove the MBR, or anything.
 
Old 03-26-2007, 02:36 PM   #4
Unknown_User
Member
 
Registered: Jan 2003
Location: EU (UK)
Distribution: Ubuntu 14.x, Raspbian, Kali
Posts: 226

Rep: Reputation: 30
If you have valuable data on this drive DON'T delete the MBR!!! If not then this should clear the drive for reinstallation.

Does your system only have one drive? If it does then it should be /dev/hda.

Log in as root and use dd if=/dev/zero of=/dev/hda count=1 bs=512 to remove the MBR.

You may need to use dd if=/dev/zero of=/dev/hdc count=1 bs=512 if somehow your system is seeing another drive. (I have no idea why this would be.)

You have then scrubbed the drive. Although you data is still there the system cannot read it.

You should then be able to reinstall your operating system without a problem.
 
Old 03-26-2007, 06:29 PM   #5
AdamskiAirsoft
LQ Newbie
 
Registered: Jul 2006
Posts: 11

Original Poster
Rep: Reputation: 0
Wasn't able to do it to HDC as it was read-only.

Seemed to work on HDA, came up with messages, no errors, but it ultimately didn't fix anything.
 
Old 03-27-2007, 02:27 AM   #6
Unknown_User
Member
 
Registered: Jan 2003
Location: EU (UK)
Distribution: Ubuntu 14.x, Raspbian, Kali
Posts: 226

Rep: Reputation: 30
Can you now fdisk /dev/hda?
 
Old 03-27-2007, 05:18 AM   #7
AdamskiAirsoft
LQ Newbie
 
Registered: Jul 2006
Posts: 11

Original Poster
Rep: Reputation: 0
"Unable to open /dev/hda"
 
Old 03-27-2007, 09:13 AM   #8
Unknown_User
Member
 
Registered: Jan 2003
Location: EU (UK)
Distribution: Ubuntu 14.x, Raspbian, Kali
Posts: 226

Rep: Reputation: 30
Strange!

I can't rule out the possibility that this is a HDD hardware failure.

Another check worth doing is to download and burn the .iso for Helix3. This is a forensic toolkit that is a bootable CD with a huge number of tools onboard.

If anything can see and fix a drive then helix can. It has saved me many, many times.

Get helix at http://www.e-fense.com/helix/downloads.php
 
  


Reply

Tags
fdisk, grub, mbr


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
read dvd video from harddrive schneidz Linux - Software 20 01-14-2007 01:13 PM
Suse can't read to my Ext. harddrive.. Adamant1988 SUSE / openSUSE 1 05-24-2006 03:37 PM
Why doesn't knoppix 3.9 read my harddrive? spw100 Linux - Hardware 5 10-24-2005 10:36 PM
Read and backup Macintosh harddrive in linux SetAbomination Linux - Software 2 10-13-2004 05:05 PM
linux harddrive view/read on windows xp Jalalabee Linux - Newbie 1 12-28-2003 02:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 01:43 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