SlackwareThis Forum is for the discussion of Slackware 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 fdisked the partitions, so they were the same as the existing drive, only bigger, created filesystems on them and then used dd to copy over the information.
I then swapped the drive cables, booted with a rescue disk, used lilo to put the MBR in place and rebooted.
All is well, a perfect upgrade, well almost.
When I run df the results are from the old drive, which is currently not mounted. Where does df get its information from, can this file be updated.
It's annoying to have df tell me that I have a 40gb drive when dmesg tell me the correct result of 160gb.
The problem is using the dd command to transfer the files. dd will create an exact image of the original partition on the new larger partition but the result will be that linux will see the new partition just like the old partition, i.e dd created a block device on the new partition identical to the old and the extra space will not be detected. The dd created block device lives inside the new partition but cannot access the extra space. See this link for how to use the cp command to copy the files from one partition over to another preserving all permissions/links, etc:
What option did you give to dd command ? I would think it did fill the drive with 0's for remaining
empty space. To duplicate a partition into another partition with different size I would rather use
tool like tar.
The problem is using the dd command to transfer the files. dd will create an exact image of the original partition on the new larger partition but the result will be that linux will see the new partition just like the old partition, i.e dd created a block device on the new partition identical to the old and the extra space will not be detected. The dd created block device lives inside the new partition but cannot access the extra space.
Snip
So I am basically scr***d, with regard to the extra space.
Any suggestions about how to change the block size on the fly, or indeed any suggestions.
What option did you give to dd command ? I would think it did fill the drive with 0's for remaining
empty space. To duplicate a partition into another partition with different size I would rather use
tool like tar.
Your not screwed if you still have your old hd with the data on it. Even if you deleted it, you can copy what you have on your new drive back to the old, delete your partitions on your new drive, repartition and reformat then use the cp command like I indicated in my edited post to transfer the files to your new hard drive. All should be well then.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.