Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then 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.
We have some very old qnx systems that we fix by basically dd image to new drives. The original partition was only 240mb. As time goes on we can't get 240mb drives so the image keeps getting larger. We now have 32G drives and the image just takes forever.
In qemu I can play with the raw image just as if it were a real drive with the exception of using the old qnx_drive_clone script. Dunno why that never works.
How can I take one of the images and grab the 240mb partition out to a smaller drive image or change the drive image parameters to a smaller drive and cut out the extra space?
I know this isn't linux directly but the concepts of drive management on image should be the same.
Instead of 'dd' why not use parted, clonezilla or some partition tool to copy the 240MB image to another partition of the same size on the new drive. Look at: List of disk cloning software 'This list of software works with Windows, Mac, and Linux (or can be used from a Live CD).
SystemRescueCd is a Linux system on a bootable CD-ROM for repairing your system and recovering your data after a crash. It aims to provide an easy way to carry out admin tasks on your computer, such as creating and editing the partitions of the hard disk. It contains a lot of system utilities (parted, partimage, fstools, ...) and basic tools (editors, midnight commander, network tools). + 'Online-Manual
All those tools need to be able to write to a QNX4 format and unless I am wrong, they won't. I did try gparted and it thinks it is a fat partition and creates the new partition but fails on write.
Make a 250 Meg target partition (just to be safe), and just "dd" that amount (using count).
Should get you the filesystem, plus a bit of slack in that partition, but in future just copy that (new) partition - after preallocating a 250 Meg partition of course.
Still driving me nuts. Tried bs=240M count=1 and many other ways of calculation but it must be some issue with QNX. Good news is it seems to fail mostly with same results. I have an old original image and I guess I can rebuild it with the correct files maybe.
QNX had a script that seems like it should have worked and some other forum posts had similar ways to us cp or cat but the all fail too.
I might go back the the manipulation of the drive parameters.
Wonder if qemu has anything to do with the thing failing?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.