Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: dd command?

  1. #1
    Join Date
    May 2010
    Beans
    11

    dd command?

    Does the following command work in a terminal or where is this command to be placed?


    dd if=/dev/sda of=/mbr.bin bs=446 count=1

  2. #2
    Join Date
    Apr 2009
    Location
    Tennessee, USA
    Beans
    Hidden!
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: dd command?

    In a terminal. But, may I ask, what is this supposed to be doing?

  3. #3
    Join Date
    May 2010
    Beans
    11

    Re: dd command?

    Master Boot Record backup. I have Ubuntu and want to dual boot Windows 7. This is a required step.

  4. #4
    Join Date
    Jan 2007
    Beans
    Hidden!
    Distro
    Ubuntu 12.10 Quantal Quetzal

    Re: dd command?

    Quote Originally Posted by jdmBlue View Post
    Master Boot Record backup. I have Ubuntu and want to dual boot Windows 7. This is a required step.
    I never did anything like that.

    If you have windows first, then install ubuntu, it will detect the partition, grub will work fine out of the box. (or at least it should, and did for me)

    when I have ubuntu first, and then install windows, I usually just reinstall grub from the live-cd after windows replaced the mbr with it's own. I'm a bit scared of the dd command, especially when it's dealing with mbr

  5. #5
    Join Date
    May 2010
    Beans
    11

    Re: dd command?

    These are the steps.

    Master Boot Record backup and re-replacement

    Back-up the existing MBR, install Windows, replace your backup overwriting the Windows boot code:

    1. Create an NTFS partition for windows (using fdisk, GPartEd or whatever tool you are familiar with)
    2. Backup the MBR e.g. dd if=/dev/sda of=/mbr.bin bs=446 count=1
    3. Install windows
    4. Boot into a LiveCD
    5. Mount your root partition in the LiveCD
    6. Restore the MBR e.g. dd if=/media/sda/mbr.bin of=/dev/sda bs=446 count=1
    7. Restart and Ubuntu will boot
    8. Setup grub to boot windows




  6. #6
    Join Date
    May 2010
    Beans
    11

    Re: dd command?

    Yes that is why I`m reluctant to do that just yet. I`m checking all options first.

  7. #7
    Join Date
    Apr 2009
    Location
    Tennessee, USA
    Beans
    Hidden!
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: dd command?

    If you have a Windows disk, or can get hold of one, I would strongly suggest against trying that... While the direction it's going for the backup shouldn't cause problems, I would be afraid to try to restore with it...

  8. #8
    Join Date
    Nov 2006
    Location
    Oregon
    Beans
    4,434
    Distro
    Ubuntu Development Release

    Re: dd command?

    Quote Originally Posted by jdmBlue View Post
    Does the following command work in a terminal or where is this command to be placed?


    dd if=/dev/sda of=/mbr.bin bs=446 count=1
    Wouldn't /dev/sda be the entire drive?

  9. #9
    Join Date
    May 2010
    Beans
    11

    Re: dd command?

    Quote Originally Posted by tgm4883 View Post
    Wouldn't /dev/sda be the entire drive?
    I`m not sure but I`ll check before I proceed with that step. Perhaps it should be
    /dev/sda1 or whatever the Ubuntu partion is?

  10. #10
    Join Date
    May 2010
    Beans
    11

    Re: dd command?

    Quote Originally Posted by Lightstar View Post
    I never did anything like that.

    If you have windows first, then install ubuntu, it will detect the partition, grub will work fine out of the box. (or at least it should, and did for me)

    when I have ubuntu first, and then install windows, I usually just reinstall grub from the live-cd after windows replaced the mbr with it's own. I'm a bit scared of the dd command, especially when it's dealing with mbr


    To do this do I just follow the steps I previously mentioned ?...except do not backup and reinstall MBR?
    Last edited by jdmBlue; May 11th, 2010 at 06:13 AM. Reason: misspelling

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •