Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Look, there is a simple answer to all of this and it was touched upon by the first answer, the dd command.
However, it requires a different set of options. The MBR sits at the head of the disk, it contains Device strings, the partition table and other bits and pieces. Really you'd just want to dd from the old disk to the new disk, skipping the first n bytes (I forget the size of the MBR); not skipping it means the new drive kinda thinks it is the same as the old, right down to versions, makes and so on
You can't reboot because the MBR has gone at this point in what your instructions want you to do, forget the MBR at the moment, all the important stuff is in memory/ known to the kernel, its only on boot that you need it there.
I always use cp -vax because this allows me to use partitions that are not the same size as the original one(s). You may need to reinstall grub from the livecd; sometimes chrooting is required, too.
Look, there is a simple answer to all of this and it was touched upon by the first answer, the dd command.
However, it requires a different set of options. The MBR sits at the head of the disk, it contains Device strings, the partition table and other bits and pieces. Really you'd just want to dd from the old disk to the new disk, skipping the first n bytes (I forget the size of the MBR)...
you quoted a piece of text out of what seems to be some kind of tutorial, but it is not enough info. what i make up if i put two and two together is that this some program that does what you want (possibly clonezilla does this too, but i never used it). i did not know gparted did disk to disk copies, perhaps you can place the link to the rest of the text here so we can see the whole (con)text.
the MBR should be cloned along in the Disk to disk process, system will not boot without it. the other thing i make up is that you should shut down your system when it is all done and then configure the new drive as the master (and only) drive in the system before next boot... but i am only guessing.
edit:
did not realise there were this many replies already..
you quoted a piece of text out of what seems to be some kind of tutorial, but it is not enough info. what i make up if i put two and two together is that this some program that does what you want (possibly clonezilla does this too, but i never used it). i did not know gparted did disk to disk copies, perhaps you can place the link to the rest of the text here so we can see the whole (con)text.
you learn something new every day! gparted copies partitions, i should have known it could do that as i often resized and moved partitions on a single drive, so why not to another..
but anyway, i dont quite understand that last bit at the bottom; they way i see what will happen is that the system will boot of the original master if you dont touch it and it will just see the slave as a 'new' drive in windows. why? because this drive has only been read, not modified! why the author of the tut says 'there is no MBR for the moment' is a riddle to me, after all did it not just make an exact copy of a drive? just try it and see what happens, or does it need MBR separately done?
i know if you have windows on a drive without and MBR or a GRUB that doesn't work, you can boot of a win98 start up floppy and give it the command
fdisk /mbr
and it will make an MBR. but you should not need to do that i think and it has been a while since i have had to do this, that goes back a few years now.
you quoted a piece of text out of what seems to be some kind of tutorial...
There's no mention of the size of the MBR in that Mini-Howto. Lilo takes care of that.
I got the size of the MBR from some notes I have laying around from when I had played around with some third party apps, but I prefer to mount the new disk under, for example /mnt/nd/ and except for some modifications to the cp command, copy everything over.
Using Lilo or Grub is just simpler and more straight-forward IMO.
There's another tutorial HERE on that method, which skips a couple of presumably obvious things like choosing your filesystem, that shows the method for using Grub instead.
I never like to cross adapters on a clone. It may work but you never know. Every once in a while some small issue comes up. Might be a small as cluster size issue or an oddity with packages or who knows. I tend to only clone like hardware. I think it is a good rule.
I'd suggest you install the new drive and put a fresh install on it. That would ensure that you have a known good starting point.
I successfully completed the cloning procedure using gparted and installed the GRUB/MBR.
However, a new problem I'm facing is, that when I boot from the new drive, I am given a GRUB options screen asking me to choose whether I want to startup in normal mode or recovery mode or memtest (snapshot attached) and when I choose any one of the first two, I'm given the error:
Quote:
error: no such device: d361a7de-2cd4-45bb-b8db-9e65d4133c3b
what i am suspecting is the uuid (universally unique identifier) (d361a7de-2cd4-45bb-b8db-9e65d4133c3b) that gets assigned by the OS during initial install, will only work for the drive it originally was given to.
have a look at your grub file and find this uuid code and replace it with whatever drive notation the system has given this number to
change the drive notations for what corresponds with your / partition and try again. hopefully i have the syntax right as i cant really test it so do make a back up of menu.lst first.
I went to /boot/grub but do not see the menu.lst there.
I removed the old drive and booted the pc with the Super Grub LiveCD and from there it successfully booted the Linux installation from the new drive. I then shut down the PC and removed the LiveCD and tried booting again, but again was unsuccessful in booting the PC from the Linux installation in the new drive. I just keep getting the follwoing message:
Code:
error: no such device: d361a7de-2cd4-45bb-b8db-9e65d4133c3b
error: no such device: d361a7de-2cd4-45bb-b8db-9e65d4133c3b
error: no such device: d361a7de-2cd4-45bb-b8db-9e65d4133c3b
Failed to boot default entries.
Press any key to continue...
and it keeps repeting when I "press any key"
This time the GRUB selection screen did not come.
I can use the PC with the new drive if I boot with the help of Super Grub LiveCD and infact am posting this from the new drive.
I can even access the files in the drive which seemed encrypted when accessing them from the old drive, so I guess from here I may be able to make changes to the boot files, which was not possible when I was booting from the old drive and mounting the new drive.
One thing I can't understand is, that the SuperGrub wiki says we SG even has the ability to Fix the Boot of Linux (http://www.supergrubdisk.org/wiki/FixBootOfLinuxOption) but I don't know how to reach there - when I boot off the SuperBrub LiveCD, I get no such screens or options for fixing things.
Also, the fstab in /etc is "read only" - how can one make changes to it?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.