Author Topic: <Attempt Abandoned for now>Move MBR TO New HD  (Read 1671 times)

Offline Ray2047

  • Hero Member
  • *****
  • Posts: 1499
<Attempt Abandoned for now>Move MBR TO New HD
« on: August 27, 2011, 06:03:26 AM »
My main computer went out last night. I'm on my backup computer and want to put the SATA drive from the main computer into the backup computer. I have to use a PCI card for the SATA drive because the MB has no SATA connections. The backup computer only recognizes PATA drives as boot devices. I know from past experience if I put the MBR on a PATA I can boot to a SATA drive.

In the pst I have only did this as a new install and that is easy. This time though I want to just put in a PATA drive and move the MBR on my SATA drive to it. Is that even possible? If so how?
« Last Edit: August 31, 2011, 12:12:11 PM by Ray2047 »
KDE 64 bit.
CPU: AMD Athlon II X2 250 Processor.
Display:  nVidia C61 [GeForce 7025 / nForce 630a.
Memory: 3Gb

Online Old-Polack

  • Administrator
  • Super Villain
  • *****
  • Posts: 11531
  • ----IOFLU----
Re: Move MBR TO New HD
« Reply #1 on: August 27, 2011, 08:36:24 AM »
My main computer went out last night. I'm on my backup computer and want to put the SATA drive from the main computer into the backup computer. I have to use a PCI card for the SATA drive because the MB has no SATA connections. The backup computer only recognizes PATA drives as boot devices. I know from past experience if I put the MBR on a PATA I can boot to a SATA drive.

In the pst I have only did this as a new install and that is easy. This time though I want to just put in a PATA drive and move the MBR on my SATA drive to it. Is that even possible? If so how?


The MBR is a physical location on a hard drive, the first sector of the first cylinder. You cant move the MBR. You can however install grub to the MBR of your PATA boot drive. Instructions here;

http://www.pclinuxos.com/forum/index.php/topic,62786.msg508062.html#msg508062

Old-Polack

Of what use be there for joy, if not for the sharing thereof?



Lest we forget...

Offline Ray2047

  • Hero Member
  • *****
  • Posts: 1499
Re: Move MBR TO New HD
« Reply #2 on: August 27, 2011, 08:50:13 AM »
I wrote that at 4 in the morning after awaking to a blank monitor at 3am. Had spent an hour running checks including swaping out video card. I was not really thinkking clearly.

I have had a bit more sleep now and realize I only need to add it to the boot menu already on the working HD on the machine. Thank you though for the response.
KDE 64 bit.
CPU: AMD Athlon II X2 250 Processor.
Display:  nVidia C61 [GeForce 7025 / nForce 630a.
Memory: 3Gb

Offline Ray2047

  • Hero Member
  • *****
  • Posts: 1499
Re: <Didn't Work>Move MBR TO New HD
« Reply #3 on: August 30, 2011, 03:40:04 PM »
Ok my idea didn't work. I just get drive not found because the bios doesn't see SATA drives. The SATA's boot sector needs to be written to a PATA drive. I don't want to mess with the working PATA drive so I will install a second PATA drive for the SATAs boot sector. I have read your link but I don't think it does what I want to do. I don't want to repair the boot sector on the SATA. I want to write it on a PATA drive. Or to put it another way on this computer the SATA drive's  boot sector must be written to a PATA drive so the bios sees it.

Yes, I have done this on this computer but only from a full install. This time I want to keep the install on the SATA.

KDE 64 bit.
CPU: AMD Athlon II X2 250 Processor.
Display:  nVidia C61 [GeForce 7025 / nForce 630a.
Memory: 3Gb

Offline AS

  • Hero Member
  • *****
  • Posts: 4111
  • Have a nice ... night!
Re: <Didn't Work>Move MBR TO New HD
« Reply #4 on: August 30, 2011, 03:47:13 PM »
Ok my idea didn't work. I just get drive not found because the bios doesn't see SATA drives. The SATA's boot sector needs to be written to a PATA drive. I don't want to mess with the working PATA drive so I will install a second PATA drive for the SATAs boot sector. I have read your link but I don't think it does what I want to do. I don't want to repair the boot sector on the SATA. I want to write it on a PATA drive. Or to put it another way on this computer the SATA drive's  boot sector must be written to a PATA drive so the bios sees it.

Yes, I have done this on this computer but only from a full install. This time I want to keep the install on the SATA.



I think you are misunderstanding old-polack's suggestion, that basically is:
because you already have a working boot loader on the pata drive, just add an entry (a stanza) for the SATA installation.

You only need to edit the file /boot/grub/menu.lst on you PATA drive and add a new stanza.

AS

Offline Ray2047

  • Hero Member
  • *****
  • Posts: 1499
Re: <Didn't Work>Move MBR TO New HD
« Reply #5 on: August 30, 2011, 04:55:22 PM »
Quote
because you already have a working boot loader on the pata drive, just add an entry (a stanza) for the SATA installation
Yes that is what I tried but that didn't work aparently because the entry refers to a boot entry on a drive the bios doesn't see.
« Last Edit: August 30, 2011, 04:57:04 PM by Ray2047 »
KDE 64 bit.
CPU: AMD Athlon II X2 250 Processor.
Display:  nVidia C61 [GeForce 7025 / nForce 630a.
Memory: 3Gb

Offline AS

  • Hero Member
  • *****
  • Posts: 4111
  • Have a nice ... night!
Re: <Didn't Work>Move MBR TO New HD
« Reply #6 on: August 30, 2011, 04:59:45 PM »
Quote
because you already have a working boot loader on the pata drive, just add an entry (a stanza) for the SATA installation
But that didn't work because the entry refers to a boot entry on a drive the bios doesn't see.

who said that can't work ?

The BIOS direct the boot process to the MBR of the PATA drive, in the MBR there is a pointer to Grub bootloader which therefore start from the PATA drive and then Grub will read the configuration file (/boot/grub/menu.lst), depending on the user selection will boot the corresponding OS kernel, no matter if it's on PATA or on SATA.
It will be the Grub bootloader to chose the hard drive to boot from, not the BIOS.


Online Old-Polack

  • Administrator
  • Super Villain
  • *****
  • Posts: 11531
  • ----IOFLU----
Re: <Didn't Work>Move MBR TO New HD
« Reply #7 on: August 30, 2011, 05:02:22 PM »
Ok my idea didn't work. I just get drive not found because the bios doesn't see SATA drives. The SATA's boot sector needs to be written to a PATA drive. I don't want to mess with the working PATA drive so I will install a second PATA drive for the SATAs boot sector. I have read your link but I don't think it does what I want to do. I don't want to repair the boot sector on the SATA. I want to write it on a PATA drive. Or to put it another way on this computer the SATA drive's  boot sector must be written to a PATA drive so the bios sees it.

Yes, I have done this on this computer but only from a full install. This time I want to keep the install on the SATA.



I think you are misunderstanding old-polack's suggestion, that basically is:
because you already have a working boot loader on the pata drive, just add an entry (a stanza) for the SATA installation.

You only need to edit the file /boot/grub/menu.lst on you PATA drive and add a new stanza.

AS

Not quite. If the add in SATA card does not have a secondary BIOS that allows the SATA drive to be seen by BIOS, it gets a bit more complicated.

Ray2047:

Do you have a Linux installation on the PATA drive? It doesn't matter what distro, just that there is a Linux installation somewhere on the drive. If so, what is the distribution, and what partition is the / partition?
Old-Polack

Of what use be there for joy, if not for the sharing thereof?



Lest we forget...

Offline AS

  • Hero Member
  • *****
  • Posts: 4111
  • Have a nice ... night!
Re: <Didn't Work>Move MBR TO New HD
« Reply #8 on: August 30, 2011, 05:11:12 PM »
My main computer went out last night. I'm on my backup computer and want to put the SATA drive from the main computer into the backup computer. I have to use a PCI card for the SATA drive because the MB has no SATA connections. The backup computer only recognizes PATA drives as boot devices. I know from past experience if I put the MBR on a PATA I can boot to a SATA drive.

In the pst I have only did this as a new install and that is easy. This time though I want to just put in a PATA drive and move the MBR on my SATA drive to it. Is that even possible? If so how?

 ::)

Offline Ray2047

  • Hero Member
  • *****
  • Posts: 1499
Re: <Didn't Work>Move MBR TO New HD
« Reply #9 on: August 30, 2011, 05:22:16 PM »
Quote
Not quite. If the add in SATA card does not have a secondary BIOS that allows the SATA drive to be seen by BIOS, it gets a bit more complicated.
Bingo!

 PCLOS on both drives. Not sure where root is on the PATA. It's size is 4Gb. Home is 7.7 GB. The 20GB drive is the PATA.


Quote
fdisk -l

Disk /dev/sda: 20.0 GB, 20020396032 bytes
16 heads, 63 sectors/track, 38792 cylinders, total 39102336 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xe16a688b

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *          63    20408975    10204456+  83  Linux
/dev/sda2        20408976    39102335     9346680    5  Extended
/dev/sda5        20409039    22649759     1120360+  82  Linux swap / Solaris
/dev/sda6        22649823    39102335     8226256+  83  Linux

Disk /dev/sdb: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders, total 312581808 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *          63     7791524     3895731   83  Linux
/dev/sdb2        52420095   312576704   130078305    5  Extended
/dev/sdb5        52420158    52452224       16033+  82  Linux swap / Solaris
/dev/sdb6       148729833   312576704    81923436   83  Linux
/dev/sdb7       148456728   148729769      136521   82  Linux swap / Solaris
/dev/sdb8        52452288   148456664    48002188+  83  Linux

« Last Edit: August 30, 2011, 05:46:22 PM by Ray2047 »
KDE 64 bit.
CPU: AMD Athlon II X2 250 Processor.
Display:  nVidia C61 [GeForce 7025 / nForce 630a.
Memory: 3Gb

Online Old-Polack

  • Administrator
  • Super Villain
  • *****
  • Posts: 11531
  • ----IOFLU----
Re: <Didn't Work>Move MBR TO New HD
« Reply #10 on: August 30, 2011, 05:45:43 PM »
Quote
Not quite. If the add in SATA card does not have a secondary BIOS that allows the SATA drive to be seen by BIOS, it gets a bit more complicated.
Bingo!

 PCLOS on both drives. Not sure where root is on the PATA. It's size is 4Gb. Home is 7.7 GB


Quote
fdisk -l

Disk /dev/sda: 20.0 GB, 20020396032 bytes
16 heads, 63 sectors/track, 38792 cylinders, total 39102336 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xe16a688b

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *          63    20408975    10204456+  83  Linux
/dev/sda2        20408976    39102335     9346680    5  Extended
/dev/sda5        20409039    22649759     1120360+  82  Linux swap / Solaris
/dev/sda6        22649823    39102335     8226256+  83  Linux

Disk /dev/sdb: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders, total 312581808 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *          63     7791524     3895731   83  Linux
/dev/sdb2        52420095   312576704   130078305    5  Extended
/dev/sdb5        52420158    52452224       16033+  82  Linux swap / Solaris
/dev/sdb6       148729833   312576704    81923436   83  Linux
/dev/sdb7       148456728   148729769      136521   82  Linux swap / Solaris
/dev/sdb8        52452288   148456664    48002188+  83  Linux


Assuming the 160 GB drive is the SATA drive, you have two swap partitions where only one is needed, and your partitions are numbered out of order as they actually exist on the drive. This can become a problem, so really should get corrected.

For the booting problem, are the two PCLinuxOS installations the same, using the same kernel, or is one an older version, no longer supported?

Bear with me and my questions. Your answers will determine the easiest way to get your SATA installation up and running, and each answer may generate some new questions, so have a bit of patience. ;D
Old-Polack

Of what use be there for joy, if not for the sharing thereof?



Lest we forget...

Offline Ray2047

  • Hero Member
  • *****
  • Posts: 1499
Re: <Didn't Work>Move MBR TO New HD
« Reply #11 on: August 30, 2011, 06:02:30 PM »
And bear with me as I explore virgin territory. Thank you for helping. Yes the small drive is PATA. PATA is 2.6.33.7-pclos6.bfs   What is the easiest way to determine the Kernel for the SATA?

KDE 64 bit.
CPU: AMD Athlon II X2 250 Processor.
Display:  nVidia C61 [GeForce 7025 / nForce 630a.
Memory: 3Gb

Online Old-Polack

  • Administrator
  • Super Villain
  • *****
  • Posts: 11531
  • ----IOFLU----
Re: <Didn't Work>Move MBR TO New HD
« Reply #12 on: August 30, 2011, 06:20:53 PM »
And bear with me as I explore virgin territory. Thank you for helping. Yes the small drive is PATA. PATA is 2.6.33.7-pclos6.bfs   What is the easiest way to determine the Kernel for the SATA?



If you know the release version you installed, that would tell us what kernel is present, if you didn't install a newer kernel. If you have more than one kernel on the SATA installation, you need to mount the SATA drive's PCLinuxOS / partition and list the contents of the /boot directory. To do that, you must first know which partition on the SATA drive is the PCLinuxOS / partition. Do you know? If so, pray tell us which it is. ;D
Old-Polack

Of what use be there for joy, if not for the sharing thereof?



Lest we forget...

Offline Ray2047

  • Hero Member
  • *****
  • Posts: 1499
Re: <Didn't Work>Move MBR TO New HD
« Reply #13 on: August 30, 2011, 06:53:21 PM »
Seems to be 2.633.7 Which makes sense because they were done at the same time now that I think about it.

Quote
file:///boot/System.map
file:///boot/System.map-2.6.33.7-pclos6.bfs
file:///boot/boot.backup.sda
file:///boot/boot.backup.sdb
file:///boot/config
file:///boot/config-2.6.33.7-pclos6.bfs
file:///boot/gfxmenu
file:///boot/grub
file:///boot/initrd-2.6.33.7-pclos6.bfs.img
file:///boot/initrd.img
file:///boot/kernel.h
file:///boot/kernel.h-2.6.33.7-pclos6.bfs
file:///boot/message-graphic
file:///boot/us.klt
file:///boot/vmlinuz
file:///boot/vmlinuz-2.6.33.7-pclos6.bfs
KDE 64 bit.
CPU: AMD Athlon II X2 250 Processor.
Display:  nVidia C61 [GeForce 7025 / nForce 630a.
Memory: 3Gb

Online Old-Polack

  • Administrator
  • Super Villain
  • *****
  • Posts: 11531
  • ----IOFLU----
Re: <Didn't Work>Move MBR TO New HD
« Reply #14 on: August 30, 2011, 07:34:17 PM »
Seems to be 2.633.7 Which makes sense because they were done at the same time now that I think about it.

Quote
file:///boot/System.map
file:///boot/System.map-2.6.33.7-pclos6.bfs
file:///boot/boot.backup.sda
file:///boot/boot.backup.sdb
file:///boot/config
file:///boot/config-2.6.33.7-pclos6.bfs
file:///boot/gfxmenu
file:///boot/grub
file:///boot/initrd-2.6.33.7-pclos6.bfs.img
file:///boot/initrd.img
file:///boot/kernel.h
file:///boot/kernel.h-2.6.33.7-pclos6.bfs
file:///boot/message-graphic
file:///boot/us.klt
file:///boot/vmlinuz
file:///boot/vmlinuz-2.6.33.7-pclos6.bfs

And the actual partition?
Old-Polack

Of what use be there for joy, if not for the sharing thereof?



Lest we forget...