[SOLVED] Cloning boot and var partitions to a new drive for booting

Ok first of all here's my setup:
fakeraid (dmraid) / and home on an OCZ Revodrive
boot with GRUB on a flash drive (since fakeraid doesn't support grub)
var and downloads/media folder on a 500GB WD Caviar drive
When I originally installed Arch I had the Caviar drive in my home server in a RAID5 array, so that's why I opted to install boot and grub on a flash drive simply for booting.  Now that I have the drive in my desktop I've cloned the flash drive's partitions and MBR using dd:
#dd if=/dev/sde of=~/MBR.img bs=512 count=1
#dd if=/dev/sde1 of=~/boot.img
#dd if=/dev/sdc1 of=~/var.img
I then backed up my downloads/media partition, then removed the partition table, then used dd to put the img files on the Caviar drive.
#dd if=~/MBR.img of=/dev/sdc bs=512 count=1
#dd of=~/boot.img of=/dev/sdc1
#dd of=~/var.img of=/dev/sdc2
I also created labels for the filesystems and put those in fstab.
I'm able to mount both partitions, however I can't boot from the drive.  I get a 'grub hard disk error' (no error number) when I put it as my first drive in the BIOS. 
I can still use the flash drive as the first hard drive in the BIOS and boot from it, then it mounts the dmraid root partition and boots successfully.  It is also able to mount the var and boot partitions in fstab. 
Basically the only problem is that the MBR is somehow wrong.  I then tried booting back into an Arch live USB and installing GRUB from the prompt:
grub
grub>setup (hd4,0) (in this case the Caviar drive's boot partition was /dev/sde1
So essentially what I'm asking is how GRUB handles the MBR.  Is it specific to the partition table of the drive in which it resides when it's originally installed?  For instance, since I had an 8GB flash drive with 2 partitions when I installed GRUB, is the backed up MBR no good for a 500GB drive with 3 partitions?
I have everything backed up so I can start with a fresh /boot and /var if need be....I'm just not sure where to start. 
Thanks in advance.
Last edited by DarksideEE7 (2011-02-13 23:25:31)

Sorry, I forgot to mention that I tried to install GRUB from the GRUB shell in a live Arch USB.  It failed on a few non-critical parts, and succeeded on the last part. I'm going to try again shortly, possibly I did something wrong.  GRUB is able to find the stage files using:
#grub
grub>find /grub/stage1
grub> find /grub/stage1
(hd0,0)
(hd5,0)
grub>
(hd0,0) is the desired boot drive, while (hd5,0) is the current bootable flash drive with /boot and GRUB installed.
Here is the output of fdisk -l:
WARNING: GPT (GUID Partition Table) detected on '/dev/sde'! The util fdisk doesn't support GPT. Use GNU Parted.
Disk /dev/sde: 2000.4 GB, 2000398934016 bytes
256 heads, 63 sectors/track, 242251 cylinders, total 3907029168 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/sde1 1 3907029167 1953514583+ ee GPT
Disk /dev/sdb: 60.0 GB, 60022480896 bytes
255 heads, 63 sectors/track, 7297 cylinders, total 117231408 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: 0xedb72db9
Device Boot Start End Blocks Id System
/dev/sdb1 * 2048 206847 102400 7 HPFS/NTFS
/dev/sdb2 206848 117227519 58510336 7 HPFS/NTFS
Disk /dev/sdd: 40.0 GB, 40018599936 bytes
255 heads, 63 sectors/track, 4865 cylinders, total 78161328 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
Disk /dev/sdd doesn't contain a valid partition table
Disk /dev/sdc: 40.0 GB, 40018599936 bytes
32 heads, 32 sectors/track, 76329 cylinders, total 78161328 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: 0xb8372fcd
Device Boot Start End Blocks Id System
/dev/sdc1 32 21484543 10742256 83 Linux
/dev/sdc2 21484544 156317695 67416576 83 Linux
Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 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: 0x8497e059
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 206847 102400 83 Linux
/dev/sda2 206848 42149887 20971520 83 Linux
/dev/sda3 42149888 976773167 467311640 83 Linux
Disk /dev/dm-0: 80.0 GB, 80035053568 bytes
32 heads, 32 sectors/track, 152654 cylinders, total 156318464 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 65536 bytes / 131072 bytes
Disk identifier: 0xb8372fcd
Device Boot Start End Blocks Id System
/dev/dm-0p1 32 21484543 10742256 83 Linux
Partition 1 does not start on physical sector boundary.
/dev/dm-0p2 21484544 156317695 67416576 83 Linux
Disk /dev/dm-1: 11.0 GB, 11000070144 bytes
255 heads, 63 sectors/track, 1337 cylinders, total 21484512 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 65536 bytes / 131072 bytes
Alignment offset: 49152 bytes
Disk identifier: 0x00000000
Disk /dev/dm-1 doesn't contain a valid partition table
Disk /dev/dm-2: 69.0 GB, 69034573824 bytes
255 heads, 63 sectors/track, 8392 cylinders, total 134833152 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 65536 bytes / 131072 bytes
Disk identifier: 0x00000000
Disk /dev/dm-2 doesn't contain a valid partition table
Disk /dev/sdf: 8086 MB, 8086618112 bytes
249 heads, 62 sectors/track, 1023 cylinders, total 15794176 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: 0x8497e059
Device Boot Start End Blocks Id System
/dev/sdf1 * 62 200693 100316 83 Linux
/dev/sdf2 200694 15794175 7796741 83 Linux
I'm using dmraid, so just to be clear I've configured the raid using:
#modprobe dm_mod
#dmraid -ay
Then I saw the array stored in /dev/mapper/silXXXXX.  I then created partitions for /boot, /, and home.  At that time I was hoping to get GRUB working with the AUR package grub2-dmraid.  I wasn't able to get it working for some time, so I just went ahead and installed boot and GRUB to a separate USB flash drive.
Here is the output of df -h:
Filesystem Size Used Avail Use% Mounted on
udev 10M 268K 9.8M 3% /dev
/dev/mapper/sil_bgbgdjaddicbp1
11G 5.3G 4.3G 56% /
shm 6.0G 584K 6.0G 1% /dev/shm
/dev/mapper/sil_bgbgdjaddicbp2
64G 38G 23G 63% /home
/dev/sda1 95M 16M 75M 18% /boot
/dev/sda2 19G 142M 19G 1% /var
/dev/sda3 439G 148G 269G 36% /home/l33/Torrents
none 1000M 132K 1000M 1% /tmp
shm 6.0G 584K 6.0G 1% /dev/shm
/dev/sde1 1.8T 1.1T 665G 62% /mnt/Green
and cat /etc/mtab
proc /proc proc rw,nosuid,nodev,noexec,relatime
sys /sys sysfs rw,nosuid,nodev,noexec,relatime
udev /dev devtmpfs rw,nosuid,relatime,size=10240k,nr_inodes=1022975,mode=755
/dev/mapper/sil_bgbgdjaddicbp1 / ext4 rw,noatime,barrier=1,stripe=32,data=ordered
devpts /dev/pts devpts rw 0 0
shm /dev/shm tmpfs rw,nosuid,nodev 0 0
/dev/mapper/sil_bgbgdjaddicbp2 /home ext4 rw,noatime 0 0
/dev/sda1 /boot ext2 rw 0 0
/dev/sda2 /var reiserfs rw,noatime 0 0
/dev/sda3 /home/l33/Torrents ext4 rw,noatime 0 0
none /tmp tmpfs rw,nosuid,nodev,noatime,size=1000M,mode=1777 0 0
shm /dev/shm tmpfs rw,nosuid,nodev,size=6G 0 0
rpc_pipefs /var/lib/nfs/rpc_pipefs rpc_pipefs rw 0 0
nfsd /proc/fs/nfsd nfsd rw,noexec,nosuid,nodev 0 0
/dev/sde1 /mnt/Green ext4 rw 0 0
Also I don't have a /proc/mdstat.  That's only for mdadm RAID setups, right?  It's been quite some time since I've used mdadm so I can't remember.
EDIT:
So I booted into a live Arch USB and entered the grub shell.  I ran:
#grub
grub> root (hd3,0)
Filesystem type is ext2fs, partition type 0x83
grub> setup (hd3)
Checking if "/boot/grub/stage1" exists.....no
Checking if "/grub/stage1 exists.......yes
Checking if "/grub/stage2 exists.......yes
Checking if "/grub/e2fs_stage1_5 exists....yes
Running "embed /grub/e2fs_stage1_5 (hd3)".....25 sectors are embedded.
succeeded
Running "install /grub/stage1 (hd3) (hd3))1+25 p (hd3,0)/grub/stage2 /grub/menu.lst".......succeeded
Done.
Last time I recall more errors than this, then it reporting that one was a non-critical error, so I think the problem may be solved.  More to come.
Last edited by DarksideEE7 (2011-02-13 23:18:44)

Similar Messages

  • TS1702 i've an iphone 3.1.3. sometimes, i have problems opening all the apps i downloaded in the past 4 months. other apps would open but the recent ones will begin to boot and then close itself. once, it persisted for over a week. pls help as am frustrat

    i've an iphone 3.1.3. sometimes, i have problems opening all the apps i downloaded in the past 4 months. other apps would open but the recent ones will begin to boot and then close itself. once, it persisted for over a week. it staarted again this evening, pls help as am frustrated. NB- i checked for apps update but all my apps are up-to-date. CT

    Try the usual steps: restart, reset, restore.
    http://support.apple.com/kb/HT1430
    http://support.apple.com/kb/HT1414
    If restoring using a backup doesn't help, try restoring the iPhone to factory settings and try for a while with just the Apple-included apps, to make sure it's not an issue with a third-party app. If it still has problems, it may have a hardware problem and will need to be sent to Apple.
    Regards.

  • I got an old Apple G5 shell from Goodwill. I'd like to salvage the Superdrive and use it as an external drive for my Apple laptop. Is this possible, and what cables would I need if so?

    I got an old Apple G5 shell from Goodwill. I'd like to salvage the Superdrive and use it as an external drive for my Apple laptop. Is this possible, and what cables would I need if so?
    Other info is available:
    Superdrive MFG date: Sept 2009
    Model: DVR-118LBK DVD-R/RW Writer Unit
    My Macbook is: Mid-2010, running Mavericks
    Thanks in advance, God bless!

    That's a nice Pioneer DVD±RW drive - and an upgraded replacement for the original optical drive that shipped with that G5.  For a finished look, you'd want to install it in an external enclosure for 5.25" IDE/ATAPI drives that converts it to USB connectivity.  Because SATA optical drives have replaced ATAPI drives in recent years, the selection is getting more limited for a new enclosure, although used ones can undoubtedly be found at ebay.  Here's an example of one, although it only features USB connectivity.  You can also find enclosures that have both FireWire and USB connectivity, which for Mac users is beneficial.  Booting the computer (if needed) by a FireWire-connected device is generally more reliable than USB booting.  If this isn't important to you, then a USB-only enclosure would be adequate.  The enclosure will have directions, but essentially all you need to do is plug in the power cable and data ribbon cable and then secure the drive to the bottom plate of the enclosure with the included machine screws.

  • Looking for a rt8139 realmode driver for boot DCA

    I have been able to get jumpstart to work with 3com 3c509 booting from PCI card, but I am unable to find a (realmode driver ) bef file for rt8139 realmode driver for boot DCA? and the /boot/solaris/devicedb/master does not contain a list for one but he rt8139 Realtek rtls0 (RealTek 8139 driver v2.1.1) under soalris 9 and the native one Solaris 10 does not have one ether.

    A Solaris realmode .bef driver for a Realtek 8139 NIC does not
    exist, AFAIK.
    Is that Realtek NIC integrated on the mainboard? Does the
    system bios offer PXE network booting using the Realtek NIC?
    If you do have PXE BIOS network boot support, then it should be
    possible to boot Solaris from the network without a realmode
    NIC driver. Solaris 10 b72 already contains the necessary entry
    for PXE booting using a Realtek NIC:
    % grep Realtek /boot/solaris/devicedb/master
    pci10ec,8139 pci10ec,8139 net pci none "Realtek 8139 Fast Ethernet"

  • M.2 Samsung Drive For Boot?

    Has it been determined what is the best use of this drive on an X99 2011 v3 system? I currently have only cache and previews, and testing it as a source drive for some ingested footage but I notice some are using it as a boot system drive. If a boot drive, should I have page file and previews on it as well? I have other SSDs installed as well as an Areca 1883x Raid controller with 5 Hdds attached for my main storage.

    Alex,
    I have read that the M.2 drive has a read/write speed of over 1 GB per second, ( which is TWICE the SATA III SSD speed), AND, because it is a direct connection to the high speed PCI Gen. 3 lanes, it eliminates the "half-duplex" nature of the SATA III interface, which does not allow reading while writing and vice versa. All this means even lower latency using that drive. If the M.2 drive is used for the OS, programs and Windows page file only, the system may run even "snappier" PLUS the many constant small "read and writes" to the Windows page file will be handled even faster. That drive is so fast that you could also have all previews and cache files assigned there as well...provided its capacity is large enough...with no loss in performance...maybe even a gain.  All else can now be placed on the SSD RAID array. You could experiment assigning the previews and all caches files to that SSD RAID array, along with all your media and project files, to see if there is any performance difference. As each separate volume, ( the M.2 and the RAID) array would now be over 1GB/ sec. EACH in transfer speed....there may be no noticeable difference in performance, as everything is ALREADY running at a high speed and balanced.  With the Areca's ability to provide even FASTER speeds by adding more SSDs, it would seem to make sense to just put EVERYTHING on the RAID array, except the OS,programs, and page file, which would go on the M.2......especially if you were to heavily tax your machine.
        I am sure that running the PPBM7 benchmark test would show any performance difference....you can compare your machine's results there with others to get an idea of how it is performing with PPro.

  • Can I connect a 4 TB USB drive to the airport extreme and use it as a network drive for Time Machine

    Can I connect a 4 TB USB drive to the airport extreme and use it as a network drive for Time Machine

    Yes, if the drive is formatted in Mac OS Extended (Journaled).
    The USB port on the Time Capsule is under powered, so you may need use a powered USB hub with the 4 TB drive...even if it has its own power supply.

  • My Apple id was disabled and had to make a new one for iTunes but it's not letting me erase then re download the app with the new Apple ID

    My Apple id was disabled and had to make a new one for iTunes but it's not letting me erase then re download the app with the new Apple ID   Just got an iPad air 2 so my iCloud and family sharing is with the one that's disabled. Which I don't know how to switch to my new one, so I trying to erase my apps that won't load and just re download them with my new ID that is being used with the iTunes n app store but I can't even find most in purchased plus it's saying that I can't get it cuz that ID is not with family sharing but I donT know why it would not be. Please someone help.

    OOk so I have my new Apple id in my iTunes account but my old Apple ID is the one that is in the iCloud account which is the Apple ID have been using for years and the reason I cannot get it on this abled is because somebody was using my credit card or debit card that was on file for family sharing and it was a stolen iPhone from my account so they had to disable my Apple ID and I could not use my debit card anymore on any Apple ID ever again they said because of it so I can't get it not to be disabled and I can't sign into iTunes with it I already have signed out and signed in with my new Apple ID for iTunes it's just iCloud is not letting me load anything so pretty much what I've been doing is I have to erase every app and then re-dumb going to iTunes and re-download the apps again but the only issue is that I still have a disabled Apple ID as my iCloud settings and my iCloud family sharing in all of that so I'm wondering how or is it possible to change my Apple ID for iCloud specifically because when I go into Icloud and settings and go into my name where my Apple ID is the one that's disabled it doesn't say anything about log out or sign out or anything like that it just says to put the password for it so is there a way to change the Apple ID for my iCloud so that my iTunes in my iCloud is the same Apple ID?

  • Reading terms and conditions page 3 of new account for iTunes Store before I  put in US$ voucher purchased in Zimbabwe. If I'm traveling world wide, willI still be able to access the US services via this same account?

    Reading terms and conditions page 3 of new account for iTunes Store before I  put in US$ voucher purchased in Zimbabwe. If I'm traveling world wide, willI I still be able to access the US services via this same account?

    You can only use the US store if you are in the US with a US billing address on your account - the US store's terms of use (and they will be similar for all countries) :
    The iTunes Service is available to you only in the United States, its territories, and possessions. You agree not to use or attempt to use the iTunes Service from outside these locations. Apple may use technologies to verify your compliance.

  • X301 and Vodafone and AT&T Wireless WAN (HSPA) Driver for Windows 7 (32-bit, 64-bit)

    Ok, I (Lenovo) did it again.
    System Update showed me this update: "Vodafone and AT&T Wireless WAN (HSPA) Driver for Windows 7 (32-bit, 64-bit)".
    As I'm using Vodafone and I had a AT&T driver, I decided to update.
    The result is, that now the GPS doesn't work.
    Yes, I'm in a place where the GPS signal is present (my house, with the previous driver I was able to get 6/7 satellites).
    What happens? Lenovo TV GPS stays there trying to fix the satellites, but nothing happens. I can't recover the system to a previous state, as I updated Flash player too, and Windows only show me the possibility to roll back this update.
    So, apart advicing everyone not to update, I kindky ask:
    - where can I found the previous driver? I searched the web without success...
    - why does Lenovo deploy driver which can cause problems (I just had one updating the BT driver last week! .msi installer problem, error 1935...)?
    Thanks to everyone
    600, R52, T61p, X301

    Ok, I found in the Net the drive 7uw706ww.zip, which is Version 6.1.4.2, while the updated version is 6.1.10.5 (7UW708WW).
    I tried again the GPS, and it wasn't working.
    Anyway, before downgrading, I tried to reinstall the new driver, downloading and installing the .exe instead going through System Update.
    Result: now GPS is working (same place, same conditions, just 5 minutes later)!
    Don't know where the difference is...
    600, R52, T61p, X301

  • I would like to take a iTunes play list and put it on a USB drive for my car radio to stay in my car. Is there a way to do this through iTunes so you have all the song info and there's no number in front of the name of the song? Is there a program?

    I would like to take a iTunes play list and put it on a USB drive for my car radio to stay in my car. Is there a way to do this through iTunes so you have all the song info and there's no number in front of the name of the song? Is there a program?

    iTunes only syncs to Apple devices.
    Assuming the media is not DRM protected, any of the media can be dragged and dropped from iTunes onto other drives (external, flash, etc) as the user chooses.

  • I'm going to be using a borrowed computer, so don't want to make permanent changes to that FF. Is there a way to sync the FF settings and keep them on a thumb drive for temporary use?

    Is there a way to sync the FF settings and keep them on a thumb drive for temporary use? I know you can try to copy the "default" folder in .mozilla, but that usually ends up a mess. The home computer runs on Linux, don't know what the borrowed one will be.

    There's Portable Firefox for Windows - http://portableapps.com/apps/internet/firefox_portable - and another for Macs - http://www.freesmug.org/portableapps/firefox/ - not for Linux, AFAIK.
    Firefox Sync works thru a server, either Mozilla's sync server or a local sync server the user has running on their own LAN. There's no way to sync the data to a thumb drive unless it has a version of Firefox on that thumb drive.
    You didn't mention which "settings" are involved, but you can export your Firefox bookmarks in HTML format to a thumb drive, and view that bookmarks.html file on any web browser on just about any operating system.
    Bookmarks > Show All Bookmarks ''(or Organize Bookmarks for 3.6 and earlier versions)''-> Import & Backup - Export HTML...
    For your other personal data in Firefox, there is no real solution outside of using Firefox.

  • I was told I need to remove the enterprise server account I have and need to add a new one for work but the IT person did not tell me how to do this.  Can anyone help?

    I was told I need to remove the enterprise server account I have and need to add a new one for work but the IT person did not tell me how to do this.  Can anyone help?

        Jennymbell, never fear help is here!
    Have you tried contacting your IT department for assistance? You can visit http://bit.ly/QECbGh for steps on how to enterprise activation.
    Keep me posted if you need further assistance.
    John B
    Follow us on Twitter @VZWSupport

  • What are the pros and cons of a solid state drive for imac?

    What are the pros and cons of a solid state drive for imac?
    I wonder if the SSD is good for replacing a failing hard drive?

    However they are dramatically faster than magnetic disk drives, useful for startup and shutdown and frequently accessed apps and fi.e

  • Hi, i was on 1 i cloud account shared with my family, and now i created a new account for my self is there anyway i can transfer all contacts to my new iCloud account?

    hi, i was on 1 i cloud account shared with my family, and now i created a new account for my self, is there anyway i can transfer or share all contacts from 1 account to another?

    No. All iTunes purchases are forever tied to the account used to make the purchase.

  • [SOLVED] Moving boot, home and var partition post-install

    I've installed my whole Arch on a single 10GB partition because of low disk space. But now that I've gained a lot of disk space, I want to move /boot, /home and /var to separate partitions.
    I'm going to use live CD, so everything will be unmounted.
    home and var:
      I assume it's just a matter of moving files and changing fstab.
    boot:
      I assume, I'll have to move all files to new partition and re-install grub/burg.
    Is there anything more to it?
    Last edited by Camus (2011-12-01 11:37:32)

    You need to edit your fstab file, copy files to the new partitions (check for permissions!), and restore grub(2), see wiki.
    If you do not have custimized Arch, you could do a reinstall, but I'm not responsible for that tip. So be sure to have a backup or something like that.

Maybe you are looking for

  • Can't sync music from iTunes onto my new iPhone 4s

    I got a new iPhone 4s through work and already have 3 iPod touches at home that sync fine on our Win7 laptop with iTunes. When I plug my new phone into my home laptop and try to drag/drop the music over onto my iPhone icon, it just shows a circle wit

  • Purchase pricing error in contract type 0002

    Hiya While creating purchasing side contract i am getting following error No basic purchase price relevant to pricing found with schema RM0000 Message no. WV185 Diagnosis There is no condition record flagged as relevant to pricing in the master condi

  • Why are my images so washed out in pages compared to how they look in Photoshop?

    I am new to Pages. I have some beautiful .jpeg CMYK files I am importing into a Pages template, and they look completely washed out in pages compared to how they look in Photoshop. Is this just a preview mode or will they look this bad if I print the

  • Function key seems to be locked

    My volume and brightness controls used to work by pressing the F1-F5 key, but now I have to press fn+F1-51. If I just press the F1-F5, it does what fn+F1-F5 used to do. I have no idea how to make it go back to the way it was. Can anyone help?

  • Using Lightroom Mobile to sync photos to desktop – proper workflow?

    Just wondering what people suggest as a workflow for importing photos taken on a cameraphone into a Lightroom library. I want the photos to be saved into the same folders on my hard drive that the rest of my photos go into (Pictures > 2014 > 8 > 3 et