LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 11-15-2008, 11:25 AM   #1
GTBlackwell
Member
 
Registered: Aug 2003
Location: MO, USA
Distribution: Mandrake 9.1/9.2(Laptop)
Posts: 117

Rep: Reputation: 15
New root hard drive in Hardy = boot trouble


I just installed a new SATA hard drive. Prior to the installation, I had two IDE hard drives (labels are the ones used by Parted Magic, for reasons that will become apparent):

hda: 60GB
hda1: ~25GB /
hda2: ~25GB /home
hda3: 2GB swap

hdb: 400GB
hdb1: 400GB /data

The hda drive is dying, so I installed the SATA drive and (using Parted Magic) copied the contents of hdb1 onto the new drive, sda, then created three partitions on hdb corresponding to hda1,2,3.

I then edited fstab (sorry, now with Ubuntu disc labels):

Code:
# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    defaults        0       0
# /dev/sda1
/dev/sda1 /               ext3    relatime,errors=remount-ro 0       1
# /dev/sda2
/dev/sda2 /home           ext3    relatime        0       2
# /dev/sdc1
/dev/sdc1	/data           reiserfs relatime        0       2
# /dev/sda3
UUID=9fbc25b9-c24c-438f-bd9e-7bb821b31f4d none            swap    sw              0       0
/dev/scd0       /media/cdrom0   udf,iso9660 user,noauto,exec,utf8 0       0
/dev/scd1       /media/cdrom1   udf,iso9660 user,noauto,exec,utf8 0       0
What I've yet to figure out is how to create a new master boot record. I tried simply copying the mbr from the dying drive using
Code:
dd if=hda0 of=hdb0 bs=< 5something > pass=2
but no dice. I also tried using the Ubuntu liveCD install program, mounted all the partitions without formatting them and tried to skip to the GRUB installation, but the installer went ahead and overwrote hdb1 anyway, forcing me to copy hda1 to hdb1 all over again.

I'm not sure if this might be an indicator of the problem, but even with the dying hda removed from the computer, Parted Magic still recognizes hdb as hdb despite having switched it to the primary master drive (on both cable and jumpers) and shows no hda whatsoever.

So, ultimately two questions:
Is it a problem that Parted Magic is finding no hda?
How can I create a new mbr wihout having to reinstall Hardy?
 
Old 11-15-2008, 01:24 PM   #2
GTBlackwell
Member
 
Registered: Aug 2003
Location: MO, USA
Distribution: Mandrake 9.1/9.2(Laptop)
Posts: 117

Original Poster
Rep: Reputation: 15
A couple more notes:

The BIOS only seems to recognize hdb as the primary IDE slave, despite the fact that the jumper is set to cable select and the drive is on the master (black) socket. I expect this is why Parted Magic keeps calling it hdb despite there no longer being an hda.
 
Old 11-15-2008, 01:54 PM   #3
GTBlackwell
Member
 
Registered: Aug 2003
Location: MO, USA
Distribution: Mandrake 9.1/9.2(Laptop)
Posts: 117

Original Poster
Rep: Reputation: 15
Another update:

Seagate seems to have stuck the label on the hard drive upside down, so my jumper was in the wrong place. Master/Slave issue is now solved.

I reinstalled GRUB per this thread and grub now loads and begins to boot Ubuntu, but there the system hangs. Is there a way to force Ubuntu to to load without the splash screen so I can read the output? Or a way to access dmesg so I can get the output from the hard drive boot while in a LiveCD session? I suppose this is now a software problem, rather than hardware, though.
 
Old 11-15-2008, 03:02 PM   #4
pingu
Senior Member
 
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,350

Rep: Reputation: 127Reputation: 127
Quote:
Originally Posted by GTBlackwell View Post
...I tried simply copying the mbr from the dying drive using
Code:
dd if=hda0 of=hdb0 bs=< 5something > pass=2
but no dice.
You be glad it didn't work! mbr contains not only stuff needed for booting but also the partition table...
Quote:
Seagate seems to have stuck the label on the hard drive upside down
The same on every drive I've seen, never understood why...

To get rid of the splash screen, afaik you simply press <esc>
How about this: try booting into single mode. When Grub menu displays press <e> you will see one or more lines. Press <e> again and you can edit the first line. Type in "single" at the end.
If it doesn't work, try a live-cd. When up-and-running mount your / -partition and you can read logs in (normally) /var/log. dmesg should be there too, # cat <mountpoint>/var/log/dmesg
 
Old 11-15-2008, 03:50 PM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,120

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
I echo the comments about restoring the MBR - the *only* time I have found it useful was after I had deliberately zeroed the MBR for some testing. It is never useful in a normal environment - especially if the partitions are being screwed with.

To the issue - seems Debian derivatives, Ubuntu amongst them, can have problems with a mix of P-ATA (IDE) and S-ATA. Appears to be an init-script issue that I just gave up on and removed Ubuntu altogether from my affected system - a quad core I wanted to test on.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
frmatting new hard drive to be fat 32&need all o.k.s for linux-hardy startup mybovets Linux - Newbie 2 06-06-2008 01:13 PM
Hard drive trouble DIGITAL39 Ubuntu 5 10-31-2007 09:25 AM
Ubuntu: Installed to external hard drive; boot to primary hard drive gives error 22 dcorb62 Linux - General 7 09-04-2007 11:28 PM
HArd drive Trouble? emerypalmer Linux - Hardware 1 09-10-2006 04:09 PM
Permission trouble with second hard drive goofyheadedpunk Linux - General 3 03-18-2004 05:38 PM

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

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