Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I bought a new computer, removed the Windows disk (as usual) and installed 2 brand new 3TB drives. Installed 11.10 from USB stick, apt-get updates and favorite installs, everything was fine. Then I booted from USB stick again and did:

dd if=/dev/sda of=/dev/sdb bs=1M

and after that I cannot boot. BIOS says I have no bootable drives. Don't even get as far as grub. Booting from USB stick sees both drives and the files successfully copied (so I did not dd the wrong direction). It is as if when the second drive was blank the first drive worked, but now that they are identical the BIOS does not know what to do.

Update 1: Checking the "BIOS confused" idea I physically disconnected one drive and booted from the other. No joy, on either drive. It is as if the blank drive had something that was helping the boot sequence, and the dd overwrote it!

Update 2: Since it is not even getting to GRUB I thought I would try to recreate the MBR. update-grub just recreated an (identical) grub.cfg. grub-install /dev/sda said "grub-setup: warn: This GPT partition label has no BIOS Boot Partition; embedding won't be possible!" I don't think I want to embed anything, just rewrite the MBR. grub-setup /dev/sda said Segmentation fault (core dumped)

Update 3: Gave up, did:

dd if=/dev/zero of=/dev/sda

and reinstalled Ubuntu from CD. Still won't boot! It is as if the brand new 3TB drives (Seagate, if it matters) had some little helper boot code on them and when I installed Ubuntu it overwrote that. Of course it is too late to confirm that now, since both drives were overwritten once I did the dd.

Has anyone heard of a brand new drive not being really blank?

Update 4: OK now my hypothesis is that my BIOS cannot boot to a GPT partitioned drive, at least not a 3TB one. If I repartition it as MSDOS it boots, if I go back to GPT it doesn't again.

Happy to post details but don't know what would be relevant. TIA!

share|improve this question
    
Another clue... checking the "BIOS confused" idea I physically disconnected one drive and booting from the other. No joy, on either drive. It is as if the blank drive had something that was helping the boot sequence, and the dd overwrote it! –  Floyd Oct 21 '11 at 17:04
    
If you dd'ed the disks, the UUID of the filesystems will be identical and since Ubuntu uses the UUIDs to find the right disk to boot from that will likely cause trouble. It should however cause trouble at a later point, so there might be something else wrong. –  Grumbel Oct 21 '11 at 21:16
    
Yes Grumbel that is a problem with the UUID concept but I had them disabled from grub.conf and /etc/fstab, and as you said that would have been later in the sequence anyway. In my opinion if you're "finding" a disk instead of knowing where it is already, you're wandering down an unstable path. –  Floyd Oct 21 '11 at 21:27
    
Why are you using dd? –  psusi Feb 24 '12 at 14:28
add comment

3 Answers

Did you format either drive and ensure that they are marked as bootable? There is usually a flag that marks a disk bootable. You may want to check that with the liveCD or liveUSB

share|improve this answer
    
Thanks for the idea. The first drive was originally formatted and marked bootable as part of the standard Ubuntu install, and it worked. I would think that flag would be part of what's copied to the second drive with dd. But now, even the first drive doesn't boot. –  Floyd Oct 21 '11 at 19:48
    
I am not sure if the flag is copied or not; it would be worth checking with diskutility just to be sure. –  cprofitt Oct 22 '11 at 12:21
add comment

It should not have worked in the first place. If you are using GPT in a bios booting machine, you must create a small ( 1 mb ) bios_grub partition for grub to install. Also do not use dd like that; the filesystems on both disks will appear to have the same UUID and confuse things.

share|improve this answer
    
I appreciate your comments. How would I know if I am using GPT, whatever that is? (I do see the letters GPT in one error message.) And why didn't Ubuntu install create the bios_grub partition? And why did it boot from one disk but both fail after I copied to another? And your UUID point has already been raised and answered; I don't set my grub.conf or fstab by UUID since that is as you point out unreliable. –  Floyd Oct 24 '11 at 20:43
add comment

OK it is working now and I was even able to dd the entire drive and boot from either one. The solution was to use an MSDOS partition table instead of GPT. It seems my BIOS (on a brand new Gateway computer, BOIS dated 2011-08-01) cannot boot a GPT partition table, at least not on a 3TB drive. I don't know whether that is a flaw in Ubuntu and how it creates the GPT partition table, or whether it is a deficiency in my BOIS.

Having booted from a live CD image, I used gparted to create an MSDOS partition table on one of the drives. I laid out my partitions, making sure none were bigger than 2TB because MSDOS partition table doesn't like that. (Unfortunately I cannot get all 3TB on one partition this way...)

With the partitions established I then proceeded to install 11.04 from the live CD. After getting everything set up on 3TB drive #1, I did:

dd if=/dev/sda of=/dev/sdb bs=1M

and when it was done I could boot from either disk with no troubles. This gives me a fully bootable backup disk in case the primary ever dies. As others have noted in the comments, using dd to make a backup bootable disk like this requires you to disable the UUID nonsense in /etc/fstab and /boot/grub/grub.cfg (by editing /etc/default/grub).

Thanks to all who tried to help.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.