Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
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 found a few threads on this, none of which had my exact problem. I had PCLinux OS on a 50 Gb hard drive and wanted to clone it to a 500 Gb hard drive. I burned a copy of Clonezilla and Parted Magic.
First I tried to clone straight over to the large disk. I got a swap, system and home partition all the same size as my old hard drive. So I had a very large unallocated space. So I pulled out the Parted Magic and tried to format the space and move /home over to it. It looked like the process completed successfully but I couldn't ever mount it. I knew there was a problem with fstab and possibly something wrong by having another partition identified as /home. I tried renaming labels with no result and only made the computer unbootable with my fstab edits. I was going to try to fix it but thought that starting over (and maybe paying attention) would be a better idea. I also wasn't sure how the computer was set up, and when it asked where to install Grub, I said to put it on the MBR.
So back in Clonezilla, I saw there were more than a few other cloning choices, like local partition to local partition, and I knew I should have done this differently from the start (I haven't used these tools before). But my second attempt was to use Parted Magic to make a swap, a "/" partition and a "/home" partition. Then I had Clonezilla move my old system over to it. I saw two problems right away. The first was my dumb choice to put Grub in the MBR. I got a window there first with "linux", "linuxfb", an "linux safe mode," a countdown, and then another linux boot sequence from my "/" partition. I need to remove that from the MBR. The second problem was my old boot sequence, Grub had it as 0,5 from the old machine, and 0,1 is the new location now that I am down to three partitions.
But I saw another problem when I went into Konqueror. When I do "Properties" of either the "/" or "/home," it reports the size from my last hard drive (such as "Free disk space: 5.8 GB out of 11.5 GB where this is now sitting on 20 GB). KdiskFree also agrees with the old settings. The Control Center shows the right brand of disk and the size, and hitting the "config tool" button calls up what looks like a quickie version of GParted, which shows the correct sizes of the drives that I set with Parted Magic.
So for my problem with an extra Grub, I have seen some threads that say to use a DOS disk and use the "fdisk /mbr" command. Other posts indicate that is for putting Windows back if you want to delete Linux. Will that make my problem worse?
I also saw that someone said to get the system to read the right hard drive size, switch the hard drive to 24 bit addressing and then switch back to 48 bit addressing. That looked like it was using a proprietary tool from Dell to do this and I'm not sure if that only apples to problems with Dell only. Anybody know something that will fix the sizing problem?
But I saw another problem when I went into Konqueror. When I do "Properties" of either the "/" or "/home," it reports the size from my last hard drive (such as "Free disk space: 5.8 GB out of 11.5 GB where this is now sitting on 20 GB). KdiskFree also agrees with the old settings. The Control Center shows the right brand of disk and the size, and hitting the "config tool" button calls up what looks like a quickie version of GParted, which shows the correct sizes of the drives that I set with Parted Magic.
That's exactly the result you get when you use partimage or other cloning tools that rely on the dd command under the hood. See my posts on this thread for a further explanation and how to clone to a larger partition using tar:
I'm not that familiar with clonezilla but it is surely using dd to do its imaging. dd based imaging utilities and the raw dd command itself will always give you this result when going from a smaller partition to a larger partition. It's just the way dd was designed.
I went to the Parted Magic website and between here and there I saw a few different posts with varied results. Some people said I could never fix this, and a few people said they resized their partitions and then found that the right size was reported. So as a test, I used Parted Magic and took 256 Mb off of the "/home" partition and booted back into PCLinuxOS. It saw the new size, so I went back in and put the 256 Mb back. I took 10 Mb off of the "/" partition and sure enough, the Linux installation saw that partition correctly after the next boot. So I went back in, put the 10 Mb back (just to keep things clean), and I just got back in the OS, re-checked the sizes, and I have my 3 partitions, and everything is reading the correct sizes.
I wouldn't have thought something that simple would provide a fix, but I am happy. I have run through crazy things like that in Windows (and worse) before, so I don't think any less of Linux or Parted Magic because of this workaround!!!! Me happy!
resizing your drive forces an OS to recheck the fs on first boot after resize. your clone most likely had the 'old' or original fs allocation table still there. which eventually (I think ext3 force checks every 30 mounts) would have been detected by fschk and most likely rectified.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.