this question might be silly, but i was’nt able to find a solution for my problem yet:
i want to change the hd in my ibm x31 and so i need backup/restore.
i’ve tried:
using the haiku installer and copying the two partitions to external usb-drive
cloning the partitions via my mac, external usb-drive and images
but no luck so far. i’m not able to generate a new, bootable drive
You aren’t getting the MBR by copying partitions manually, you’d probably be better off using the data dumper command:
dd if=/source_drive of=/destination_drive bs=8M
if it works the same in Haiku as it does in Linux… a cursor will blink for a long bit until the duplicating is done. you want to be sure of the drive assignments because if you get them backwards you’ll be blanking your source drive.
and thank you! i think this is what the mac os x disk tools doing under the bonnet, too.
i’m going to try it directly in haiku. but is it working for partititions only, or for complete drives?
i’ve found your link last night and tried this procedure, too.
the strange thing is, that is working with the drive attached as external usb-drive, but not in the internal drive-bay.
i’m afraid the cmos battery is out of order – the x31 can’t hold the date.
it would be a strange coincidence, but perhaps this is the real reason for my fail?
thank you. unfortunately i have no real experiences with bios, mbr and pbr as »native« mac-user –
how to apply this command when i’m not able to boot the partition or drive itself?
this is the point i just did’nt understand in the articles i’ve found so far?
and thank you! i think this is what the mac os x disk tools doing under the bonnet, too.
i’m going to try it directly in haiku. but is it working for partititions only, or for complete drives?
and sorry for asking this silly question, but is the right syntax for copying the 2 internal partititions to the new, external drive?
dd if=/dev/disk/ata/0 of=/dev/disk/usb/0 bs=8M
(have no backup, so it should be safe
Hmm not 100% sure about USB disks (i.e. whether the USB disk would be bootable afterwards?). But in theory, yes. If you want to take a backup though you can just do:
So the newbackup.file is the file to create, and the path for it is just the path to your USB drive. Then restoring goes the other way around, so “if” (which means input file) is set to the newbackupfile.image and “of” (output file) is set to the disk node (replace /dev/disk/ata/0 with whatever disk you are restoring back to).
BTW, I wanted to check you had the right dev node name, but couldn’t find any docs for block device node naming on haiku (I’ve never actually done the above on haiku, only *nix, and don’t have haiku booted to have a look). Perhaps someone can enlighten us? Was also wondering why there are separate “raw” nodes for partitions (or are there for whole disks also) - what is the difference to the other nodes?
and thanks a lot for your detailed help! i’ve spent some hours again, but unfortunately without much luck …
i’m taking the drive out of the usb-housing for booting, but i was able to boot via usb with the original/old drive only
[quote]dd if=/dev/disk/ata/0 of=/some/path/to/usb/newbackupfile.image bs=8M
And then to restore do:
dd if=/path/to/newbackupfile.image of=/dev/disk/ata/0 bs=8M[/quote]
ah, the trick is to go via an image-file? i’ve tried it directly, from disk to disk (like »dd if=/dev/sda of=/dev/sdb« in the linux-world).
with the exception of some kernel panics the copying works well, but the results are different:
finished dd with success, but system crashes on opening the usb-drive afterwards
or finished with success, but the partitions are much smaller after reboot?!
this is exactly my problem, too. there a lot of good articles for different linux-flavors, but i can’t figure out the haiku-syntax for devices?
for example: »df -a« told me there is »/dev/disk/usb/0/0/0« but –
dd: failed to open ‘/dev/disk/usb/0/0/0/haiku.img’: Not a directory
dd: failed to open ‘/dev/disk/usb/0/0/haiku.img’: Read-only file system
dd: failed to open ‘/dev/disk/usb/0/haiku.img’: Read-only file system
dd: failed to open ‘/dev/disk/usb/haiku.img’: Read-only file system
so far the most »successful« way was to use the installer and copy the old to the new partititions – the new drive seems to be perfect, but he can’t boot (bios logo, blank screen, endless loop …)
Ah, for writing to an image you need to mount the disk and put the mount point before the image name, e.g. /usb_disk/haiku.img, instead of /dev/disk/usb/0/0/haiku.img etc.
In terms of doing it using the installer, to make the disk bootable afterwards you just need to run makebootable and/or install the boot manager. For makebootable you just mount the drive and run “makebootable /mountpoint”. For the boot manager, you can find it in /system/apps/bootmanager and use the gui to install it.
… mission accomplished(!) unfortunately i can’t tell exactly which detail helped at the end?
and a big bonus: the beos-partitition is booting, too. (after the last haiku-update only haiku was able to boot …)
so everything’s fine, but i hope i don’t need a new restore soon