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.
I have a partitioned HDD with Linux Satanic on it. I want to copy that partition to another HDD and make it bootable. I have tried Partition Magic and it don't recognise the Linux ext3 (what ever that is) for it to copy, ghost or what ever you call it. Also there is another Linux partition called Swap. It is only small but what does it do? Is it part of the main Linux partition? Do i have to copy that as well? What other programs can i use to do this please? Thanx in advance.
I have a partitioned HDD with Linux Satanic on it. I want to copy that partition to another HDD and make it bootable. I have tried Partition Magic and it don't recognise the Linux ext3 (what ever that is) for it to copy, ghost or what ever you call it. Also there is another Linux partition called Swap. It is only small but what does it do? Is it part of the main Linux partition? Do i have to copy that as well? What other programs can i use to do this please? Thanx in advance.
It would be easier to just install it.
It is possible to copy it, but it will require getting your hands dirty. You need to boot linux (a livecd will do), mount the original partition, format and mount the distination partition, then copy everything (preserving permissions, i.e. with cp -a) and then you will need to properly setup the bootloader. If you aready have a bootloader (you must have one if you are able to boot your original linux partition) then you probably just need to edit the /boot/grub/menu.lst or grub.conf file to add the new partition to the list of bootable ones.
If you plan to replace one disk with the other the thing change because you need to install the bootloader on the second drive.
You also need to setup your /etc/fstab file probably, depending on your layout.
If you decide to do this and you need more info just ask.
By the way, the swap partition is like the swap file in windows. It's used to page stuff to disk when your ram is full.
Being all that said, try to tell us why do you want to do this and why installing on the new disk from scratch is not an option.
It is possible to copy it, but it will require getting your hands dirty. You need to boot linux (a livecd will do), mount the original partition, format and mount the distination partition, then copy everything (preserving permissions, i.e. with cp -a) and then you will need to properly setup the bootloader. If you aready have a bootloader (you must have one if you are able to boot your original linux partition) then you probably just need to edit the /boot/grub/menu.lst or grub.conf file to add the new partition to the list of bootable ones.
If you plan to replace one disk with the other the thing change because you need to install the bootloader on the second drive.
You also need to setup your /etc/fstab file probably, depending on your layout.
If you decide to do this and you need more info just ask.
By the way, the swap partition is like the swap file in windows. It's used to page stuff to disk when your ram is full.
Being all that said, try to tell us why do you want to do this and why installing on the new disk from scratch is not an option.
Im tryimg to do this so i have one HDD for Windows Xp, 7 32 and 7 64 and one HDD dedicated to Ubuntu. Yea that bootloader thing can be a real problem. Still trying to work it out and if all else fails, knowing me it probaly will ill do a fresh install of Ubuntu as suggested. One other thing, Ubuntu fits on a 700mb cd yet it took up near on 20 gig of HDD space, (thats what it said in Partition Magic). Why is this? Thnax
Im tryimg to do this so i have one HDD for Windows Xp, 7 32 and 7 64 and one HDD dedicated to Ubuntu. Yea that bootloader thing can be a real problem. Still trying to work it out and if all else fails, knowing me it probaly will ill do a fresh install of Ubuntu as suggested.
Judging by your post I assume that your experience with linux is very limited. No offense intended at all.
So I'd emphasize again the suggestion of reinstalling. Toying with partitions and bootloaders can be left for a later stage because at times it can be a bit confussing, overall when you don't even know the basics about partitions and disk layout in linux (though you obviously have at least the needed knowledge to use partition magic, which is a good starting point).
If you still want to try to do it the hard way I will provide all the assitance that I can. But unless it's for learning purposes I don't think it's worth all the trouble. Reinstalling should take minutes at most, and it is way easier.
Quote:
One other thing, Ubuntu fits on a 700mb cd yet it took up near on 20 gig of HDD space, (thats what it said in Partition Magic). Why is this? Thnax
I am assuming that you are talking about the size of the partition. That is not the space that ubuntu takes. It's just the size of the container, that doesn't means it's all full. Windows can't see the free space inside that partition simply because windows can't deal with the linux fs natively (though certainly there are workarounds to overcome that as well).
If partition magic can see inside the linux partition (which I don't know) then it might be also be able to tell you if there's free space inside that partition. But only if it supports that type of partition.
Judging by your post I assume that your experience with linux is very limited. No offense intended at all.
So I'd emphasize again the suggestion of reinstalling. Toying with partitions and bootloaders can be left for a later stage because at times it can be a bit confussing, overall when you don't even know the basics about partitions and disk layout in linux (though you obviously have at least the needed knowledge to use partition magic, which is a good starting point).
If you still want to try to do it the hard way I will provide all the assitance that I can. But unless it's for learning purposes I don't think it's worth all the trouble. Reinstalling should take minutes at most, and it is way easier.
I am assuming that you are talking about the size of the partition. That is not the space that ubuntu takes. It's just the size of the container, that doesn't means it's all full. Windows can't see the free space inside that partition simply because windows can't deal with the linux fs natively (though certainly there are workarounds to overcome that as well).
If partition magic can see inside the linux partition (which I don't know) then it might be also be able to tell you if there's free space inside that partition. But only if it supports that type of partition.
Thank you for your reply and no, not offended. You have explained so much about what i needed to know. After messing around with it for a while, with no luck i feel it may be best to do your suggestion of a reinstall. So i will. All this ghosting, bootloader, virtual windows and all the other cool and exciting stuuf is new to me. But it is a learning curve. I guess once i get my head around it, it will be like breathing. The only dump question, is one that isnt asked. Very happy with your reply. Thanks once again.
Thank you for your reply and no, not offended. You have explained so much about what i needed to know. After messing around with it for a while, with no luck i feel it may be best to do your suggestion of a reinstall. So i will. All this ghosting, bootloader, virtual windows and all the other cool and exciting stuuf is new to me. But it is a learning curve. I guess once i get my head around it, it will be like breathing. The only dump question, is one that isnt asked. Very happy with your reply. Thanks once again.
I hope you find your way around.
Linux as any new thing can be a bit hard to learn at the beginning, but you will surely find some satisfaction in it once you have learned a bit about the basics. Luck on your new quest and regards.
If you really wanna make a raw copy of the disk and put it on another disc or just have a backup i gotat recommend Acronis True image.
It works great with ext3 partitions.
# warning: this is very destructive, make sure you are overwriting the correct device.
I usually disregard giving this kind of advice to a newcomer. This will effectively copy byte-by-byte a given block device (sda1) into another block device (sda2). There are a number of things to consider.
The first two are evident:
As you said, you need to know how to correctly identify partitions, if you overwrite the wrong one there's no need to tell what will happen.
In a similar fashion, guess what happens if the devices are not exactly of the same size. dd makes a raw copy, which means it bypasses the file system. It copies the whole partition it doesn't matter whether it's empty. dd doesn't know what's inside the partition. It just reads bytes from point A to point B and dumps them into another partition. If the destination is smaller then not everything will be copied (and in addition your partitions won't have a valid ending, and will have an incorrect size). That means you can lose data. If the destination is bigger then everything will be ok. But you will lose storage capacity which will be unaccessible.
There are others:
If your partition is mostly empty you are stressing your disk unnecessarily because you will be copying mostly empty space which is meaningless.
This just copies the partitions, but he will still have to deal with the boot loader and the /etc/fstab file in the new partition. For this you also need to know what the layout of your disks in linux is, and how they are called. And if using grub then you need to translate them into grub syntax, which is different of the linux one.
...[*]This just copies the partitions, but he will still have to deal with the boot loader and the /etc/fstab file in the new partition. For this you also need to know what the layout of your disks in linux is, and how they are called. And if using grub then you need to translate them into grub syntax, which is different of the linux one.[/LIST]
i understand what you said about everything else but would this alleviate the problem quoted above:
That would copy an entire disk into another. The same things I said above applies. You are going to have problems unless both disks are of identical size.
About fstab and grub.conf, the same things apply as well.
For example, assuming you have two disks (hda and sdb) you would need to change hd0 by hd1 on grub.conf. You would also need to adjust the kernel lines and substitute root=/dev/hda1 (or a similar thing depending again on your layout) by root=/dev/sdb1 or whatever fits in.
In fstab you would need to adjust ALL your partitions so they refer to the correct place for sdb instead of hda. This all assuming that your two disks are named that way.
Some of these problems can be alleviated by using a shared /boot partition for both oses. But of course you need to know how to deal with that, since both OSes will in principle assume that /boot belongs to them alone and can conflict with each other.
That is, unless he just want to transfer the OS to a second hd, and then remove the first hd and substitute it with the second. In which case it *should* work without any tinkering. But it all depends on the disks and how you configure and attach them to the motherboard, as well as a couple of kernel settings in some cases.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.